The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Is it possible to add new smilies to snitz forums? If so is it easy?
Paul Fletcher<
Paul Fletcher<
Posted
Posted
Thanks for that it works fine, but can I make it so that it will come up with a little shortcut thing instead of [img] image path [/img']. The ' is there so no image would try and come up. So the short cut would be like :) but with in [] like the other ones. I have found a huge list of the smilies in the inc_functions.asp file but I was not sure if I could add them there without the whole thing just falling to pieces.
Can you help?
Paul<
Can you help?
Paul<
Posted
That's what I did, demon9k and it's working just fine.
There are two places that reference smilie files in inc_functions.asp. Just copy and paste the existing lines, replacing the image links with the names of the new smilie files and the [] shortcut with what you want to use (don't forget that if you use letters in the shortcut, you need separate lines for the uppercase and lowercase versions). Here's the two I inserted, (I marked the changed parts in red):
fString= replace(fString, "<img src=icon_smile_rotflmao.gif border=0 align=middle>", "[r]", 1, -1, 1)
fString = replace(fString, "[r]", "<img src=icon_smile_rotflmao.gif border=0 align=middle>")
Oh, and don't forget to upload the new smilie files!
<
Posted
quote:
(don't forget that if you use letters in the shortcut, you need separate lines for the uppercase and lowercase versions)fString = replace(fString, "[r]", "<img src=icon_smile_rotflmao.gif border=0 align=middle>")
you'd also need
fString = replace(fString, "[R]", "<img src=icon_smile_rotflmao.gif border=0 align=middle>")
RDoGG™<
Posted
Sorry that I dig such an old topic, but I wonder how does the same thing works in version 3.4? (Replacing strings for pictures)<
Posted
Just do the following:
inc_iconfiles.asp find this code (approx. line 152):
add this code right after it:
icon.gif: file name of the image
ww: image width
hh: image height
example:
inc_func_common.asp find this code (approx. line 166)
add this code after it:
example:
(I've taken the example from the posts above) <
inc_iconfiles.asp find this code (approx. line 152):
Code:
Const strIconYahoo = "icon_yahoo.gif|16|15"Code:
Const strIconYourIcon = "icon.gif|ww|hh"ww: image width
hh: image height
example:
Code:
Const strIconRotflmao = "icon_rotflmao.gif|15|15"inc_func_common.asp find this code (approx. line 166)
Code:
function Smile(fString)Code:
fString = replace(fString, "[YourCode]", getCurrentIcon(strIconYourIcon,"","align=""middle"""))example:
Code:
fString = replace(fString, "[r]", getCurrentIcon(strIconRotflmao,"","align=""middle"""))(I've taken the example from the posts above) <
Posted
Tnx =)<
Posted
You're welcome
<
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...