Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
Username on Non-VB Page Details »»
Username on Non-VB Page
Version: , by ohspot ohspot is offline
Developer Last Online: Jul 2003 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-09-2003 Last Update: Never Installs: 0
 
No support by the author.

I'm trying to print a message either welcoming members back, or if they are not logged in, asking them to either login or register.

I have tried This


Code:
<?

require("forums/global.php");

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
  
echo "Welcome back, <b>$username</b>";

}

?>
But can't get it to work. Basically, I want one of the following messages:

Welcome Back, USERNAME

OR

Please Login or Register To Interact In Our Community.

With the words Login, Register & Community being hyperlinks to their respective areas.

This page/message will be outside the forums directory.

Thanks in advance for any help!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-10-2003, 04:36 PM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i might be missing something but try this

require("./forums/global.php");
Reply With Quote
  #3  
Old 04-10-2003, 04:56 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're not defining the opposite case.
PHP Code:
chdir("./forums");
require(
"global.php");

if (
$bbuserinfo['userid'] == 0)
{
    echo 
"you're a guest";
}
else
{
    echo 
"Just kidding, you're " $bbuserinfo['username'];

Reply With Quote
  #4  
Old 04-10-2003, 09:16 PM
ohspot ohspot is offline
 
Join Date: Apr 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm... I tried both tid bits of code, and here is what I get:

PHP Code:
WarningCannot modify header information headers already sent by (output started at /home/ohsppigz/public_html/1index.php:8in /home/ohsppigz/public_html/forums/admin/functions.php on line 1660
you
're a guest 
Also, how did you get your signature? I've seen those images with forum stats all over thie forum, is there a hack that allows you to do that or something - very nice.

And thanks for the help!
Reply With Quote
  #5  
Old 04-10-2003, 09:20 PM
ohspot ohspot is offline
 
Join Date: Apr 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried saving the code in a seperate file (welcome.php) and I didn't get the header information - however, it always shows up as guest - even though I'm logged in.

I even tried logging in then being redirected back to the welcome.php page - same thing, you are a guest.

:banana:
Reply With Quote
Reply

Thread Tools

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 09:01 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.04871 seconds
  • Memory Usage 2,229KB
  • Queries Executed 20 (?)
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)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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