Hi,
I want to add a new template to vBulletin. This is what I tried.
- Added new template directly in database (phpmyadmin), table templates.
templateID autonumber
styleID -1
title register_choice
template
Code:
<html>
<body>
<a href="http://www.example.com/forums/register.php?do=register_forumsonly">Register forums only</a>
<br>
<a href="http://www.example.com/forums/register.php?do=register_forumsandwebsite">Register forums and website</a>
</body>
</html>
template_un
Code:
<html>
<body>
<a href="http://www.example.com/forums/register.php?do=register_forumsonly">Register forums only</a>
<br>
<a href="http://www.example.com/forums/register.php?do=register_forumsandwebsite">Register forums and website</a>
</body>
</html>
- Changed code in register.php
Code:
// ############################### start choice - website and forum or forum only registration ###############################
if ($_REQUEST['do'] == 'register')
{
globalize($_REQUEST, array(
'month' => INT,
'day' => INT,
'year' => INT,
'agree' => INT,
'options'
));
if (empty($agree))
{
eval(print_standard_error('register_not_agreed'));
}
if (!$vboptions['allowregistration'])
{
eval(print_standard_error('error_noregister'));
}
if ($bbuserinfo['userid'] != 0 AND !$vboptions['allowmultiregs'])
{
eval(print_standard_error('error_alreadyregistered'));
}
eval('print_output("' . fetch_template('register_choice') . '");');
}
However, when I call this code, it just displays a blank page. When i call fetch_template('register') however, it works. The title is the same as in the database, so there's no error there. Do I need to register this template elsewhere?
Thanks!