check your php.ini and server configurarion ... I think you cannot require_once an URL ....
|
Ive set allow_url_include=1 in php.ini now that gets rid of the first error, still the other two errors:
Code:
Warning: require_once(http://al-hussain.co.uk/wp- content/themes/Karma/header.php) [function.require-once]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in [path]/includes/class_bootstrap.php(106) : eval()'d code on line 3 Any ideas guys? |
Sorry, i have no idea... but i think it has to do with the streams or paths ...
|
You can't do a require_once on an http:// URL... you can only require (or include) on a local file on your server and it has to be by a local path.
|
Quote:
Code:
ob_start(); |
I noticed in the error message above and in the one you posted on vbulletin.com that there's a space between wp- and content. It should be all one word, so maybe try taking out whatever character that is (so it reads require_once('/home/alhussai/public_html/wp-content/themes/Karma/header.php', all on one line).
|
Thanks for the reply the error seem to have gone and now its giving just this:
Code:
Fatal error: Call to undefined function language_attributes() in /home/alhussai/public_html/wp-content/themes/Karma/header.php on line 2 Removed language_attributes() from header.php now just a blank page now errors :/ |
I think the header.php is depending on some Wordpress functions that you aren't including.
|
Hello,
am a new Owner of vb4.2 and would like to add an echo Script. Unfortunately, this does not in the Templates, the Output will always appear at the top left. What can I do? I use the Standart Style! Please help me.. I have add a Plugin: PHP Code:
HTML Code:
{vb:raw back} The same Script tested in the Customer Sidebar, thats Works fine ;) |
Try this:
Code:
ob_start(); (you may not need the ob_get_contents(), but I'm not sure if the echo script creates any output other than the $back value). |
Hi kh99,
thx to Replay and help me.... Your Info not Work! :( I have a failure in the Config or ? I use the php in the Sidebar Adden and this work fine! Why nothing Work in a Template? I have Read all howto and change some Codes, all not Work |
Hi. I am having a problem, i registered two variables which are in the vbtrade_main template, and i want it to see it only in the php page vbtrade.php, but i see it in all pages! The forum also dissapears.
This is the code i put in the Hook Location with global_bootstrap_init_start Code:
ob_start(); Thanks for your help. |
Quote:
|
Quote:
It might only be that you're missing an ob_start() call. If you want to include two files separately, you would need to call ob_start() again after the first call to ob_end_clean(). |
Quote:
Code:
ob_start(); The vbtrade_main template: Code:
{vb:stylevar htmldoctype} |
That looks right, but it may have to do with what's in the scripts you're trying to include. For instance if they call exit() or die(), then that may be why the forum is disappearing. (If vbtrade.php is a vbulletin "powered" page that calls print_output() at the end, that would also do it). If that's the case, then maybe you can use an iframe instead.
Also I just noticed that you're including the same file twice - even if it worked, you'd probably get the same output for both. |
Quote:
This is the end of the vbtrade.php Code:
print_output($templater->render()); Thanks for your answers! EDIT: An iframe is a bbcode. Do you mean i don't have to put the code in a new plugin, but in the new bbcode? The same code i put in the plugin? |
Quote:
Both of your 'require_once' lines have the same file name. Quote:
To be honest I'm not sure what you're trying to do. It looks like you're trying to use the method in this article to include output from an external file (vbtrade.php), but you also have a template. What are you using that template for, and what output do you expect from vbtrade.php? And where are you trying to include it? |
Quote:
I am trying to make work a vb3 plugin in vb4, and i see in the template this lines: Code:
[B]<vb:if condition="$stocktable != null"> |
Quote:
So far that all looks OK. Edit: but I guess the issue is, where are those variables coming from? |
Quote:
|
Well, right, you'd have to do that in php, which means a plugin or modifying a script. But the issue seems to be where those variables are coming from. The code you posted looks like you're trying to capture the entire output of vbtrade.php into each of those variables, which won't work. But I'm not sure what to tell you to do instead of that.
Edit: I'm thinking now that you don't need this "include external files" thing at all. If you're trying to modify vbtrade.php to work with vb4, then you probably want to edit that script and change the way the templates are rendered. |
1 Attachment(s)
Quote:
Code:
$templater = vB_Template::create('forumdisplay_sortarrow'); |
OK, that's already written for vb4, so it doesn't need to be changed. Sorry, I probably just misunderstood what you're trying to do.
You said you're trying to modify a vb3 plugin for vb4, so you were right, if it involved using variables in a template, you might have to register them. Is your vb3 plugin code calling fetch_template() then eval()? Edit: OK, I just noticed that the code you posted above from vbtrade.php is rendering the vbtrade_main template and already registers $stocktable and $preview, so I'm lost. What does the plugin do? |
Quote:
|
is there anyway to get this to work in an Iframe
i try HTML Code:
<iframe src="{vb:raw perm}" width="530" height="600" frameBorder="0" class="leftColumn"></iframe> this is the plugin i use PHP Code:
|
If what you want is the output of $perm in the iframe simply make the iframe src="url/perm/perm.php"
|
Quote:
HTML Code:
<iframe src="{vb:raw perm}" width="530" height="600" frameBorder="0" class="leftColumn"></iframe> |
From the code you posted above, $perm = ob_get_contents();
That means $perm is the contents of the output buffer or the output (presumably) of the perm.php page. NOT a URL. But the iframe SRC is looking for a URL ONLY. You can't put iframe content in the src= attribute. Actually, it appears HTML5 does allow you to specify the code in the iframe but it uses the srcdoc attribute - http://www.w3schools.com/tags/tag_iframe.asp |
Hi there,
For some reason I can include the PHP file, but my header and navbar goes funny. I know it's the plugin in as when I turn the plugin off, the header and navbar works fine. The header and navbar works fine, but it changes to: My navbar/headers are #vbtab_form# $tab_mdu1_245 and #vbflink_pms# #vbmenu_community# and I'm missing some of my footer menu links. Very odd that it works but my css stuffs up. Thank you for your help. Cheers |
Can someone help me ? When I run plugins everywhere are white pages...
|
Quote:
|
I have msg
Code:
Warning: require_once(/szatek/vb/nowosci.php): failed to open stream: No such file or directory in ..../includes/class_bootstrap.php(103) : eval()'d code on line 2 |
Quote:
|
Ive tried all the suggestions in all 8 pages and im still not getting an output at all, even when using and ECHO message. Any suggestions?
Code:
Product: vBulletin PHP Code:
Code:
{vb:raw header} |
This way can affect to the loading of web page?
|
All times are GMT. The time now is 07:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|