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, 01:20 PM (46,970 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, 12:01 PM.
Offline Profile Quote Post Goto Top
 
Replies:
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
It's possible, but it would require modifications to the existing code that Viral would have to make.
Offline Profile Quote Post Goto Top
 
Vicks.Louise
Member Avatar
Member
[ *  *  * ]
Cory
Jul 22 2011, 04:48 PM
It's possible, but it would require modifications to the existing code that Viral would have to make.
Ok thanks :)
Offline Profile Quote Post Goto Top
 
Vicks.Louise
Member Avatar
Member
[ *  *  * ]
Sorry i know i'm a pain but everytime i add to this it just messes up and doesn't show

Code: HTML
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Achievements",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[3588776,"Club25","http://img194.imageshack.us/img194/4895/club25.jpg","Achieved by reaching 25 posts","17th July 2011"]
[3588776,"Club50","http://imageshack.us/photo/my-images/819/club50.jpg/","Achieved by reaching 50 posts","30th July 2011"]
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>


code i used ^^^^^^^
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Achievements",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[3588776,"Club25","http://img194.imageshack.us/img194/4895/club25.jpg","Achieved by reaching 25 posts","17th July 2011"],
[3588776,"Club50","http://imageshack.us/photo/my-images/819/club50.jpg","Achieved by reaching 50 posts","30th July 2011"]
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>
Try that instead, you need a comma after every line except the last one.
Offline Profile Quote Post Goto Top
 
StarTrekFanatic1701
Member Avatar
Member
[ * ]
Ok, so I've got the basic code, one which I found from here, but how do I make a certain member get the award, how do I find a user ID?

Cheers! :D
Offline Profile Quote Post Goto Top
 
kyokun
Member Avatar
Member
[ * ]
[Hidden Content: Login/Register to View]
Offline Profile Quote Post Goto Top
 
StarTrekFanatic1701
Member Avatar
Member
[ * ]
Got it!! Thankyou so much!! :D
Offline Profile Quote Post Goto Top
 
Mazilo Isaac
Member Avatar
Member
[ * ]
I've tried several things now. Doesn't work.
Spoiler: click to toggle
[/s]

Solved already, Thanks for the code tough.
Edited by Mazilo Isaac, Aug 7 2011, 07:21 PM.
Offline Profile Quote Post Goto Top
 
JimmyT
Member
[ * ]
Nice Work Viral. Helped me with my website and your Codes are really cool.
Edited by JimmyT, Aug 15 2011, 02:12 AM.
Offline Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
I'm sorry if this has been asked already, but on my forum the description box doesn't appear when hovering over the image. Tried it on all themes including ZB Original.

Posted Image

Code:

Spoiler: click to toggle
Edited by akstylish-ZNR, Aug 18 2011, 09:01 AM.
Offline Profile Quote Post Goto Top
 
daitetsu
Member
[ * ]
Oh thank you Viral for letting this be used on Chrome as well, more codes should be tested on Chrome if possible I think anyways.
Edited by daitetsu, Aug 18 2011, 09:32 AM.
Offline Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
Continuing from the previous post, it seems putting the code in each theme works, so it must be conflicting with another code in board template. What could be causing this?
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Code:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[3067719,"Test","http://z6.ifrm.com/8161/171/0/f5017320/elitemember.png","Test","2011"],
[3067719,"Test","http://z6.ifrm.com/8161/171/0/f5017320/elitemember.png","Test","2011"]
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>
That should work.
Offline Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
It didn't..this is what you changed right?

Code:
 
name : "Awards",


Viral said you could change the name anyway.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type='text/javascript' src='http://z4.ifrm.com/30095/43/0/f5089594/awards_and_awards_pagev1_1_by_Quozzo.js'></script>
Place your code below that script.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply