| 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: |
| Advanced Award System v1.0; with tooltips | |
|---|---|
| Tweet Topic Started: Nov 7 2009, 01:20 PM (46,975 Views) | |
| Viral | Nov 7 2009, 01:20 PM Post #1 |
![]()
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:
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
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.
|
![]() |
|
| Replies: | |
|---|---|
| Jameswgw | Jul 17 2010, 08:17 PM Post #166 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]()
|
To rehost it I just save it as .js and upload it on my board? And then where does this code go? |
![]() |
|
| Aoshi153 | Jul 19 2010, 12:01 AM Post #167 |
![]()
Member
![]() ![]() ![]()
|
Great code, thanks.
Edited by Aoshi153, Jul 19 2010, 03:33 AM.
|
![]() |
|
| marcelc | Aug 7 2010, 03:00 AM Post #168 |
|
Member
![]() ![]() ![]()
|
great work viral, love it
Edited by marcelc, Aug 7 2010, 03:03 AM.
|
![]() |
|
| Lust.Sins | Sep 30 2010, 04:52 PM Post #169 |
|
Member
![]() ![]() ![]()
|
What do I need to change in the javascript to: 1. use member names instead of user ids? 2. have a 1 character space between awards? Thank you. |
![]() |
|
| Skep93 | Oct 4 2010, 10:48 AM Post #170 |
|
Member
![]() ![]() ![]()
|
Right, love the code viral. Been using it for a while and it's working perfectly. Just one thing that bugs me though. Once you go down to a second line of award icons, they misalign with the top row (go to the left). Any idea how to fix this? |
![]() |
|
| paul r | Oct 4 2010, 11:57 AM Post #171 |
|
Member
![]() ![]() ![]()
|
not working for me . here is my codes <script type="text/javascript"> //<![CDATA[ var t_award = { name : "Awards", thumbnail : [20,20], closeFunction : "fade", users : [ ["907566","1000 poster","http://i130.photobucket.com/albums/p273/hitumup_2007/1k.png","1000 poster","10/3/2010"] ] } //]]> </script> |
![]() |
|
| RedBldSandman | Oct 4 2010, 12:36 PM Post #172 |
![]()
Asante sana Squash banana
![]() ![]() ![]() ![]() ![]() ![]()
|
You forgot the last line which has the main body of the code
|
![]() |
|
| paul r | Oct 4 2010, 01:48 PM Post #173 |
|
Member
![]() ![]() ![]()
|
holly hell sh*t lol fail on my end thanks !!!! what do we do when adding a new user id ? Edited by paul r, Oct 4 2010, 01:54 PM.
|
![]() |
|
| t3hlazy1 | Oct 4 2010, 04:40 PM Post #174 |
|
Member
![]() ![]() ![]()
|
I think I remember someone asking about how you would get 2 different sets. Like: Awards and Items. I did it on my forum. Basically, I downloaded the http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js file and replaced every "award" with item. I think that's all I did. Then, I uploaded it, and duplicated the original code, and replaced it with the new file. And I think the code that goes in board template needed to be adjusted a bit. Really simple, and I haven't had any conflicts. |
![]() |
|
| Skep93 | Oct 6 2010, 01:57 PM Post #175 |
|
Member
![]() ![]() ![]()
|
Any idea guys? |
![]() |
|
| IRS | Oct 6 2010, 06:13 PM Post #176 |
|
Wannabe photographer
![]() ![]() ![]() ![]() ![]()
|
Confirmed working in Midori 0.2.8 Great job
Edited by IRS, Oct 6 2010, 06:14 PM.
|
![]() |
|
| N7R | Oct 14 2010, 01:52 AM Post #177 |
|
Member
![]() ![]() ![]()
|
I really like this code, it works great. If there happens to be a version 2. I'd love to see it award certain medals automatically or a member can say earn the same medal more than once. Awesome stuff =) |
![]() |
|
| Mightykyle66 | Oct 24 2010, 04:06 PM Post #178 |
|
Member
![]() ![]() ![]()
|
nice work looks awsome! |
![]() |
|
| firegun | Oct 25 2010, 09:10 PM Post #179 |
|
Member
![]() ![]() ![]()
|
Hi Viral, I did follow find + replace the code and rehost the script, it seem totally not working ... when I using the http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js back and everything was FINE... can you guide me through ...
|
![]() |
|
| CaptDennyCrane | Nov 3 2010, 09:07 AM Post #180 |
![]()
Member
![]() ![]() ![]()
|
Hello all - Viral this is a nice bit of code and I have it somewhat customized for my needs, where I host a copy of your .JS file, but.... as it is, it uses the User Profile ID # to assign awards - I need to know how to modify my copy of the .JS file so that I can assign awards by Username. I have tried various permutation of dl.username, dl.user_name, dl.user_profile, etc., but none of them work. Do you know what the reference name is to make this work via username? Thanks. Here is the code I have:
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · ZetaBoards Codes & Modifications · Next Topic » |
| Track Topic · E-mail Topic |
4:29 AM Jul 11
|




![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)
.







4:29 AM Jul 11