Announcement

Collapse
No announcement yet.

Code to generate the link to a post

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

  • Code to generate the link to a post

    I want to add a little link on each post in a thread that is the direct link to that post without the long string of session numbers. What is the code to do that?

  • #2
    $bburl/showthread.php?postid=$post[postid]

    Comment


    • #3
      Re: Code to generate the link to a post

      Originally posted by samtha25
      I want to add a little link on each post in a thread that is the direct link to that post without the long string of session numbers. What is the code to do that?
      i prefer to use

      showthread.php?s=&postid=$post[postid]#post$post[postid]
      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
      :: Nginx SPDY SSL - World Flags Demo [video results]
      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

      Comment


      • #4
        Well yes you should have the
        #post$post[postid]
        on the end however the s=& is completely unneeded.

        Comment


        • #5
          So it would be:

          $bburl/showthread.php?postid=$post[postid]#post$post[postid]?

          Why is the # part needed as the $post[postid] alone seems to work OK?

          Comment


          • #6
            Originally posted by samtha25
            So it would be:

            $bburl/showthread.php?postid=$post[postid]#post$post[postid]?

            Why is the # part needed as the $post[postid] alone seems to work OK?
            example

            http://vbulletin.com/forum/showthrea...030#post228030

            versus

            http://vbulletin.com/forum/showthrea...&postid=228030
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment


            • #7
              Originally posted by samtha25
              Why is the # part needed as the $post[postid] alone seems to work OK?
              If it is not the first post on a page it will make the page jump to the specific post that is being referenced.

              Comment


              • #8
                Thanks very much, guys.

                Comment


                • #9
                  Originally posted by samtha25
                  Thanks very much, guys.
                  no probs
                  :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                  :: Nginx SPDY SSL - World Flags Demo [video results]
                  :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                  Comment


                  • #10
                    np

                    Comment


                    • #11
                      np

                      ...wait a second, wrong thread.
                      Chen Avinadav
                      Better to remain silent and be thought a fool than to speak out and remove all doubt.

                      גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                      Comment


                      • #12

                        Comment


                        • #13
                          This:

                          $bburl/showthread.php?postid=$post[postid]#post$post[postid]

                          isn't working. I'm getting:

                          www.oursite.com/showthread.php?blah

                          instead of

                          www.oursite.com/vbb/showthread.php?blah

                          Help?

                          Comment


                          • #14
                            Go into your Admin CP > vBulletin Options > General > and look at the URL. It should be
                            http://www.yoursite.com/vbb
                            just like that.

                            Comment


                            • #15
                              It is, with no trailing slash, like it says. Maybe I haven't done the link correctly. I have an image in it.
                              Code:
                              <a href="$bburl/showthread.php?postid=$post[postid]#post$post[postid]">
                              <img src="{imagesfolder}/link.gif" width="10" height="17" border="0" align="right"></a>
                              That's it exactly.

                              Comment

                              Loading...
                              Working...
                              X