Revolution X

Coding Community => Coding Snippets => Topic started by: Agent Moose on November 07, 2008, 06:48:17 pm



Title: Awards System
Post by: Agent Moose on November 07, 2008, 06:48:17 pm
Footers:
Code:
<script>
var Awards = new Array();
Awards[Awards.length] = ["USER ID","AWARD"];

$("a").each(function(){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(this.href.match("profile;u=" + Awards[v] + "$")){
$(this).parent().next().append("<br><b>Awards</b>:" + Awards[v][1]);
};};);
</script>

USER ID = The User ID you would like to give awards to.
AWARD = What the award will be.  You may use HTML or Text.

Enjoy :)


Title: Re: Awards System
Post by: anthony on March 28, 2009, 05:30:09 pm
Lol nice, I could use it, when I get more members on my forum, at least


Title: Re: Awards System
Post by: Blighted on May 20, 2009, 08:17:08 am
lol nice. Is there anything you need to add to the headers?


Title: Re: Awards System
Post by: Exilis on May 20, 2009, 02:42:04 pm
Nope :) When it comes to codes on here, you only have to add what they tell you to add. Normally in the footers ;)


Title: Re: Awards System
Post by: Agent Moose on May 21, 2009, 07:20:18 am
lol nice. Is there anything you need to add to the headers?

It sotra matters :P  If you don't have the following code at the top of your headers, then yes, you will need to add it, if you already have if, then you don't need to add it again:
Code:
<script src="/jquery.js"></script>


Title: Re: Awards System
Post by: Blighted on May 24, 2009, 11:11:34 am
I've got that. Oh btw, where does the award appear?


Title: Re: Awards System
Post by: Agent Moose on May 24, 2009, 01:23:33 pm
Right under all the users stats on the side of a post.


Title: Re: Awards System
Post by: Lyle on June 07, 2009, 04:02:25 pm
may we use pictures?


Title: Re: Awards System
Post by: Agent Moose on June 07, 2009, 05:05:19 pm
Yes you may.  You need to use single quotes instead of double quotes for the src= part.


Title: Re: Awards System
Post by: KrylonKrystals on August 24, 2009, 09:52:23 pm
Footers:
Code:
<script>
var Awards = new Array();
Awards[Awards.length] = ["USER ID","AWARD"];

$("a").each(function(){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(this.href.match("profile;u=" + Awards[v] + "$")){
$(this).parent().next().append("<br><b>Awards</b>:" + Awards[v][1]);
};};);
</script>

USER ID = The User ID you would like to give awards to.
AWARD = What the award will be.  You may use HTML or Text.

Enjoy :)
Is there a way to make it so that either the user can automatically get the award or possibly add more users to the list?

EDIT: put a strikethrough on that part didn't read the code correctly :P


Title: Re: Awards System
Post by: Exilis on August 25, 2009, 01:36:54 am
Once slayer releases the shop source code, I'm going to work on a simple item that adds the user's name onto a list- the list is then read and can be used by codes like this one. It might take a bit to develop.