vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Simple vB User login and access control on non vB pages (https://vborg.vbsupport.ru/showthread.php?t=100992)

Billspaintball 06-22-2006 05:11 AM

Quote:

Originally Posted by Majava
Do i need to put that still in everypage? or just the index page?
.

If everything is just included into the index page thats the only spot you would need to put it.

You can post the index page code if you like and I will have a look for anything obvious.

Majava 06-22-2006 08:58 AM

This is at the top
PHP Code:

<?php
   chdir
('/path/to/forum'); 
   require_once(
'/path/to/forum/global.php');  

    
// Do not edit anything below this line
    // Do not edit anything below this line
    
session_start();

    
// You can now edit below this line
    // You can now edit below this line
?>

PHP Code:

            <?php
            $page 
$_GET['page'];
            
            if ((
$page == "news") || ($page == "status") || ($page == "armour") || 
                (
$page == "protector") || ($page == "garment") || ($page == "swords") || 
                (
$page == "blades") || ($page == "spears") || ($page == "glaives") || 
                (
$page == "bow") || ($page == "jewlery") || ($page == "accesories") || 
                (
$page == "skills") || ($page == "guides") || ($page == "guilds") || 
                (
$page == "quests") || ($page == "maps") || ($page == "faq") || 
                (
$page == "movies") || ($page == "screenshots") || ($page == "pictures") || 
                (
$page == "wallpapers") || ($page == "art") || ($page == "downloads") || 
                (
$page == "links") || ($page == "contact") || ($page == "jobs") || 
                (
$page == "irc") || ($page == "main") || ($page == "potions") ||
                (
$page == "scrolls") || ($page == "thanks") || ($page == "error_job") ||
                (
$page == "explist") || ($page == "mailthanks") || ($page == "register") ||
                (
$page == "lostpw")) {
    
                include(
"includes/".$page.".php");     
            } else if (
$page == "") {
                include(
"includes/main.php");
            } else {        
//                include("includes/broken.php"); 
            
}     
            
?>

This is my main code

Billspaintball 06-23-2006 03:14 AM

[QUOTE=Majava]This is at the top
PHP Code:

<?php
   chdir
('/path/to/forum'); 
   require_once(
'/path/to/forum/global.php');  

    
// Do not edit anything below this line
    // Do not edit anything below this line
    
session_start();

    
// You can now edit below this line
    // You can now edit below this line
?>

Try something like

PHP Code:

<?php  
session_start
();
$curdir getcwd (); 
chdir('/path/to/your/forums');     
require_once(
'/path/to/your/forums/global.php');  
chdir ($curdir); 
?>

If that fails to work then it looks like both scripts are just incompatible :(

Dark s.s. Trunk 06-24-2006 09:07 AM

I have a strange problem lol i seem to be permittly logged in. Now on my forums when i log off and go to main forum page it shows me as logged in, and on the page i put the code i hit log out goes to forums cookies cleared aand all but when it goes back to page still logged in,, even cleared IE cashe and still does it
----------------
Edit: that problem was bad cashe in IE but now ran into another problem, i have 2 php files i use one has a bit different b/c of the way i display some pages but works perfect on mainpage.php but any file that seems to use my mainpage2.php it goes to log in but keeps telling me to log in but still logged in on mainpage.php.. all ode for login exact same.

Note seems pages dun work on anything linked to in the address bar like thsi http://twistedeffects.com/mainpage.p...iles/tutorials

hurry 06-25-2006 10:28 AM

Quote:

Originally Posted by AutoXer
I fixed it. Here's how:

AdminCP -> vBulletin Options -> Cookies and HTTP Header Options -> Path to Save Cookies

I changed the 'Suggested Settings' dropdown from '/forums/' to '/'

I did this but it still does not work for me and gives me the forum logged in screen and then again returns back to the page without being logged in. Please help.

Billspaintball 06-27-2006 10:59 PM

Quote:

Originally Posted by Dark s.s. Trunk
Note seems pages dun work on anything linked to in the address bar like thsi http://twistedeffects.com/mainpage.p...iles/tutorials

I dont quite understand what you mean here.
What part of the login does not work exactly?

Billspaintball 06-27-2006 11:04 PM

Quote:

Originally Posted by hurry
I did this but it still does not work for me and gives me the forum logged in screen and then again returns back to the page without being logged in. Please help.

I need a bit more detail than this please.

Billspaintball 07-14-2006 05:02 AM

Updated instructions with a change that may allow cross domain login to work.

lightnb 07-14-2006 12:29 PM

I'm having an issue where including global.php causes my main script to stop functioning.

I've commented out your code, line by line to locate the problem, and my script works until I allow global.php to be called.

At that point, all of the links on the page stop working (the login box works fine).

It is a search results page, and the links are in this format:

PHP Code:

<a href="<?=$PHP_SELF?>?query=<?=$query?>&page=<?=$page?>&limit=5">5</a>

Any idea why global.php interferes with the functionality of these links?

Thanks,

Nick

Paris Holley 07-20-2006 03:48 PM

does not work in 3.6 rc2, including global.php causes scripts to become unresponsive

*nvm*

was a cookie conflict


All times are GMT. The time now is 01:08 PM.

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.01401 seconds
  • Memory Usage 1,770KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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