PDA

View Full Version : custom page


eddie w
05-19-2009, 07:08 PM
Hi

I have made a simple custom page and i want to make it accessible for members only I have tried following code but it does not work can you show me what i have done wrong .

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
if ($vbulletin->userinfo['member'] < 2 OR $vbulletin->userinfo['member'] > 7)
{
$vbulletin->url = 'index.php?' . $vbulletin->session->vars['sessionurl'];
eval(print_standard_redirect('redirect_exitwithast ernwarning'));
}
<head>
$headinclude
<title>$vboptions[bbtitle]</title>
</head>
<body>

$header

<!-- Custom Code Start Here -->
some code here
<!-- / Custom Code Ends here -->

</body>
</html>

Many thanks

Eddie

RLShare
05-19-2009, 07:10 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=62164</a>

eddie w
05-19-2009, 07:25 PM
Hi

it seems very complex i just want to have the page seen by members only i do not want navbar or footer just logo . I was told the code i had would work but i may have got part of it wrong.

Thanks

Eddie

Seven Skins
05-19-2009, 08:30 PM
Have you tried this? Edit user group to suit your needs.

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle]</title>
</head>
<body>
$header

<if condition="is_member_of($bbuserinfo, 5, 6, 7)">
Stuff to show to memebrs of usergroup 5, 6 and 7
<else />
Sorry ... this page is only viewable by the members of the forum.
</if>



</body>
</html>

Lynne
05-20-2009, 03:34 AM
You cannot put php into your template.

(This is php:
if ($vbulletin->userinfo['member'] < 2 OR $vbulletin->userinfo['member'] > 7)
{
$vbulletin->url = 'index.php?' . $vbulletin->session->vars['sessionurl'];
eval(print_standard_redirect('redirect_exitwithast ernwarning'));
}
)

eddie w
05-20-2009, 02:18 PM
Thanks everyone that helped but have now solved the problem

Eddie