vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Creating a include template? (https://vborg.vbsupport.ru/showthread.php?t=45835)

GlitterKill 11-17-2002 07:31 PM

Creating a include template?
 
On my site I have several ads that are changed occasionally as my site sponsors change. The site is run on vbportal so there are a few different places that I have to change the banner code in order for the changes to be uniformed throughout the site.

What I am wanting to know is if it is possible to create a template that has the banner code and then include that code in the proper sections by using the $file type include that vbulletin uses for its themes. This would allow me to just change the template instead of including the code in each place.

How would I go about this?

NTLDR 11-17-2002 07:42 PM

Use the phpinclude template ;)

GlitterKill 11-17-2002 08:29 PM

I have tried that but it never seems to work right. Is there not a way to do it liek I described? When I used to use myphpnuke I was able to use regular php includes. They do not work right in vbulletin when I tried.

NTLDR 11-17-2002 08:32 PM

If you place the full code in the template or use the include statment there is no reason why it shouldn't work for every file that requires global.php

The phpinclude template is the only one you can add PHP to.

GlitterKill 11-18-2002 12:12 PM

Maybe I am not understanding... If I want this code included in a few different pages then what is the procedure?

Code:

<center><smallfont color="FFFFFF"><b>Be sure to check out our sponsors</b></smallfont></center>
<center><script language="javascript" src="http://www.pimprig.com/banners/adjs.php?what=22&target=_blank"></script></center>

What goes in the phpinclude template and what code pulls that info into a specific part of the page?

Sorry for the trouble.

filburt1 11-18-2002 01:27 PM

Just put that in the header or footer, that is on every page except for show_nopermission and the standarderror and standardredirect pages.

GlitterKill 11-18-2002 01:42 PM

But the code needs to go in specific locations. Like in certain table cells, etc.

filburt1 11-18-2002 01:46 PM

Then put this in phpinclude:
PHP Code:

$somevariablename '<center><smallfont color="FFFFFF"><b>Be sure to check out our sponsors</b></smallfont></center>
<center><script language="javascript" src="http://www.pimprig.com/banners/adjs.php?what=22&target=_blank"></script></center>'


...and put $somevariablename wherever you want that HTML to appear.


All times are GMT. The time now is 05:54 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.00988 seconds
  • Memory Usage 1,723KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete