PDA

View Full Version : How to create custom pages?


dezkit
03-07-2010, 05:13 PM
I am using this as a plugin:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<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">Server Status</td>
</tr>
<tr>
<td class="alt1">

$includedphp4

</td>
</tr>
</table>

$footer
</body>
</html>


But it gives error

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: navbar in [path]/includes/functions.php on line 3932

Parse error: syntax error, unexpected T_STRING in /home/quickgam/public_html/servers.php(47) : eval()'d code on line 1

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: servers in [path]/includes/functions.php on line 3932 Then continues to show the custom page.

Anybody help me?

Lynne
03-07-2010, 05:30 PM
You should take a look at this article - [HOW TO - vB4] Create a own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

dezkit
03-07-2010, 06:04 PM
You should take a look at this article - [HOW TO - vB4] Create a own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

Thanks, but I have one problem, i put {$includedphp4} in the template but nothing shows up, the hook to it set up..

even tried {vb:raw includedphp4}

borbole
03-07-2010, 06:46 PM
Alternatively have a look at my mod. It does just that.

https://vborg.vbsupport.ru/showthread.php?t=235359

dezkit
03-07-2010, 06:55 PM
I'm sorry but I'm in need of putting PHP into it, and I cannot with your hack, it's a good hack anyways!

borbole
03-07-2010, 06:59 PM
I'm sorry but I'm in need of putting PHP into it, and I cannot with your hack, it's a good hack anyways!

There is another custom page hack that supports php. Have a look at the Add-ons section.

dezkit
03-07-2010, 07:10 PM
There is another custom page hack that supports php. Have a look at the Add-ons section.

Can't find anything, checked 20 pages...
I found an arabic one but it doesn't work, anyways..
Can somebody just tell me what I am doing wrong with the hook??

Lynne
03-07-2010, 07:48 PM
Thanks, but I have one problem, i put {$includedphp4} in the template but nothing shows up, the hook to it set up..

even tried {vb:raw includedphp4}
That's because you need to register the variables for use in the template and my guess would be you didn't do that. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide (https://vborg.vbsupport.ru/showthread.php?t=228078)

dezkit
03-07-2010, 07:57 PM
That's because you need to register the variables for use in the template and my guess would be you didn't do that. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide (https://vborg.vbsupport.ru/showthread.php?t=228078)

Thanks so much, that worked.

Silver Tiger
03-08-2010, 03:39 AM
I want to give a Shoutout to Dezkit, hes my homie from Quick-Gaming. Holla at me sometime.