Mortus Eclipse
Forum Replies Created
-
Forum: Plugins
In reply to: [NextGEN Public Uploader] More on multiple image uploadsI would have to look into how to disable or hide the “Add picture” button this should be doable by adding some code to the jQuery function that adds the additional fields. What is needed I am not sure however.
As for changing the text on the “Add picture” button, this is on line 427 for the short code form and line 566 for the widget form. Simply edit the value “Add picture” to what is desired on those lines:
$strOutput .= "\n</div><br/><input type=\"button\" value=\"Add picture\" id=\"addBtn\">";Forum: Plugins
In reply to: [NextGEN Public Uploader] How to pass a new name for the uploaded imageThe code to do this is actually already in place. All it needs is an appropriate input field, and a few tweaks.
First, open npu-upload.php in wp-contents -> plugins -> nextgen-public-uploader -> inc
Find the line similar to:
$strOutput .= "\n\t<input type=\"file\" name=\"imagefiles\" id=\"imagefiles\"{$disabled} />";This line may change slightly depending on the version you are using, the above line is from the latest version. In earlier lines you may have to replace it in the “Shortcode Form” and “Widget Form” if you want the same function in both.
Below that line add:
$strOutput .= "<br />"; $strOutput .= "Image Title:"; $strOutput .= "<br />"; $strOutput .= "\n\t<input type=\"text\" name=\"alttext\" id=\"alttext\" />";Then we need to modify update details function, currently if you do not have the description field on, or it’s left blank this will not work. The portion we are interesting in looks like the following:
// Function: Update Details public function update_details() { global $wpdb; $arrUpdateFields = array(); if ( isset( $_POST['imagedescription'] ) && !empty( $_POST['imagedescription'] ) ) { $this->strDescription = esc_sql( $_POST['imagedescription'] ); $arrUpdateFields[] = "description = '$this->strDescription'"; } else { return; } if ( isset( $_POST['alttext'] ) && !empty( $_POST['alttext'] ) ) { $this->strTitle = esc_sql( $_POST['alttext'] ); $arrUpdateFields[] = "alttext = '$this->strTitle'"; }Commenting out the following lines is the easiest but may not be the best way:
} else { return; }So they look like this:
//} else { // return; //}Hope this helps.
Forum: Plugins
In reply to: [NextGEN Public Uploader] Need to be able to upload multiple imagesNM, I found it in the class file… Not sure how I want to handle it yet though.
Forum: Plugins
In reply to: [NextGEN Public Uploader] Need to be able to upload multiple imagesI do have a question though. All the files seem to have a hash attached to the end of the filenames when they are uploaded. What is causing this?
Forum: Plugins
In reply to: [NextGEN Public Uploader] Need to be able to upload multiple images@dado_it: Both methods seem to still work with the latest plugin and NextGen 2.X, however you will have to reapply the changes everytime you update the plugin.
It would be great if the uploaders could specify the Image Title/Alt Text and Description/Caption fields when they upload an image to the moderation cue.
Finally replaced it propperly and all is good now! Grrr… Been doing alot more crawling through wordpress and plugin innards than I would like lately.