Folder Shortcodes

Embedded Folder Shortcodes

When you embed a folder in the Enterprise version if the plugin, a shortcode will appear in your post – something like this:

[google-drive-folder id="0B0bCnqlT4ojRNHFBT1A3T0VEOFk" title="Sample Folder" border="yes"]

You can modify the shortcode to change the appearance of the folder.

Core parameters

The following parameters explain the core parameters that determine which folder will be displayed.

id="<Drive folder ID>": this is the Drive ID of the folder to be displayed (when embedded as a Quick Folder).

cfid="<Controlled Folder ID>": this is the ID of the Controlled Folder, as stored in WordPress when a Controlled Folder was inserted. It is not a Drive ID. It would be possible to use the WordPress post id to embed the Attachment Folder of a WordPress post.

Only one of id or cfid should be present. If neither id or cfid is present, an Attachment Folder will be inserted corresponding to the current post/page.

title="<Folder title>": this is a temporary folder title, generally corresponding to the folder when it was embedded. This title will be replaced as soon as the plugin is able to verify the current title of the folder that is actually embedded via the id/cfid parameter.

Style parameters

Here are some extra parameters for shortcodes:

columns="title,owner,lastmodified,size,ext,thumbnail": specify which columns to display, and in which order. List should be comma-separated and can include any of title, owner, lastmodified, size, ext. The File Size (‘size’) is a column that is not displayed at all by default. The File Extension column (‘ext’) is also not displayed by default.

sort="[-]<column name>": specify which column to sort initially. Can use any of the available column names in ‘columns’ parameter above (title, owner, lastmodified, size), optionally prefixed by a "-" to specify descending order. e.g. sort="title" to sort in order of file titles; sort="-lastmodified" to sort in descending order of date (most recent first). A comma-separated allows you to specify secondary (or further) sort columns, e.g. sort="ext,title" to sort by file extension and then title.

breadcrumbs="yes|no": yes to enable a trail of folder names as you dive deeper into sub-folders – you can click the name of an earlier folder to jump back up the tree; no to disable those folder names, and just have a ‘go back’ button as you dive deeper.

maxresults="<integer>": to display only the specified number of files in the folder to start with; more can be loaded using a "more…" button.

subfolders="yes|no": yes to list subfolders and allow the user to drill down into them; no just to ignore them and miss them off the folder list

showupload="yes|no": whether to add a browse button to the bottom of the folder. If upload permissions are ‘Never’ then this will not show in any event. If not present, then users with the correct permissions will still be able to drag-and-drop files.

width|height="<integer>[%|px]": dimensions of either width or height (or both); optional – if omitted folder will just fill as much space as required (or allowed by your CSS styles).

attachmentstitle="yes|no": if yes, displays "Drive Attachments" at the top of the folder area, as is mandatory for Attachment Folders.

border="yes|no": if yes, displays a border around the embedded folder.

preview="both|tab|none" (default = "both"): Specifies which file types should open in a preview lightbox or a new tab, or which should be downloaded straight away when clicked.
 – none means no files should preview, and therefore native Google file types will open in a new tab, and non-native ‘downloadable’ files will download to the user’s computer.
 – both means all file types will open in the preview lightbox when clicked.
 – tab means all file types will open in a new browser tab when clicked, within the Drive viewer. For native Google file types, this is the same as ‘none’; downloadable files will open in a new tab in the ‘tab’ setting.

Folders will largely inherit styling from your theme, and you will be able to override styles directly in your CSS if desired.

File extensions

Each row in the table displaying the files has a <TR> element containing a class name derived from the file extension. For example, a PDF file will be listed in a row with TR class=&quotlgdm-fileext-ext". You could use this for example to hide certain file types through CSS. E.g. tr.gdm-fileext-ds_store { display: none }

Google Apps Login is trusted by thousands of organizations from small businesses to NASDAQ-listed companies and government organizations.

Users click their way through Login via Google (just one click after the first time)

Users click their way through Login via Google (just one click after the first time)


You can try it out by clicking below to auto-create a test account on this site! This will show you the basic Google login process.
Try out Google login

Logging in is only the start – Google Apps Login takes care of all your WordPress user management. Find out more here.

[user_show_avatar]

See [user_first_name] – that was easy!

Your account has been created, and you are now logged in. On your own site, you will specify your Google Apps domain – e.g. mycompany.com – and only users on that domain will be allowed to auto-create accounts.

Logging in is only the start – Google Apps Login takes care of all your WordPress user management.

Find out more

 

×