vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Can someone explain: one template updates correctly, one doesn't (on the same page)? (https://vborg.vbsupport.ru/showthread.php?t=136094)

kirblam 01-10-2007 12:34 PM

Can someone explain: one template updates correctly, one doesn't (on the same page)?
 
I have a left sidebar as a result of placing more html in the header and footer templates. In the sidebar (html in the header template), I'd like to include the typical loginbox. There are also some items in the sidebar that rely on the var $show['member'] for whether to display or not. I also left the current loginbox in the navbar template until I get the sidebar working correctly.

After logging in, both loginboxes, correctly show the typical "Welcome User, your last visit etc"

When I click logout, I get to login.php?do=logout... However, only the loginbox in the navbar correctly reverts to username and password inputs. The one in the header template/sidebar retains the Welcome message. If I reload the page though, the sidebar login correctly figures out the state of the user and reacts accordingly.

I've tried various hacks to login.php ($show['member'] = false) in different lines to try to force the sidebar loginbox to behave. I've tried using plugins to debug the issue by showing $show['member']'s value and also $vbulletin->userinfo['userid']'s value.

In any case, everything I see indicates that either the header template is cached and doesn't get refreshed until a later event or that the logout process doesn't occur until after the header template is rendered. I'm a relative newbie so I'm guessing there's something fundamental I'm missing.

Thanks in advance,
K

noppid 01-10-2007 04:08 PM

There's some Javasript and a hash involved in that logout thing IIRC. Are you sure you have a complete copy of the login box code and not just a simple form?

kirblam 01-10-2007 07:59 PM

I believe the complete code is there for the login box. It functions well when actually logging in. I'll double check it though.

Also, the logout link is separate from the loginbox.

Plus, the issue affects other conditionals in the sidebar, not just the loginbox. Anything that relies on <if condition="$show['member']"> - any of those blocks still believe the member is logged in, but only in the header template. The other conditionals in the navbar template work OK.


All times are GMT. The time now is 10:28 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.00955 seconds
  • Memory Usage 1,708KB
  • 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)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