PDA

View Full Version : blank author on comments


skidpics
April 12th, 2008, 06:08 AM
I know I had this discussion in the past, and got some it resolved with the name for unregistered users.

My comments on the index page shows 'unregistered', but the comments under the pics under author show nothing.. what can I do to get 'guest' in that spot?

Chuck S
April 12th, 2008, 10:39 AM
In image-inc.php you can add this line



if ( !empty( $User['username'] ) )$User['username'] = "Unregistered";
$iuser = addslashes( $User['username'] );

skidpics
April 12th, 2008, 07:45 PM
didn't do the trick..

Chuck S
April 12th, 2008, 08:00 PM
Yes it should on new photos. Try uploading a new photo

skidpics
April 12th, 2008, 11:44 PM
the issue is not with the photos, rather the comments that are listed having nothing listed on the 'author'

I did as instructed, uploaded a new photo and added another comment, with no difference..

Chuck S
April 13th, 2008, 10:08 AM
IN your language file what do you have for this language string?

$ucuser[$itemnum] = $Globals['pp_lang']['unreg'];


You can edit showphoto.php and find this line and above it add the line in bold but i dont see why your array does not load the string noted above if cuname is empty


if ( empty( $cuname) $cuname = Globals['pp_lang']['unreg
$ucuser[$itemnum] = $cuname;

skidpics
May 16th, 2008, 06:13 AM
$ucuser[$itemnum] = $Globals['pp_lang']['unreg'];

is NOT found in my language file. english.php

skidpics
May 16th, 2008, 06:19 AM
In image-inc.php you can add this line



if ( !empty( $User['username'] ) )$User['username'] = "Unregistered";
$iuser = addslashes( $User['username'] );




I just added this tweak to the upgraded version, since it wasn't included, and it made my uploads go to unregistered for logged in user. It will show unregistered, but the link will go to the uploaders profile.

here is a link to a pic, check out the uploader:

http://skidpics.com/showphoto.php/photo/5380

Chuck S
May 16th, 2008, 10:11 AM
You can run the tool in admin to update photo and comment names. :)

skidpics
May 16th, 2008, 07:50 PM
You can run the tool in admin to update photo and comment names. :)

that works, but should the upload for a logged in user remain unregistered until I run the utility each time? That is what it is doing now..

Chuck S
May 16th, 2008, 08:23 PM
well I would ask why what integration is this?

skidpics
May 17th, 2008, 04:18 PM
well I would ask why what integration is this?

What do you mean by integration? It is a standalone PP..

Chuck S
May 17th, 2008, 07:59 PM
The users username should be entered on a comment.

Url and test login.

skidpics
January 16th, 2009, 09:47 PM
I think this conversation was left in the dust, but I also noticed this issue was never taken care of in any updates, which of course where the tweaks were lost..

Reading the thread, is it the language string we are missing to show 'unregistered' or 'guest' on the blank upload names? Or is there something else?

skidpics
January 16th, 2009, 09:49 PM
How about something like this in image-inc?

if ( $upuserid != 0 )
{
list( $tmpid, $tmpuname, $tmail ) = get_userinfo("", $upuserid);
$User['username'] = $tmpuname;
if ( empty($User) )
{
$User = 'guest';
}
}

Chuck S
January 17th, 2009, 09:24 AM
The line you posted in your post is wrong


if ( !empty( $User['username'] ) )$User['username'] = "Unregistered";


this is more like it


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

skidpics
January 17th, 2009, 09:26 AM
Thanks Chuck - I used that for general terms.

I will update the files once the server upgrades are complete.

Chuck S
January 17th, 2009, 09:27 AM
yeah I am just running through this thread looking for errors in posts ;)