PDA

View Full Version : question about templates


Joe Pimms
07-30-2008, 03:09 AM
hello i have a question about linking an external website into a template, im wanting to to display the content from my stat site to display it in to a custom vbulletin template

<php include_once("http://www.xxx.com/xxx/xxx.php"); ?>

i use this on my index page on my site and it displays every thing for me...

so how would i import this code into vb ?

i have this so far

<?php
// By Joe Pimentel,
error_reporting(E_ALL & ~E_NOTICE);
define('THIS_script', 'XXXXXX');
require_once('./global.php');

$navbits = array($vbulletin->options['xxx_title']);
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('XXXXXX') . '");');
?>


Please help

Dismounted
07-30-2008, 06:48 AM
<a href="http://www.vbulletin.com/docs/html/main/templates_externalfiles" target="_blank">Including External Files</a>

Joe Pimms
07-30-2008, 10:00 PM
how im i to import that into my script, i have made my template and i have my php file.

here is my template file script


$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
$headinclude
<title>$vboptions[xxxx_title] - $vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vboptions[xxxxxx_title]</td>
</tr>
<tr>
<td class="panelsurround" align="center">$includedphp</td>
</tr>
</table>
$footer



here is the phpfile


<?php
// By Joe Pimentel,
error_reporting(E_ALL & ~E_NOTICE);
define('THIS_script', 'XXXXXX');
require_once('./global.php');
$includedphp = include('path/to/this/file/myfile.php');
navbits = array($vbulletin->options['xxx_title']);
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('XXXXXX') . '");');
?>

RLShare
07-30-2008, 10:19 PM
Read through the link that was given above, it tells you how to include a PHP file. Your not doing it.