forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 JUpload by etienne_sf => Topic started by: bitcloud on August 01, 2009, 07:55:38 am

Title: Adding custom editpic form elements
Post by: bitcloud on August 01, 2009, 07:55:38 am
Hi,

Love the plugin, I'm wanting to add some custom elements to the edit pic form.
Mainly I have some checkboxes in my original upload form that added entries to the keywords (so people could tag commonly used tags)

I'm looking in edit_uploaded_pics.php near
Code: [Select]
while($CURRENT_PIC = mysql_fetch_array($resultset_pictures))
Is there some way I can put in a custom set of html in here rather than:
Code: [Select]
create_form($data);
flush();

I can copy the form data in and get it to display, but any chance I could get you to give me some pointers as to how to populate the html with the right variables?
This my replaced code currently: (I'm gonna need to replace these hard coded entries with entries populated by the $resultset_pictures query...
Code: [Select]
//Let's display the pictures.
while($CURRENT_PIC = mysql_fetch_array($resultset_pictures)){
        //create_form($data);
        //flush();


echo '
        <input name="pid[]" value="6857" type="hidden">
        <tr>
                <td class="tableh2" colspan="3">
                        <b>DeadBird_Protected.jpg</b> '.$data[1].'
                </td>

        </tr>
        <tr>
                <td class="tableb" style="white-space: nowrap;">
                        File info
                </td>
                <td class="tableb">
                        742 × 800 - 271 KB - 0 views - 0 votes
                </td>
                   <td class="tableb" rowspan="5" align="center">
                        <a href="displayimage.php?&amp;pos=-6857" target="_blank"><img src="albums/userpics/10001/4/thumb_DeadBird_Protected.jpg" class="image" alt="" border="0"><br></a>

            </td>
        </tr>
        <tr>
            <td class="tableb" style="white-space: nowrap;">
                       
        </td>
        <td class="tableb" valign="top" width="100%">
                <input name="aid6857" value="4" type="hidden">
                </td>
        </tr>

        <tr>
            <td class="tableb" style="white-space: nowrap;">
                        Title
        </td>
        <td class="tableb" valign="top" width="100%">
                <input style="width: 100%;" name="title6857" maxlength="255" value="DeadBird Protected" class="textinput" type="text">
                </td>
        </tr>
        <tr>

                <td class="tableb" style="white-space: nowrap;" valign="top">
                        Description
                </td>
                <td class="tableb" valign="top">
                        <textarea name="caption6857" rows="5" cols="40" class="textinput" style="width: 100%;" onkeydown="textCounter(this, 512);" onkeyup="textCounter(this, 512);"></textarea>
                </td>
        </tr>        <tr>
            <td class="tableb" style="white-space: nowrap;">

                        Keywords<br><font size="0">If your image is NSFW<br>(not safe for work) remove the PG rating.<br>Remove the "Frontpage" keyword if you don\'t <br>want your buddies<br>to see this image from the main gallery.</font>
        </td>
        <td class="tableb" valign="top" width="100%">
                <input style="width: 100%;" name="keywords6857" maxlength="255" value="" class="textinput" type="text">
                </td>

        </tr>
        <input name="user16857" value="" type="hidden">
        <input name="user26857" value="" type="hidden">
        <input name="user36857" value="" type="hidden">
        <input name="user46857" value="" type="hidden">
';
} // while
mysql_free_result($resultset_pictures);

Any help would be really appreciated... I could probably bash away at it and figure most of it out, but the part i'm the most confused about is this section:
Code: [Select]
        <input name="user16857" value="" type="hidden">
        <input name="user26857" value="" type="hidden">
        <input name="user36857" value="" type="hidden">
        <input name="user46857" value="" type="hidden">

Cheers, BC :)
Title: Re: Adding custom editpic form elements
Post by: etienne_sf on August 01, 2009, 10:21:24 pm
hi,

I can't answer for the moment: I'm off for two weeeks still. I need my computer to analyze this one (Icm answering from my phone)

Etienne
Title: Re: Adding custom editpic form elements
Post by: bitcloud on August 02, 2009, 07:25:54 pm
No worries,

I sussed it out anyway... added some extra cases to your function there and put it in that way...
If anyone's super curious, let me know and i'll try my best to explain what I did...