Bridged Coppermine, Showing User Albums for ALL Registered Users Bridged Coppermine, Showing User Albums for ALL Registered Users
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Bridged Coppermine, Showing User Albums for ALL Registered Users

Started by pols1337, July 25, 2011, 01:42:13 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

pols1337

Dear Andre :)

I was moving an album around, and clicked on "Edit Album Properties."  In the drop-down menu for "Album Categories," to showed me both the categories that I created (which is good  :)) .... and hundreds of hundreds of user galleries (which is bad  :-\).  Please see picture.   

In my "Config" > "Registration" settings, "Create user album in personal gallery on registration" is disabled because Coppermine is bridged so the function is automatically disabled. 

Is there a way for me to purge Coppermine of these unused user galleries? 

Joel

Αndré

Open modifyalb.php, find
        $sql = $cpg_udb->get_admin_album_list();
       
        $result = cpg_db_query($sql);
       
        while ($row = mysql_fetch_assoc($result)) {
            print_r($row);
            // Add to multi-dim array for later sorting
            $rowset[] = array(
                'cat'   => $lang_modifyalb_php['user_gal'],
                'aid'   => $row['aid'],
                'title' => $row['title'],
            ); 
        }
       
        mysql_free_result($result);

and remove it completely.

pols1337

Hi Andre,

I did what you told me to do, but when I checked, it still showed all the User Galleries.  Please see picture.

Please see attached for my modifyalb (saved a text document to attach)

Joel

Αndré

Oops, my solution removed the user categories from the 'Choose album' box ;D

Undo that change. Instead, find     foreach ($CAT_LIST as $category) {
        echo '                <option value="' . $category[0] . '"' . ($ALBUM_DATA['category'] == $category[0] ? ' selected="selected"': '') . ">" . $category[1] . '</option>' . $LINEBREAK;
    }

and replace with
    foreach ($CAT_LIST as $category) {
        if ($category[0] == USER_GAL_CAT || $category[0] > FIRST_USER_CAT) continue;
        echo '                <option value="' . $category[0] . '"' . ($ALBUM_DATA['category'] == $category[0] ? ' selected="selected"': '') . ">" . $category[1] . '</option>' . $LINEBREAK;
    }

pols1337

Yes, this works -- resolved.

I have a question though, is this because my CPG is bridged with SMF, or did I have a setting wrong or something?  How come it showed all of these user albums even though, in my Groups settings, I purposely put no user uploads. 

Αndré

Quote from: pols1337 on July 26, 2011, 07:28:19 PM
is this because my CPG is bridged with SMF
No.


Quote from: pols1337 on July 26, 2011, 07:28:19 PM
did I have a setting wrong
No.


Quote from: pols1337 on July 26, 2011, 07:28:19 PM
How come it showed all of these user albums
What you see are user categories, not albums. You as admin might want to assign (move) some albums to a particular user. That's the reason why you see all available user names.