Wish to display owner name on 'Edit file information' page Wish to display owner name on 'Edit file information' page
 

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

Wish to display owner name on 'Edit file information' page

Started by GarryS, August 26, 2012, 07:59:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GarryS

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.

Joe Carver

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

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.

GarryS

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.

Jeff Bailey

Try this.

Find:

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:

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;
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

GarryS

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

Thank you, Jeff, and to Coppermine.

Jeff Bailey

Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford