Ok, I tried that out. The first one did indeed echo, but the second one didn't. So this means I need to go into the php.ini config file and change something? I can't seem to find this php.ini. Should I be looking somewhere?
Edit: It works now! Before in my plugin I was putting the entire path in (http://www.yoursite.com/forum/test.php). So I just changed it to "../forum/test.php" and it works! So it must be a problem with the php.ini. I looked around and it sounds like it is a real huge pain to mess with. Unless it is simple, I will just remember to not put the full path in. |
Yes, theres a setting in php.ini to allow scripts to be passed over http
I'm not sure exactly where it is, but I had to do the same before some of my scripts would run properly on my server You need to set php to include through HTTP , ie: allowing remote files to be included Some info is available here. http://www.php.net/manual/en/features.remote-files.php |
You can't include a php file using it's remote (http) address EVER. It will never work that way. PHP files are executed when viewed by http, the code is never shown or known to the browser. You can include using full or relative paths on your server, examples:
Code:
/includes/myfile.php |
Thank you guys so much for all the help, everything is working like a charm now! :D
|
Ok i need your help please!
I have created four pages according to this How-To: https://vborg.vbsupport.ru/showthread.php?t=228112 I have also 4 external php scripts that i want to include. I have created 4 templates and 4 plugins. I have change the php_include to php_include_1 to php_include_4 and also changed this accordingly in the templates. Code:
ob_start(); As soon as i activate 2,3 or 4 plugins i get this: Warnung: require_once(../vbtest/test_1.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/class_bootstrap.php(122) : eval()'d code (Zeile 7) Fatal error: require_once() [function.require]: Failed opening required '../vbtest/test_1.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/b/b0000009/weball/vbtest/includes/class_bootstrap.php(122) : eval()'d code on line 7 The file which is mentioned as missing here is there and it is producing output as long as i only activate 1 of the modules! I guess it maybe is because of the hook i've chosen? As i was not sure which one, and most of the ones i expected to be the right ones did not work at all i've chosen 'global_bootstrap_init_complete' Any ideas? Which would be the correct hook? Thanks for any help, regards, Matthias |
Where are you wanting the info to show up at? Every page?
|
Ok, i'll explain what i want to achieve, and hopefully you guys can help me.
I'm very new to vBulletin and my knowledge of php is also not 'the' best :) I have a php script that is creating a linklist from files within a directory. At the end of the script i have an echo statement to display the list. What i want is to have this showing up inside a vbulletin page. The only thing i have achieved so far is including this script in the new page i have created according to this: https://vborg.vbsupport.ru/showthread.php?t=228112 I have put PHP Code:
So what i want to achive is: Including the output of several php scripts in several vbulletin pages. www.mysite.com/script1.php > www.mysite.com/page1.php www.mysite.com/script2.php > www.mysite.com/page2.php and so forth. |
Of course you will see the created list if you use echo in the file. You need to use the function from the file to show the listing formatted to whatever template you set up for it.
|
Ok, lack of vbulletin knowledge + only very basic php knowledge = fail :)
I have now changed my script.php file so that the output is now a function. When i include the script.php in a simple php script like this it works. So no problem in the script. PHP Code:
I have a page.php file and a matching template. These i have created after reading this tutorial: https://vborg.vbsupport.ru/showthread.php?t=228112 In the page.php file i include script.php after global.php require_once('./global.php'); require_once('./script.php'); What i still don't understand is where i now have to put "myfunction();" to show the output in a vbulletin page. In the template? In a plugin? Thanks for your help! Really appreciated! Schoelle |
I'm using this and it works, only I want to pass a variable (GLOBALS.foruminfo.title_clean) from my template to my PHP script.
I am attempting to pass the current Forum title and with my own PHP generate CSS to have a specific image for that forum in the background. My Plugin code: Code:
ob_start(); --------------- Added [DATE]1299018239[/DATE] at [TIME]1299018239[/TIME] --------------- figured it out, didnt have to use the global variable - just used foruminfo[title_clean] which worked instead. |
All times are GMT. The time now is 11:40 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|