The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
invoking a php in html.
I've got a silly question.
I got a php banner rotation file called test.php in my forums folder. Now i'm trying to invoke it in my homepage of my site. I am currently running vbindex so i open it's index template and add ; <!--#include file="forums/test.php" --> it doesn't seem to work. anyone know the code i need to input to invoke my php banner on the top fo my page? thanks |
#2
|
||||
|
||||
Do you have SSI (Server Side Includes) enabled?
For Apache smth. like this in httpd.conf: Code:
AddType text/html .shtml AddHandler server-parsed .shtml |
#3
|
||||
|
||||
well on the page you want to display it add
PHP Code:
|
#4
|
||||
|
||||
@AN-net
I don't think this will wok in a HTML-file, which is what lorden want's to have. |
#5
|
|||
|
|||
Hey guys thanks for the reply, i wasn't subbed on this thread and i had no idea there was reply.
@AN-net: I have tried that and it doesn't work. @KirbyDE, SSI is enabled BUT my webhost does not allow me to access HTTP.conf, they tell me though i can created a .htaccess file to do those commands, unfortuantely i keep getting internal server error when i try to create one soi gave up that concept. I would still like a answer to this question if possible with a little twist, I actually resolved this problem by invoking the banners as java and jsut adding them in the "index" template and it works just fine. I have never worked with php in my life before and don't quite understand the basics to it. Something that noramlly would take 5 minutes to make takes me a few hours because I have to make sense of the code and try to find the source of it which is actually pretty fun. But i'm stuck now since i really don't know the bases of PHP, i have no idea the difference between vbulletin's template and PHPadmin's template, and how all this molds into a php file. Working with hacks and customising them is quite fun and simple for me but now I am at the point where I have a quicklink bar and i would like to open a whole new page to do that. For example on my homepage if someone clicks on "reviews" I want them to open a page in the middle of my vbindex (that way they still have acces to the rest of there tools) but i don't know where to start. Anyone can direct me to a site where i can read the basics of php and the "complete idiot's guide" (no joke i really like those books they really break them down :P) Again thanks for all your help and support |
#6
|
||||
|
||||
well you could put it in between <?PHP and ?>. it should work then
|
#7
|
|||
|
|||
yeah i'll be able to do that but ih ave no idea what to write in between there i'm looking for a dummies guide to PHP to give me the basics on how to create them.
vBulletin is great, a monkey can do it because it's all setup for you, even customizing is a breeze but i don't want to be limited to it's hacks I want to add 2 more pages and i don't know how. |
#8
|
||||
|
||||
hmm so this image rotation script basically randomly chooses and it doesnt use a variable like $banner to display the image, if so then you can put in the template <img src="test.php">.
if the file uses a variable such $banner to display the image then my idea is include the file globally. if your using vb3 open phpinclude_start and insert this code in there Code:
include("/forums/test.php"); open phpinclude add in there: Code:
include("/forums/test.php"); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|