vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adding Templates (https://vborg.vbsupport.ru/showthread.php?t=184915)

thedudleys 07-10-2008 03:08 PM

Adding Templates
 
Ok, I have added a new template and here is the code below. I am trying to make the custom template for a new page of the forum but I don't want it visible to everyone, how do I make it where only members of the forum can access the page even from the direct link and show an error message of them having to log in to see the page? Please help :confused:
Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tbody>

<tr>
<td class="tcat" colspan="5">
MY HEADER HERE!


</td>
</tr>
</tbody>

<tbody id="collapseobj_forumbit_1" style="">


<tr align="center">
<td class="alt1Active" align="center" id="f4">

<br>

THE CONTENT I WANT WILL GO HERE

<tr><td class="thead" style="line-height: 0; padding: 0; margin: 0;" colspan="5"><img src="IMAGE GOES HERE" alt="" width="1" height="12" /></td></tr>
</tbody>

</table>


$footer
</body>
</html>


Opserty 07-10-2008 03:25 PM

Code:

<if condition="$show['member']">
    YOU ARE  A MEMBER
<else />
    YOU DON'T HAVE PERMISSION
</if>

Or in PHP
PHP Code:

if(!$vbulletin->userinfo['userid'])
{
    
print_no_permission();



thedudleys 07-10-2008 03:35 PM

Where would I put that code to get it to work properly?

Opserty 07-10-2008 03:41 PM

The first piece of code would go in your template (Change the bits in uppercase as appropriate). Or you can use the second piece of code in the PHP code for your page.

thedudleys 07-10-2008 03:56 PM

Neither seemed to work :( I must be doing something wrong.

Dismounted 07-11-2008 05:35 AM

Please post the template you have now.

thedudleys 07-12-2008 05:32 PM

I'm working with The proweb by vBSkinworks and the onlydev one as well.

Dismounted 07-13-2008 06:40 AM

Please post the template you are using for your page - not the name of your style...


All times are GMT. The time now is 05:14 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.01002 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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