The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hooks and templates
Hi there,
I got a basic question: How can I create my own hooks in templates and php files ? And another question: How can I use them? I wanted to add something to my home page in the cms. Basically I wanted to add a slider function to it, or lets say, firstly just the template. So what I did was as follows: 1. Add own template in default style: called 'content_slider' and put my html code in 2. added product: Add-On: CMS Hook: init_start Title: content_slider Priority: 5 Code PHP Code:
3. I edited the template:vbcms_page and put this code inside: Code:
{vb:raw template_hook.cms_content_slider} Everything is vice versa and my page looks very arabic... no offense .... but it actually changed to RTL!!!! I was really confused. Maybe somebody could help me out how to add template hooks and php hooks |
#2
|
||||
|
||||
You probably didn't change the CSS at all and so everything went wonky.
|
#3
|
|||
|
|||
Ok guys,
I got a damn serious problem at the moment. I tried something else so what I did was adding this code to the plugin: PHP Code:
The $content_slider template was successfully loaded and it is visible on a nice white blank page ... the admincp also doesnt work anymore, because there is just a white page. What I did after was logging into my phpmyadmin, tablelugins fetch the one with my plugin and changed the php code, as well as i set activated to 0. Still blank........ Anykind of help would be apprechiated a lot! Vb4.0.3 Debug Mod on //EDIT DB Backup saved my a** however, I am really interested what that problem caused |
#4
|
||||
|
||||
Next time you need to turn your plugins off in order to get into the admincp, do it through the config.php file
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php PHP Code:
print_output is what you do if it's the very last template for the page. It spits it out and then stops doing anything else. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|