Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [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

  • #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


    • #3
      Originally posted by Lynne View Post
      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


      • #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


        • #5
          Originally posted by Lynne View Post
          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


          • #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


            • #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


              • #8
                Originally posted by Mike0 View Post
                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


                • #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:
                  $this->script = $registry->options['forumhome'];
                  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...
                  X