![]() |
The problem with file inclusion is that this is completely contrary to the way in which vBulletin handles it's output buffering.
It doesn't generate line after line, it generates the entire page, and then sends that to the browser once it's compiled it. For includes to work properly, anything (echos, output, etc.) would have to be stored as variables within the include, which are then echoed by the template itself. |
DraX - and what is the solution? Any code ideas?
|
Hello, sorry if this has been answered, I have read through and can't find anyhting relating to my problem.
I have installed the hack, I then dropped '<? ?>' (without the quotes) into the header of one of our templates. When I view the page it's not parsing the php, I can see the php tags in the source. I then tried dropping an include in the same place but I then just get a blank page. I read that there are issues with using includes in the templates and I can live without using them although it would be very useful if I could. Can you shead any light, let me know if you need any more details. Thanks for your help people :) |
You're not the only one.
I can't get php working in my 2.3 templates too. Any solutions in v3? Anybody, Fil, xenon?! |
Can you retrive information from the database with this hack?
|
Theoreticaly it operates template DB. Theoreticaly.
|
Great hack!
I am so glad that I found this hack, but the problem is that I'm having trouble installing it. I did exactly what is written in the file, the simple replacement of the code but this is what I get on the top of myVBindex.php. Warning: Failed opening 'randomride.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/importhookup/public_html/forums/admin/functions.php(1095) : eval()'d code on line 1 Parse error: parse error, unexpected T_INCLUDE in /home/importhookup/public_html/forums/admin/functions.php(1095) : eval()'d code on line 1 Parse error: parse error, unexpected T_INCLUDE in /home/importhookup/public_html/forums/admin/functions.php(1095) : eval()'d code on line 1 Can someone help me with this? Thanks! |
If I use include statements, it works but always puts the include file at the top of the page. Any way around this?
Thanks for the cool hack! |
Not working... at least not in the postbit.
Code used: PHP Code:
Code:
<? |
Is it working in v3?
|
filburt, in your opinion does this render logician's conditionals hack obsolete? i'm fluent in php. i liked logician's conditionals a lot except that it was kinda slow..
|
I have tried many combinations and haven't figured out this one yet
if someone would be so kind this is what I had figured out in the vb3 conditionals: PHP Code:
I have tried several things but only get parse errors displayed above the header stuff like: PHP Code:
PHP Code:
thanks a bunch for any help |
once again...I couldn't get bit by a dog even with a steak hanging around my neck
|
Quote:
well, i don't have any experience in vbulletin 3, but if i'm understanding the code correctly, it should look something like this in php: PHP Code:
|
thank you...I will give that a try.
it looks like it will work though....I forgot about the "echo" |
We all forget some times about the quotes or the echo ...
|
I read through some of the other messages AFTER modifying/fixing the original script, I would have added the <?php ?> <php> </php> stuff but I can't be arsed. On a deadline for other stuff.
That said, attached is an updated version that uses output buffering (in case you want to echo text) and also fixes the str_replace that didn't do squat :) Mail me at stephen AT natnet DOT com if you want to say thanks or have questions, today was my first day on the board and I probably won't be back (fixed for a client who wanted to use phpAdsNew). |
Very usefull! I hope this will possible in vb3 soon. :)
|
Quote:
With these modifications, the hack works like a charm for what I needed it to do, which was to pull a php file into the header template via include(). the original hack would pull the file into the page but only at the top of the page and not where it was supposed to display. For everyone else that had a similar problem, try this version. My thanks to both authors that worked on this. |
All times are GMT. The time now is 03:33 AM. |
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:
|