ebelew Posted October 11, 2006 Report Share Posted October 11, 2006 Something that might show welcome and the user name or guest.Something along these lines\<?php global $user_nickname;get_currentuserinfo();if ( $user_nickname<> "" ) { ?>Welcome <?php echo $user_nickname ?>.<?php } else { ?>Welcome Guest<?php } ?>\ Quote Link to comment Share on other sites More sharing options...
Barry Posted October 11, 2006 Report Share Posted October 11, 2006 This will work - looks good on our site - thanks. <?php if( $currentuser ) {echo "$text[welcome], $currentuserdesc\n";} else {echo "Welcome Guest";} ?> Quote Link to comment Share on other sites More sharing options...
ebelew Posted October 11, 2006 Author Report Share Posted October 11, 2006 This will work - looks good on our site - thanks. <?php if( $currentuser ) {echo "$text[welcome], $currentuserdesc\n";} else {echo "Welcome Guest";} ?>Thanks, it works and shows "Welcome, Guest" but when I log in it shows "Welcome, " and no name.Is something set up on my end wrong....www.ballewgenealogy.orgLogin = guestpw - passwordThXEddy Quote Link to comment Share on other sites More sharing options...
Barry Posted October 11, 2006 Report Share Posted October 11, 2006 I can only see the html code that index.php produces.The original code was:<?php if( $currentuser ) { echo "<p><strong>$text[welcome], $currentuserdesc.</strong></p>\n"; }?>and the only change necesary is to add the else line. Must be something around currentuserdesc that is causing the problem. If you copy that part of your code into a reply then I could try it. (I am at less than novice level in php programing) Quote Link to comment Share on other sites More sharing options...
ebelew Posted October 11, 2006 Author Report Share Posted October 11, 2006 I can only see the html code that index.php produces.The original code was:<?php if( $currentuser ) { echo "<p><strong>$text[welcome], $currentuserdesc.</strong></p>\n"; }?>and the only change necesary is to add the else line. Must be something around currentuserdesc that is causing the problem. If you copy that part of your code into a reply then I could try it. (I am at less than novice level in php programing)Sorry, my bad. It wasn't on the "Home" page yet, I've added it and it shows your name on the home page now. You must select one of the categories before you see it. Try the statistics link.Eddy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.