vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How do I run a PHP script in my templates? (VB 3.03) (https://vborg.vbsupport.ru/showthread.php?t=136918)

larryd 02-03-2007 05:41 AM

I used to run PHPledads and the script worked perfectly fine with that using the SCRIPT command in the header template. I see that they used document.write which I've also managed to get working in my banner code however the problem I'm having is getting the document.write to display flash and other types of ad codes like google for instance being rich text. It seems like the $banner variable doesn't get interpreted correctly when it is rich text through the SCRIPT SRC = 'mysource.php' command line.

Digitalus 02-03-2007 10:44 AM

Quote:

Originally Posted by Dismounted (Post 1172762)
Errr, vBulletin 3.0.3 has not got a plugin system.

Sorry. didnt know that.. never had a 3.0.3

WEBDosser 02-03-2007 10:51 AM

could you not use the include command somewhere?..

Arrangements 07-24-2007 05:40 AM

Quote:

Originally Posted by Digitalus (Post 1171412)
Why dont you make a plugin?

Hook Location global_start

ob_start();
include('/pathto/display_ar.php'');
$banner = ob_get_contents();
ob_end_clean();

and put $banner in your template

After reading this post, it has really helped me a lot. I spent hours trying to figure out how to put php into my templates and now I know. Thanks


All times are GMT. The time now is 11:28 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
  • Page Generation 0.00987 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete