Disable Previous/Next thread

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nfn
    Senior Member
    • Apr 2006
    • 100

    Disable Previous/Next thread

    Hi,

    Where do I disable the link bellow the threads to the Previous and Next one?

    I see a conditional there at showthread.php
    <if condition="$show['next_prev_links']">

    Thanks

    n
  • glennybee
    Senior Member
    • Feb 2008
    • 1005
    • 3.7.x

    #2
    The code is contained in the showthread.php file.

    Code:
    // next/prev links don't work for search engines or non-lastpost sort orders
    $show['next_prev_links'] = (!$show['search_engine']
        AND ($foruminfo['defaultsortfield'] == 'lastpost' OR !$foruminfo['defaultsortfield'])
    );
    Commend it out if you don't want it to show.

    Code:
    // next/prev links don't work for search engines or non-lastpost sort orders
    //$show['next_prev_links'] = (!$show['search_engine']
    //    AND ($foruminfo['defaultsortfield'] == 'lastpost' OR !$foruminfo['defaultsortfield'])
    //);

    Comment

    • nfn
      Senior Member
      • Apr 2006
      • 100

      #3
      So $show['next_prev_links'] by default aren't shown to search engines?

      Comment

      • Kinneas
        Senior Member
        • Jan 2005
        • 308
        • 3.8.x

        #4
        You don't need to (and shouldn't) modify the php file directly.

        Just go to the SHOWTHREAD template and remove/comment out the following:

        <if condition="$show['next_prev_links']">
        <!-- next / previous links -->
        <br />
        <div class="smallfont" align="center">
        <strong>&laquo;</strong>
        <a href="showthread.php?$session[sessionurl]t=$threadid&amp;goto=nextoldest" rel="nofollow">$vbphrase[prev_thread]</a>
        |
        <a href="showthread.php?$session[sessionurl]t=$threadid&amp;goto=nextnewest" rel="nofollow">$vbphrase[next_thread]</a>
        <strong>&raquo;</strong>
        </div>
        <!-- / next / previous links -->
        </if>

        Comment

        • nfn
          Senior Member
          • Apr 2006
          • 100

          #5
          But are these links seen by bots?

          I setup mine like this:

          <if condition="$show['next_prev_links'] and !$show['guest']">
          ...
          </if>

          Comment

          • Kinneas
            Senior Member
            • Jan 2005
            • 308
            • 3.8.x

            #6
            Bots see what Guests see. View your forum as a guest and you'll have your answer.

            Comment

            • nfn
              Senior Member
              • Apr 2006
              • 100

              #7
              I know that but, !$show['search_engine'] means show to guests but not to bots?

              Comment

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