Support » Plugin: NextGEN Public Uploader » [Plugin: NextGEN Public Uploader] Choose Category for Upload

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Brian Richards


    Currently, no. The only way to upload to a particular gallery is to have an uploader for that gallery. I would recommend adding the uploader to each individual gallery page, rather than present it as a widget.

    We’ve talked about a feature like this, so it might find it’s way into a future pro release.



    If you do offer this, could it have the option for checkboxes so they can post to more than one category? The ability to add tags would be great as well. 🙂

    I have implemented it as Brian suggested, with an uploader on each gallery page. When I receive the confirmation that someone uploaded an image, I have no idea what gallery it was uploaded to and have to browse through each. Any way for that info to be tacked into the confirmation email? Thanks!!

    I am in need of the same functionality. My users currently have access to a single uploader page and having multiple uploader pages is not feasible for my site as I would literally need one hundred uploader pages. Are there currently any other solutions? I need to associate a gallery per order (or request) that is placed on my site. Thanks!!

    @als12 and Mr. Bingo:
    I’m planning on doing just the same thing, but with (some day) over 100 galleries and not knowing where the uploaded picture belongs to, I’d suggest setting up an extra upload gallery as default, so when a picture is submitted by the user, you know where to look and move the picture to the correct gallery.

    I know that’s not practical at all but better than browsing through all galleries to find the uploaded pictures.

    So, I too would like to have this information implemented into the confirmation email as als12 proposed. 🙂

    Thanks in advance!


    I was able to create a solution for this to output the gallery name the image was submitted to. In the plugin file – nextgen-public-uploader/inc/npu-upload.php

    define the gallerypath in the Send Email area like below:

    // Function: Send Email Notice
    public function sendEmail() {
    $gallerypath = ltrim($_SERVER[‘REQUEST_URI’],’/’);

    $to = get_option(‘npu_notification_email’);
    $subject = “New Image Pending Review”;
    $message = “A new image has been submitted and is waiting to be reviewed. $gallerypath”;
    wp_mail( $to, $subject, $message, $attachments);

    @als12: That’s good. How do you think would it be possible to display also the gallery id $gal_id ?


    In nextgen-public-uploader/inc/npu-upload.php

    Comment or delete lines 199, 272:

    $strOutput .= "\n<input type=\"hidden\" name=\"galleryselect\" value=\"{$gal_id}\">";

    and between the lines 200, 201 (for Shortcode Form) and 269, 270 (for Widget Form):


    $strOutput .= "\n\t<div class=\"uploader\">";
    <--- paste
    $strOutput .= "\n\t<input type=\"file\" name=\"imagefiles\" id=\"imagefiles\"/>";

    Paste this:

    $strOutput .= "\n\tChoose gallery:: <select name=\"galleryselect\">";
    $sql = "SELECT gid, title FROM wp_ngg_gallery ORDER BY title";
    $result = mysql_query($sql);
    while ($array = mysql_fetch_array($result)) {
    $strOutput .= "\n\t<option value=\"".$array['gid']."\">".$array['title']."</option>";
    $strOutput .= "\n\t</select><br><br>";

    Thats all!

    Thats my file with multiples upload and gallery chooser: npu-upload.php

    Hi dyabol,

    Thanks for the solution this works beautifully! There is one thing I still can’t figure out with your solution though. Uploading an image with your new Gallery select option doesn’t seem to be following the options set for whether or not the photo should be excluded for review/approval first. It seems to be defaulting the image to being excluded until further approval is given even when that option is not selected. I’m looking for the image to be uploaded to the selected gallery immediately upon submitting.

    Thanks again for working on this solution though, this is extremely helpful.

    Hi jasnon,
    thank you for your feedback. In Dashboard->Gallery->Public Uploader is radiobox “Uploads Require Approval”. Works fine for me. Or did you mean something else?

    Nope, that was it. I meant to post this sooner but the day after I posted the above I checked again and it worked just fine! I toggled the “Uploads Require Approval” button on and off and saved the new settings and that seemed to do the trick. Not sure exactly what was happening but it’s working perfect now.

    Thanks again dyabol.

    Hi, dyabol I used choose gallery code on my side but its not working . my select box not show any gallery option please, give me some suggestion .. Thanks .

    Hi dyabol ,
    I also used multiple image up loader code but its nor working on my site
    Please Help me .

    Hi jiya112,
    maybe at your table in the database has a different name, check the prefix. Please send me your npu-upload.php file.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Plugin: NextGEN Public Uploader] Choose Category for Upload’ is closed to new replies.