View Full Version : vertical navigation on left as on Sitepoint
Dannyboy1
09-21-2006, 10:11 AM
If I want to make such a vertical navigation on left as on Sitepoint how can I do that? I mean I have tested the mods that I found here, but there are not even close to what you see on SItepoint.
Any ideas?
MRGTB
09-21-2006, 02:43 PM
That's basically just a Left Side Column hack, which you can find here:
https://vborg.vbsupport.ru/showthread.php?t=117988
Dannyboy1
09-21-2006, 04:01 PM
That's basically just a Left Side Column hack
Thanks....but I doubt that will make the navigation as on SitePoint beacuse do you see how you can add there subforum etc. I am not sure that you can do that with this mod, as long as I read the description. And that's for 3.6.0
I still use 3.5.4
Any other ideas?
Basically where from the vbulletin source can I grab the forum folder tree including all the subforums and just paste it in some custom column on the left?
Adrian Schneider
10-09-2006, 12:35 AM
Here is what I'm using... It's not perfect yet, but it's pretty close.function buildForumTree($forumid = -1, $depth = 0, $collapseDepth = 1)
{
global $vbulletin;
$forumbits = '';
foreach ($vbulletin->forumcache as $forum)
{
$permissions = fetch_permissions($forum['forumid']);
if (
$forum['depth'] != $depth or
$forum['parentid'] != $forumid or (
!($permissions & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and
!$vbulletin->options['showprivateforums']
)
) continue;
$forum['childArray'] = explode(',', $forum['childlist']);
$forum['subforums'] = count($forum['childArray']);
$show['collapsesubforums'] = ($depth == $collapseDepth and $forum['subforums'] > 2);
$childForumBits = ($forum['subforums'] > 2 ?
buildForumTree($forum['forumid'], $depth + 1)
: ''
);
eval('$forumbits .= "' . fetch_template('portal_forumsbit') . '";');
}
return $forumbits;
}
$forumbits = buildForumTree();portal_forums<table width="180" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" class="tborder">
<tr>
<td class="thead">Forum Tree</td>
</tr>
$forumbits
</table>portal_forumsbit<if condition="$depth == 0">
<tr>
<td class="alt1">
<span class="smallfont">
<if condition="$show['collapsesubforums']">
<a style="float:$stylevar[right]" href="#" onclick="return toggle_collapse('forumtree_$forum[forumid]')">
<img id="collapseimg_forumtree_$forum[forumid]" src="images/buttons/collapse_alt_collapsed.gif" alt="Hide/Show" border="0" />
</a>
<else />
»
</if>
<strong><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a></strong>
</span>
<if condition="$show['collapsesubforums']"><div id="collapseobj_forumtree_$forum[forumid]" style="display: none"></if>
$childForumBits
<if condition="$show['collapsesubforums']"></div></if>
</td>
</tr>
<else />
<div class="smallfont" style="margin-left: 10px; margin-top: 8px">
<if condition="$show['collapsesubforums']">
<a style="float:$stylevar[right]; padding-left: -13px" href="#" onclick="return toggle_collapse('forumtree_$forum[forumid]')">
<img id="collapseimg_forumtree_$forum[forumid]" src="images/buttons/collapse_alt_collapsed.gif" alt="Hide/Show" border="0" />
</a>
<else />
»
</if>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<if condition="$show['collapsesubforums']"><div id="collapseobj_forumtree_$forum[forumid]" style="display: none"></if>
$childForumBits
<if condition="$show['collapsesubforums']"></div></if>
</div>
</if>
Dannyboy1
10-09-2006, 09:30 AM
Thanks SirAdrian :) I will test your code today and report back.
Can you just be a littile bit more specific where do I have to paste the code provided by you?
Thank you.
Hornstar
10-15-2006, 08:50 AM
A demo of what yours looks like as well would be nice :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.