WordPress.org

Ready to get started?Download WordPress

Forums

Frontend Uploader
[resolved] Questions about Frontend Uploader (5 posts)

  1. justinesmithies
    Member
    Posted 1 year ago #

    Hi i have a few questions about your plugin , can it do the following ?

    1 - Only show approved files to the file owner / admin and not others ?

    2 - Allow me to add fields to the upload form say , Description , File Name etc ?

    3- Only allow registered users to upload ?

    Re question 1 if files are not approved am i right in thinking that only admin can see them ?

    Thanx
    Justine Smithies

    http://wordpress.org/extend/plugins/frontend-uploader/

  2. michaelamcgregor
    Member
    Posted 1 year ago #

    I have the same question as Justine. Is there a way to limit uploads to registered users?

  3. ThinkTaiwan
    Member
    Posted 1 year ago #

    Hey guys

    There is an easy way to do this actually and involves no coding. All you would need to do is install a plugin called Display Widgets found here: http://wordpress.org/extend/plugins/display-widgets/

    Then a plugin called "Use shortcodes in widgets" found here: http://wordpress.org/extend/plugins/shortcodes-in-sidebar-widgets/

    Then, copy and paste the shortcode for this plugin into the widget that you place wherever widgets go on your theme. Then in the widgets section simply choose to display this particular front end upload widget to only "Logged in users" This will solve your problem.

    However, if you are using this in a page rather than a widget , I wouldn't know how to do this. However, I prefer this in a widget anyway..looks better in my opinion

    Mike

  4. Rinat Khaziev
    Member
    Plugin Author

    Posted 1 year ago #

    1) You're right, uploads get private status by default, unless admin approves them
    2) Currently, this requires some programming skills. You can add additional fields via shortcode, but you'll need to apply some logic to save them.

    [fu-upload-form class="your-class" title="Upload your media"] [textarea name="caption" class="textarea" id="ug_caption" description="Description (optional)"]
    [input type="text" name="your_field" id="ug_your_field" class="required" description="Your Field"]
    [input type="file" name="photo" id="ug_photo" class="required" description="Your Photo" multiple=""] [input type="submit" class="btn" value="Submit"] [/fu-upload-form]

    Then put this in your functions.php:

    add_action( 'fu_after_upload', 'my_fu_after_upload' );
    
    function my_fu_after_upload( $media_ids ) {
    	foreach ( $media_ids as $media_id ) {
    		$your_field = sanitize_text_field( $_POST['your_field'] );
    		update_post_meta( $media_id, 'your_field', $your_field, true );
    	}
    }

    Note that you have to replace your_field with your actual form input name. Does this make any sense?

    3. Will be added in future version

  5. Rinat Khaziev
    Member
    Plugin Author

    Posted 1 year ago #

    Accidentally marked this topic as resolved

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.