Announcement

Collapse
No announcement yet.

how can I insert a file in a template?

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

  • how can I insert a file in a template?

    Hi

    I would like to insert a separate file under the table header, before the forums get actually displayed.

    I can't see how I should use this bit of code:
    PHP Code:
    // Example of how to include a seperate file:
    // ob_start();
    // require("yourheader.html");
    // $header = ob_get_contents();
    // ob_end_clean(); 
    Should I actually place this bit of code in the appropriate vBulletin template?

    thanks in advance for your help
    Alex

  • #2
    If you want something with the "head" "/head" HTML code, install it in the "headinclude" template for the specific style you're working with. I strongly suggest creating a test style and a test forum assigned to that style, in order to test it. Once you've got it working, you can transfer that code to the "live" style.

    Comment


    • #3
      Actually, I don't want it in the <head> part of the document.

      Just imagine that, on the forum's homepage, there would be a file inserted below the table header links (userCP, newposts etc...). It's actually an html file that will be updated quite often.

      Is that feasible? It almost sounds like a hack but... it seemed that it was possible using the code posted above and a bit of template editing.
      Alex

      Comment


      • #4
        That would be under the $navbar variable in the header template IIRC.

        Comment


        • #5
          Oh and thanks for your reply
          Alex

          Comment


          • #6
            is that where I should include the above code, with the path to my file?
            Alex

            Comment


            • #7
              Originally posted by jeskel
              is that where I should include the above code, with the path to my file?
              bump

              I still don't know if I am supposed to add the code posted above in the template to be edited.

              thanks in advance for your help
              Alex

              Comment

              Loading...
              Working...
              X