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
Advanced Awards System; Created: Nov 2009
Topic Started: Aug 10 2014, 05:09 PM (3,649 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
 
Kankuro
Member Avatar
ぱ ぺっと ますたあ
Is this the EXACT code that Dynamo Awards will have?
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Administrator
No, Dynamo will improve on this one (I created this 5 years ago so it's not all that efficient/ nice to look at etc).
Viral
ZetaBoard's Dynamo Developer
MEng Aeronautical Engineering @ Imperial College London


>> CULTURAL JETTISON <<
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
ぱ ぺっと ますたあ
Viral
Aug 10 2014, 05:43 PM
No, Dynamo will improve on this one (I created this 5 years ago so it's not all that efficient/ nice to look at etc).
So will it be more like Quozzo's awards? Where there is a page dedicated to the Awards?
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Administrator
Undecided.
Viral
ZetaBoard's Dynamo Developer
MEng Aeronautical Engineering @ Imperial College London


>> CULTURAL JETTISON <<
Offline Profile Quote Post Goto Top
 
Dark Shadow 6
Member Avatar

Great code still working perfectly.
Posted Image
Born To Be A Winner
Offline Profile Quote Post Goto Top
 
Geoffrey
Member Avatar

I've been informed that for some users (one right now but I've encountered this in the past) the awards block appears in both the main postbit block (with posts, join date, etc.) and in the additional profile fields postbit block (with added profile fields like where forum url is here).

Like I said, I've seen this in the past and feel like there was something to add that fixed this issue but that's been a few years ago and I can't remember/don't have access to whatever that fix was. Any ideas what could be causing this and what can be done to fix it?
Posted Image Posted Image Posted Image
Opening Saturday, June 13, at 6 PM Eastern.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Administrator
Hmm. If that's the case, then this might solve it:

Code:
 
<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/p508917/advancedawards_base.js"></script>
Attached to this post:
Attachments: advancedawards_base.js (2.89 KB)
Edited by Viral, Dec 26 2014, 01:16 PM.
Viral
ZetaBoard's Dynamo Developer
MEng Aeronautical Engineering @ Imperial College London


>> CULTURAL JETTISON <<
Offline Profile Quote Post Goto Top
 
Geoffrey
Member Avatar

That didn't show the cards/awards at all.

It's not a big deal though. I see you're working on a new version to work with Dynamo anyways.
Edited by Geoffrey, Dec 26 2014, 08:16 PM.
Posted Image Posted Image Posted Image
Opening Saturday, June 13, at 6 PM Eastern.
Offline Profile Quote Post Goto Top
 
anaymohite
No Avatar

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.
Edited by Viral, May 23 2015, 05:12 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Basic Modifications · Next Topic »
Add Reply
  • Pages:
  • 1

Theme by Symbiote & Foxx of Outline