Frontend Upload Button Help

Frontend Upload Tips

Frontend uploading is finally here, I have written a how to below with some tips and trick on how to simplify some aspects of using the shortcode.

Backend Setup

The first thing you will need to do to, to get this functionality working is head to the Dashboard and then click on the Memphis Docs tab on the left side navigation bar.

Screen Shot 2018-04-20 at 11.17.27 AM.png

Then click on Options > Settings >

Screen Shot 2018-04-20 at 11.18.39 AM.png

Once in the settings menu you will need to check a capability to active the upload button for certain roles on your site.  The capability that needs to be turn on is “Allow Upload Frontend”.  Scroll down to the Roles and Capabilities section and check all the Roles that you want to give the ability to.

Screen Shot 2018-04-20 at 11.21.41 AM.png

Thats it, now you are ready to use the shortcode on any post or page that you want.

Using the Shortcode

Now that the backend setup is complete you are ready to add the shortcode to any post or page that you want.  

Adding shortcodes is a simple process but this shortcode has a lot of options available to it that define how you want the upload modal to look.  I will start with the simple implementation first then move into all the options later.

To add a shortcode to a post or page simple open your post/pages editor and add the shortcode mdocs_upload_btn

Screen Shot 2018-04-20 at 11.27.50 AM.png

The final output will look something like this, depending on you theme of course.

Screen Shot 2018-04-20 at 11.31.10 AM.png

Thats the basic setup and implementation of the button.  Next I will go into all the options available for this shortcode.

The Shortcode

Here is a list of all options available to use with the shortcode, I will also show some tricks you can use to save some time.

mdocs_upload_btn options

OPTIONS

VALUES

DESCRIPTION

DEFAULT

align left, center, right Simply moves the button to the left center or right.  If this option is not used the default position is left. left
edit_all true, false True will allow any user to edit any input box, false will not allow users to edit any input box accept for “Title” and “File Uploader”.  The default state of this is true. true
hide_all true, false True will hide all input box accept, “Title” and “File Uploader”. False will show all input boxes. The default value for this option is false. false
folder The name of a mDocs folder The will set the default folder the mDocs file will be uploaded to. The Main folder of mDocs
folder_edit true, false True will allow users to edit the default upload folder.  False will disable the input box and not allow users to edit the upload folder. The default value for this is true. true
folder_hide true, false True will hide the folder input box from all users.  False will show the input box to all users.  The default value if this is false. false
version Any text value you want. eg 1.0 or 2  This value sets the default version value. 1.0
version_edit true, fasle True will allow users to change the version number.  False will disable the input box and not allow users to edit the version number. The default value for this is true. true
version_hide true, false True will hide the version input box from all users.  False will show the input box to all users.  The default value if this is false. false
date A date value Sets the default date, be careful with this default. Dates are very strict and need to be enter precisely.  Current time and date.
date_edit true, false True will allow users to change the date.  False will disable the input box and not allow users to edit the date. The default value for this is true. true
date_hide true, false True will hide the date input box from all users.  False will show the input box to all users.  The default value if this is false. false
file_status public, private This will set the files status, which has two states public or private. public
file_status_edit true, false True will allow users to change the file status.  False will disable the input box and not allow users to edit the file status. The default value for this is true. true
file_status_hide true, false True will hide the version input box from all users.  False will show the input box to all users.  The default value if this is false. false
post_status publish, private, draft, pending Sets the default value of the mDocs post to one of four status.  These are built in WordPress values, and cannot be editor or added to. publish
post_status_edit true, false True will allow users to change the post status.  False will disable the input box and not allow users to edit the post status. The default value for this is true. true
post_status_hide true, false True will hide the version input box from all users.  False will show the input box to all users.  The default value if this is false. false
show_social_apps on, off Setting this value to on will show the social media buttons on both the mDocs list page as well as the mDocs post page. on
show_social_apps_hide true, false True will hide the show social apps input checkbox from all users.  False will show the input checkbox to all users.  The default value if this is false. false
show_social_apps_edit true, false True will allow users to hide or show the social apps.  False will disable the input checkbox and not allow users to edit the date. The default value for this is true. true
downloadable_by_non_members on, off Setting this value to on will allow non members to download the file, setting it to off will not allow non members to download the file. on
downloadable_by_non_members_edit true, false True will allow users to toggle weather user have to be logged in to download the file.  False will disable the input checkbox and not allow users to edit this value. The default value for this is true. true
downloadable_by_non_members_hide true, false True will hide the download by non members input checkbox from all users.  False will show the input checkbox to all users.  The default value if this is false. false
contributors default values not allowed This feature does not work with contributors none
contributors_edit true, false True will allow users to add contributors.  False will disable the ability to add contributors. The default value for this is true. true
contributors_hide true, false True will hide the contributors input box from all users.  False will show the input box to all users.  The default value if this is false. false
author Any text value you want eg Hello, World  Any text you want to put here, usually the name of the author. none
author_edit true, false True will allow users to add an author.  False will disable the ability to add an author. The default value for this is true. true
author_hide true, false True will hide the author input box from all users.  False will show the input box to all users.  The default value if this is false. false
tags Any comma separated list Set the default tags for the current file upload. none
tags_edit true, false True will allow users to add tags to your mDocs post.  False will disable the ability to add tags. The default value for this is true. true
tags_hide true, false True will hide the tags input box from all users.  False will show the input box to all users.  The default value if this is false. false
categories default value not allowed This feature does not work with categories none
categories_edit true, false True will allow users to add categories to your mDocs post.  False will disable the ability to add tags. The default value for this is true. true
categories_hide true, false True will hide the categories input box from all users.  False will show the input box to all users.  The default value if this is false. false
description Any text value you want. eg. hello world This text will be the default description for this file upload. none
description_edit true, false True will allow users to create a description.  False will disable the ability to create a description. The default value for this is true. true
dsecription_hide true, false True will hide the description input box from all users.  False will show the input box to all users.  The default value if this is false. false

Tips and Tricks

Finally I will get to the shortcuts you can use to speed up the way you do thing with this button.  The first thing you need to remember is that edit will always overwrite hide.  What does this mean, basically if you have folder_hide=”true” and folder_edit=”false” the folder will be visible and not editable, that being said we can us this to our advantage.

Senario #1

I only want the input type folder available, do I have to hide each input type individually.

No, here is what you can do.  mdocs_upload_btn hide_all=”true” folder_edit=”true” this will hide all the inputs then unhide the folder input and making it editable.

Senario #2

What if I want to show the folder name but I don’t want the users to edit it.

Basically the same thing with one minor change folder_edit=”false” so the shortcode would look like this.  mdocs_upload_btn hide_all=”true” folder_edit=”false”

More Scenarios to come…