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
  • 6
  • 25
Advanced Award System v1.0; with tooltips
Topic Started: Nov 7 2009, 01:20 PM (46,981 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:
Rosencrantz
Member
[ * ]
I'm not having much luck. I'm new to the coding aspect, so apologies x_x

Under Edit Board Template -> Below The Board I have the following:

Code:
 
<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[1049602,"Title","http://i7.photobucket.com/albums/y271/XxMrWhitexX/Dragonball%20Sagas/SaiyanOozaru.png","Description","Date"]
]
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/28050/70/0/p295220/AwardTest.js"></script>


And this is the link to the code I have uploaded to the board itself: Test

I'm sure I've made a dumb mistake somewhere >.> Or in multiple places.

Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
You need to completely remove the code, and just have that last line:

Code:
 
<script type="text/javascript" src="http://z3.ifrm.com/28050/70/0/p295220/AwardTest.js"></script>



Also, in that script (the hosted file) you need to remove the last </script>. So the file should look like:

Code:
 
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [10,10],
closeFunction : "fade",
users : [
[1049602,"Title","http://i7.photobucket.com/albums/y271/XxMrWhitexX/Dragonball%20Sagas/SaiyanOozaru.png","Description","Date"]
]
}
//]]>
Offline Profile Quote Post Goto Top
 
Rosencrantz
Member
[ * ]
For some reason it's still doesn't seem to be showing up.

This is what I have currently:

(Under Body Template -> Below The Board)
Code:
 
<script type="text/javascript" src="http://z3.ifrm.com/28050/70/0/p295220/AwardTest.js"></script>


(Uploaded .js file)
Code:
 
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [10,10],
closeFunction : "fade",
users : [
[1049602,"Title","http://i7.photobucket.com/albums/y271/XxMrWhitexX/Dragonball%20Sagas/HSaiyanOozaru.png","Description","Date"]
]
}
//]]>


I double checked my member ID number to make sure it was accurate and re-linked to a new image in case the one I had was busted.
Offline Profile Quote Post Goto Top
 
Datt
Member
[ * ]
Hi. I'm new to coding and these mods and stuff, but would it be possible to make this work with this so I don't have to edit the code?

I would like to know before I even attempt to get it to work.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Rosencrantz
Mar 6 2010, 10:53 AM
For some reason it's still doesn't seem to be showing up.

This is what I have currently:

(Under Body Template -> Below The Board)
Code:
 
<script type="text/javascript" src="http://z3.ifrm.com/28050/70/0/p295220/AwardTest.js"></script>


(Uploaded .js file)
Code:
 
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [10,10],
closeFunction : "fade",
users : [
[1049602,"Title","http://i7.photobucket.com/albums/y271/XxMrWhitexX/Dragonball%20Sagas/HSaiyanOozaru.png","Description","Date"]
]
}
//]]>


I double checked my member ID number to make sure it was accurate and re-linked to a new image in case the one I had was busted.
Sorry, add this after:

Code:
 
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>


Datt: I don't plan on integrating the code with that system.
Offline Profile Quote Post Goto Top
 
Rosencrantz
Member
[ * ]
I'm really sorry for this taking so much of your time :/ For the life of me, I can't figure out what's going wrong. I added another script to the board (it's a dice rolling script) but tried removing it to see if it was interfering, but still nothing.

Below The Board:

Code:
 
<script type="text/javascript" src="http://z3.ifrm.com/28050/70/0/p295419/AwardTest.js"></script>
<script type='text/javascript' src='http://z3.ifrm.com/313/104/0/p246374/dice_roll.js'></script>


In the notepad file:

Code:
 
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [10,10],
closeFunction : "fade",
users : [
[1049602,"Title","http://i7.photobucket.com/albums/y271/XxMrWhitexX/Dragonball%20Sagas/HSaiyanOozaru.png","Description","Date"],
]
}
//]]>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>


I've C+Ped from your post exactly to make sure I didn't put a space or a punctuation mark somewhere by accident. Could there be anything wrong with the way I copied the code?

Once again, really sorry and I do appreciate your help very much!



Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Yeah, the extra code I told you to add needs to be added in your board templates, not in the hosted file :P .
Offline Profile Quote Post Goto Top
 
Rosencrantz
Member
[ * ]
Viral.
Mar 6 2010, 09:40 PM
Yeah, the extra code I told you to add needs to be added in your board templates, not in the hosted file :P .
And this ordeal has come to an end!

I cannot thank you enough for your help. I know my members are going to love this code. I hope this is the last time I ever have to bug you about it. Sorry for being such a newb, but you were a great help. :)
Offline Profile Quote Post Goto Top
 
Datt
Member
[ * ]
Viral.
Mar 6 2010, 09:10 PM

Datt: I don't plan on integrating the code with that system.
Ok, thanks anyways.
Offline Profile Quote Post Goto Top
 
remnightfall-ZNR
Member
[ * ]
This is my code:

[coe]<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[998344,"Staffer","http://img242.imageshack.us/img242/4315/staffer.png","Awarded to those with a staff position","1/13/10"]
[998344,"Helperr","http://i292.photobucket.com/albums/mm29/sonikku123/HELPER.png","Helped a BH member with a problem.","1/13/10"]
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>[/code]





Its not workin :(
Offline Profile Quote Post Goto Top
 
SlyCooperFan
Member Avatar
Member
[ * ]
remnightfall
Mar 11 2010, 09:37 PM
This is my code:

[coe]<script type="text/javascript">
//<![CDATA[
var t_award = {
name : "Awards",
thumbnail : [20,20],
closeFunction : "fade",
users : [
[998344,"Staffer","http://img242.imageshack.us/img242/4315/staffer.png","Awarded to those with a staff position","1/13/10"]
[998344,"Helperr","http://i292.photobucket.com/albums/mm29/sonikku123/HELPER.png","Helped a BH member with a problem.","1/13/10"]
]
}
//]]>
</script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>[/code]





Its not workin :(
The ID's (in your case, 998344) need to be in quotations, like this: "998344"
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
It doesn't matter for numbers. Can you give me a link to your board?
Offline Profile Quote Post Goto Top
 
nleon_20
Member
[ * ]
Love this Code, it is working quite well for me, except for one thing: The "Award" text isn't lined up with the rest of profile information (like posts, group, etc.). It looks like it is aligned center or right. It is a fairly minor issue, but any clues on what is causing this and what i could do to fix it?
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
You'd have to edit it in the CSS and well I'm not the one to ask for help with that.
Offline Profile Quote Post Goto Top
 
SlyCooperFan
Member Avatar
Member
[ * ]
Hmm...this was working fine for me until today. I have this in Below the Board.
Code: HTML
 
<!---Advanced Award System v1.0--->
<script type="text/javascript" src="http://z3.ifrm.com/181/8/0/f538281/Achievements.js"></script>
<script type="text/javascript" src="http://z3.ifrm.com/142/141/0/p239659/tooltipawards.js"></script>

And my Achievements.js file contains this:
Code: HTML
 
<script type="text/javascript">
//<![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"]
]
}
//]]>
</script>
Forget the award names/descriptions LOL. Long story. But none of the awards are showing up on any user. Help?
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
  • Pages:
  • 1
  • 6
  • 25