| Author |
Topic Search Topic Options
|
justme
Groupie
Joined: 06 January 2006
Status: Offline
Points: 53
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
gölge
Groupie
Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
T50webmaster
Groupie
Joined: 28 December 2006
Status: Offline
Points: 52
|
Post Options
Thanks(0)
Quote Reply
Posted: 17 January 2007 at 2:53am |
|
|
 |
T50webmaster
Groupie
Joined: 28 December 2006
Status: Offline
Points: 52
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
PhTor
Newbie
Joined: 25 June 2005
Location: Switzerland
Status: Offline
Points: 7
|
Post Options
Thanks(0)
Quote Reply
Posted: 26 February 2007 at 9:57am |
justme wrote:
[...] |
I've just made all of this but I've got two problems 
- 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 
|
 |
gölge
Groupie
Joined: 16 April 2005
Location: Turkey
Status: Offline
Points: 182
|
Post Options
Thanks(0)
Quote Reply
Posted: 27 February 2007 at 6:15pm |
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.
|
 |
T50webmaster
Groupie
Joined: 28 December 2006
Status: Offline
Points: 52
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
T50webmaster
Groupie
Joined: 28 December 2006
Status: Offline
Points: 52
|
Post Options
Thanks(0)
Quote Reply
Posted: 27 February 2007 at 10:43pm |
could it be my webhost?
i use webng.com
|
 |