Author |
Topic |
work mule
Senior Member
USA
1358 Posts |
Posted - 06 October 2003 : 03:13:26
|
Still in the process of adding this mod and it's looking good.
While I was adding this to inc_func_common.asp, in the smile() function, I was thinking it might be good if the array of smilies could be cached in the Application object vs. executing a SQL statement each time.
Anyways, here's how I modified the inc_func_common.asp file.
GetSmilieArray() executes the SQL statement and stores it in the Application object. Whenever it's called, it'll check the timestamp and if it's still under 60 minutes, it'll pull it out of the Application object instead of the database.
function Smile(fString)
if fString = "" or IsNull(fString) then exit function
dim numrows, smi
smiledata=GetSmilieArray()
If IsArray(smiledata) Then
numrows=ubound(smiledata,2)
for smi = 0 to numrows
fString = replace(fString, smiledata(0,smi), getCurrentIcon(smiledata(1,smi) & "||","","align=""middle"""))
next
End If
Smile = fString
end function
Function GetSmilieArray()
Dim arrTemp, datLastUpdate, intRefresh
intRefresh = 0
datLastUpdate = Application(strCookieURL & "Smilies_LastUpdate")
If IsDate(datLastUpdate) Then
If (DateDiff("n",datLastUpdate,now()) > 60) Then intRefresh = 1
Else
intRefresh = 1
End If
If intRefresh = 0 Then arrTemp = Application(strCookieURL & "Smilies") 'if no refresh is needed, get array
If IsArray(arrTemp) AND (intRefresh = 0) Then
'do nothing...
Else
Dim smilesql
smilesql = "SELECT S_CODE, S_URL FROM " & strTablePrefix & "SMILES ORDER BY S_DESC"
set SMrs = my_conn.execute(smilesql)
if not(SMrs.eof) then
arrTemp=SMrs.getrows
SMrs.close
set SMrs = nothing
Application.Lock
Application(strCookieURL & "Smilies") = arrTemp
Application(strCookieURL & "Smilies_LastUpdate") = now()
Application.UnLock
else
SMrs.close
set SMrs = nothing
end if
End If
GetSmilieArray = arrTemp
End Function
|
Edited by - work mule on 06 October 2003 03:20:06 |
|
|
Blue-7
Starting Member
3 Posts |
Posted - 04 November 2003 : 22:44:25
|
help, please! I'm new, so don't think me dumb for this
here is my problem Microsoft JET Database Engine error '80040e37' The Microsoft Jet database engine cannot find the input table or query 'FORUM_SMILES2'. Make sure it exists and that its name is spelled correctly.
/uchat/admin_smiles.asp, line 160
what did i do wrong, and how can i fix this????
when you try to post a reply is say's this (and you can NOT reply, so my foum is all broke now )
Message:
Smilies Microsoft JET Database Engine error '80040e37' The Microsoft Jet database engine cannot find the input table or query 'FORUM_SMILES2'. Make sure it exists and that its name is spelled correctly.
/uchat/inc_smilies.asp, line 62
http://www.bluerealimage.com/uchat/post.asp?method=Reply&TOPIC_ID=5&FORUM_ID=3
|
Edited by - Blue-7 on 04 November 2003 23:20:52 |
|
|
Blue-7
Starting Member
3 Posts |
Posted - 06 November 2003 : 15:21:44
|
Ok, forget my LAST problem with this Mod, i have a NEW one (i fixed the other one). NONE of my features work in the post.asp function. You can't do bold,italic, preview your post, nada! Can ANYone help here?? Please *begging*
Thanks Blue
edit....is there any way to contact the person who created this directly instead of waiting on a reply...i can't add new members into my private forums now either! This is a real problem :( |
Edited by - Blue-7 on 06 November 2003 19:34:34 |
|
|
ianswe
Starting Member
6 Posts |
Posted - 07 November 2003 : 18:16:17
|
hey, i have the same problem as you did in your 2nd last post. If you could tell me how you fixed it that would be great!
Thanks Ian |
|
|
Blue-7
Starting Member
3 Posts |
Posted - 09 November 2003 : 23:17:50
|
to be honest, i just stared all over. i placed all my original .asp's back in and then started over again, and it worked fine the second time.
I still need to fix this other problem
A friend of mine used this mod, which is how i got the link to get this mod here...and they said they didn't realize that there was two 'setups' when you are in the admin function....they didn't read the instructions very clearly. Maybe that's what you missed? Not sure, but just thought i would toss that out there :)
Blue |
|
|
zin
Starting Member
12 Posts |
Posted - 12 November 2003 : 16:44:32
|
This was asked a few months ago now but can someone supply us with the code to add the smilies to the quick reply box as well?
Thanks. |
|
|
spikette
Starting Member
1 Posts |
Posted - 13 November 2003 : 02:37:39
|
Thanks for this fun mod. Installation was easy, no problems. Spike |
|
|
acoustika
Junior Member
Denmark
311 Posts |
Posted - 14 November 2003 : 20:19:03
|
Hey there, I'm still having a hard time making this MOD work properly, anyone who can help. I have Installed it at least 5 times now, and everytime it's the same, it all works except the size of the smilies on the post page. It's very annoying because this is just plain and simple a superMOD and I would love to make it work.
I have another topic her on snitz, from where you can see my forum and there is also links to post.txt and inc_smilies.txt, please help.
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=49087
Thought I would mention
I HAVE FIXED IT
it what because I had deleted the include line to message Icon MOD on the post page.
maybe it should be mentioned in the read me, because IF you have message Icon mod installed and Am a newbee you could easily delete that line if you follow the steps 100%. |
May The Code Be With You www.UniqueDk.dk *** The Open Forums of Denmark *** |
Edited by - acoustika on 19 November 2003 19:23:38 |
|
|
techknow
Junior Member
USA
149 Posts |
Posted - 02 December 2003 : 20:32:17
|
I implemented this mod... I followed the directions BUT when I was done there is no link in the admin section that will allow me to administer the smilies... Any ideas? The forum is located at http://justoneguy.com/board/default.asp
Thanks in advance! |
Best Regards, Techknow http://myinternetfunnies.com |
|
|
8-Ball
Starting Member
Netherlands
4 Posts |
Posted - 10 December 2003 : 09:04:49
|
Hi all, i'm a newbie at this and want to know if i can use it on version 3.4.03
And if so , what is the best way to do it,
greetz: 8-Ball
www.brutalchaos.com/forum
|
|
|
8-Ball
Starting Member
Netherlands
4 Posts |
Posted - 15 December 2003 : 02:43:03
|
|
Edited by - 8-Ball on 15 December 2003 02:43:55 |
|
|
agrecojr
Starting Member
6 Posts |
Posted - 08 January 2004 : 19:44:21
|
For the most part everything installed fine. I have a couple of mods running including Polls. The probelm is after installing this my table got whacked out and I can't figure out what to do to fix it, any thoughts? I his the smiley table and still nothing
|
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
Aaron S.
Average Member
USA
985 Posts |
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 22 April 2004 : 15:31:06
|
Of course it isn't. It was taking so long to generate pages that the function was removed and replaced by the original one. |
Erick Snowmobile Fanatics
|
|
|
Topic |
|