The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need to add some code but do not know where
I have received following instructions in order to add link exchange script but I do not know how to add it to vB:
1. Add this code to your script (in bootstrap or in each php file): Code:
<?php include_once('prolink.php'); ?> Code:
<?php prolink_getLinks(); ?> |
#2
|
||||
|
||||
1) Easiest way would be to create a plugin with hook @ global start (or similar, not sure how it's exactly called) and insert the code there, so you could make sure that the inclusion is available throughout the whole script call.
2) This code won't work in template files, you can't use php code. A plugin which works with template-hooks seems to be the easiest way to realize this without modifying vb core files. |
#3
|
|||
|
|||
I was also given this instructions:
In includes/class_bootstrap.php after: Code:
$templater = vB_Template::create("footer"); Code:
ob_start(); include("prolink.php"); prolink_getLinks(); $prolink = ob_get_clean(); $templater->register("prolink", $prolink); Code:
{vb:raw prolink} Does this code look OK? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|