PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Pro Support Forums > Photopost Pro How Do I...?

Photopost Pro How Do I...? Wondering how to do things in PhotoPost?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old October 10th, 2006, 03:49 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Feb 2004
Posts: 117
Comments Question

Can you please help me with a question about how PP handles some things.
I have modified my showphoto.php file so that only certain users are able to view photos in certain categories, otherwise they get sent to a signup page. I also have it where certain categories are visible to all users. Everything works fine as intended, except for when commenting. To begin with (and to better explain), here is the code I am using:
Code:
Content visible to verified customers only.
Basically saying, for all categories except 513, 514, and 515, unless you are a part of usergroup 5, 6, or 7 then you will be sent to the signup page. This works fine as everyone can view the photos in categories 513, 514, and 515, and only usergroups 5, 6, and 7 can view the other categories without getting the signup message.
The problem comes in when a user in a group other than 5, 6, or 7 tries to rate or comment on a photo in group 513, 514, or 515. It allows them to view the photo, and then rate or comment it, but once it has completed the rating/comment, it sends them to the signup page. I can quite figure this out, since it should send them back to the photo. Maybe I am missing something further down in the code that I didn't see which needs to be changed. The only thing I can tell is the URL does change from http://www.mysite.com/photos/showpho.../13007/cat/515 to http://www.mysite.com/photos/showphoto.php?photo=13007 so I'm not sure if that is part of the problem or not. Please help point me in the right direction. Thanks!
ghinton is offline   Reply With Quote
Old October 10th, 2006, 04:59 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
the one thing I see off hand is your using within your brackets && whereas it should be ||
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 11th, 2006, 06:45 AM   #3 (permalink)
Member
Verified Customer
 
Join Date: Feb 2004
Posts: 117
It don't understand... The && means that it has to meet all of those requirements. If I replace any of the && with || then then don't meet those requirements and it starts displaying the signup page when it isn't supposed to.
If I am wrong, can you suggest how it is supposed to work then, and will that take care of my issue with it poping up the signup screen when someone leaves a comment.
ghinton is offline   Reply With Quote
Old October 11th, 2006, 09:07 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
Your logic is flawed if I follow.

You want to match if a user's usergroup is not one of the ones in those parentheses AND not one of the cats then do this hense it must be like I said.

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 11th, 2006, 01:01 PM   #5 (permalink)
Member
Verified Customer
 
Join Date: Feb 2004
Posts: 117
I understand where you are coming from; however, if I do the code that way, then it will show the signup page for everyone, no matter what usergroup or category. Logically thinking it should be OR, since usergroup is 1 and is not a member of usergroup 5, 6, 7, OR 8, then they should see the signup page. For some reason thought it is not seeing it that way and sends all groups to the signup page. The only way I can get it to function the way it is intended is to have the code the way it is.

Anyways... I have found the problem. It appears it as I initially had said with the way the URL changes after a comment is made. When my code is looking for the particular categories that are allowed, when the URL changes, apparently it doesn't know what category it is, so it sends the person to the signup page. I fixed it by changing the following line in comments.php from
Code:
Content visible to verified customers only.
to
Code:
Content visible to verified customers only.
ghinton is offline   Reply With Quote
Old October 11th, 2006, 01:28 PM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
You can post your mod questions in the mod corner but your code simply will never work. Your logic is not valid. The code must be as I posted as that is correct but the big question here where are you grabbing and defining the $usergroup parameter?

Nothing will work until you define the $usergroup paramter maybe above the if statement this

list( $guserid, $gusername, $gmail, $gpass, $gtemp, $usergroup ) = get_userinfo("", {$User'userid']});
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 11th, 2006, 06:20 PM   #7 (permalink)
Member
Verified Customer
 
Join Date: Feb 2004
Posts: 117
It's OK Chuck... when I changed the comments.php file it fixed what I need it to do. However flawed it may be, it is the only thing that works properly, and now all is working perfectly like I wanted it. As far as defining the usergroup, this is something you and Michael had helped me in the past with. In photopost.php I changed
Code:
Content visible to verified customers only.
to
Code:
Content visible to verified customers only.
ghinton is offline   Reply With Quote
Old October 11th, 2006, 06:38 PM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
Right but your if statement is not using $User['usergroup'] in the statement
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 12th, 2006, 12:43 AM   #9 (permalink)
Member
Verified Customer
 
Join Date: Feb 2004
Posts: 117
Not sure why it works, but it is

This is what you sent me regarding this over a year ago:

Quote:
Sure showphoto can use usergroup setting. why not just modify photopost.php to define that like so
find the offset definition and add the usergroup definition below it and then usergroup will be available throughout the program

$User['offset'] = $offset;
$User['usergroup'] = $usergroup;
ghinton is offline   Reply With Quote
Old October 12th, 2006, 08:08 AM   #10 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,695
Thats fine I am just pointing out $usergroup is never defined
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
5.5 If not allow comments, hide Close Comments link? mjm Photopost Pro Bug Reports 1 October 5th, 2006 08:04 AM
comments. Sybaris Photopost Pro How Do I...? 3 August 7th, 2006 03:18 PM
5.02 - Upgrade Error Question/Deleted Files Question WB Photopost Pro Installation & Upgrades 5 March 16th, 2005 03:00 PM
"Moderate Comments" not showing comments myjeeprocks Photopost Pro Installation & Upgrades 3 July 14th, 2004 03:06 PM


All times are GMT -5. The time now is 03:58 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0