GithubHelp home page GithubHelp logo

rinatkhaziev / wp-frontend-uploader Goto Github PK

View Code? Open in Web Editor NEW
54.0 12.0 52.0 1.74 MB

WordPress plugin that allows your visitors to upload media from the front-end

CSS 0.33% JavaScript 62.70% PHP 35.71% Shell 1.25%

wp-frontend-uploader's Introduction

Frontend Uploader

⚠️ This plugin is not actively maintained. Any discovered security issues will be patched though. ⚠️

If you're interested in becoming a maintainer please let me know.

Description

This plugin gives you an ability to easily accept, moderate and publish user generated content (currently, there are 3 modes: media, post, post + media). The plugin allows you to create a front end form with multiple fields (easily customizable with shortcodes). You can limit which MIME-types are supported for each field. All of the submissions are safely held for moderation in Media/Post/Custom Post Types menu under a special tab "Manage UGC". Review, moderate and publish. It's that easy!

Installation

  1. git clone https://github.com/rinatkhaziev/wp-frontend-uploader.git in your WP plugins directory
  2. Activate the plugin
  3. Set the settings
  4. Enjoy

Upgrade instructions

  1. Pull as usual
  2. ...
  3. Profit

Developers

Miss a feature? Pull requests are welcome.

wp-frontend-uploader's People

Contributors

danielbachhuber avatar david-binda avatar gastonbesada avatar jdgrimes avatar mtthwbckmn avatar mustafauysal avatar rebeccahum avatar rfzappala avatar rinatkhaziev avatar sboisvert avatar stephyiu avatar tmtrademark avatar trepmal avatar yyano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-frontend-uploader's Issues

Ability to notify site admins of new submissions

One of requested features is the ability to notify editors of new content submissions. It could be done now by using fu_after_upload hook, but not all WP users are tech savvy enough to do so.

Multiple forms in same page

Multiple forms in same page would result in just the first one being submitted (submitting the second form would post the data from the first one)

I've already tried using different IDs for each form with no success

Enhancement: Setting options page

Hi Rinat:
It is a suggestion for enhancement.

Setting options page for:

  1. allowed extensions
  2. file size
  3. comment on/off
  4. comment as textarea or input text
  5. multifiles on/off
  6. checkboxes with user profiles able to upload files, or pulldown with minimum role allowed.

Thanks!

Email notifications sent on unsuccessful form submissions

A VIP client is reporting he's receiving email notifications of new submissions, but there's nothing in the library when he goes to check.

The issue started manifesting itself recently. I suspect there's some anti-pattern in the file uploading logic that's not setting the 'success' result variable. I haven't found it though.

Couple of suggested fixes:

  • $result['success'] in _notify_admin() should check for true, not false
  • Only send the email notification if there are 'post_id' or 'media_ids'

Also, it might be nice to include links to the uploaded content in the notification email.

Setting post type sets wrong post_type in database

I enabled the post type of "Products" (I am using WooCommerce) so that the form can allow for users to upload items into the overall store, but when I upload a file using [fu-upload-form post_type="product"], when I check the UGC under products, no file exists, but the file is under the UGC under the media settings tab.

How do I get the uploaded files to show up under the correct post type? Currently, the post_type that is saved in the DB is attachment.

Admin UGC page showing blank

Hi,

I am facing 2 issues using this plugin.

  1. On Front, it is showing form fields twice.
  2. On admin Media >> Manage UGC is showing blank for me.

I am using 4.8.1 version of wordpress. Please suggest me next step.

Handle default permalinks

Default permalinks, or rather no permalinks have ?p=666. When adding upload response, resulting url is something like ?p=666?fu-response=success&param=value

display uploaded post media inline on page

I was wondering if anyone knew how to make an instance of the uploaded content inside a WP page.

I've attached the following image of what I mean.. The page is accessed as a logged in user and the upload and post would be authored by the user..

screen shot 2016-08-24 at 4 35 38 pm

ERR_CONNECTION_FAILED using https with iPhone 4 and SiteGround hosting

I have reproduced a problem that occurs with my own plugin, oik-fields. I'm raising this primarily for awareness but secretly hoping that you may be able to suggest a solution that may be implemented by SiteGround.

The details of the problem are basically the same as for bobbingwide/oik-fields#24, but instead of using the [bw_new] shortcode I used
[fu-upload-form][/fu-upload-form]

Expected output

Your file was successfully uploaded!

Actual output

This site can't be reached.
example.com is currently unreachable
ERR_CONNECTION_FAILED

Conditions

  • Protocol: https
  • Device: iPhone 4
  • Hosting: SiteGround

