PDA

View Full Version : Extra page via templates


cdrive
01-28-2004, 03:51 PM
I'm wanting to know if someone is planning on updating this hack that c-pr0mt did a while ago

Old hack : https://vborg.vbsupport.ru/showthread.php?t=36600


cheers

Cdrive

assassingod
01-28-2004, 04:10 PM
It's not that hard, here's a simple way:

<?php

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');

eval('print_output("' . fetch_template('YOUR TEMPLATE') . '");');
?>


Then create a template called 'YOUR TEMPLATE' (without quotes) and add your page in there:)

cdrive
01-28-2004, 04:24 PM
thanks, very much!

cdrive
01-28-2004, 04:30 PM
ok now the only problem is that i can't get the navbar to show; this is the code i used


$stylevar[htmldoctype]
<html 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 -->
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
$headinclude
</head>
<body>
$header
$navbar

<thead>
<if condition="$show['guest']">
<!-- guest welcome message -->
<tr>
<td class="tcat" colspan="6"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
</tr>
<tr>
<td class="alt1" colspan="6">
<phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
</td>
</tr>
<!-- / guest welcome message -->
</if>

</thead>

<br>
YOUR CONTENT GOES HERE
<br>
$footer
</body>
</html>

assassingod
01-28-2004, 04:36 PM
Use this code:

<?php

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('YOUR TEMPLATE') . '");');
?>

cdrive
01-28-2004, 04:49 PM
ok cheers working now!

Loxias
02-06-2004, 11:51 PM
Gotta...just took a little more searching ;)

PranK
03-25-2004, 05:39 AM
nice one - i love it!