vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Load category by click (https://vborg.vbsupport.ru/showthread.php?t=159844)

Lee Saker 10-08-2007 10:00 PM

Load category by click
 
Simple demo: attachment

Install:
Add to bottom of template headinclude
Quote:

<script language="JavaScript1.3">
var panes = new Array();

function setupPanes(containerId, defaultTabId) {
// go through the DOM, find each tab-container
// set up the panes array with named panes
// find the max height, set tab-panes to that height
panes[containerId] = new Array();
var maxHeight = 0; var maxWidth = 0;
var container = document.getElementById(containerId);
var paneContainer = container.getElementsByTagName("div")[0];
var paneList = paneContainer.childNodes;
for (var i=0; i < paneList.length; i++ ) {
var pane = paneList[i];
if (pane.nodeType != 1) continue;
if (pane.offsetHeight > maxHeight) maxHeight = pane.offsetHeight;
if (pane.offsetWidth > maxWidth ) maxWidth = pane.offsetWidth;
panes[containerId][pane.id] = pane;
pane.style.display = "none";
}
paneContainer.style.height = maxHeight + "px";
paneContainer.style.width = maxWidth + "px";
document.getElementById(defaultTabId).onclick();
}

function showPane(paneId, activeTab) {
// make tab active class
// hide other panes (siblings)
// make pane visible

for (var con in panes) {
activeTab.blur();
activeTab.className = "tab-active";
if (panes[con][paneId] != null) { // tab and pane are members of this container
var pane = document.getElementById(paneId);
pane.style.display = "block";
var container = document.getElementById(con);
var tabs = container.getElementsByTagName("ul")[0];
var tabList = tabs.getElementsByTagName("a")
for (var i=0; i<tabList.length; i++ ) {
var tab = tabList[i];
if (tab != activeTab) tab.className = "tab-disabled";
}
for (var i in panes[con]) {
var pane = panes[con][i];
if (pane == undefined) continue;
if (pane.id == paneId) continue;
pane.style.display = "none"
}
}
}
return false;
}
</script>
Open template forumhome and search
Quote:

<body>
Replace with
Quote:

<body onload='setupPanes("containerx", "tabx");'>
x is no of category you want it is default
Search
Quote:

<!-- main -->
$forumbits
<!-- /main -->
Replace with
Quote:

<div id="containerx">
<ul class="tabs">
<li><a href="#" onClick="return showPane('x', this)" id="tabx">x</a></li>
<li><a href="#" onClick="return showPane('y', this)">y</a></li>
</ul>

<div class="tab-panes">

<!-- main -->
$forumbits
<!-- /main -->

</div>
</div>
y is no of yours categories
Search template forumhome_forumbit_level1_nopost, add on top
Quote:

<div id="$forumid">
Add on bottom
Quote:

</div>
Finish :)

Click Install if you like it :D :D :D

jarod1981? 10-09-2007 03:45 PM

Oh very interesting...very thanks e congratulations ;-)

:up:

Spank 10-09-2007 03:49 PM

That's brill. Abit like the tabs on here only faster. Nice job.

linhhon2003 10-09-2007 04:03 PM

i cant do it. need hide all of your forum?

jasculs 10-09-2007 05:06 PM

Once someone installs this on an English forum version can they please post a demo...Thanks

jasculs 10-09-2007 05:13 PM

Hey Lee Skater,

How can I get a similar forum layout like yours?

Mecho 10-09-2007 06:40 PM

sry but i dont get it !? any english demo plz

FreshFroot 10-09-2007 09:21 PM

this actually looks very interesting.. I will have a go at it, BTW I use a english forum.

yoyoyoyo 10-09-2007 09:23 PM

I don't get it either - what am I supposed to be looking at?

chickadee 10-10-2007 01:08 AM

Has anyone got this working?

SCRIPT3R 10-10-2007 01:21 AM

guys, you can do this by default settings... no need to edit anything or use whatever that java code mess is above; just set your category as hyperlinks to whatever section you want them to open up into. very simple.

shadowevil 10-10-2007 03:41 AM

Mod is not plugins ... It's Template Modifications >"< .... anyway, thanks for sharing but not install :)

Lee Saker 10-10-2007 03:46 AM

Quote:

i cant do it. need hide all of your forum?
Follow my tut and without anything
Quote:

How can I get a similar forum layout like yours?
U need edit in forumhome_forumbit_level1_nopost, use fieldset

This's beta version, i'll complete it coming soon

linhhon2003 10-10-2007 04:31 AM

tried.but cant. it doesnt show anything :(


All times are GMT. The time now is 05:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01890 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete