vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   custom page (https://vborg.vbsupport.ru/showthread.php?t=214077)

eddie w 05-19-2009 06:08 PM

custom page
 
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 06: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 06: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 07:30 PM

Have you tried this? Edit user group to suit your needs.

HTML Code:

$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 02:34 AM

You cannot put php into your template.

(This is php:
PHP Code:

if ($vbulletin->userinfo['member'] < 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 01:18 PM

Thanks everyone that helped but have now solved the problem

Eddie


All times are GMT. The time now is 02:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01533 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete