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
  • Pages:
  • 1
  • 7
  • 25
Advanced Award System v1.0; with tooltips
Topic Started: Nov 7 2009, 01:20 PM (46,980 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:
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Take out the <script> tags at the top and bottom in Achievements.js
Offline Profile Quote Post Goto Top
 
SlyCooperFan
Member Avatar
Member
[ * ]
Okay, that made sense...works now, thanks!
Offline Profile Quote Post Goto Top
 
nleon_20
Member
[ * ]
Viral.
Mar 14 2010, 09:10 AM
You'd have to edit it in the CSS and well I'm not the one to ask for help with that.
I got it figured out, but not sure how to fix it.

I am using a code to remove certain lines from the profile area that appears in topics. Looks like those determine the alignment for stuff below them, so by removing them , the Awards area has no alignment.

I wonder- do you know of a way to move this "up" so that it appears AFTER 'Group' and 'Posts' but BEFORE 'Joined' and 'Member Number'?
Offline Profile Quote Post Goto Top
 
pure smile
Member
[ * ]
i have follow all steps but still wont work o.0 help?

Code:
 

<script type="text/javascript">
//<![CDATA[var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[1080103,\"Dipolamt"/,\"http://i44.tinypic.com/73jgbs.gif"/,\"Given to whom recruits 10+ to Vigilance!."/,\"18/3/10"/],
[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>
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
I don't know what steps you were following :P . Copy the base code again and try again but do not put those random slashes around the quotations that are there by default.
Offline Profile Quote Post Goto Top
 
Knox`
Member Avatar
Unofficial Request Assistant :D
[ *  *  *  * ]
Won't work for me:

Code:
 


<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Achievements",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[1097991,"Hilarious Member","http://i390.photobucket.com/albums/oo346/InsanitySorrow/Humorous.png","The "Hilarious Member" award is given to the members that make us laugh the most.","March 29th 2010"]
]
}
//]]>
</script>
Offline Profile Quote Post Goto Top
 
Lout-ZNR
Member Avatar
He came, he saw...
[ *  *  * ]
screamscream
Mar 30 2010, 12:12 PM
Won't work for me:
You have an extra set of double quotes around hilarious member that is breaking the code. Use single quotes there and it will work so the complete code should look like this -

Spoiler: click to toggle
Edited by Lout-ZNR, Mar 30 2010, 12:30 PM.
Offline Profile Quote Post Goto Top
 
Knox`
Member Avatar
Unofficial Request Assistant :D
[ *  *  *  * ]
I did that, now it's showing up twice.

Posted Image
Offline Profile Quote Post Goto Top
 
Lout-ZNR
Member Avatar
He came, he saw...
[ *  *  * ]
screamscream
Mar 30 2010, 01:39 PM
I did that, now it's showing up twice.

Posted Image
You have the following piece of code twice in your Board Template, remove one of them -

Code:
 
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>
Offline Profile Quote Post Goto Top
 
Knox`
Member Avatar
Unofficial Request Assistant :D
[ *  *  *  * ]
How bout this:

Code:
 

<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Achievements",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[1098895,"Member of the month","http://i390.photobucket.com/albums/oo346/InsanitySorrow/MOTM.png","You got this award for being March's member of the month =D","March 30th 2010"],
[1097991,"Hilarious Member","http://i390.photobucket.com/albums/oo346/InsanitySorrow/Humorous.png","You entertain us and constantly make us laugh.","March 29th 2010"],
[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>


Doesn't even appear.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Remove the lines with the user id part (where you haven't added an award).
Offline Profile Quote Post Goto Top
 
SlyCooperFan
Member Avatar
Member
[ * ]
Okay, this is frustrating. Only one of my members, the award doesn't show up for. All other members including myself (including people in his group too!) has their awards.

Code:
 
<!---Advanced Award System v1.0--->
//<![CDATA[
var t_award = {
name : "Achievements",
thumbnail : [20,20],
closeFunction : "fade",
users : [
["279861","","http://img710.imageshack.us/img710/9192/ultimatefounderbadge.png","This achievement is awarded to SlyCooperFan1, the creator of the guild!","July 26, 2008"],
["284244","","http://img412.imageshack.us/img412/826/founderh.png","An achievement awarded to those who joined the Knights of Swordhaven from July 26 to August 26, 2008! Founders also have access to the <a href=/'http://s1.zetaboards.com/KnightsOfSwordhaven/forum/1102208//'>Clan Founder's Shop</a>.","July 29, 2008"],
["282030","","http://img412.imageshack.us/img412/826/founderh.png","An achievement awarded to those who joined the Knights of Swordhaven from July 26 to August 26, 2008! Founders also have access to the <a href=/'http://s1.zetaboards.com/KnightsOfSwordhaven/forum/1102208//'>Clan Founder's Shop</a>.","August 13, 2008"],
["282484","","http://img412.imageshack.us/img412/826/founderh.png","An achievement awarded to those who joined the Knights of Swordhaven from July 26 to August 26, 2008! Founders also have access to the <a href=/'http://s1.zetaboards.com/KnightsOfSwordhaven/forum/1102208//'>Clan Founder's Shop</a>.","July 30, 2008"],
["282915","","http://img412.imageshack.us/img412/826/founderh.png","An achievement awarded to those who joined the Knights of Swordhaven from July 26 to August 26, 2008! Founders also have access to the <a href=/'http://s1.zetaboards.com/KnightsOfSwordhaven/forum/1102208//'>Clan Founder's Shop</a>.","August 12, 2008"],
["282099","","http://img412.imageshack.us/img412/826/founderh.png","An achievement awarded to those who joined the Knights of Swordhaven from July 26 to August 26, 2008! Founders also have access to the <a href=/'http://s1.zetaboards.com/KnightsOfSwordhaven/forum/1102208//'>Clan Founder's Shop</a>.","July 30, 2008"],
["747927","","http://img412.imageshack.us/img412/826/founderh.png","An achievement awarded to those who joined the Knights of Swordhaven from July 26 to August 26, 2008! Founders also have access to the <a href=/'http://s1.zetaboards.com/KnightsOfSwordhaven/forum/1102208//'>Clan Founder's Shop</a>.","July 30, 2008"],
["474971","","http://img138.imageshack.us/img138/2338/warriorofthevoid2.png","Awarded for completing the first mission in the Void Quest Chain!","October 10, 2009"],
["282484","","http://img138.imageshack.us/img138/2338/warriorofthevoid2.png","Awarded for completing the first mission in the Void Quest Chain!","October 10, 2009"],
["284244","","http://img138.imageshack.us/img138/2338/warriorofthevoid2.png","Awarded for completing the first mission in the Void Quest Chain!","October 10, 2009"],
["284244","","http://img101.imageshack.us/img101/3920/lag.png","A brave warrior who bested Lag-a-saurus Rex on Mogloween 2009!","Mogloween 2009"],
["282099","","http://img101.imageshack.us/img101/3920/lag.png","A brave warrior who bested Lag-a-saurus Rex on Mogloween 2009!","Mogloween 2009"],
["282030","","http://img268.imageshack.us/img268/3159/smallfrostking.png","Not afraid to challenge themselves, this warrior managed to defeat the legendary Frost King!","Frostval 2009"],
["474971","","http://img412.imageshack.us/img412/7163/undeadslayerbadge.png","Possibly a relative of Artix von Krieger, this warrior just loves to exorcise the undead!","October 10, 2009"],
["279861","","http://img697.imageshack.us/img697/9569/warriorwithbluestarswor.png","This warrior managed to retrieve a Blue Starsword from the rifts of time! Or the stomach of a dragon. Either/or.","March 21, 2010"],
["284244","","http://img697.imageshack.us/img697/9569/warriorwithbluestarswor.png","This warrior managed to retrieve a Blue Starsword from the rifts of time! Or the stomach of a dragon. Either/or.","March 21, 2010"],
["282099","","http://img697.imageshack.us/img697/9569/warriorwithbluestarswor.png","This warrior managed to retrieve a Blue Starsword from the rifts of time! Or the stomach of a dragon. Either/or.","March 21, 2010"],
["693677","","http://img697.imageshack.us/img697/9569/warriorwithbluestarswor.png","This warrior managed to retrieve a Blue Starsword from the rifts of time! Or the stomach of a dragon. Either/or.","March 21, 2010"],
["279861","","http://img406.imageshack.us/img406/9775/bladeofawe.png","A proud and brave Knight who managed to retrieve all of the pieces of the Blade of Awe and have it constructed!","March 22, 2010"]
]
}
//]]>

Code:
 
<script type="text/javascript" src="http://z3.ifrm.com/28069/160/0/f553784/AdvancedAwardSystemVentusChaserChangeTest.js"></script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>
And yes, I had to name my JavaScript document after him. XD

This is the troublesome user where the awards aren't showing up:
Code:
 
["474971","","http://img412.imageshack.us/img412/7163/undeadslayerbadge.png","Possibly a relative of Artix von Krieger, this warrior just loves to exorcise the undead!","October 10, 2009"],


Just...excuse the award names/descriptions plz. xD Anyway I can fix this? Missing something, what? D:
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
It looks like it should work. As you say it doesn't I'll need a board link to look into it further.
Offline Profile Quote Post Goto Top
 
SlyCooperFan
Member Avatar
Member
[ * ]
I gave guests a bit more permissions on the board so you can help me out here. Here's a topic you can tell the differences in: http://s1.zetaboards.com/KnightsOfSwordhaven/topic/3158036/1/

DeathKnight65, you can see has awards, but Ventus Chaser, the user where it's not showing up for, doesn't. That's the problem I'm having. :/
P.S. Disregard Mia, there's no awards for her because she has none. :P
Edited by SlyCooperFan, Apr 7 2010, 06:55 PM.
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

Viral, I followed post #62, and its working good, thank you very much!!!
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
  • Pages:
  • 1
  • 7
  • 25