vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   new page with permission request ? (https://vborg.vbsupport.ru/showthread.php?t=71425)

pagekeeper 11-06-2004 03:03 PM

new page with permission request ?
 
how would you create a new page with a template request "chat" tittle Chat Instructions.

i've tried using the post that is already in here but the images dont appear because the index is in a sub directory i.e chat/index.php tries to get all the site information from the same folder which wont work and confusing

and if the page could request for the user to login before they can see that page i would be good.

thanks!

HiDeo 11-06-2004 03:26 PM

PHP Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''instructions');

// ################### 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();

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

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

if (!
$bbuserinfo['userid'])
{
print_no_permission();
}
    
eval(
'print_output("' fetch_template('chat') . '");');

?>


pagekeeper 11-07-2004 04:26 PM

oh cool, thanks for that !! but i get an error
Warning: main(./global.php): failed to open stream: No such file or directory in /home/website/public_html/chat/index.php on line 24

Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/website/public_html/chat/index.php on line 24

the website is a portal so there is no trailing /forum. it looks like its accessing all images and files from the /chat but its not in that folder but in the root folders. this code is for chat/index.php file

what would be the right way to add javascript to the header of just that page ?

thanks!

pagekeeper 11-07-2004 05:48 PM

oh and would it be possible to change permissions for specific user groups ? i.e validation cant see that page.

HiDeo 11-07-2004 07:15 PM

Use chdir !

You have to create a new parameters for your permissions or maybe you can use:

bbuserinfo[usergroupid] == X

pagekeeper 11-08-2004 11:46 PM

i dont know how to :( specifically because i've tried with the other example with chdir and it didnt work.

what would be the right way to add javascript to the header of that page ? and maybe if you could give me the code for that page i would really appriciate it.


All times are GMT. The time now is 02:09 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.00976 seconds
  • Memory Usage 1,723KB
  • 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_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