Announcement

Collapse
No announcement yet.

Which Template displays Posts ?

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

  • [Forum] Which Template displays Posts ?

    In vbulletin at showthread.php it is calling template in database to show shothread page.

    i.e 'SHOWTHREAD' row at 'template' table

    At showthread it has given cal to

    Code:
    $final_rendered .= '' . '
            <ol id="posts" class="posts" start="1">
                ' . $postbits . '
            </ol>
    Initially I assumed $postbits is executing data at "postbit" row at "template" table. But it doesnot affecting/displaying changes.

    Does anyone have idea exactly from where in 'template' table $postbit data is getting executed?

    From where it is getting data for $postbits.

  • #2
    Posts use one of two templates depending on your settings:

    postbit or postbit_legacy
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.6.1 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #3
      Thanks for reply.It was postbit_legacy in my case.
      I want to insert a image after first post only.
      Is there any way/trick to identify end of first post.

      Comment


      • #4
        You can use the condition:
        Code:
        <vb:if condition="$post['isfirstshown']">
        image here
        </vb:if>
        That will show an image after the first post of every page.

        If you really want to show only after the very first post in a thread, and not on subsequent pages, you could use:
        Code:
        <vb:if condition="$post['postcount'] == 1">
        image here
        </vb:if>

        Comment


        • #5
          Thanks for reply. It worked.
          Is there any way to detect last post in similar manner as you described above?

          In which file or template global variables are being declared at vbulletin? So that I can call same variable from any template without redeclaration?

          Comment


          • #6
            I believe $post['islastshown'] should also work...

            You'd have to look at the php file that calls the template, like showthread.php to see what is being called. In VB4 virtually every variable not used by default in a template needs to be pre-registered.

            Comment

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