vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Question: Change the URL to a static NOT relative (https://vborg.vbsupport.ru/showthread.php?t=78205)

Reaktor7 03-16-2005 06:57 AM

Question: Change the URL to a static NOT relative
 
Hey guys, i bought VB just yesterday and already have it integrated with my site (hand integrated, no portals) but i had a little problem.

I have a few "admin-only" pages, which i have used global.php to protect it from unauthed use.
PHP Code:

[code]require('global.php');
global 
$bbuserinfo;
if(
$bbuserinfo["usergroupid"] != "6"
{
    
print_no_permission();


However, if they arent logged in or or do not belong to this group it gives me a standard VB no permission error (as its designed to).
BUT! the links to either login or log out point to login.php in the current directory, which doesnt exist.

How can i set it so any links used are set statically and not relative? It would be great if someone could help with that

Carnage 03-16-2005 10:38 AM

well one way to do it; providing the protected files are in a sub directory of your main forum is to copy global.php from the admincp directory into your protected files directory and require it on every protected page, it'll do the rest for you. Same thing cept with global.php from modcp directory if you want to make mod only pages.

this will only work if the files (both global.php and the protected file) are in the same dir which is a sub dir of your main forum ie:
www.yourforums.com/forum/protecteddir/file.php

Reaktor7 03-17-2005 03:51 AM

yer not really what i was after.

The files are not in the forums at all.. i chdir to the forums directory and its fine.. however the links/forms are stuffed. If i could redirect everything to http://forums.domain.com/<action> that would work like a charm.. but im unsure how one would go about that.


All times are GMT. The time now is 03:31 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.01515 seconds
  • Memory Usage 1,715KB
  • 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
  • (3)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