Welcome Guest [Log In] [Register]
Welcome to the home of Viral's Modifications. We hope you enjoy your visit.

This forum is used for support and feedback purposes only. All modifications can also be found on the official site.

Username:   Password:
mQuote [-] mQuote [+]
Add Reply
  • Pages:
  • 1
  • 2
Advanced Awards System; Created: Nov 2009
Topic Started: Aug 10 2014, 05:09 PM (3,650 Views)
Viral
Member Avatar
Administrator
Creation Date: November 2009
Name: Advanced Awards System
Description: 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.
Code Placement: Admin CP >> Themes >> Board Template >> Below the Board
Code:

Code: HTML
 
<script type="text/javascript">
//<![CDATA[
// Created by Viral of Viral's Modifications - http://viralsmods.com
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/p502352/awards.js"></script>


Notes:

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 Viral, Aug 10 2014, 05:58 PM.
Viral
ZetaBoard's Dynamo Developer
MEng Aeronautical Engineering @ Imperial College London


>> CULTURAL JETTISON <<
Offline Profile Quote Post Goto Top
 
Replies:
Dregran
Member Avatar

What's the maximum amount of awards each user can have? On my forum it stopped working after a user got more than 35.
Offline Profile Quote Post Goto Top
 
zbug
No Avatar

Hey, so i finally got this code to work on my board then it does this Posted Image

Is there a way to get it out of the joined box ?
Offline Profile Quote Post Goto Top
 
zbug
No Avatar

Update: http://support.zathyus.com/single/?p=18109685&t=5068409
Offline Profile Quote Post Goto Top
 
VCA
Member Avatar

zbug
Dec 23 2015, 12:38 PM
Hey, so i finally got this code to work on my board then it does this Posted Image

Is there a way to get it out of the joined box ?
On my forums, it only shows up in the default box (normally). Once in awhile, it will show up in both the money box and the default box, and this is usually fixed by refreshing the page.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Basic Modifications · Next Topic »
Add Reply
  • Pages:
  • 1
  • 2

Theme by Symbiote & Foxx of Outline