For vbulletin 3.6.2 you could use :
You have to create a 'TEST' template :
Quote:
$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 -->
$headinclude
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
</head>
<body>
$header
$navbar
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" style="border-bottom: 0" width="100%" align="center">
<tr>
<td class="cat-top">TEST</td>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="2">TEST</td>
</tr>
</tbody>
</table>
<br />
$footer
</body>
</html>
|
and a test.php file :
Quote:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'index');
// pre-cache templates used by all actions
$globaltemplates = array(
'TEST'
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('TEST') . '");');
?>
|
I think it will work :up:
:bunny: :bunny:
************
Hum... I have a question
In my database, I have 5 records (5 names of country) and I would like to list them in the 'test.php' page.
My test.php file :
Code:
$name = $db->query_read_slave("SELECT name FROM country");
while ($country = $db->fetch_array($name))
{
$vbphrase[name] = $country['name'];
}
In the template, I indicate :
But I have just one name of country which is listed !
What I have to do to list all names of country ?
Thanks :rambo: