Jump to content
TNG Community

Welcome message


ebelew

Recommended Posts

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 } ?>

\

Link to comment
Share on other sites

This will work - looks good on our site - thanks.

<?php

if( $currentuser ) {echo "$text[welcome], $currentuserdesc\n";}

else {echo "Welcome Guest";}

?>

Link to comment
Share on other sites

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.org

Login = guest

pw - password

ThX

Eddy

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...