New Icons - نوشته شده در (1789 Views)
Starting Member
demon9k
مطلب: 3
3
Is it possible to add new smilies to snitz forums? If so is it easy?
Paul Fletcher<
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Junior Member
Ez4arab
مطلب: 479
479
there is MOD for smile you can hit this link
click here
enjoy


<
نوشته شده در
Starting Member
demon9k
مطلب: 3
3
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<
نوشته شده در
New Member
fpgal
مطلب: 93
93

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! smile

<
نوشته شده در
Junior Member
RDoGG™
مطلب: 329
329
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™<
نوشته شده در
Starting Member
Ross
مطلب: 4
4
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)<
نوشته شده در
Dev. Team Member & Support Moderator
OneWayMule
مطلب: 4969
4969
Just do the following:

inc_iconfiles.asp find this code (approx. line 152):
Code:
Const strIconYahoo = "icon_yahoo.gif|16|15"
add this code right after it:
Code:
Const strIconYourIcon = "icon.gif|ww|hh"
icon.gif: file name of the image
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)
add this code after it:
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) <
نوشته شده در
Starting Member
Ross
مطلب: 4
4
Tnx =)<
نوشته شده در
 
شما باید یک متن وارد کنید