vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   breadcrumb issue after upgrading from vB3 to vB4 (https://vborg.vbsupport.ru/showthread.php?t=288435)

Psalmist 09-28-2012 05:50 PM

breadcrumb issue after upgrading from vB3 to vB4
 
We're upgrading a large forum from vBulletin 3 to vBulletin 4.

In our vBulletin 3 setup, the forum is the home page, on the root of our site. Basically our whole site is the forum.

vBulletin 4 has an articles section and by default that's the home page. We followed instructions to make the forum the homepage in our vBulletin 4 test setup. But two problems remain, both related to the breadcrumb navigation.

1. In vBulletin 3, the leftmost breadcrumb is the site name, not "Forum". We want to keep it that way (it should be the site title, not "Forum").

2. Also, in vBulletin 3, there is no breadcrumb on the homepage. We also want to keep that the same. (In our current test setup of vBulletin 4, there's an unlinked "Forum" breadcrumb on the main page.)

Can you please advise.

kh99 09-28-2012 06:28 PM

Quote:

Originally Posted by Psalmist (Post 2369259)
1. In vBulletin 3, the leftmost breadcrumb is the site name, not "Forum". We want to keep it that way (it should be the site title, not "Forum").

That was a little tricky but there's a way to do it in a plugin using hook location template_register_var:

Code:

global $vbphrase, $vbulletin;

if ($this->template == 'navbar_link' AND $name == 'nav_title' AND $value == $vbphrase['forum'])
{
    $value = $vbulletin->options['bbtitle'];
}


Quote:

2. Also, in vBulletin 3, there is no breadcrumb on the homepage. We also want to keep that the same. (In our current test setup of vBulletin 4, there's an unlinked "Forum" breadcrumb on the main page.)
That one's a little easier: edit the navbar template, find the breadcrumb section and add an if, like:

Code:

<div class="body_wrapper">
<vb:if condition="THIS_SCRIPT != 'index'">
<div id="breadcrumb" class="breadcrumb">
        <ul class="floatcontainer">
                <li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>
                {vb:raw navbits.breadcrumb}
                {vb:raw navbits.lastelement}
        </ul>
        <hr />
</div>
</vb:if>



All times are GMT. The time now is 10:47 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.01376 seconds
  • Memory Usage 1,718KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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