News:

Create A Forum Installed

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

0 Members and 1 Guest are viewing this topic.

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile

Badges: (View All)
Level 6 Sixth year Anniversary Fifth year Anniversary
Re: New Smileys for Your Forum
« 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.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
831 Views
Last post January 11, 2018, 05:15:36 pm
by CreateAForum
5 Replies
608 Views
Last post September 13, 2018, 06:31:14 am
by Fire
3 Replies
615 Views
Last post April 01, 2019, 12:07:35 am
by Pearl
8 Replies
663 Views
Last post July 08, 2019, 04:49:11 pm
by CreateAForum
2 Replies
310 Views
Last post August 10, 2021, 06:16:43 pm
by Executive