PDA

View Full Version : Image rating not showing for guests


skidpics
January 26th, 2009, 02:06 PM
Hate to bother you Chuck,

But I think I may have a glitch in the ratings.

I have rating enables for guest..

When i view the pic as a guest ( I didn't upload), there is no rating field.

In one particular image, I checked the DB and it is indeed marked with 1 for allowrate and allowcoms, but nothing will show up until I log into the site..

I also checked the DB is comments are enabled, and it states '1'

I don't have it set for comment approval.

here is the one I am checking: Skidpics - Fast, free image hosting - 23-01-09_1206_edited (http://skidpics.com/showphoto.php/photo/17037)

Chuck S
January 26th, 2009, 02:25 PM
Do you have category voting enabled for guests as well for the categories? Do you have allow quick ratings set to yes in admin as well?

skidpics
January 26th, 2009, 03:24 PM
Do you have category voting enabled for guests as well for the categories? Do you have allow quick ratings set to yes in admin as well?

yes. never changed that part.

I just uploaded an image logged in, and can rate that one when viewing as a guest, but not when uploading as a guest, and trying to rate as a guest I cannot. Comment box shows up though.

recent working example: Skidpics - Fast, free image hosting - palo duro canyon (http://skidpics.com/showphoto.php/photo/17044)

non working example: Skidpics - Fast, free image hosting - 691 (http://skidpics.com/showphoto.php/photo/17043)

Let me check my modified uploadphoto.tmpl.

I removed the parts about title, description and keywords, trying to simplify it a bit since it asks again on the bulk upload, but the part about image ratings is still there and being passed on, as previously checked in the DB with an upload

Chuck S
January 26th, 2009, 03:28 PM
Definately looks like a setting. I would have to look at it more in depth,

skidpics
January 26th, 2009, 09:16 PM
Definately looks like a setting. I would have to look at it more in depth,

uploaded the default uploadphoto.tmpl, and that didn;t seem to make the differnece. still no ratings for guests showing. I will leave it up until you have a chance to look at it.

Do you still have the old admin access or do you want me to email it to support again?

I verified all the settings, and nothing has been changed.. so I am not sure what it could be.

Chuck S
January 26th, 2009, 10:13 PM
You would need to email details to support.

skidpics
January 26th, 2009, 10:21 PM
emailed just now.

thanks for checking it out.

Chuck S
January 27th, 2009, 09:54 AM
Not a problem will check helpdesk for sign in details and respond accordingly

Chuck S
January 27th, 2009, 10:21 AM
Both examples you provide above have a rating bar and I rated them.

skidpics
January 27th, 2009, 11:35 AM
that's weird.

this one doesn't have one for me: Skidpics - Fast, free image hosting - 691 (http://skidpics.com/showphoto.php/photo/17043)

but this one does: Skidpics - Fast, free image hosting - palo duro canyon (http://skidpics.com/showphoto.php/photo/17044)

and as you can see, I have not rated this one.

You know what. the image rating shows if you are logged in, as a guest, the second one does only.

you logged in to rate the image. try without and let me know.

Chuck S
January 27th, 2009, 12:30 PM
I guess we would need to see what the difference is. I viewed many photos not logged in and see the rate box so we need to see what the difference is with that one photo. Obviously the category permissions to rate are correct because other photos viewed have the rate box.

skidpics
January 28th, 2009, 09:38 AM
Right. I just some more uploads from some users. check this out and see it. I want to know if it isn't local to me. Let me know. And I will compare a couple of photos in the database to see what the settings are..

Skidpics - Fast, free image hosting - ~My Pictures~ (http://skidpics.com/showphoto.php/photo/17056) - should not show.

Skidpics - Fast, free image hosting - catandtoychick1 (http://skidpics.com/showphoto.php/photo/14790) - should show

let me know. and thanks.. for helping me a bit. seems like something is not getting saved for the guest uploads.

Chuck S
January 28th, 2009, 10:00 AM
well you need to show examples that dont show in the same category like you did before. That shows me its some setting in your database like close comments or something like that in the photos table. Thats what I am leaning towards.

skidpics
January 28th, 2009, 10:13 AM
I checked the DB for 2 images in the same category, and the settings are the same..

Skidpics - Fast, free image hosting - PICT0186 (http://skidpics.com/showphoto.php?photo=17074)
and
Skidpics - Fast, free image hosting - 132_crazy (http://skidpics.com/showphoto.php/photo/13368)

The second one shows the rating, first one (recent upload) does not. O course, it does show up when logged in. ;-)

let me try an upload as guest to another cat and see what it does

Chuck S
January 28th, 2009, 10:19 AM
They are not the same. who uploaded the first I see no name? The settings can not be the same. We know its not category permissions as that would affect all images. It has to be the photo info.

$rateperms = ( $cattype == "a" ? $CatPerms['ugvote'][500] : $CatPerms['ugvote'][$dbcat] );


if ( $Globals['allowrate'] == "yes" && $rateperms == 0 && $ratingtype != 1 )
{



If you need help I would need to see the database.

skidpics
January 28th, 2009, 10:26 AM
guest are uploading the photos, and again I think from a previous discussion, guest do not have a name in PP - sometimes though, it shows up as unregistered, but most of the time, there is no name..

Chuck S
January 28th, 2009, 10:28 AM
what I am saying though is the entries in the photos table can not be identical if two photos are uploaded to the same category and one can be rated and another can not.

The only thing off the top of my head is the close comments thing.

skidpics
January 28th, 2009, 10:28 AM
They are not the same. who uploaded the first I see no name? The settings can not be the same. We know its not category permissions as that would affect all images. It has to be the photo info.

$rateperms = ( $cattype == "a" ? $CatPerms['ugvote'][500] : $CatPerms['ugvote'][$dbcat] );


if ( $Globals['allowrate'] == "yes" && $rateperms == 0 && $ratingtype != 1 )
{



If you need help I would need to see the database.

If this is in showphoto.tmpl, mine shows this:

if ( $Globals['allowrate'] == "yes" && $rating != 0 && $ratingtype != 1 )
{

Chuck S
January 28th, 2009, 10:33 AM
php file

in the tmpl file you want to pay attention to this


if ( $Globals['dispquick'] == "yes" && $ratedisplay != "" && $ratingtype == 0 )



We just need to track down what is different here what is the permission that restricts it from showing.

skidpics
January 28th, 2009, 10:50 AM
why are these 2 lines different?

if ( $Globals['dispquick'] == "yes" && $ratedisplay != "" && $ratingtype == 0 )

if ( $Globals['allowrate'] == "yes" && $rating != 0 && $ratingtype != 1 )

skidpics
January 28th, 2009, 11:01 AM
Do you want me to email the db info again

I never had this problem before, and even going back to default showphoto.tmpl file, it still doesn't work right.

Chuck S
January 28th, 2009, 11:11 AM
Well yes I need to see the database and ftp to see the files. we need to determine really what variable is causing it. we know its not category permissions since the photos are in the same category it has to be in the photos table.

skidpics
January 28th, 2009, 11:30 AM
support a pp, right?

skidpics
January 28th, 2009, 11:34 AM
I checked usergroup settings in DB, and 2 recent uploads I uploaded, one logged in, one not, it will be the last 2 uploads in pp_photos. The settings are identical pretty much. The one with username and I shows ratings, the other does not..

login details will be forwarded to support.

skidpics
January 28th, 2009, 11:37 AM
My user groups in SMF doesn't match user groups in PP, I have a Guest account in PP that is not in SMF - I did update usergroups from DB.. Will the posting take from Guest, or is it suppossed to be something else?

What about guest user group number in PP, what is it supposed to be? The Db is set to 100..

Chuck S
January 28th, 2009, 08:57 PM
Your groups need to be exact for things to work but SMF if I remember has no guest group so we create one which is 100.

skidpics
January 29th, 2009, 04:19 PM
Did you get my email to check it out? Find anything weird?

Chuck S
January 29th, 2009, 04:21 PM
Yes I found your answer quite simple actually we both where looking too hard at this.

No one is every able to rate their OWN picture this is why you dont see the quickrate bar. This is right in showphoto.php


if ( $alreadyrated == 0 )
{
if ( $User['userid'] != $iuserid )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/quickrate.tmpl" );
}
}

skidpics
January 29th, 2009, 04:22 PM
Yes I found your answer quite simple actually we both where looking too hard at this.

No one is every able to rate their OWN picture this is why you dont see the quickrate bar. This is right in showphoto.php


if ( $alreadyrated == 0 )
{
if ( $User['userid'] != $iuserid )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/quickrate.tmpl" );
}
}



well, that's fine and dandy, but the problem is, I didn't upload those photos. So I am assuming if you are a viewer, you are the guest that uploaded the photo?

Chuck S
January 29th, 2009, 04:25 PM
Correct the reason someone logged in sees the rating bar is because they did not upload that photo. A guest is userid 0 and hense a guest viewing the photo is not going to be able to rate it. Just like if you viewed one of your photos your not going to see the rate bar. ;)

skidpics
January 29th, 2009, 04:25 PM
okay - what is the best way to tweak that setting to allow ratings then, regardless of who uploaded?

Chuck S
January 29th, 2009, 04:33 PM
Possibly remove the conditional that makes it not show ;)

it would look like this with the conditional removed


if ( $alreadyrated == 0 )
{
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/quickrate.tmpl" );
}

skidpics
January 29th, 2009, 04:48 PM
that did the trick. I already knew that answer. Not sure why I even asked.

Thanks for your time. I will add this to the tweak list in case I have to update PP in the future..

skidpics
January 29th, 2009, 04:53 PM
now I just need to find that thread that showed how to get 'unregistered' or 'guest' for the name field if not logged on.