Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 02-18-2008, 12:12 AM
HKothari HKothari is offline
 
Join Date: Jul 2007
Location: Near Boston, MA
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [Urgent] Check if user is logged in.

Can someone help me on this, I finally got a working login page to integrate my site by using the code from this page but I can't seem to figure out how to hide the form and show something else if the user is already logged in. Anyone have ideas?
Reply With Quote
  #2  
Old 02-18-2008, 01:17 AM
Hex_legend Hex_legend is offline
 
Join Date: May 2007
Posts: 750
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="$show['register']>
LOGIN CODE
<else />
Text for logged in users
</if>

How about that?
Reply With Quote
  #3  
Old 02-18-2008, 01:29 AM
HKothari HKothari is offline
 
Join Date: Jul 2007
Location: Near Boston, MA
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That didn't seem to work at all, it showed both the login code and the other.

What Do I have to include for this to work, that may be the problem.
Reply With Quote
  #4  
Old 02-18-2008, 03:59 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this on your own custom page? Could you post that page?
Reply With Quote
  #5  
Old 02-18-2008, 07:51 AM
MiahBeSmokin420 MiahBeSmokin420 is offline
 
Join Date: May 2007
Location: Ohio
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<if condition="$bbuserinfo[userid]">
Text For Logged In Users
<else />
LogIn Code
</if>
Reply With Quote
  #6  
Old 02-18-2008, 11:14 AM
HKothari HKothari is offline
 
Join Date: Jul 2007
Location: Near Boston, MA
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Is this on your own custom page? Could you post that page?
http://www.truewebgaming.com
and to use the if statements, what do I need to include?

Also, can I just use php's if statements, and as far as the bbuser thing, what do I need to include?
Reply With Quote
  #7  
Old 02-18-2008, 11:26 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?t=170110" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=170110</a>
Reply With Quote
  #8  
Old 02-18-2008, 11:49 AM
HKothari HKothari is offline
 
Join Date: Jul 2007
Location: Near Boston, MA
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, well, I followed that, but it says this when I test it:
Quote:
Notice: Undefined index: HTTPS in /usr/local/pem/vhosts/133519/webspace/httpdocs/forums/includes/class_core.php on line 1591

Notice: Undefined index: HTTPS in /usr/local/pem/vhosts/133519/webspace/httpdocs/forums/includes/class_core.php on line 1591




Unable to add cookies, header already sent.
File: /usr/local/pem/vhosts/133519/webspace/httpdocs/forums/includes/class_core.php
Line: 1591

Any Ideas why?

--------------- Added [DATE]1203349108[/DATE] at [TIME]1203349108[/TIME] ---------------

I found out that it's a notice, so it's not important, but it still isn't checking whether the user is logged in. Anyone?

--------------- Added [DATE]1203352368[/DATE] at [TIME]1203352368[/TIME] ---------------

If you aren't logged in, all it does is show the error, and nothing else is loaded, if you are logged in, it just shows the notices at the top, but it loads the rest of the page
Reply With Quote
Reply

Thread Tools
Display Modes

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:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04310 seconds
  • Memory Usage 2,224KB
  • 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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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