Author Topic: New Smileys for Your Forum  (Read 4040 times)

0 Members and 0 Guests are viewing this topic.

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 29
  • Gender: Male
    • View Profile
New Smileys for Your Forum
« on: July 18, 2010, 11:46:18 pm »
I DID NOT CREATE THIS CODE. I JUST MODIFIED IT WITH THE SMILEY LINKS FOR CONVENIENCE.



Use the code below. Go to Admin CP > Style Manager

This code utilizes jQuery, please use the latest version found in this thread: http://support.createaforum.com/5/jquery-v1-8-update/

FOOTERS:
Code: [Select]
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
function swap_img(){
var forumurl = "YOURFORUMNAME";
var img_b = new Array();
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/smiley.gif" , "http://smfsupport.com/support/Smileys/smfnew/smiley.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/wink.gif" , "http://smfsupport.com/support/Smileys/smfnew/wink.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/cheesy.gif" , "http://smfsupport.com/support/Smileys/smfnew/cheesy.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/grin.gif" , "http://smfsupport.com/support/Smileys/smfnew/grin.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/angry.gif" , "http://smfsupport.com/support/Smileys/smfnew/angry.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/sad.gif" , "http://smfsupport.com/support/Smileys/smfnew/sad.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/shocked.gif" , "http://smfsupport.com/support/Smileys/smfnew/shocked.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/cool.gif" , "http://smfsupport.com/support/Smileys/smfnew/cool.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/huh.gif" , "http://smfsupport.com/support/Smileys/smfnew/huh.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/rolleyes.gif" , "http://smfsupport.com/support/Smileys/smfnew/rolleyes.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/tongue.gif" , "http://smfsupport.com/support/Smileys/smfnew/tongue.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/lipsrsealed.gif" , "http://smfsupport.com/support/Smileys/smfnew/lipsrsealed.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/undecided.gif" , "http://smfsupport.com/support/Smileys/smfnew/undecided.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/kiss.gif" , "http://smfsupport.com/support/Smileys/smfnew/kiss.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/cry.gif" , "http://smfsupport.com/support/Smileys/smfnew/cry.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl + ".createaforum.com/Smileys/default/embarrassed.gif" , "http://support.createaforum.com/Smileys/smfnew/embarrassed.gif" ]


var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>

Replace the "YOURFORUMNAME" with the name of your forum.
« Last Edit: November 06, 2012, 02:38:02 am by xboi209 »
<--- Donate to CreateAForum! :D

Jeremiah 33:3

Share on Facebook Share on Twitter


Offline Alex

  • CAF Support Team
  • Full Member
  • ***
  • Posts: 235
  • Karma: 12
  • Gender: Male
  • Location: Greenville, North Carolina
    • View Profile
Re: New Smileys for Your Forum
« Reply #1 on: July 19, 2010, 01:13:18 am »
Edited to change the name of the forum. ;)
Terms Of Service

Please don't PM me with support questions

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 29
  • Gender: Male
    • View Profile
Re: New Smileys for Your Forum
« Reply #2 on: July 19, 2010, 01:24:58 am »
Edited to change the name of the forum. ;)

....why?

You could've just put "support" there..... then they wouldn't have to edit anything. It's all the same image.

Wasn't trying to advertise or anything.
<--- Donate to CreateAForum! :D

Jeremiah 33:3

Offline Alex

  • CAF Support Team
  • Full Member
  • ***
  • Posts: 235
  • Karma: 12
  • Gender: Male
  • Location: Greenville, North Carolina
    • View Profile
Re: New Smileys for Your Forum
« Reply #3 on: July 19, 2010, 01:27:16 am »
No. I edited it out, because the way that the code works is that it will change the image display for one site. So the code you put up would only change the image output on your forum, not on other forums.
Terms Of Service

Please don't PM me with support questions

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 29
  • Gender: Male
    • View Profile
Re: New Smileys for Your Forum
« Reply #4 on: July 19, 2010, 01:28:27 am »
No. I edited it out, because the way that the code works is that it will change the image display for one site. So the code you put up would only change the image output on your forum, not on other forums.

I realized that as soon as I posted my last message. Sorry.
<--- Donate to CreateAForum! :D

Jeremiah 33:3

Offline Alex

  • CAF Support Team
  • Full Member
  • ***
  • Posts: 235
  • Karma: 12
  • Gender: Male
  • Location: Greenville, North Carolina
    • View Profile
