Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: Other members photos appearing in personal album  (Read 5195 times)

0 Members and 1 Guest are viewing this topic.

khoking

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
[Solved]: Other members photos appearing in personal album
« on: February 25, 2008, 12:57:26 am »

I have members complaining that photos that don't belong to them are showing up in their members gallery.

You can see the example here:

http://pentaxworld.com/gallery/thumbnails.php?album=272

The above album is belonging to a member called smc

You can see three colour photos there, which belongs to a member called calsan. If you clicked on the colour photo, it will go to calson's album.

Why do calson's photos appearing in smc album? This is supposed to be a personal member album, other members' photos shouldn't appear there.

How to correct this?

Thanks.
« Last Edit: February 25, 2008, 08:32:12 am by Joachim Müller »
Logged

Nibbler

  • Guest
Re: Other members photos appearing in personal album
« Reply #1 on: February 25, 2008, 01:08:57 am »

Apparently the album 'People in Rome' has an album keyword of 'Street' set. Any pictures with the keyword 'Street' will be displayed in the album. If you don't want this then don't set album keywords.

Update your gallery.
Logged

khoking

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Other members photos appearing in personal album
« Reply #2 on: February 25, 2008, 01:18:19 am »

Hi Nibbler,

Thank you very much for the fast reply and solution!

Is it possible for me to disable album keyword in the gallery? Most members will not know that the keyword is the problem that caused the mixed photos, so I might as well just disable that feature so that no members can key in any keyword in their albums.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Other members photos appearing in personal album
« Reply #3 on: February 25, 2008, 07:57:22 am »

Edit modifyalb, find
Code: [Select]
function form_input($text, $name)
{
    global $ALBUM_DATA;

    $value = $ALBUM_DATA[$name];

    echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        $text
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width: 100%" name="$name" value="$value" class="textinput" />
                </td>
        </tr>

EOT;
}
and replaced with
Code: [Select]
function form_input($text, $name)
{
    global $ALBUM_DATA;

    $value = $ALBUM_DATA[$name];
   
    if ($name=='alb_password' && !GALLERY_ADMIN_MODE) {

    echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        $text
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="hidden" style="width: 100%" name="$name" value="$value" class="textinput" />
                </td>
        </tr>

EOT;
} else {
    echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        $text
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width: 100%" name="$name" value="$value" class="textinput" />
                </td>
        </tr>

EOT;
}
}
(coded without testing out of the back of my head, please post if this worked for you). It should hide the album keyword field for non-admins.
Logged

khoking

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Other members photos appearing in personal album
« Reply #4 on: February 25, 2008, 08:08:51 am »

Got an error:

Parse error: syntax error, unexpected $end in /home/pentaxkk/public_html/gallery/modifyalb.php on line 623
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Other members photos appearing in personal album
« Reply #5 on: February 25, 2008, 08:22:20 am »

Sorry, the stuff I posted above contained a flaw. Replace with
Code: [Select]
function form_input($text, $name)
{
    global $ALBUM_DATA;

    $value = $ALBUM_DATA[$name];
   
    if ($name=='alb_password' && !GALLERY_ADMIN_MODE) {

    echo <<< EOT
        <tr>
            <td width="40%" class="tableb">
                        $text
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="hidden" style="width: 100%" name="$name" value="$value" class="textinput" />
                </td>
        </tr>

EOT;
} else {
echo <<< EOT

        <tr>
            <td width="40%" class="tableb">
                        $text
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="hidden" style="width: 100%" name="$name" value="$value" class="textinput" />
                </td>
        </tr>

EOT;

}
}
instead of the stuff I posted originally.
Logged

khoking

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Other members photos appearing in personal album
« Reply #6 on: February 25, 2008, 08:28:58 am »

Hi Joachim Müller,

Working fine now.

Thanks! I love Coppermine!  :D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: Other members photos appearing in personal album
« Reply #7 on: February 28, 2008, 09:55:34 am »

I have added this as admin-settable option to cpg1.5.x  ;)
Logged

daverj

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: [Solved]: Other members photos appearing in personal album
« Reply #8 on: March 04, 2008, 11:03:15 pm »

OK, I'm confused.

I read through the code you posted in the second version (reply #5) and it looks to me like the HTML being generated when the "IF" statement is true is exactly the same HTML being generated when it is false. Both versions are creating a hidden form field.

 If this is true, why have the IF statement at all?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: Other members photos appearing in personal album
« Reply #9 on: March 05, 2008, 08:22:45 am »

You're right, the second form field should not be hidden, but a plain text field.
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.