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: Displaying Comment on the Edit One Picture Page  (Read 2807 times)

0 Members and 1 Guest are viewing this topic.

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Displaying Comment on the Edit One Picture Page
« on: September 22, 2012, 05:46:40 pm »

My site URL is http://www.victoriacameraclub.org/vcccompetitions/.

Thanks to this forum, great progress has been made in tweaking Coppermine as our camera club's competitions management software. Here is one additional item that I am grappling with.

Our judges will enter a single comment under each submitted image. It will include a score, a placement and the judge's remarks.

Our competitions admin group will use those comments to enter keywords for display of winning images, etc. Currently, the comment appears on the display image page and the function to add keywords on the edit one picture page.

It is our desire to display the comment (the only one that will be present) on the edit one picture (edit file information) page to facilitate the entry of appropriate keywords and the copy and past of certain information to a separate spreadwheet.

This is similar to a previous query regarding placing the owner name on the edit one picture page. That solution was applied.

I look forward to your assistance on this one.



Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Displaying Comment on the Edit One Picture Page
« Reply #1 on: September 24, 2012, 09:18:09 pm »

This should be possible but a few questions:
Will it always be the same member judging or at least the same group of members?
Will there be any other comments on the images?
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Displaying Comment on the Edit One Picture Page
« Reply #2 on: September 24, 2012, 10:24:38 pm »

Judge's will be registered to the gallery, each with their unique usernames and passwords. Most will be from outside the club and they will change from month to month. A couple will be club members and will serve throughout the year. There could be from six to eight individuals serving as judges during a given month (to deal with 18 different competitions spread over three levels).

Scores and placements will be used to prefix title for sorting wihin albums (what we call categories).

Keywords will be used to show images in additional albums for collected slide shows of entries by level.

The nub of it is that reading this info on the image diaplay page and remembering it once on the edit file information page is a challenge. Having it in front of one would be the answer.

Given that edits will also be required to some of the judge's comments, it would be a very desirable secondary benefit if the comments themselves could also be edited on the same edit file information page.

There will be no additional comments on any of the images, just the one original comment by a judge.

Thanks for help on this one.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Displaying Comment on the Edit One Picture Page
« Reply #3 on: September 24, 2012, 11:21:46 pm »

This will display the first comment made on an image.

Edit edit_one_pic.php
find:
Code: [Select]
print <<< EOT

    <tr>
        <td class="tableh2" colspan="3">
            <strong>{$filename}</strong>
            &nbsp;&nbsp;-&nbsp;&nbsp;
            <a href="modifyalb.php?album={$CURRENT_PIC['aid']}" class="admin_menu">
                {$icon_array['album_properties']}{$lang_editpics_php['album_properties']}
            </a>
            &nbsp;&nbsp;-&nbsp;&nbsp;
            <a href="thumbnails.php?album={$CURRENT_PIC['aid']}" class="admin_menu">
                {$icon_array['thumbnail_view']}{$lang_editpics_php['thumbnail_view']}
            </a>
        </td>
    </tr>
    <tr>
        <td class="tableb" style="white-space:nowrap;">
            {$icon_array['file_info']}{$lang_editpics_php['pic_info']}
        </td>
        <td class="tableb">
            $pic_info
        </td>
        <td class="tableb" align="center" rowspan="$THUMB_ROWSPAN">
            <a href="$thumb_link">
                <img src="$thumb_url" class="image" border="0" alt="{$CURRENT_PIC['title']}"/>
            </a>
            <br />
        </td>
    </tr>
EOT;
replace with:
Code: [Select]
$comments_query = cpg_db_query("SELECT msg_body FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$pid}'");
$comments_row = mysql_fetch_array($comments_query);
$comments = $comments_row[msg_body];
print <<< EOT

    <tr>
        <td class="tableh2" colspan="3">
            <strong>{$filename}</strong>
            &nbsp;&nbsp;-&nbsp;&nbsp;
            <a href="modifyalb.php?album={$CURRENT_PIC['aid']}" class="admin_menu">
                {$icon_array['album_properties']}{$lang_editpics_php['album_properties']}
            </a>
            &nbsp;&nbsp;-&nbsp;&nbsp;
            <a href="thumbnails.php?album={$CURRENT_PIC['aid']}" class="admin_menu">
                {$icon_array['thumbnail_view']}{$lang_editpics_php['thumbnail_view']}
            </a>
        </td>
    </tr>
    <tr>
        <td class="tableb">
            <span>Judges Comment:</span>
        </td>
        <td class="tableb">
            {$comments}
        </td>
    </tr>
    <tr>
        <td class="tableb" style="white-space:nowrap;">
            {$icon_array['file_info']}{$lang_editpics_php['pic_info']}
        </td>
        <td class="tableb">
            $pic_info
        </td>
        <td class="tableb" align="center" rowspan="$THUMB_ROWSPAN">
            <a href="$thumb_link">
                <img src="$thumb_url" class="image" border="0" alt="{$CURRENT_PIC['title']}"/>
            </a>
            <br />
        </td>
    </tr>
EOT;

You have to make sure to add the changes back for displaying the owners name.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Displaying Comment on the Edit One Picture Page
« Reply #4 on: September 25, 2012, 01:31:28 am »

Thank you once again, Jeff. Tested it out and it works as advertised. I also managed to retain the first mod to place the owner's name on the page.

Thumbs up to you and the Coppermine forum.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Displaying Comment on the Edit One Picture Page
« Reply #5 on: September 25, 2012, 01:35:34 am »

Glad it worked and thank you for resolving your thread.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.