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 Bug Reports

Photopost Pro Bug Reports Post post installation PhotoPost Pro problems here.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old March 29th, 2008, 11:40 AM   #1 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 220
Subalbums not shown in selectbox

pp-inc.php, function catmoveopt.

This is the query to get all albums for a specific user:
Code:
Content visible to verified customers only.
This query doesn't find subalbums, because they don't have the userid in the "parent" field, but the id of their parent album.

To get this working, album "categories" should also make use of the "children" field to store their children. This would allow to easily grab them without doing some recursive queries to get all children (and their children ..).
Astaran is offline   Reply With Quote
Old March 29th, 2008, 12:09 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
I am not following your logic here it just doesnt seem quite right your query above. I am not clear on what your expecting where so please post where you mean exactly but if I edit a photo and select the change category options clearly my subalbums that I have assigned to other albums are listed as well as parent albums and I can move a photo there. I did test this functionality as I saw your post.

The admin options on showphoto category list does not include albums in any manner whether its parent subalbum etc so this would not be a bug to my knowledge it is intentional not to list albums since an admin sees all albums and this can slow down the page. If you hit editphoto you will see all the cats and albums listed which is correct.

The userid of an album is always stored in the parent field always. Children has no place here thats only used to assign an album or category to a category not an album. If you assign an album as a subalbum the actual parent album is listed in the categories table in the subalbum field of your album you just assigned to the parent album. I hope this clarifies the issue as if you check you will see what I am saying here so what your posting is not needed.

If there is something we are not understanding here please explain but the only place in the program that a full cat and album list is found in the program for a user is under editphoto.php and in admin for the admin on all the catmove boxes. The Admin catmove box only shows categories.
__________________
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 March 29th, 2008, 03:10 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 220
Hi Chuck,

sorry for not being clear enough. I wasn't aware of the subalbums field that stores the parent id.

I'm using a customized call to the catmoveopt() function on my custom upload processing page. I want to display all albums of the current user. It looks like this:

catmoveopt(0,0,0,1);

the useralbums script basically uses the same call to display a selectbox with possible parent albums:


catmoveopt( 0, 0, 0, 1, true, true );


This call doesn't return any subalbums, because it uses the query as described above.

The parameters of the function are a bit misleading. For example, the second parameter "albums" needs to be "0" to display albums. I would expect it the other way round.

If I call it like this:

catmoveopt(0,0,0,1,false, false); // so albumsonly = 1
it basically works, but not for admins. They will get all albums.

If I use:
catmoveopt(0,0,0,1,true, false); // so albumsonly = 1 and onlymine = true
it doesn't display subalbums.


So it's not a real bug, just unexpected behaviour. With the current code, it's not possible to display just all albums of the current user. The function parameters just made me think that it should be possible.

So no bug, sorry for bugging you. Maybe it can be considered as a feature request => refactoring the catmoveopt function.
Astaran is offline   Reply With Quote
Old March 29th, 2008, 08:03 PM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
Well the current code works in all aspects that I see by displaying all a users albums for a user or all albums for an admin. maybe you might need to debug your customizations?
__________________
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 March 30th, 2008, 06:05 AM   #5 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 220
It works for all current use cases in the software, right. Just not as I was expecting it. What I need is basically the selectbox from the editphoto page. This selectbox display the subalbums, as you said. But it displays all users' albums if you have admin rights.

I just want to display all albums of the current user, regardless of the user rights. Anyway, I created a new parameter for that function, so that I can do what I want.

So again, no real bug, just some unexpected behaviour. Your hint regarding the subalbum field was the information I needed to understand what was missing. Thanks for that!


Feel free to move this thread to the suggestion or modification forum.
Astaran is offline   Reply With Quote
Old March 30th, 2008, 11:39 AM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
Well personally if I am following what your trying to do your overthinking the issue by trying to add some new option in the function.

If you never want the admin to see other users albums and only want people to see their own stuff its real simply in the catmoveopt you simply change this

Code:
Content visible to verified customers only.
to say this

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 March 30th, 2008, 11:47 AM   #7 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 220
That's basically what I did, I just used an additional parameter so that I don't change the default photopost behavior.
Astaran is offline   Reply With Quote
Old March 30th, 2008, 11:49 AM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
LOL although this thread tells me you want to change the default behavior go figure
__________________
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 March 30th, 2008, 12:09 PM   #9 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 220
I want to populate a selectbox that doesn't exist in the standard photopost installation. It's on my upload page and allows the user to choose where is uploaded photos should be moved to. One shows all existing categories and another selectbox just shows his albums. I didn't want to change any existing selectbox (editphoto, useralbums). Hopefully, this clears things up a bit. I was just a bit confused about the function parameters, but you convinced me that it is desired that way.

An additional parameter is just easier to maintain during upgrades and an admin should get all albums on the editphoto page.
Astaran is offline   Reply With Quote
Old March 30th, 2008, 12:12 PM   #10 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
Ah your talking about your hard coded flash or java upload page got ya.
__________________
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rank not shown in posts Kirby vBGallery Suggestions 1 March 17th, 2008 09:45 PM
Where the manufacturer is shown bob weaver ReviewPost How do I...? 1 February 24th, 2008 03:50 PM
SubAlbums Not Deleted from Display Mr_JWL Photopost Pro Bug Reports 5 October 30th, 2006 11:37 AM
Category name not shown in navbar Oblivion Knight Bugs - vBulletin 3.5.X 2 August 6th, 2005 03:36 PM
Backing member Album & subalbums? iphoto General Discussion 5 December 5th, 2004 07:26 PM


All times are GMT -5. The time now is 10:54 AM.

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