Announcement

Collapse
No announcement yet.

Includes within a template

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

  • Includes within a template

    Is it possible to use PHP includes within the header template?

    I want to use this code to generate a random quote:

    PHP Code:
    <?
    include('randomquote.php');
    ?>
    But it's not working for me. Is there a problem with putting includes within a template? Is there a way round it?

    Chris

  • #2
    Please see these instructions for including PHP, TXT or HTML in a template:

    http://www.vbulletin.com/docs/html/t..._externalfiles
    http://www.vbulletin.com/forum/showt...18#post1066718
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      I have this working now (following the instructions) but I can't work out how to set up a second include.

      It says "If you wish to include() multiple PHP files, make sure you use ob_clean() before each include() to reset the buffer" - so I guess I can set up a second file.

      How do I do that though?

      If $includedphp includes the first PHP file - what would I use to insert the second file?

      Comment

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