PDA

View Full Version : unregistered users have blank name


skidpics
March 13th, 2008, 10:30 AM
Anyone what is not logged in (guest) shows up as a blank name for uploads and messages..

Is there a problem with my settings, or does photopost not place a default "guest' for unregistered users?

Chuck S
March 13th, 2008, 11:17 AM
I guess what is your integration type? url?

skidpics
March 13th, 2008, 11:58 AM
I guess what is your integration type? url?

Integrated with SMF Forum -

http://skidpics.com

notice the Top Posters - The black one is when not logged in..

Chuck S
March 13th, 2008, 12:05 PM
Well in smf.php you can try this. It will help for future uploads as its not going to change things for old uploads add this in bold.


elseif ( $usergroup == "" ) {
// login for guests
$usergroup = 100;
}
if (!$User['username'] ) $User['username'] = "Guest";

skidpics
March 16th, 2008, 06:13 PM
Well in smf.php you can try this. It will help for future uploads as its not going to change things for old uploads add this in bold.


elseif ( $usergroup == "" ) {
// login for guests
$usergroup = 100;
}
if (!User['username'] ) $User['username'] = "Guest";


With that change, my site will not pull up. I added if (!User['username'] ) $User['username'] = "Guest";

The end result is this:

elseif ( $usergroup == "" ) {
// login for guests
$usergroup = 100;
}
if (!User['username'] ) $User['username'] = "Guest";

Chuck S
March 16th, 2008, 06:14 PM
whats different here what you added is exactly as what I posted?

skidpics
March 16th, 2008, 06:21 PM
correct, and it makes my site not pull up once I posted the update..

how about in this section: line 402

// This assumes that Id for "Guests" is 100
$usergroup = 100;

Chuck S
March 16th, 2008, 06:40 PM
Try this


if ($User['username'] == "" ) $User['username'] = "Guest";

skidpics
March 16th, 2008, 09:17 PM
seems to be working.

Now I have to see if it will show up in the top poster listing. I have a blank in there with images showing, but unsure on who the images belongs to..

Chuck S
March 16th, 2008, 09:33 PM
It is not going to correct names on all ready uploaded images, You can try running the scan database tool update names on photos comments to see if that helps

skidpics
March 16th, 2008, 10:19 PM
Thanks for the help!

Chuck S
March 17th, 2008, 08:47 AM
Glad to help have a good day