Create A Forum - Support Forums

Support => Create a Forum Codes and Support => Topic started by: aIURbliS on February 12, 2012, 10:31:03 pm

Title: [Code] Awards
Post by: aIURbliS on February 12, 2012, 10:31:03 pm
Adds awards to a user's profile.


Instructions:
1) Go to your Headers & Footers  http://FORUM.createaforum.com/index.php?action=admin;area=style;sa=headers; (http://forum.createaforum.com/index.php?action=admin;area=style;sa=headers;)
2) This code utilizes jQuery, please use the latest version found in this thread: http://support.createaforum.com/5/jquery-v1-8-update/
3) Copy and paste this code in your Footers:
Code: [Select]
<script>var Awards=['ID','URL','NAME'];$(document).ready(function(){if(location.href.toLowerCase().match("action=profile;u="+Awards[0])){$("dl.noborder").after("<b>"+Awards[2]+":</b> <img src='"+Awards[1]+"'/></br>");$("dl.noborder").after("<b>Awards:</b><br><br>")}});</script>

4) Where you see "var Awards = ['ID', 'URL', 'NAME'];" edit the ID to the user's ID number found in the url when you go to the user's profile. Edit the IMAGE to the url of the image you want to add. Edit the NAME to the name of the award.
5) For more awards, simply add more of these lines:
Code: [Select]
var Awards = ['ID', 'URL', 'NAME'];
after the first one
6) Save