vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

sdfaheem 08-05-2009 08:17 PM

I am getting this error when i create a new page, so i tried using the same php file and template info but still get an error:

Code:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/sdfaheem/public_html/desimeet.com/disclaimer.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/sdfaheem/public_html/desimeet.com/disclaimer.php on line 2

Could you please help me with this?

Lynne 08-05-2009 10:09 PM

Make sure you are using a text editor made for coding, not something like Microsoft Word. It sounds like line breaks or extra text is getting added to your file.

Keesa 08-07-2009 05:47 AM

I just used this again and I just wish I could give it more stars because I LOVE THIS TUTORIAL.

:D


I don't find this code in functions_online any longer, is there a new fix for that?

Quote:

Now if you want to show who is browsing this new page of yours, just open up includes/functions_online.php and find:

Lynne 08-07-2009 02:38 PM

Quote:

Originally Posted by Schnee (Post 1862942)
I don't find this code in functions_online any longer, is there a new fix for that?

See step 3 here - Display Users Viewing non-vBulletin Pages in "Online Users" (If you have several locations, you can modify those to use a switch statement).

choccyclaire 08-13-2009 07:38 PM

Sorry if this has already been asked but what would I have to change in the php file in order to place the page in another directory?

Lynne 08-13-2009 08:38 PM

You need to add a line leading to the forum with the vbulletin files like this prior to requiring the global.php file:

PHP Code:

chdir('/home/site/forum'); 


choccyclaire 08-13-2009 08:46 PM

Many thanks for the quick response. :)

ilrglen 08-16-2009 04:28 PM

What can I add or remove from the following code to keep out Guests and members of Usergroups 1, 2, 3, & 4 who are not also part of Usergroups 5 or higher (if that makes a difference)?


Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', '9LA07081'); // 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(
    '9LA07081',
);

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

);

// ######################### REQUIRE BACK-END ############################

chdir('/var/www/html/Forums/');
require_once('./global.php');
if (!$vbulletin->userinfo['userid']) print_no_permission();

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

$navbits = array();
$navbits[$parent] = '9LA07081';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('9LA07081') . '");');

?>


Lynne 08-16-2009 04:34 PM

Quote:

Originally Posted by ilrglen (Post 1868618)
What can I add or remove from the following code to keep out Guests and members of Usergroups 1, 2, 3, & 4 who are not also part of Usergroups 5 or higher (if that makes a difference)?

Try changing this:
Code:

if (!$vbulletin->userinfo['userid']) print_no_permission();
To something more like this:
Code:

if (!$vbulletin->userinfo['userid'] OR !is_member_of($vbulletin->userinfo, 5, 6, 7)) print_no_permission();
That will give an error if the user is not logged in or if the member is not a member of usergroups 5,6, or 7.

ilrglen 08-16-2009 04:47 PM

Quote:

Originally Posted by Lynne (Post 1868623)
Try changing this:
Code:

if (!$vbulletin->userinfo['userid']) print_no_permission();
To something more like this:
Code:

if (!$vbulletin->userinfo['userid'] OR !is_member_of($bbuserinfo, 5, 6, 7)) print_no_permission();
That will give an error if the user is not logged in or if the member is not a member of usergroups 5,6, or 7.

Will this then send them to the 'no permission page' or another error page?


All times are GMT. The time now is 10:46 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.02616 seconds
  • Memory Usage 1,745KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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