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: Wish to display owner name on 'Edit file information' page  (Read 3322 times)

0 Members and 1 Guest are viewing this topic.

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Wish to display owner name on 'Edit file information' page
« on: August 26, 2012, 07:59:47 pm »

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

On the displayimage.php page with file info toggled on, the owner's name is displayed (with link to profile). The 'Edit file information' button is available only to administration. Screenshot attached.

On the 'edit_one_pic.php' page, that information is not displayed. Screenshot attached.

My desire is to display the owner's name there, preferably in a text format which could readily be copied and pasted into the title field. This is to facilitate competition reporting after judging.

I have tried various hacks to the 'edit_one_pic.php' file, but with no success thus far.

Thank you for any help you may be able to offer.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Wish to display owner name on 'Edit file information' page
« Reply #1 on: August 27, 2012, 02:37:26 am »

What exactly are you trying to do (exactly)?

Show the owners name in the title block for visitors only?

Do you want / need to do this by hand for each file?
     - a plugin or theme mod. should allow for an automatic display

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Wish to display owner name on 'Edit file information' page
« Reply #2 on: August 27, 2012, 03:02:04 am »

The competitions will involve a two-stage porocess. Initially, owners names will be hidden from judges and other competitors. Only image titles will be shown.

After judging, competitions admin will edit the titles by adding the owners names. Those images will ultimately be shown during the presntation of compeititon results.

To facilitate this, short of creating a plugin (which I am not capable of doing - at least I don't think I am) a simple display of the owners name in a white background field, just above the row which displays the title on the current edit_one_pic.php page, would meet our needs well.

I hope that clarifies what I am after for now.

Thanks for your early reply and any follow-up.
Logged

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Wish to display owner name on 'Edit file information' page
« Reply #3 on: August 29, 2012, 11:24:35 pm »

I'm still grappling with this one. I see, in edit_one_pic.php, the a database query is made and that the variable owner_id is returned. That is the variable I am interested in (the actual name, not just the integer) when working on the 'Edit file information' page.

I see, in the same edit_one_pic.php file, that a table is used to create the "editonepicform".

My dilemma is that I lack sufficient knowldege to place a row into the table to display (not to edit) the owner_id (the actual name). The purpose of displaying the name here would be to facilitate copying it into the image title field, following the title provided by the photographer. This would be done on an album by album basis following competitions judging as the year unfolds.

The ability to copy and paste this information would be a significant bonus.

Perhaps this will offer just a bit more clarity to this thread.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Wish to display owner name on 'Edit file information' page
« Reply #4 on: August 30, 2012, 02:15:42 am »

Try this.

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]
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>Owner Name:</span>
        </td>
        <td class="tableb">
            {$cpg_udb->get_user_name($CURRENT_PIC['owner_id'])}
        </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;
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: Wish to display owner name on 'Edit file information' page
« Reply #5 on: August 30, 2012, 04:59:36 pm »

Wonderful! That was exactly what I was looking for and it works like a charm.

Thank you, Jeff, and to Coppermine.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Wish to display owner name on 'Edit file information' page
« Reply #6 on: August 30, 2012, 05:08:04 pm »

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.024 seconds with 20 queries.