Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2004, 08:39 PM
lorden lorden is offline
 
Join Date: Feb 2004
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 02-18-2004, 09:06 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 02-18-2004, 09:37 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well on the page you want to display it add
PHP Code:
include("test.php"); 
to the file at then you can call the variables from that php file in the templates for the .php files you added the include to
Reply With Quote
  #4  
Old 02-18-2004, 10:28 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@AN-net
I don't think this will wok in a HTML-file, which is what lorden want's to have.
Reply With Quote
  #5  
Old 02-22-2004, 03:43 PM
lorden lorden is offline
 
Join Date: Feb 2004
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 02-22-2004, 04:09 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well you could put it in between <?PHP and ?>. it should work then
Reply With Quote
  #7  
Old 02-22-2004, 04:25 PM
lorden lorden is offline
 
Join Date: Feb 2004
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 02-22-2004, 06:19 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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");
if your using vb2
open phpinclude
add in there:
Code:
include("/forums/test.php");
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04327 seconds
  • Memory Usage 2,231KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete