Welcome Guest [Log In] [Register]

About Me

Tips, tricks, and projects from the Generation Studio team. Updated often.
Categories
Code Release (2)
Coding Tips (1)
Other (2)
RPGeneration (2)

Readers Online

0 Members, 1 Guest

Dec 26

Reputation System v1

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://209.85.62.24/static/1/w_up.png' alt='' />",
minusImg: "<img src='http://209.85.62.24/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.
Posted in Code Release at 6:38 pm · No comments
Nov 30

Add More Boxes to Board Statistics

Location: Admin CP > Themes > Board Template > Javascripts OR Below the Board (Prefer Javascripts)
Demo: http://s1.zetaboards.com/GenerationStudio/index/ (Look at Board Statistics)
Instructions:
Define a new box with $().newZBBS({Options}); Check the example if you are confused.
You must define a new set of options for each separate box, like in the example.
Options:
isOn - Set to true to turn on the box. Set to false to turn it off. This is useful if you must switch in boxes for whatever reason, or want to see if one box is causing a problem.
Info - This is the data that goes inside the box. Values include any HTML. Use single quotes(') instead of double(")
Title - This is the title of the box. Values include any HTML. Use single quotes(') instead of double(")
Image - This image goes to the box to the left. Values are URLs.
imageLink - This links the image to another site. Values are URLs. Leave blank if you want no link.
Quote:
 
<script src='http://generationstudio.net/codes/zbboardstats2.js'>// Add more boxes to Board Statistics</script>
<script type="text/javascript">
// Add more boxes to Board Statistics
$(function(){
$().newZBBS({
isOn: true,
Title: "MyTitle",
Info: "MyText",
Image: "http://209.85.62.24/static/1/s_stats.png"
});

$().newZBBS({
isOn: true,
Title: "MyTitle2",
Info: "MyTex2t",
Image: "http://209.85.62.24/static/1/s_stats.png",
imageLink: "http://generationstudio.net"
});
});
</script>
Posted in Code Release at 2:10 pm · 3 comments
« Older Entries