![]() |
|
|
Thread Tools |
|
#1
|
||||||||||||
|
||||||||||||
|
Include php file in template
Hi everyone. I have some trouble including a php file in my template, will describe the problem below:
I have a template with an header, a navbar, the forum/content, footer and a fixed right bar. I want to insert this php code(for now) into the right bar: userbox.php
userbox plugin:
Inside the footer template I have made a div that is fixed and I call the plugin with this code:
But it doesn't output my desired string. The HOOK is parse_templates. When i in the plugin write echo $userboxinsert; the userbox get's inserted but at the top of the screen, so the link works. Would be very happy if someone could help me with this problem! --------------- Added 28 Mar 2011 at 14:09 --------------- I can add that when I turn debug on, the file is included but it doesn't write out any text! No members have liked this post.
Last edited by Muffin89 : 28 Mar 2011 at 14:09. Reason: Auto-Merged DoublePost |
||||||||||||
|
#2
|
||||||||||||
|
||||||||||||
|
This line here is registering a variable named $php_include:
That line would allow you to use this line in the footer template:
If you want to use the variable $userboxinsert, then you need to preregister that variable, not php_include.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
||||||||||||
|
#3
|
|||
|
|||
|
Thank you that solved the problem!
No members have liked this post.
|
|
#4
|
||||||||
|
||||||||
|
I am using (vBulletin 4.0.5 Patch Level 6)
Plugin Code:
Using Hook: global_start_init_start To display in header template I tried both below, but I still get no output
Can anyone help please No members have liked this post.
|
||||||||
|
#5
|
||||
|
||||
|
Change the preRegister line to:
(or else change the ob_get_contents() line to use $kellysmenu instead of $kbar).
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
||||
|
#6
|
||||||||
|
||||||||
Using Hook: global_start_init_start To display in header template I tried both below, but I still get no output
No members have liked this post.
|
||||||||
|
#7
|
||||
|
||||
|
Try using hook parse_templates. If it still doesn't work, try this as a test:
BTW, you definitely want to use {vb:raw kellysmenu} in the template (assuming you have some version of vbulletin 4).
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
||||
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 06:16.