It works if any of the following are true

  • Protocol: http
  • Device: Laptop, iPad
  • Hosting: Not SiteGround

Support multiple emails per notification

Feedback from wp.org support thread:

Under settings, although wp_mail() supports multiple email 'to' addresses, it sanitizes the email addresses, removing commas.

I edited your frontend_uploader_settings.php file, and removed

'sanitize_callback' => 'sanitize_email',

Post Category

I read the readme but I couldnt get it. Can you give a direct example of how to implement the category drop down?

And also, is there a way i could walk round the plugin such that posts dont need moderation, it just gets on the page... thats all... or beta still.. writer sees post and other dont awaiting moderation.

Am I clear??

Wrong return value check in Frontend_Uploader::approve_post

The return value of get_post( $_GET['id'] ) call is being checked using the is_wp_error but the get_post function does never return an object of WP_Error class. It either returns an object of WP_Post class, an array or null. See https://developer.wordpress.org/reference/functions/get_post/ for details.

In this case, since the $output param is not specified, the default OBJECT value is being used and thus the call either returns a object of WP_Post or null and the return value check should reflect that, either by using false === empty(), true === is_object( $post ), or true === is_a( $post, 'WP_Post' ).

Readonly attribute

Would be great if you could add the readonly attribute to form fields

messages_en.js doesn't exist

The language file for english for the validate library doesn't exists which results in 404s. The file should either be added, or there should be a check to prevent the 404 if the file doesn't exist.

Placeholder Element feature

Hey Guys,

is it possible to implement a placeholder attribute to the shortcodes?
Something like the description attribute but for placeholder.

[input ... placeholder=""]

With this included this plugin is pretty damn nice.

Thanks in advance.
Cheers.

Unchecked settings are saved as "off" in settings option, but checked for isset() in conditions - causing unexpected results

Specifically with "show_author", though all checkboxes are working this way, saved as "on" when checked", "off" when unchecked.

On this line, you'll see that it's checking for the settings being set and evaluating to true - which "off" does.

Recommend either having the settings update routine unset the option, set it to false, or have the aforementioned line check for !== 'off' instead of truthiness. The latter is probably the most backwards compatible path.

Enhancement: Include ability to open the form in a popup

Another suggestion,

Get the post_id from referer, Where the post_id is the ID of the parent post to attach the file.

When opening in a popup, get post_id parameter, like used with WP media-uplad.php (/wp-admin/media-upload.php?post_id=1045&TB_iframe=1&width=640&height=482) with the class="thickbox".

Thanks!

Using Radio Buttons

I can get the radio buttons to show in the form however the selection doesn't appear in the Manage UGC to differentiate what category the user has selected.
I'm new too

French translation

I had to make a french translation of the plugin, would you want it and how could I send it to you ?

Characters don't show up correctly when image goes into a post

For a media upload, if you put characters like apostrophes they show up funky when you insert it into a post.

Front end:
Screen Shot 2013-03-21 at 2 35 20 PM

How it shows up in Media:
Screen Shot 2013-03-21 at 2 35 13 PM

Text shows strange characters when inserting the media a post:
Screen Shot 2013-03-21 at 2 23 46 PM

Also: If you enter content into the "Description," it shows up in Description and Caption in media. Is this intended behavior?

Useless checkboxes, radio buttons, & dropdown.

I feel like the checkboxes, radio buttons, & dropdowns are useless with out the ability to use them as values for the category id.
E.g.
[fu-upload-form suppress_default_fields=true class=user-gallery title='Upload Your Portfolio Images' form_layout=post_media post_type=gallery append_to_post=true]
[input type=text name=post_title id=title class=required description='Your First Name']
[category=select name=foo class=select id=ug_select description='Pick A Profession' values=24:Painter,25:Photographer]

^Where 24 & 25 are category IDs of the post_type=gallery.

No captcha when suppress_default_fields="true"

When I use suppress_default_fields="true" in the form, then no captcha is pisplayed. Is there any way to add captcha manually? Otherwise I get "Your submission failed spam checks" error.

Bulk actions

There's bulk delete, but we need a bulk approve as well.

File does not post under Media > Manage UGC

I'm using the current short code and the uploaded file is put under the regular Media area and not the Mange UGC area. The default short code does the same as well.

[fu-upload-form class="title-hide" title="Submit Your Video" suppress_default_fields="true" form_layout="media"]
[input type="file"  name="video" id="my-video-submission"
class="required"]
[input type="submit" class="btn-block" value="Submit"]
[/fu-upload-form]

Add minimal css

For now, plugin comes with no CSS at all, it would be nice to add some minimal css for users that don't have any experience in web development.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.