coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: skidpics on December 31, 2007, 06:31:45 AM

Title: Auto insert description field for uploads
Post by: skidpics on December 31, 2007, 06:31:45 AM
For upload approvals, there is the form box to multiple delete all files if wanted.. 

How can one adapt a main description box, with a 'checkbox' that will apply that to all images, and automatically insert the main box's information in all boxes?


Title: Re: Auto insert description field for uploads
Post by: Joachim Müller on December 31, 2007, 09:48:04 AM
Just code it.
Title: Re: Auto insert description field for uploads
Post by: Hein Traag on December 31, 2007, 10:42:35 AM
Nice idea skidpics and i see you point but it wil have to be coded as it is not standard in cpg. So either you whip up some php code to do this or someone else with time to spare can help out.

Cheers
Hein
Title: Re: Auto insert description field for uploads
Post by: skidpics on December 31, 2007, 04:17:00 PM
thanks.  in my spare time, I will look into it.  If I have any luck, I will post my results...

Title: Re: Auto insert description field for uploads
Post by: skidpics on January 03, 2008, 12:29:58 AM
What is the variable that hold the description value in the editpics.php script?

caption, or caption1 or captionLabel?  I believe it is caption, correct?

$data = array(
 
        array($captionLabel, 'caption', 2, $CONFIG['max_img_desc_length']),

With some research.  It appears I am going to have to wrap this around some javascript.  I already have a rought script that copies one value to another once the checkbox is checked, but I have to figure out how to wrap it into the caption form in order to change it..  Might also alter the following from the file:

Quote
<td width="20%" align="center">
     <span class="admin_menu">
     <input type="checkbox" name="del_commentsAll" onclick="selectAll(this,'del_comments');"   class="checkbox"reset_votesAll" id="del_commentsAll" />
     <label for="del_commentsAll" class="clickable_option">{$lang_editpics_php['del_all_comm']}</label>
     </span>
</td>

in order to move it into a text box and copy the results back to the caption array..?
Will keep posting some results, once I make some headway...
Title: Re: Auto insert description field for uploads
Post by: Nibbler on January 03, 2008, 11:33:49 AM
http://forum.coppermine-gallery.net/index.php?topic=47112.0