Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Smiley Mod
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Smiley Mod

 Post Reply Post Reply Page  12>
Author
justme View Drop Down
Groupie
Groupie


Joined: 06 January 2006
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote justme Quote  Post ReplyReply Direct Link To This Post Topic: Smiley Mod
    Posted: 09 November 2006 at 9:13pm
SMILEY MOD:
 Credit goes to original author:
 

Open the 'includes/emoticons_inc.asp' file in notepad (or similer) and find the line...
'Dimension variablesDim saryEmoticons(38,3)

increase the first number (shown in red) by one per smiley you add.
Adding smiley's is a s simple as uploading them into the 'smileys' folder and increasing the number as shown above...
Then, still in the 'emoticons_inc.asp' file you will see a bunch of code for each smiley that defines the name, short cut and path. that looks like....
 

saryEmoticons(38,1) = "Lamp"
saryEmoticons(38,2) = ""
saryEmoticons(38,3) = "smileys/smiley38.gif"


Add 3 new line for each new smiley, for instance...


saryEmoticons(39,1) = "nod"
saryEmoticons(39,2) = "|-)"
saryEmoticons(39,3) = "smileys/smiley39.gif"

Note how the number in red has been increased??? Well increase it for every added smiley


Edited by justme - 09 November 2006 at 9:14pm
Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2006 at 4:18pm
hey man you do not have to add smileys manually, you can use that code:
 
<%Dim objsmileyFSO, objFolderObject,  objFile
 ' Variables to build the smiley list
 Dim strSmileyNameText
 Dim strSmileySrcText
Set objsmileyFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolderObject = objsmileyFSO.GetFolder(Server.MapPath("avatars/"))
Set files = objFolderObject.Files
 dim intTotalNumberOfFiles, saryEmoticons()
 redim saryEmoticons(intTotalNumberOfFiles,3)
' SetUp a counter to loop through
Dim intEmoticonCounter
intEmoticonCounter = 0
For Each file in files
   intEmoticonCounter = intEmoticonCounter + 1
  strSmileyNameText = left(objFile.Name, len(objFile.Name)-4)
  strSmileySrcText = "smileys/" & objFile.Name
  

 ' This will place the smileys into the array: 
 saryEmoticons(intEmoticonCounter,1) = strSmileyNameText               'Emoticon Name
 saryEmoticons(intEmoticonCounter,2) = "[:" & strSmileyNameText & ":]" 'Forum code
 saryEmoticons(intEmoticonCounter,3) = strSmileySrcText                'URL/path to smiley
Next
Set objFolderObject = Nothing
Set objsmileyFSO = Nothing
Set files = Nothing
%>


Edited by gölge - 27 February 2007 at 6:16pm
"A lie travels round the world while Truth is putting on her boots" C.H. Sturgeon
PLEASE VISIT www.tallarmeniantale.com AND SEE THE TRUTH.
Back to Top
T50webmaster View Drop Down
Groupie
Groupie


Joined: 28 December 2006
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote T50webmaster Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2007 at 2:53am
This doesn't work for me
Back to Top
T50webmaster View Drop Down
Groupie
Groupie


Joined: 28 December 2006
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote T50webmaster Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2007 at 2:27am

I get:

 

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/troop50/data/forum/includes/emoticons_inc.asp, line 8

800401f3

Back to Top
PhTor View Drop Down
Newbie
Newbie


Joined: 25 June 2005
Location: Switzerland
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhTor Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2007 at 9:57am
Originally posted by justme justme wrote:

[...]
 
I've just made all of this but I've got two problems Confused
 
- if the user clic on the smiley, it runs fine, but if he write the short cut, it doesn't, it is displayed the place of the image and after the path to it
- when the user clic on "more..." to have the popup with all smileys, this windows is too small
 
Any ideas ?
 
ps : sorry for my poor english Wink
Back to Top
gölge View Drop Down
Groupie
Groupie


Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
Post Options Post Options   Thanks (0) Thanks(0)   Quote gölge Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2007 at 6:15pm
Originally posted by T50webmaster T50webmaster wrote:

I get:

 

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/troop50/data/forum/includes/emoticons_inc.asp, line 8

800401f3

 
try this:
 
<%Dim objsmileyFSO, objFolderObject,  objFile
 ' Variables to build the smiley list
 Dim strSmileyNameText
 Dim strSmileySrcText
Set objsmileyFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolderObject = objsmileyFSO.GetFolder(Server.MapPath("avatars/"))
Set files = objFolderObject.Files
 dim intTotalNumberOfFiles, saryEmoticons()
 redim saryEmoticons(intTotalNumberOfFiles,3)
' SetUp a counter to loop through
Dim intEmoticonCounter
intEmoticonCounter = 0
For Each file in files
   intEmoticonCounter = intEmoticonCounter + 1
  strSmileyNameText = left(objFile.Name, len(objFile.Name)-4)
  strSmileySrcText = "smileys/" & objFile.Name
  

 ' This will place the smileys into the array: 
 saryEmoticons(intEmoticonCounter,1) = strSmileyNameText               'Emoticon Name
 saryEmoticons(intEmoticonCounter,2) = "[:" & strSmileyNameText & ":]" 'Forum code
 saryEmoticons(intEmoticonCounter,3) = strSmileySrcText                'URL/path to smiley
Next
Set objFolderObject = Nothing
Set objsmileyFSO = Nothing
Set files = Nothing
%>
"A lie travels round the world while Truth is putting on her boots" C.H. Sturgeon
PLEASE VISIT www.tallarmeniantale.com AND SEE THE TRUTH.
Back to Top
T50webmaster View Drop Down
Groupie
Groupie


Joined: 28 December 2006
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote T50webmaster Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2007 at 10:43pm
still not working
 

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/troop50/data/forum/includes/emoticons_inc.asp, line 5

800401f3

Back to Top
T50webmaster View Drop Down
Groupie
Groupie


Joined: 28 December 2006
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote T50webmaster Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2007 at 10:43pm
could it be my webhost?
i use webng.com
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.