Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Advanced Award System v1.0; with tooltips
Topic Started: Nov 7 2009, 12:20 PM (34,171 Views)
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
What it Does: Adds awards to user's mini profiles (only in posts at the moment). When hovering over these awards, it will show a description of it and the date received in a tooltip.

I have tested this to work in the following browsers:
  • Google Chrome 2.0.172.43
  • Firefox 3.5.2
  • Internet Explorer 8.0.6001.18783 (lol)
  • Opera 9.26
  • Opera10.0
  • Safari 4.0


It works 100% in all of those browsers. Hopefully it works just as well in others, but I don't have them ready to test.

Preview: http://s1.zetaboards.com/zbAIO2/topic/2231766/1/

The Code:

Add the following Below The Board
Code:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[user id,"award name","award image","award description","award date"],
[user id,"award name","award image","award description","award date"],
[user id,"award name","award image","award description","award date"],
[user id,"award name","award image","award description","award date"]
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>


That's the base of the script, but it needs to be edited when adding awards and such.

name : "Awards", - You can change "Awards" to whatever you want to call it, be it achievements, or whatever. Just make sure you wrap it with speech marks " and have a comma after the last speech mark.

thumbnail : [20,20], - These are the dimensions of the thumbnail versions of the award images. Change the first 20 to the width, and the second 20 the height.

closeFunction : "remove", - This is the animation used when you move your mouse out of the image (when hiding the information box). You can set this to either: "remove" (no animation) or "fade" (fades out) or "slide" (slides upwards). Once again, it must be wrapped with speech marks, and there must be a comma after the last speech mark.

Each award is set out like:
[user id,"award name","award image","award description","award date"],

You can add as many as you want after each other, which will automatically award someone. If you remove the award from the script, it will be removed from all of their posts as well. Note how each part is wrapped with speech marks besides the user id. User ID is the number you see in the URL when viewing their profile. For example, my account here has a user id of 230248. After each award, their should be a comma (after the closing square bracket ]). However, you do not put a comma at the end of the last award. Think of it as a list, use commas after each one, but not the last.

When filling out the information, put a backslash in front of all apostrophes and speech marks (besides the ones wrapping it). So, ' changes to \' and " changes to \". Last but not least, you cannot use line breaks (hitting the enter/ return key). If you need a line break, use \n instead, and that will be replaced by a real line break on the forum.

I realise that's a lot to take in, so if anything goes wrong, just post here :) .
Edited by slayer766, Nov 22 2009, 11:01 AM.
Offline Profile Quote Post Goto Top
 
Replies:
Poui-ZNR
Member Avatar
Member
[ * ]
Viral.
Nov 25 2009, 04:49 PM
Yeah, I realised that, and I wish choco made that in to a function =\ . It's obvious the person who created the skin didn't fix the defaults though, but I'm more interested in the multiple overlays >.< .
:no: The default gets fully knocked out. I checked (though there's the possibility I missed something). I suppose you can add a class to the tooltips like I tried though, so at least the people who know how can edit it.
Offline Profile Quote Post Goto Top
 
synne
Member
[ * ]
wow works AWESOME

8D thanks so much =]
Offline Profile Quote Post Goto Top
 
Puppet Of Fate
Member
[ * ]
I don't know whats wrong but it just isn't showing up for me at all on the topics.

I put it below the board like it said too.

Code:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[14,"Won Contest #1","http://i949.photobucket.com/albums/ad335/Puppet_of_fate/Contest1.png","Tied for first on the first ever Protogaming mapping contest!","September 27 2009"],
[15,"Won Contest #1","http://i949.photobucket.com/albums/ad335/Puppet_of_fate/Contest1.png","Tied for first on the first ever Protogaming mapping contest!","September 27 2009"],
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>
</script>


That's the exact code.

If you need to see my site it's below.
http://s1.zetaboards.com/protogaming/index/
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
The IDs 14 and 15 are wrong. Use 782976 for the puppet of masters account.
Offline Profile Quote Post Goto Top
 
StormyWolf
Member Avatar
Member
[ * ]
It works great, but I have just one question/issue. Is it possible to have 2 copies of this running at once? Like, say, to have an Awards listing, and an Armies listing? I tried just duplicating the code, but the tooltip descriptions are miss-matched - ie. the thumbnail is correct, but when you hover over it it shows the wrong award. Any insight into this?
Offline Profile Quote Post Goto Top
 
Jamesas10
Member
[ * ]
A truly amazing code! Thanks Viral :)

Only one question, is it possible for the awards to show up on the profile page? Not a problem if not, just curious...

Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Unfortunately that would need quite a bit of editing. I may work on something similar later.
(I can't edit)

James: Yes, that will be the next thing I work on. Just don't have the time at the moment, sorry.
Edited by Viral, Dec 26 2009, 08:17 PM.
Offline Profile Quote Post Goto Top
 
Jamesas10
Member
[ * ]
Thats not a problem! Thanks again for making such a dudeee code :)
Offline Profile Quote Post Goto Top
 
Mime.
Member
[ * ]
Hey, i cant get it working, this is the code ive added, please tell me where im going wrong

Quote:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[945134"Test Award","http://images.gojoin.com/images/layout/gojoin/icons/20x20/medal.gif
","Test Award","2010"],
[user id,"award name","award image","award description","award date"],
[user id,"award name","award image","award description","award date"],
[user id,"award name","award image","award description","award date"]
]
}
//]]>
</script>
Offline Profile Quote Post Goto Top
 
Lout-ZNR
Member Avatar
He came, he saw...
[ *  *  * ]
Mime.
Jan 7 2010, 04:59 PM
Hey, i cant get it working, this is the code ive added, please tell me where im going wrong

Quote:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[945134"Test Award","http://images.gojoin.com/images/layout/gojoin/icons/20x20/medal.gif
","Test Award","2010"],
[user id,"award name","award image","award description","award date"],
[user id,"award name","award image","award description","award date"],
[user id,"award name","award image","award description","award date"]
]
}
//]]>
</script>
Change what you currently have to this:-

Code:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
["945134","Test Award","http://images.gojoin.com/images/layout/gojoin/icons/20x20/medal.gif
","Test Award","2010"]
]
}
//]]>
</script>


That should work now, the problem was that you had missed the " before and after the user ID and also missed the , after that.
Offline Profile Quote Post Goto Top
 
Mime.
Member
[ * ]
Nah still not working
Offline Profile Quote Post Goto Top
 
Lout-ZNR
Member Avatar
He came, he saw...
[ *  *  * ]
Link to board?
Offline Profile Quote Post Goto Top
 
Mime.
Member
[ * ]
http://s1.zetaboards.com/Underground_Battles/index/
Offline Profile Quote Post Goto Top
 
Lout-ZNR
Member Avatar
He came, he saw...
[ *  *  * ]
I can't see that code anywhere on your board viewing the page source, where exactly have you installed it?
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[945134"Test Award","http://images.gojoin.com/images/layout/gojoin/icons/20x20/medal.gif","Test Award","2010"]
]
}
//]]>
</script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply