![]() |
Include php
- Plugin
I have made and activated a Plugin with the flowing information: Hook Location: global_start Title: btnSolvedPHP Execution Order: 5 Plugin PHP Code: ob_start(); include('customcode/btnSolved.php'); $includedphp = ob_get_contents(); ob_end_clean(); - Template Then in the default template I've set the $includedphp at the right place: So in 'postbit' right under '$template_hook[postbit_userinfo_right]' I add the line '$includedphp' - File In the file 'customcode/btnSolved.php' I put the folowing testing-code: PHP Code:
But that is not the case fortunately.:confused: When I change the plugin-code to: $includedphp = 'qqq'; there is olso no line shown. Plugin-system is enabled and the plugin is also enabled. File and folder rights are 666. What can be the problem here? |
Maybe a stupid question, but, are you sure you are using the postbit template on your site and not the postbit_legacy template? And, are you changing the correct style templates?
|
Hi Lynne
If I put some text direct into the 'postbit' right under '$template_hook[postbit_userinfo_right]' then the text is shown at the right place. I think that awsers your'e reaction :) |
Quote:
You should see 'qqq' under the header. |
That's correct Andy.
ad_header_logo is empty in my case. But yes when I put $includedphp into ad_header_logo then I see 'qqq' in the right of the header. Do you know why 'qqq' is not being shown in the postbit and is being shown in the ad_header_logo? I think it is remarkable that direct text is shown in postbit and a include not. EDIT: I think it is remarkable that direct text is shown in postbit and a include not or only the content of a variable. |
Quote:
Code:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if> |
echo will spit out the text as soon as the code it run - which is in the global_start plugin. If you want to put the code somewhere specific, you need to save the result to a variable and then spit the variable out where you want it (no echo statements in this method).
|
Andy:
I did what you asked and unfortunately there is no text shown anywhere on the page. Man this is my fist time editing vbulletin and that makes thinking to a solution difficult. :) Lynne: Indeed. The global_start plugin runs the plugin. The plugin runs the php-file and set the result in the variable $includedphp. I put the variable in the right place with the Style Manager. Now.. When I put the variable in the style-template ad_header_logo then the value of the variable is shown correctly> But when I put the same variable in the style-template postbit then the value of the variable is not shown. Remarkable is that when I put direct text in the style-template then it is shown correctly. |
All times are GMT. The time now is 07:14 PM. |
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:
|