Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
  • Pages:
  • 1
  • 25
ZetaBoards Reputation System; Version 1.0
Topic Started: Dec 19 2007, 07:11 PM (35,710 Views)
RyuraGS
Member Avatar
Member
[ *  *  * ]
This code will add a reputation system to your board.
Features:
*Reputation +/-
*24 hour wait between reputations
*Automatic database and installation
*Reputation number in post details and profile
*Reputation Reasons
*Reputation History

Preview: http://s1.zetaboards.com/GenerationStudio/
Create your own account on the preview board to get the full experience.

INSTALLATION
Installing is simple, and is broken up into two steps.
Step 1: Add CSS.
Go to Admin CP→[Themes]→Themes
Click Edit Theme Appearance for your first active skin. Scroll down to the bottom of this CSS and add this snippet:
Code:
 
div#historybox {
display: none;
min-height: 120px;
background-color: #FFF;
text-align: center;
width: 400px;
left: 50%;
margin-left: -200px;
border: 1px solid #5A70B3;
}

#historybox a {
position: relative;
left: 125px;
}

div#hisloading {
display:none;
vertical-align: center;
}

Repeat the process for all other active skins.

Step 2: Add Code
Simply add to Admin CP→ Board Template→ Edit Board Template→ Above the copyright.
Quote:
 

<script type="text/javascript">
//<![CDATA[
/* ZetaBoards Reputation System by GenerationStudio
Do not edit this code except for these variables: */
RepOptions = {
on: true,
customDomainCode: "0",
name: "Reputation",
addImg: "<img src='http://z3.ifrm.com/static/1/w_up.png' alt='' />",
minusImg: "<img src='http://z3.ifrm.com/static/1/w_down.png' alt='' />",
version: "1.0.0"
};
// Don't edit below this line, thanks!
if (window.location.href.split(main_url)[1].split("/")[0] == "topic" || window.location.href.split(main_url)[1].split("/")[0] == "profile") {
document.write('<script src="http://generationstudio.net/codes/repsystem/rep.js"><\/script>')
}
//]]>
</script>

Options in orange are customizable.
on - Set to true to enable the Reputation System. Set to false to disable it.
customDomainCode - This is for if you are using a custom domain. Set it to something unique, it doesn't matter what. I suggest a string of random numbers, such as x542108. But don't use that one.
name - The name of your reputation (Reputation, Karma, Popularity, etc)
addImg - The image/text shown for a +1 reputation.
minusImg - The image/text shown for a -1 reputation.
version - Don't edit this.

UPGRADING TO 1.0
To upgrade, simply remove all pieces of your current installation (including customizable options) and then follow the installation instructions from above. This is contrary to what I had previously said; but this now allows for more options..

USING MULTIPLE THEMES
This was requested because some users wanted to be able to use different buttons for each theme.
ACP > Themes > Themes > Edit Theme Layout (on the theme you want)
Add the code to the END of the box.

Report bugs or questions here.

Developer's Notes: You can request a commented, unminified version by PMing me here.
Edited by RyuraGS, Feb 17 2008, 10:43 PM.
Offline Profile Quote Post Goto Top
 
Michael W
Member Avatar
MESKOS - Forum Consultant
[ *  * ]
The mod seems alright but the loading speed is quite slow.
Offline Profile Quote Post Goto Top
 
Viper
Member Avatar
Member
[ * ]
clicking the +\- buttons as a guest gives the "you must wait 24 hours inbetween uses!" box.

Also, have you tested this for firefox, or is this not compatible with it?

I know this is just beginning, but it would be cool if you can make it so only certain groups could use it, such as the admins, by the preview it looks pretty cool, good luck!

Tested it, slow, but appears to work, kudos on a job well done.
Edited by Viper, Dec 19 2007, 07:55 PM.
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
Viper
Dec 19 2007, 07:38 PM
clicking the +\- buttons as a guest gives the "you must wait 24 hours inbetween uses!" box.

Also, have you tested this for firefox, or is this not compatible with it?

I know this is just beginning, but it would be cool if you can make it so only certain groups could use it, such as the admins, by the preview it looks pretty cool, good luck!

Tested it, slow, but appears to work, kudos on a job well done.
Group (and guest) restrictions will be included in the next release, I knew I forgot something :p.
This is 100% compatible with Firefox 2.0. As far as I can tell, it is also perfect with IE.
A lot of the slowdown is from the numerous ajax requests on each load. Luckily it doesn't lock the browser, so it shouldn't be a problem, except for on 56k connections.
Also optimizing the code should make it quicker.

Note: There is a bug right now where if two users try to give rep within 5 minutes of each other it won't work, I've got a method to fix this but it will make an even longer load time on the first page view :(
Offline Profile Quote Post Goto Top
 
Lyle
Member Avatar
Member
[ * ]
First of all great code

Just one problem I have, is there any way you can change the buttons so they will be the same as the Warn Up and Warn Down no matter what skin you are using. Right now the buttons look good on one Theme and they stick out like a sore thumb.

Also I would just like to add I see you are considering a "Reasons why" for the + and -, I hope you do Implement that, and if you can have it so the rep isn't added till an admin approves the reason.

Keep up the great work
Edited by Lyle, Dec 19 2007, 09:30 PM.
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
Quote:
 
if you can have it so the rep isn't added till an admin approves the reason.

That's not possible under the current system but by using your own database (will take quite a bit of setup) it will be usable.I will have more info on this with the launch of version 1.0.

Quote:
 
Just one problem I have, is there any way you can change the buttons so they will be the same as the Warn Up and Warn Down no matter what skin you are using. Right now the buttons look good on one Theme and they stick out like a sore thumb.

I'll look into seeing if this is possible... I haven't experimented much with theme images but we will see.
Edited by RyuraGS, Dec 19 2007, 09:39 PM.
Offline Profile Quote Post Goto Top
 
jediman (S)
Member Avatar
Hmmmm......
[ *  *  * ]
Wait so you purposely want to see how much Zetaboards can handle >_< There has to be a much easier way to do this via a money code or soemthing. (Setit where they can only b egiven points/karma/rep by admin though, so normal members couldn't participate >_<)
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
jediman
Dec 20 2007, 01:07 AM
Wait so you purposely want to see how much Zetaboards can handle >_< There has to be a much easier way to do this via a money code or soemthing. (Setit where they can only b egiven points/karma/rep by admin though, so normal members couldn't participate >_<)
Quote:
 
(Setit where they can only b egiven points/karma/rep by admin though

That would be what we call the warning system.
Offline Profile Quote Post Goto Top
 
Longhorns15
Member
[ *  * ]
Interesting code. Would like to see it be a bit faster and then I would use it permanently.
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
Version 0.4 has been released. It is faster, more stable, and adds support for profile pages.
Edited by RyuraGS, Dec 20 2007, 02:37 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · User Created Codes · Next Topic »
Add Reply
  • Pages:
  • 1
  • 25