forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: murphyz on July 04, 2004, 05:50:39 pm

Title: [SOLVED] user edit description problem
Post by: murphyz on July 04, 2004, 05:50:39 pm
I have the gallery running with phpbb integration and with the mod for a user to delete their image whilst in 'admin' mode - all of which works fine.

However, when a user looks at their own picture and click on the 'edit description' link they are able to edit their description as normal. The problem is that there is no list of albums for them to specify where to move it to (if needed). See image below:

(http://www.cluckbook.com/a2z/images/nolist.jpg)

This means that if the user goes to admin mode and attempts to change the image description, by clicking submit, the image is lost - I assume because it doesn't know which album the image is meant to go into.

This works fine if I am logged in as the administrator.

Any idea how to make the album list appear in the dropdown?

Mxx

Edit:  The 'album' pull down shows any of the users private albums if they have been created.  I think, therefore, that I will need to change the editOnePic.php file so that for any USER_ADMIN_MODE takes not only the user_albums_list, but also the public_albums_list.

I'll continue playing as before, but if anyone in the know can shed some light on the solution, that'll obviously be a great help - thanks :)

Edit:   Sorry, more patience on my behalf needed. I think I have solved it.

Find:
Code: [Select]
if (GALLERY_ADMIN_MODE) {
    $public_albums = db_query("SELECT DISTINCT aid, title, IF(category = 0, CONCAT('&gt; ', title), CONCAT(name,' &lt; ',title)) AS cat_title FROM {$CONFIG['TABLE_ALBUMS']}, {$CONFIG['TABLE_CATEGORIES']} WHERE category < '" . FIRST_USER_CAT . "' AND (category = 0 OR category = cid) ORDER BY cat_title");

Replace with:
 
Code: [Select]
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
    $public_albums = db_query("SELECT DISTINCT aid, title, IF(category = 0, CONCAT('&gt; ', title), CONCAT(name,' &lt; ',title)) AS cat_title FROM {$CONFIG['TABLE_ALBUMS']}, {$CONFIG['TABLE_CATEGORIES']} WHERE category < '" . FIRST_USER_CAT . "' AND (category = 0 OR category = cid) ORDER BY cat_title");

I'm just doing a few security checks just now, but if you don't hear anything further, please assume the above worked.  Apolgies for needless posting.
Title: Re: [SOLVED] user edit description problem
Post by: NetCritter on July 15, 2004, 08:34:25 pm
Thanks murph, this seems to be working fine for me  ;D