Re: New Smileys for Your Forum
« Reply #5 on: July 19, 2010, 01:31:00 am »
Not a problem. I wasn't mad at you or anything. I just fixed it up. Thanks for posting that. It helps a lot. Just put it on my forum. :)

I "applauded" you. :D
Terms Of Service

Please don't PM me with support questions

Offline Seldom Fail

  • Global Moderator
  • *****
  • Posts: 207
  • Karma: 29
  • Gender: Male
    • View Profile
Re: New Smileys for Your Forum
« Reply #6 on: July 19, 2010, 01:42:48 am »
Not a problem. I wasn't mad at you or anything. I just fixed it up. Thanks for posting that. It helps a lot. Just put it on my forum. :)

I "applauded" you. :D

I felt like someone was applauding me. Maybe that's why I was having uncontrollable spasms where I was just bowing, saying thank you a lot, and holding my arms out to catch roses everywhere I went.
<--- Donate to CreateAForum! :D

Jeremiah 33:3

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
Re: New Smileys for Your Forum
« Reply #7 on: February 20, 2012, 09:41:32 pm »

I know I'm bumping an old thread but there's 2 things that I'd like to say:
1) The Jquery code you listed won't work because Jquery isn't uploaded to CreateAForum forums yet, use this code instead:
Code: [Select]
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
2) Instead of having to type in your forum url every time, it's much better to type it once only :P
Code: [Select]
<script type='text/javascript'>
/* Image Changes on Page
SMF For Free 2009 - WWX */
var forumurl = "YOURFORUMNAME";
function swap_img(){
var img_b = new Array();
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/smiley.gif" , "http://smfsupport.com/support/Smileys/smfnew/smiley.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/wink.gif" , "http://smfsupport.com/support/Smileys/smfnew/wink.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/cheesy.gif" , "http://smfsupport.com/support/Smileys/smfnew/cheesy.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/grin.gif" , "http://smfsupport.com/support/Smileys/smfnew/grin.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/angry.gif" , "http://smfsupport.com/support/Smileys/smfnew/angry.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/sad.gif" , "http://smfsupport.com/support/Smileys/smfnew/sad.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/shocked.gif" , "http://smfsupport.com/support/Smileys/smfnew/shocked.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/cool.gif" , "http://smfsupport.com/support/Smileys/smfnew/cool.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/huh.gif" , "http://smfsupport.com/support/Smileys/smfnew/huh.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/rolleyes.gif" , "http://smfsupport.com/support/Smileys/smfnew/rolleyes.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/tongue.gif" , "http://smfsupport.com/support/Smileys/smfnew/tongue.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/lipsrsealed.gif" , "http://smfsupport.com/support/Smileys/smfnew/lipsrsealed.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/undecided.gif" , "http://smfsupport.com/support/Smileys/smfnew/undecided.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/kiss.gif" , "http://smfsupport.com/support/Smileys/smfnew/kiss.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/cry.gif" , "http://smfsupport.com/support/Smileys/smfnew/cry.gif" ]
img_b[img_b.length++] = [ "http://" + forumurl ".createaforum.com/Smileys/default/embarrassed.gif" , "http://support.createaforum.com/Smileys/smfnew/embarrassed.gif" ]


var a_i = document.getElementsByTagName('IMG');
for(i=a_i.length-1;i>=0;i--) for(j=0;j<img_b.length;j++) if(a_i[i].src == img_b[j][0]) a_i[i].src = img_b[j][1];
}
swap_img();
</script>
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline Silver734

  • Full Member
  • ***
  • Posts: 165
  • Karma: 1
  • Gender: Female
    • View Profile
    • Fairy Tail
Re: New Smileys for Your Forum
« Reply #8 on: August 06, 2013, 10:38:50 pm »
can there be more instructions, eg. where to put new smiley url, where to put forum url
since i find it a bit hard to figure out
Fairytailrp.netFairytailrp.net
This forum was made with Create a Forum!! :3

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
649 Views
Last post October 10, 2013, 08:38:31 pm
by aIURbliS
8 Replies
321 Views
Last post May 21, 2015, 06:25:09 pm
by discjocke09
1 Replies
301 Views
Last post January 11, 2018, 05:15:36 pm
by CreateAForum
5 Replies
175 Views
Last post September 13, 2018, 06:31:14 am
by Fire
3 Replies
153 Views
Last post April 01, 2019, 12:07:35 am
by Pearl