Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2006, 04:43 PM
kwame kwame is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I detect if user is logged in?

Hi, I have changed the header & navbar altogether and I wanted to display Login/Logout based on the current status of the user. Can someone please tell me how I can do this? I just can't figure out how to test for current status. Thanks.
Kwame
Reply With Quote
  #2  
Old 03-24-2006, 06:23 PM
GTAce GTAce is offline
 
Join Date: Nov 2005
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<if condition="$show['guest']">

Login

</if>

<if condition="$show['member']">

Logout

</if>
Replace "Login" and "Logout" with their respective code of course
Reply With Quote
  #3  
Old 03-24-2006, 07:04 PM
kwame kwame is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the help but I guess I should have been more specific. The code is going to be placed in the header template and once I put the code
<if condition="$show['guest']">Login</if> into the template, I immediately get errors. Any thoughts?
Kwame

The error that I get is "Parse error: parse error in E:\jamproinvest\caribbeanbusinessclub\forums\globa l.php(512) : eval()'d code on line 368" and line 368 is the line that says "<if condition="$show['guest']">"
Kwame
Reply With Quote
  #4  
Old 03-24-2006, 07:31 PM
GTAce GTAce is offline
 
Join Date: Nov 2005
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, I'm not sure...that should work just fine....post the block of code around this code you're working on.
Reply With Quote
  #5  
Old 03-24-2006, 07:40 PM
kwame kwame is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is my code which is taken from the header template:
<tr>
<td colspan=\"3\" class=\"top_menu\" height=\"35\"> &nbsp;<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/forums/sendmessage.php\" STYLE=\"text-decoration:none\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">Contact Us</span></a> |&nbsp;
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/aboutUs.php\" class=\"style2\" STYLE=\"text-decoration:none\" onMouseOver=\"MM_showHideLayers('matching','','hid e','about','','show','hideAbou t','','show')\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">About Us</span></a> |
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/forums/matching.php\" class=\"style2\" STYLE=\"text-decoration:none\" onMouseOver=\"MM_swapImage('Image40','','http://www.investjamaica.com/caribbeanbusinessclub/forums/moon/images/matchingOver.gif',1);MM_showHideLayers('matching', '','show','hideMatching','','s how','events','','hide','about','','hide')\" onMouseOut=\"MM_swapImgRestore()\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">Business Matching</span></a> |
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/forums/forumdisplay.php?f=1\" STYLE=\"text-decoration:none\" onMouseOver=\"MM_showHideLayers('matching','','hid e','events','','show','news',' ','hide','hideEvents','','show')\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">Events</span></a> |
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/forums/forumdisplay.php?f=14\" class=\"style2\" STYLE=\"text-decoration:none\" onMouseOver=\"MM_showHideLayers('events','','hide' ,'news','','show','hideNews',' ','show','info','','hide')\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">News</span></a> |
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/forums/index.php\" class=\"style2\" STYLE=\"text-decoration:none\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">Forums</span></a> |
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/businessInfo.php\" class=\"style2\" STYLE=\"text-decoration:none\" onMouseOver=\"MM_showHideLayers('news','','hide',' hideInfo','','show','info','', 'show')\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">Business Info</span></a> |
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/forums/forumdisplay.php?f=3\" class=\"style2\" STYLE=\"text-decoration:none\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">Presidents Club</span></a> |

<if condition="$show['guest']">
<a href=\"http://www.investjamaica.com/caribbeanbusinessclub/forums/login.php\" class=\"style2\" STYLE=\"text-decoration:none\"><span onmouseout=\"this.style.color = '#999999';\" onmouseover=\"this.style.color
= '#ffcc33', this.text-decoration=none;\" align=\"justify\">Login</span></a>
</if>

</td>
</tr>
Reply With Quote
  #6  
Old 03-24-2006, 07:49 PM
GTAce GTAce is offline
 
Join Date: Nov 2005
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know...I see nothing wrong, maybe somebody else can see something in it
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:05 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.03711 seconds
  • Memory Usage 2,211KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete