Change link to "Post new thread"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JabirA
    Member
    • Apr 2012
    • 80
    • 4.1.x

    [Forum] Change link to "Post new thread"

    Hello,

    Does someone know how to change the link "Post new thread" to link to another page. If yes is it possible to do this for a specific forum?

    Thanks in advance.

    Kind regards
  • TheLastSuperman
    Senior Member
    • Sep 2008
    • 1799

    #2
    Originally posted by JabirA
    Hello,

    Does someone know how to change the link "Post new thread" to link to another page. If yes is it possible to do this for a specific forum?

    Thanks in advance.

    Kind regards
    You should be able to edit template SHOWTHREAD and find:
    Code:
        <div id="above_postlist" class="above_postlist">
            <vb:if condition="$show['largereplybutton']">
                <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1" class="newcontent_textcontrol" id="newreplylink_top"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>
                <img style="display:none" id="progress_newreplylink_top" src="{vb:stylevar imgdir_misc}/progress.gif" alt="" />
            </vb:if>
    AND:

    Code:
    <div id="below_postlist" class="<vb:if condition="!$show['inlinemod']">noinlinemod </vb:if>below_postlist">
        <vb:if condition="$show['largereplybutton']">
            <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1"class="newcontent_textcontrol" id="newreplylink_bottom"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>
        </vb:if>
    Replace with:
    Code:
        <div id="above_postlist" class="above_postlist">
            <vb:if condition="$show['largereplybutton']">
                <a href="<vb:if condition="$thread['forumid'] == 9">http://www.yourreplacmenturlhere.com<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if  "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw  session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1</vb:if>"  class="newcontent_textcontrol" id="newreplylink_top"><vb:if  condition="$show['closethread']"><span>+</span>  {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase  closed_thread}</vb:if></a>
                <img style="display:none" id="progress_newreplylink_top"  src="{vb:stylevar imgdir_misc}/progress.gif" alt="" />
            </vb:if>
    AND:

    Code:
    <div id="below_postlist" class="<vb:if condition="!$show['inlinemod']">noinlinemod </vb:if>below_postlist">
        <vb:if condition="$show['largereplybutton']">
            <a href="<vb:if condition="$thread['forumid'] == 9">http://www.yourreplacmenturlhere.com<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if  "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw  session.sessionurl}p={vb:raw  LASTPOSTID}&amp;noquote=1</vb:if>"class="newcontent_textcontrol"  id="newreplylink_bottom"><vb:if  condition="$show['closethread']"><span>+</span>  {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase  closed_thread}</vb:if></a>
        </vb:if>
    Replacing the 9 in the added code w/ the forumid this change of the button will take place in .


    Former vBulletin Support Staff
    Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
    Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!

    Comment

    • JabirA
      Member
      • Apr 2012
      • 80
      • 4.1.x

      #3
      Didn't work! I tried it twice.

      Comment

      • borbole
        Senior Member
        • Feb 2010
        • 3074
        • 4.0.0

        #4
        Originally posted by JabirA
        Didn't work! I tried it twice.
        Try this. At the FORUMDISPLAY template find the following code:

        HTML Code:
        <vb:if condition="$show['newthreadlink']"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if>
        And change it to:

        HTML Code:
        <vb:if condition="$show['newthreadlink']">
        <a href="http://www.redireclink.com" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top">
        <span>+</span> {vb:rawphrase post_new_thread}</a></vb:if>
        And replace the example link with the link where you want to redirect the Post New Thread button when clicked upon.

        Comment

        • JabirA
          Member
          • Apr 2012
          • 80
          • 4.1.x

          #5
          @Borbole: I want this modification only in a specific forum. How do do I accomplish that?

          Comment

          • borbole
            Senior Member
            • Feb 2010
            • 3074
            • 4.0.0

            #6
            Originally posted by JabirA
            @Borbole: I want this modification only in a specific forum. How do do I accomplish that?
            I do not have much free time atm to look further into this. Here you have a list of conditionals. Give it a try yourself.

            Comment

            • JabirA
              Member
              • Apr 2012
              • 80
              • 4.1.x

              #7
              Thank you. I will look into it

              Comment

              • TheLastSuperman
                Senior Member
                • Sep 2008
                • 1799

                #8
                Originally posted by borbole
                Try this. At the FORUMDISPLAY template find the following code:

                HTML Code:
                <vb:if condition="$show['newthreadlink']"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if>
                And change it to:

                HTML Code:
                <vb:if condition="$show['newthreadlink']">
                <a href="http://www.redireclink.com" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top">
                <span>+</span> {vb:rawphrase post_new_thread}</a></vb:if>
                And replace the example link with the link where you want to redirect the Post New Thread button when clicked upon.
                omdl thanks for the catch! I was thinking reply to thread not post new thread .

                Originally posted by JabirA
                @Borbole: I want this modification only in a specific forum. How do do I accomplish that?
                So try this then instead:

                Code:
                [COLOR=#000000]<vb:if condition="$show['newthreadlink']"><a href="<vb:if condition="$thread['forumid'] == 9">http://www.yourreplacmenturlhere.com<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}</vb:if>" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if>[/COLOR]
                And revert the changes made to SHOWTHREAD respectively .


                Former vBulletin Support Staff
                Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
                Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!

                Comment

                • Matthew Gordon
                  Senior Member
                  • May 2002
                  • 3243
                  • 1.1.x

                  #9
                  I think this'll work. Edit the FORUMDISPLAY template, find:
                  Code:
                  <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}"
                  Replace with:
                  Code:
                  <a href="<vb:if condition="$foruminfo['forumid'] == 5">http://www.youurlhere.com/<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}</vb:if>"
                  This appears multiple times. Replace 5 with the appropriate forumid and the URL with the URL you want to use.

                  Comment

                  • JabirA
                    Member
                    • Apr 2012
                    • 80
                    • 4.1.x

                    #10
                    Originally posted by TheLastSuperman
                    omdl thanks for the catch! I was thinking reply to thread not post new thread .



                    So try this then instead:

                    Code:
                    [COLOR=#000000]<vb:if condition="$show['newthreadlink']"><a href="<vb:if condition="$thread['forumid'] == 9">http://www.yourreplacmenturlhere.com<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}</vb:if>" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if>[/COLOR]
                    And revert the changes made to SHOWTHREAD respectively .
                    Originally posted by Matthew Gordon
                    I think this'll work. Edit the FORUMDISPLAY template, find:
                    Code:
                    <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}"
                    Replace with:
                    Code:
                    <a href="<vb:if condition="$foruminfo['forumid'] == 5">http://www.youurlhere.com/<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}</vb:if>"
                    This appears multiple times. Replace 5 with the appropriate forumid and the URL with the URL you want to use.
                    Both solutions didn't work. :S
                    I am very confused right now. How is this possible?

                    Comment

                    • JabirA
                      Member
                      • Apr 2012
                      • 80
                      • 4.1.x

                      #11
                      Wait!

                      @Matthew Gordon

                      This works only for the second button. The first button still creates a new thread.

                      Comment

                      • JabirA
                        Member
                        • Apr 2012
                        • 80
                        • 4.1.x

                        #12
                        I fixed it now! The problem is that I didn't reverted the changes I made in the begin. I am sorry if causing confusion!
                        Thank you again very much for the help. You guys are the best!

                        Kind regards

                        Comment

                        • John Lester
                          Senior Member
                          • Jul 2000
                          • 412
                          • 4.1.x

                          #13
                          Originally posted by Matthew Gordon
                          I think this'll work. Edit the FORUMDISPLAY template, find:
                          Code:
                          <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}"
                          Replace with:
                          Code:
                          <a href="<vb:if condition="$foruminfo['forumid'] == 5">http://www.youurlhere.com/<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}</vb:if>"
                          This appears multiple times. Replace 5 with the appropriate forumid and the URL with the URL you want to use.
                          My oh my this is so much easier then what I was doing thank you
                          BrainTalk is a support group for friends, family, caregivers, and patients with neurological disorders and other health related diagnosis.

                          BrainTalk Communities Inc
                          sigpic

                          Comment

                          • enthusify
                            New Member
                            • Feb 2012
                            • 9

                            #14
                            Originally posted by Matthew Gordon
                            I think this'll work. Edit the FORUMDISPLAY template, find:
                            Code:
                            <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}"
                            Replace with:
                            Code:
                            <a href="<vb:if condition="$foruminfo['forumid'] == 5">http://www.youurlhere.com/<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}</vb:if>"
                            This appears multiple times. Replace 5 with the appropriate forumid and the URL with the URL you want to use.
                            I just did this and it works. Thanks guys!
                            Last edited by enthusify; Thu 13 Sep '12, 3:44pm.

                            Comment

                            Related Topics

                            Collapse

                            Working...