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:
Locked Topic
[ C ] Tabbed Categories
Topic Started: Jul 31 2010, 11:56 AM (669 Views)
jesschen
Member Avatar
Member
[ * ]
Board Address: private
Board Software: ZetaBoards
Description: I want the tabbed categories like here -> http://s1.zetaboards.com/Superstar_Test/index/

Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
/*
Created by Agent Moose
-zbcode.com
-revolutionx.smfforfree3.com
You may not redistribute or edit without permission
*/
if(location.href == main_url + "index/"){
var Tabs = "";
var Forumz = "";
var FirstView = $("div.category:first").find("h2 a").parent().parent().parent().parent().parent().next().html();
$("div.category[id!='Tabby']").find("h2 a").each(function(){
var startID = this.href.split("/forum/")[1];
var forumID = startID.split("/")[0];
Tabs += "<a id='tab_" + forumID + "' href='javascript:void(0);' onclick='ShowCat(" + forumID + ");' class='tabBorder'>" + this.innerHTML + "</a>";
});
if(readCookie("ShowForum")){
var CurrentCookie = $("div.category").find("h2 a[href*='forum/" + readCookie("ShowForum") + "/']").parent().parent().parent().parent().parent().next().html();
$("div#main div.category:first").before("<div class='category' id='Tabby'><table class='cat_head'><tr><td><h2><span style='float: right;'><a href='javascript:void(0);' onclick='ShowAll(this);' id='ShoeMe'>(Show all Forums)</a></span>Tabs: " + Tabs + "<span class='tabBorder'> </span></h2></td></tr></table><table id='TheTable'>" + CurrentCookie + "</table></div>");
}else{
$("div#main div.category:first").before("<div class='category' id='Tabby'><table class='cat_head'><tr><td><h2><span style='float: right;'><a href='javascript:void(0);' onclick='ShowAll(this);' id='ShoeMe'>(Show all Forums)</a></span>Tabs: " + Tabs + "<span class='tabBorder'> </span></h2></td></tr></table><table id='TheTable'>" + FirstView + "</table></div>");
};
$("div.category[id*='cat-']").hide();
};
function ShowCat(forum){
$("div.category").find("h2 a").each(function(){
if(this.href.match("/forum/" + forum + "/")){
createCookie("ShowForum",forum,365);
Forumz = $(this).parent().parent().parent().parent().parent().next().html();
$("#TheTable").html(Forumz);
};});
};
function ShowAll(){
$("#Tabby").slideToggle();
$("div.category[id*='cat-']").show("normal");
};
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name) {
createCookie(name,"",-1);
}
</script>
Admin CP Posted Image Themes Posted Image Themes Posted Image Edit Theme Appearance
Quote:
 
.tabBorder {
border-left: 1px solid #3A5197;
padding: 5px;
margin-right: 1px;
}
Offline Profile Goto Top
 
Roby-ZNR
Member Avatar
Efficacy
[ *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic