vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

pmk_1992 04-21-2010 02:06 PM

it working now
thank so much

toolmanwill 04-22-2010 12:07 PM

Lynne, thanx again so much for this tut. i'm creatin' pages like a madman now!! :D

Khan_ 04-23-2010 11:27 PM

can we give access permissions to particular usergroups and deny for some ..

If yes where do i set the permissions .. ?? Lil confused .. i used logicans webtemplates when i was on vB 3.8.2 and it has its own settings .. now i upgraded to 4.0.3 and never used custom pages so lil confused with it .. Need little support or suggest me any particular mod as logicans webtemplates for 3.8.x series ..

Lynne 04-23-2010 11:46 PM

Under the Start Main Script area, you may deny some usergroups:
PHP Code:

if (!is_member_of($vbulletin->userinfoxyz))  
{
// give no permission unless in usergroup x, y, or z
        
print_no_permission();



Khan_ 04-23-2010 11:59 PM

guess i dont want registered users and moderators to access this page so do i do it this way below in the start main script?

PHP Code:

if (!is_member_of($vbulletin->userinfo27,))  
{
// give no permission unless in usergroup 6, or 5
        
print_no_permission();


Do i have to edit it this way .. check the php code please ..

2 = registered user <=> should not have access
7 = moderator <=> should not have access
6 = super admin. <=> should have access
5 = global moderator <=> should have access

Lynne 04-24-2010 12:13 AM

If you want to exclude usergroups 2 & 7, then you would do:
PHP Code:

if (is_member_of($vbulletin->userinfo27))  
{
// give no permission to usergroup 2 & 7
        
print_no_permission();



Khan_ 04-24-2010 12:18 AM

PHP Code:

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

if (is_member_of($vbulletin->userinfo27))  
{
// give no permission to usergroup 2 & 7
        
print_no_permission();
}  

$navbits construct_navbits(array('' => 'Test Page'));
$navbar render_navbar_template($navbits); 

This is how i add it under start main script ..

P.S i want more groups to be excluded from it .. like 2,11,13,9,7 etc etc .. do i have to do it 2, 11, 13, 9, & 7 ? i am getting confused here on the second part.
PHP Code:

// give no permission to usergroup 2, 11, 13, 9 &  7 


David Regimbal 04-24-2010 01:13 AM

child directory does not seem to work for me :(
I'm very sure I'm doing something wrong though:

Quote:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'noble6');
define('CSRF_PROTECTION', true);
// change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array('noble6',
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
$curdir = getcwd ();
chdir('/path/to/forums');
require_once('./global.php');
chdir ($curdir);

// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################

$navbits = construct_navbits(array('' => 'noble6'));
$navbar = render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'INTEL';

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######

$templater = vB_Template::create('noble6');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());

?>
In a folder such as "/pages." My forum is in the root.

Error:

Quote:



Warning: require_once(./includes/functions_user.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/class_bootstrap.php(283) : eval()'d code on line 52

Fatal error: require_once() [function.require]: Failed opening required './includes/functions_user.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /path/to/public_html/includes/class_bootstrap.php(283) : eval()'d code on line 52


arilukes 04-26-2010 12:55 AM

Great tutorial, and thanks to everyone who's input went into this.

I was able to create the page template and plugins with no issues.

FCS-Webmaster 05-02-2010 10:59 AM

How do I include Widgets to my own vBulletin page?


All times are GMT. The time now is 09:18 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02683 seconds
  • Memory Usage 1,754KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete