Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Move an album from User gallery?  (Read 2259 times)

0 Members and 1 Guest are viewing this topic.

gosha

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Move an album from User gallery?
« on: May 09, 2006, 09:52:07 pm »

Hi,

Maybe is was asked before, but I did not found it in 1.4's support forums.
I need to move one album or it's content from user's gallery into usual category but I want to keep all 'display times', 'votes' and 'comments' on all images, is it possible? Maybe in could be done in SQL manualy?

Thanks in advance,
G.
Logged

trippinsweet

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 27
Re: Move an album from User gallery?
« Reply #1 on: May 13, 2006, 12:54:28 pm »

Yep you could do it in SQL manually. Go to the albums database and edit the cid feild.
User galleries have cid's starting at 10,000.

Or you can edit modifyalb.php which is what I did.

Change

Code: [Select]
if (!GALLERY_ADMIN_MODE || $ALBUM_DATA['category'] > FIRST_USER_CAT) {
        echo <<<EOT
        <tr>
            <td class="tableb">
                        $text
        </td>
        <td class="tableb" valign="top">
                        <i>{$lang_modifyalb_php['user_gal']}</i>
                        <input type="hidden" name="$name" value="{$ALBUM_DATA['category']}" />
                </td>

EOT;
        return;
    }

to

Code: [Select]
if (!USER_IS_ADMIN)
{
    if (!GALLERY_ADMIN_MODE || $ALBUM_DATA['category'] > FIRST_USER_CAT) {
        echo <<<EOT
        <tr>
            <td class="tableb">
                        $text
        </td>
        <td class="tableb" valign="top">
                        <i>{$lang_modifyalb_php['user_gal']}</i>
                        <input type="hidden" name="$name" value="{$ALBUM_DATA['category']}" />
                </td>

EOT;
        return;
    }
}

That way only the gallery admins can move albums out of the user gallery.

If you want to move it back into the user gallery, you'll have to do it manually or apply another hack.
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 15 queries.