vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vertical navigation on left as on Sitepoint (https://vborg.vbsupport.ru/showthread.php?t=127178)

Dannyboy1 09-21-2006 10:11 AM

vertical navigation on left as on Sitepoint
 
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

Quote:

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.
PHP Code:

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'] > ?  
            
buildForumTree($forum['forumid'], $depth 1)
            : 
'' 
        
);

        eval(
'$forumbits .= "' fetch_template('portal_forumsbit') . '";');
    }
    
    return 
$forumbits;
}

$forumbits buildForumTree(); 

portal_forums
HTML Code:

<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
HTML Code:

<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 />
                    &raquo;
                  </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 />
            &raquo;&nbsp;
          </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 :)


All times are GMT. The time now is 01:06 AM.

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.01055 seconds
  • Memory Usage 1,755KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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