Edocs - Embed Documents - v 1.1
A simple, smart and effective way to embed documents in your contents. Not a replacement for entering the text of new information. To embed forms from other organizations historical documents.
This plugin makes use of Google Docs Viewer and allows to embed a lot of formats.
Available formats (more to come as Google adds them):
PDF | DOC (Word, Openoffice) | PPT (Powerpoint) | XSL (Excel)
How to use
It's very easy to embed a document in any content article. Just use the following code:{edocs}folder/path/document.format,width,height{/edocs}
700 width, 600 height seems to be good for the SCRID site.
Example:
{edocs}pdfs/minutes/,700,600{/edocs}
If you want to make available a "Download" link, just add the parameter "link" to the previous code:
{edocs}my_documents/pdf/catalogue.pdf,700,600,link{/edocs}
Download
To change the text of the download link, edit the plugin parameter "Download link label".
NOTICE: by default edocs will assume as the starting folder images/stories, so everything you add with the standard code will be appended to this default path. To change the default path just edit the plugin parameter "Default root folder".
Tips & Tricks
Bypass the default root path
To bypass the default root folder, just add a trailing slash "/" to the document path into your article.Example:
if you use the default code:
{edocs}path/document.pdf,200,300{/edocs}
the document path will be http://www.yoursite.com/images/stories/path/document.pdf because by default edocs will assume as the starting path the one specified in the plugin parameter "Default root folder".
If you use the new code:
{edocs}/documents/path/document.pdf,200,300{/edocs} (note the starting trailing slash)
the result document path will be http://www.yoursite.com/documents/path/document.pdf
External documents
To embed an external document, just add the full path to the document.Example:
{edocs}http://infolab.stanford.edu/pub/papers/google.pdf,200,300{/edocs}
Styling each embedded document
Each embedded document is contained in a div. If you need extra control over all the embedded documents, you can use the container class "edocs_viewer".If you need more control over a single embedded document, you can set an id on the container div. To do that, just add your id name as a fourth parameter in the plugin string into your article.
The code is:
{edocs}my_documents/pdf/catalogue.pdf,300,200,link,my_div_id{/edocs}
If you don't need the download link on the embedded document, just write
{edocs}my_documents/pdf/catalogue.pdf,300,200,,my_div_id{/edocs} ! Notice that you need to add an extra comma, just like the previous example
If something goes wrong
If you write the right code to call the plugin but the result nothing, go the setting page of the plugin and enable the debug mode. After that in the article will be printed on screen the url where the plugin is going to search for the document. In this way you can correct a bad document path.Compatibility with IE
Unfortunately Internet Explorer (7 and 8) has got a problem showing an embedded document with google docs viewer. In the meantime that Google solves this problem (the fault is by IE, not Google), you can activate the compatibility mode in the plugin settings. While in compatibility mode, if a user is browsing your pages with IE (6,7,8), the plugin will show only a link with the name of the document with an explaining text. If the link is clicked, a new page with the document viewer is opened.Please check with the demo page http://www.mediaeventi.it/en/projects/joomla/edocs if Google solved the problem.
Article is in the following categories:
KB » Using the SCRID Website
KB » Using the SCRID Website

How do I embed a PDF document in an article?




Leave A Comment
Email This Article
Article Information





