Adding PHP in template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nathan-mahdavi
    New Member
    • Apr 2013
    • 5
    • 5.0.0

    Adding PHP in template

    How can I add some custom PHP into one of my templates? I've taken a look at http://www.vbulletin.com/docs/html/m..._externalfiles but it seems out of date. Where do I create the plugin file? There is no global_bootstrap_init_start in the hooks list either.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74161

    #2
    You cannot use PHP within the templates. You've never been able to use PHP in templates. What is stated in vBulletin 4's manual does not apply to vBulletin 5. You need to review the appropriate manual version.
    • vBulletin 5 doesn't support external files in the methods you're used to.
    • All hooks in vBulletin 4 are no longer valid in vBulletin 5.
    • vBulletin 5 only has template hooks. Thought these are more powerful than those in previous versions.
    • vBulletin 5 does not support PHP Plugins.
    • PHP Extension is done via API Classes in vBulletin 5.

    If you want to include external files, you'll need to use either HTML or PHP modules on the page. Include the HTML directly in the module or encapsulate it in an iframe element. For PHP modules, you'll need to use output buffering and assign it to the $output variable. If you need more information on these, please visit www.vbulletin.org.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

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