Forums

NextGEN Public Uploader
[resolved] Choose Category for Upload (20 posts)

  1. jasnon
    Member
    Posted 7 months ago #

    Hi,

    I'm wondering, is there a way to add a dropdown menu to the widget that shows on the front end that allows users to select which gallery to upload their image to? I want to avoid having a separate upload widget for each different gallery that only uploads to a specific gallery.

    Thanks,
    Jon

    http://wordpress.org/extend/plugins/nextgen-public-uploader/

  2. Brian Richards
    Member
    Plugin Author

    Posted 7 months ago #

    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.

  3. zanzaboonda
    Member
    Posted 6 months ago #

    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. :)

  4. als12
    Member
    Posted 5 months ago #

    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!!

  5. Mr. Bingo
    Member
    Posted 5 months ago #

    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!!

  6. flashbytes
    Member
    Posted 4 months ago #

    @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!

    flashbytes

  7. als12
    Member
    Posted 4 months ago #

    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() {
    if(get_option('npu_notification_email')){
    $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);

  8. eukally
    Member
    Posted 4 months ago #

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

  9. dyabol
    Member
    Posted 3 months ago #

    Solution:

    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):

    Exemple:

    $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!

  10. dyabol
    Member
    Posted 3 months ago #

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

  11. jasnon
    Member
    Posted 3 months ago #

    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.

  12. dyabol
    Member
    Posted 3 months ago #

    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?

  13. jasnon
    Member
    Posted 2 months ago #

    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.

  14. jiya112
    Member
    Posted 2 months ago #

    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 .

  15. jiya112
    Member
    Posted 2 months ago #

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

  16. dyabol
    Member
    Posted 2 months ago #

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

  17. steve.vreatt
    Member
    Posted 2 months ago #

    I have a black background on my site so the text for Gallery and warning massages don't show up since they have black text. Can anyone help??? Please!!!

  18. bobbyau
    Member
    Posted 1 month ago #

    Thanks to @als12 for the code above. Just what i needed and works like a charm.

  19. Lyngtoft
    Member
    Posted 1 week ago #

    Works great for me also!

    One question, is there any way to let the user create a new gallery also?

    Only users who are logged in are able to upload pictures, and all users who can log in should be allowed to create new galleries. I know they can do it from the dashboard, but they are not quite tech savy, so it would be great to have a field in the dropdown box "Create new" and then an editbox to enter the name.

  20. mrsangeld
    Member
    Posted 3 days ago #

    Thank you so much for sharing that code dyabol it was exactly what I was looking for.

    I wonder though if there is a way get the the user id and and have it at least put into the notification email that is sent.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.