vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Includes - Please help (https://vborg.vbsupport.ru/showthread.php?t=42328)

stuuu 08-15-2002 04:06 PM

Includes - Please help
 
How would I include the vB header, footer, and stylesheet into a separate PHP page, I cant find this anywhere :(

Xenon 08-15-2002 09:42 PM

require global.php in your scripts

stuuu 08-16-2002 12:12 AM

Quote:

Originally posted by Xenon
require global.php in your scripts
Done that, it just brings up a blank page :(

PHP Code:

<?php
require("./global.php");
?>

Dont I need to include some templates? I dont know how though.

stuuu 08-16-2002 07:46 AM

OK, I have managed to get a header and footer working using the vB template method.

PHP Code:

<?
error_reporting(7);
require("./global.php");
eval("dooutput(\"".gettemplate("audio")."\");");
?>

I have this in my audio template:

Quote:

{htmldoctype}
<html>
<head>
<title>$bbtitle - Audio</title>
$headinclude
</head>
<body>
$header
!!MY CODE HERE!!
$footer
</body>
</html>
I have quite a big PHP script that calls audio clips from my database, I need to get that included where it says !!MY CODE HERE!!, I have tried making an include file (audio.inc) and calling that through the phpinclude template, but $variables dont seem to get processed when I do this. Plus the code would be quite intensive if it was included in each page vB loads!

Please help :D

stuuu 08-17-2002 06:33 AM

PLEAAAASE HELP :D

Xenon 08-17-2002 10:54 PM

you can't include scripts in templates..

you have to use something like this:
PHP Code:

<?
error_reporting(7);
require("./global.php");
include("audio.inc");
eval("dooutput(\"".gettemplate("audio")."\");");
?>

in your audio.inc you should have defined a variable and then you can use this variable in your template


All times are GMT. The time now is 12:01 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.05672 seconds
  • Memory Usage 1,722KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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