The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
2 almost identical plug-ins, one is working other is not.
I add an external php file to the common-template "header" of each style
$includedphpheader and this works smoothly. In the same way, I added $includedineverypost in the postbit template. and a plug-in hooked to Product : vBulletin plug-in title ineverypost Hook global_start Plugin PHP Code ob_start(); include('/home/domain/public_html/php/includes/ineverypost.inc.php'); $includedineverypost = ob_get_contents(); ob_end_clean(); Plugin is Active YES but $includedphpheader is not being parsed. What am I missing? |
#2
|
||||
|
||||
Access your file directly to see if it exists, can be read, and outputs something.
|
#3
|
|||
|
|||
Quote:
it does output the expected html code. I went further to chown me:me. ; chmod 775 -cvR . to all files in /php/includes/ still ineverypost.inc.php is not parsed in the posts |
#4
|
|||
|
|||
F1 !!!!
|
#5
|
|||
|
|||
Try [minicode]$GLOBALS[includedineverypost][/minicode] in the template.
|
#6
|
|||
|
|||
Quote:
to my big furstration yes this works. why does $includedineverypost not work when $GLOBALS[includedineverypost] does? it does help me to know that what I did was correct, and per the manual I cared to read .... note: I DID hook my plug-in to global start..... that did not help |
#7
|
||||
|
||||
The postbit is parsed inside a function outside the scope of a variable set at global_start. If you placed your plugin at postbit_display_complete it would work, but would waste server resources by including that file on every post.
|
#8
|
|||
|
|||
Quote:
thank you very much I appreciate your help your answer tells me that my original complaint on vbulletin.com that the documentation is lacking, was in fact correct. The documentation is not clear enough on including external php files. |
#9
|
|||
|
|||
thank you again Dismounted for this kind help
|
#10
|
|||
|
|||
I'm trying to call some code for an ad in the header of my forum.
I first tested it without an include and it works correctly. I then cut the code and put it in a new file and put <include('/home/domain/public_html/ads/file.php');> in it's place, but it isn't working. Is my format correct and do I need to do anything else to make my include work? Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|