vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Login issue (https://vborg.vbsupport.ru/showthread.php?t=284016)

SavSin 06-06-2012 03:30 AM

Login issue
 
1 Attachment(s)
When i view the forums i am logged in fine but anytime I hit my home button which goes to my custom home page (Software is forum only no CMS) it shows me logged out.

any ideas on how to fix this..

it seems to happen on all my custom pages. (The home button on the footer and the small house keep me logged in its the tab that logs me out)

Here is the PHP and HTML for my page.

PHP Code:

<?php

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

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

define('THIS_SCRIPT''NcBHomePage');
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('NcBHomePage');

// 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
//chdir ('forums/');
require_once('./global.php');

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

$navbits construct_navbits(array('http://www.norcalbots.com' => 'Home'));
$navbar render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'NcB Home';

$output '<table class="servers">

        <tr class="servers">
            <td class="servers" align="left" colspan="10"><img src="ncb_images/cscz_servers.png" height="30" width="300" /></td>
        </tr>
        
        <tr class="servers">        
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27016&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
            
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27018&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
            
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27019&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
            
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27017&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
        </tr>
        
        <tr class="servers">        
            <td class="servers">
                &nbsp;
            </td>            
        </tr>
        
        <tr class="servers">
            <td class="servers" align="left" colspan="10"><img src="ncb_images/csgo_servers.png" height="30" width="300" /></td>
        </tr>
        
        <tr class="servers">
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27020&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
            
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27020&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
            
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27020&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
            
            <td class="servers"><iframe src="http://cache.www.gametracker.com/components/html0/?host=69.62.252.50:27020&bgColor=555555&fontColor=eeeeee&titleBgColor=333333&titleColor=ffffcc&borderColor=222222&linkColor=ffffcc&borderLinkColor=eeeeee&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="288"></iframe></td>
        </tr>
        
    </table>'
;


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

$templater vB_Template::create('NcBHomePage');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);

//Home Page Outline
$templater->register('output'$output);

print_output($templater->render());
?>

Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if>  dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
       
        <LINK REL=StyleSheet HREF="games/stats/player_stats.css" TYPE="text/css">
               
        {vb:raw headinclude}
        <title>{vb:raw pagetitle}</title>

        <vb:if condition="$includecss">
                <vb:if condition="$vboptions['storecssasfile']">
                        <vb:each from="includecss" value="file">
                                {vb:cssfile {vb:raw file}}
                        </vb:each>
                <vb:else />
                        {vb:cssfile {vb:raw includecss}}
                </vb:if>
        </vb:if>
        {vb:raw headinclude_bottom}
</head>
<body>

        {vb:raw header}
       
        {vb:raw navbar}
       
        <center>
                        {vb:raw output}
        </center>
        {vb:raw footer}
       
</body>
</html>


kh99 06-06-2012 10:08 AM

I think the problem is that your custom page has "www" on the url while the vb page doesn't (or was it the other way around), so the cookies aren't getting sent to your custom page. You could try going to Cookies and HTTP Header Options > Cookie Domain and setting a domain, but you might find you'll have fewer problems overall if you choose one domain (either with or without the www) and set up an htaccess command to send all requests to that one.

SavSin 06-06-2012 06:10 PM

Quote:

Originally Posted by kh99 (Post 2337062)
I think the problem is that your custom page has "www" on the url while the vb page doesn't (or was it the other way around), so the cookies aren't getting sent to your custom page. You could try going to Cookies and HTTP Header Options > Cookie Domain and setting a domain, but you might find you'll have fewer problems overall if you choose one domain (either with or without the www) and set up an htaccess command to send all requests to that one.

Thanks that worked great.. haha

Ill have to look into the htaccess i haven't played with that so i will check it out.


All times are GMT. The time now is 05:11 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.01376 seconds
  • Memory Usage 1,755KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_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