Announcement

Collapse
No announcement yet.

Custom Header & Footer for Showthread using template system

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

  • Custom Header & Footer for Showthread using template system

    I'm currently using vbulletin 3.7.

    For years I used the hack Add a Header / Footer option to each forum to add a header and footer to the showthread and forumdisplay pages. This mod was designed for vb 3.5 and doesn't seem to work with 3.7.

    Is there a way to achieve this using the template statement?

    For example, could you put a few if statments in the showthread template and link it to other templates so that, depending on the forum room, a forum header would be displayed?

    thanks,

    kevin
    | System 0 |

  • #2
    Yes, you could put a condition where you want in that template to do what you want.

    HTML Code:
    <if condition="$forum[forumid]==x">
    blah, blah
    </if>
    I do this on my forums, only I use a phrase to spit out what I want:
    HTML Code:
    <if condition="in_array($forum[forumid], array(x,y,z))">
    $vbphrase[my_added_phrase]
    </if>

    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 &lt;- awesome site for html/css help

    Comment


    • #3
      thanks for the quick response. How do you link to a new template? Do you need to add it as a hook?
      | System 0 |

      Comment


      • #4
        anyone know how to do this?
        | System 0 |

        Comment


        • #5
          Yes, you need to use a hook to insert a new template. Otherwise you could just put the code you wanted (html) in the conditional.

          Comment


          • #6
            Is there a template hook available where you want to insert another template? If not, you can add one:

            HTML Code:
            $template_hook[your_own_hook]
            And then create a plugin and eval it:

            PHP Code:
            eval('$template_hook[your_own_hook] .= " ' fetch_template('your_own_template') . '";'); 

            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 &lt;- awesome site for html/css help

            Comment

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