![]() |
How to add php code into vb4 template?
How to add php code into vbulletin 4 template?
i want it only on the index page (forums listing) the php code to add: Code:
<?php vBulletin Admin area / Plugins & Products / Add New Plugin As a Hook location you can use navbits_complete and it should load the php code on all pages of the forum including index. To show it only on thread pages, use "fetch_foruminfo" Plugin is Active = yes As a PHP code, do NOT enter <?php ?>, you should add code right away |
You can't use PHP in templates, you need to output the contents of the PHP to the templates via variables and such.
|
I would also suggest asking for support from the backlinks site, as this is their code, they can tell you what to do.
|
The easiest way is to make a plugin for this. Add the code to the plugin, bind it to the right hook location, assign it to a template variable and display it where needed.
|
im really noob and not programmer to do it "plugin way", there would have to be some step by step tutorial to follow, and i dont want to waste whole afternoon doing it. Can i include some .php file into template?
|
No.
|
Quote:
There is no method to include a PHP file directly into a template. One of the niceties of the vBulletin template system is it just might save you from yourself. Like including PHP in a way that you you shouldn't and allowing your board to be exploitable or compromised. :) |
i mentioned my code already before.
So what is the step by step easiest process to add it to the index.php page (forum.php) as i already mentioned |
Quote:
|
So i know i cant add php code into template.
How can i let some php code be shown or executed on vbulletin forum, example index, header of footer? even dirty way? thanks |
All times are GMT. The time now is 04:15 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|