Change 'Forum' breadcrumb link from index.php to root

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ap0llo_*
    New Member
    • Mar 2010
    • 17
    • 4.0.0

    [Forum] Change 'Forum' breadcrumb link from index.php to root

    Hi,

    I'm trying to delete all occurrences of index.php and instead will be using the root domain. I've managed to get rid of all occurrences of index.php apart from one, the Forum link in the breadcrumb links. Anyone know how to get rid of this?

    Rhys
    Tech-Reviews | Tech-Reviews Forums
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    How about vboptions > Forums Home Page Options > Script Name for Forum Home Page ?

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • ap0llo_*
      New Member
      • Mar 2010
      • 17
      • 4.0.0

      #3
      Originally posted by Lynne
      How about vboptions > Forums Home Page Options > Script Name for Forum Home Page ?
      I've tried this but as it's the root it does not work because if put a / in this option, .php is added to the ending. Therefore, the forum link becomes /.php .
      Tech-Reviews | Tech-Reviews Forums

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        Since you know it is the setting 'forumhome', did you try searching in the files for where it is used? It's on the bottom of the forum pages under the //draw nav bar area - like here in forumdisplay.php:
        PHP Code:
        // draw nav bar
        $navbits = array();
        $navbits[$vbulletin->options['forumhome'] . '.php' $vbulletin->session->vars['sessionurl_q']] = $vbphrase['forum']; 

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools <- awesome site for html/css help

        Comment

        • ap0llo_*
          New Member
          • Mar 2010
          • 17
          • 4.0.0

          #5
          Originally posted by Lynne
          Since you know it is the setting 'forumhome', did you try searching in the files for where it is used? It's on the bottom of the forum pages under the //draw nav bar area - like here in forumdisplay.php:
          PHP Code:
          // draw nav bar
          $navbits = array();
          $navbits[$vbulletin->options['forumhome'] . '.php' $vbulletin->session->vars['sessionurl_q']] = $vbphrase['forum']; 
          Ah it seems I only looked within 'Search in Templates' rather than the raw files. Thanks.

          I've made the changes to forumdisplay.php and showthread.php. Do you know any other files to change the link in?

          I've had to leave index in the 'Script Name for Forum Home Page' as the 'Mark Forums Read' seems to redirect to this and I couldn't find a way of redirecting to the root rather than this. Do you know of a way?

          Thanks for all your help so far, these answers are not anywhere on the internet!

          Rhys
          Tech-Reviews | Tech-Reviews Forums

          Comment

          • Lynne
            Former vBulletin Support
            • Oct 2004
            • 26255

            #6
            Try a search in your files for $navbits[$vbulletin->options['forumhome'] to see if it shows up anywhere else. And for the Mark Forums Read, if you look at the link, it goes to forumdisplay.php?do=markread, so look under that action in the file to find the redirect link.

            Please don't PM or VM me for support - I only help out in the threads.
            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
            Want help modifying your vbulletin forum? Head on over to vbulletin.org
            If I post CSS and you don't know where it goes, throw it into the additional.css template.

            W3Schools <- awesome site for html/css help

            Comment

            • Mike0
              New Member
              • May 2011
              • 9
              • 4.1.x

              #7
              vBulletin 4.1.3 solution

              I thought I'd update this topic with the solution for the current vBulletin 4.1.3 version, since the old solution doesn't apply anymore.

              in \includes\class_friendly_url.php
              Replace
              PHP Code:
              $this->script $registry->options['forumhome'] . ".php"
              with
              PHP Code:
              $this->script $registry->options['forumhome']; 
              in Template: navbar (id: 748)
              Replace
              PHP Code:
              <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
              with
              PHP Code:
              <li class="navbithome"><a href="{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li

              Comment

              • alive.se
                New Member
                • Feb 2008
                • 2
                • 4.1.x

                #8
                Originally posted by Mike0
                I thought I'd update this topic with the solution for the current vBulletin 4.1.3 version, since the old solution doesn't apply anymore.
                Great work!
                It worked perfect, it took some time to find someone who had solved it but it was sure worth it :P
                Many thanks.
                Webmaster @ alive.se

                Comment

                • tuningmode
                  Senior Member
                  • Sep 2010
                  • 129

                  #9
                  I just recently had the forum updated to 4.1.10, I managed to update everything from my previous versions to remove forum.php, however the latest version I don't think the code
                  Code:
                  [COLOR=#000000][COLOR=#0000BB]$this[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]script [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$registry[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]options[/COLOR][COLOR=#007700][[/COLOR][COLOR=#DD0000]'forumhome'[/COLOR][COLOR=#007700]];[/COLOR][/COLOR]
                  is valid anymore as it will but the path to domain.com/forum instead of the root url

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...