Logo MediaEventi
Edocs - Embed Documents

A simple, smart and effective way to embed documents in your contents

edocs_logo


What it does

This plugin makes use of Google Docs Viewer and allows you to embed a document directly into any article, allowing the visitor to view it without having to download it before.

Available formats (more to come as Google adds them):

PDF | DOC (Word, Openoffice) | DOCX | PPT (Powerpoint) | TIFF (Multipage) | PPS


WARNING: it seems that IE8 has problems with the viewer used by Edocs (Google Docs Viewer is the viewer). The problem could be a matter of management of a cookie from IE8 to Google. Google is fixing this issue and soon the plugin will work fine also with IE8 without making any change. To test the behaviour of IE8 just open the demo page with IE8. IE7 works fine for the moment, other browsers too.


How to use it

It's very easy to embed a document in any content article. Just use the following code:

{edocs}path/folder/document.extension,width,height{/edocs}

Example:

{edocs}documenti/gretsch_2005_namm_lowres.pdf,920,300{/edocs}




If you want to make available a "Download" link, just add the parameter "link" to the previous code:

{edocs}documenti/rivista.pdf,920,300,link{/edocs}

pointing_download

parametro_downloadTo 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.

parametro_rootTo change the default path just edit the plugin parameter "Default root folder" (eg: if I write {edocs}documenti/catalogo.doc,400,500{/edocs} and I leave default parameters into the plugin parameters, the final path will be [ROOT FOLDER]/images/stories/documenti/catalogo.doc).



Tips & Tricks

Bypass the default root path

Sometimes it can happens that you need to embed a document that don't resides in a subfolder inside the default root folder (example:  the default root folder is "images/stories/ and the document to embed is in the folder [root]/templates). To bypass the default root folder, just add a trailing slash "/" to the document path into your article.

Example:

if the default root folder is "images/stories" and you use the default code:

{edocs}path/document.pdf,200,300{/edocs}

the final path will be http://www.yoursite.com/images/stories/path/document.pdf.

Instead, if you use this code:

{edocs}/templates/mytemplate/document.pdf,200,300{/edocs} (note the starting trailing slash)

the final path will be http://www.yoursite.com/templates/mytemplate/document.pdf



External documents

If you need to embed external documents (from external sites), just write the full address of the document (remember to include http://...).

Example:

{edocs}http://infolab.stanford.edu/pub/papers/google.pdf,920,300{/edocs}





Styling embedded documents

Each document embedded with Edocs is inserted in a div. If you need more control over each embedded document, you can use the class "edocs_viewer" inside your CSS.

If you need more control, over a single embedded document, you can set an ID into the container div of the embedded document. To do that, add the ID name as the fourht parameter.

The code is:

{edocs}my_documents/pdf/catalogue.pdf,300,200,link,my_div_id{/edocs}

Where my_div_id is your custom id for this specific embedded document.

If you don't need the download link, just insert the ID but don't forget the empty comma:

{edocs}my_documents/pdf/catalogue.pdf,300,200,,my_div_id{/edocs} !Please, pay attention to the empty comma!

Troubleshooting

If you wrote the right code but the result is a blank space, you can enable the debug mode in the plugin parameter page.

parametro_debugWith debug mode "on", a url where the plugin is going to search for the document will be printed after the embedded document. In this way you can correct a bad document path.



Demo

Word (.DOC)
{edocs}documenti/Edocs.doc,400,320{/edocs}



Powerpoint (.PPT)
{edocs}documenti/killbullet.ppt,400,320{/edocs}



Tiff Multipage (.TIF)
{edocs}documenti/neutrino.tif,400,320{/edocs}



Portable Document Format (.PDF)
{edocs}documenti/gretsch_summer05_lowres.pdf,400,320{/edocs}







Download

download Download Edocs - Version 1.1

To upgrade an existing installation of Edocs, just install the plugin in the normal way without uninstalling the previous version. The installer will update the existing installation automatically


 

Comments  

 
0 #81 Mary Schwaner 2010-05-22 18:41
Your plugin is working beautifully. Thank you so much! Would love to have a print icon. Also editing capability will help my team immensely, if that becomes an option.
Quote
 
 
0 #80 Anne M 2010-05-18 23:58
Hello,

I tried this plugin on my site in an article. It works fine with HTML and CSS code. However, when I tried it on PHP the plugin failed to display the PHP code on my frontend side of my website.

Is it supposed to display PHP code properly?

Best Regards,
Anne M
Quote
 
 
0 #79 Sebastiaan 2010-05-18 08:56
I read the documentation of flexicontent last night and found a solution to embed the document via edoc. The only problem is that it can't be placed anywehere within the normal content. This is because I had to create a new FlexiContent Field. This field can be used in a template of flexicontent. In this template you are able to add the extra field to one of the locations in the template. In my case below the standard content. When the field is created there is an option which is called 'Trigger content plugins'. This is used to parse the used tags which are also defined in the field. So this is a partial solution, to embed only one single document. I'am looking at the code of Flexicontent right now to find the function which triggers the content plugin.

Sebastiaan
Quote
 
 
0 #78 Sebastiaan 2010-05-17 19:59
I swapped the order of the plugins, but with no luck.

As said, if I can be of any help, feel free...

Sebastiaan
Quote
 
 
0 #77 MediaEventi - Developer 2010-05-17 19:09
I just checked at the Flexicontent forum, it seems that some plugins need some modification to work with flexicontent component.

Anyway, you can do a last try: go to the plugin page in the administration and check if edocs is ordered before any other flexicontent plugin. If not, just make it go before flexicontent plugins.
Quote
 
 
0 #76 Sebastiaan 2010-05-17 18:17
Hi,

I tried in a new installation on the same server without the Flexicontent component installed, and it worked. So it seems flexicontent is parsing in another way then the standard joomla content manager.
I could not try it in the same installation while the installation of Flexicontent integrates with the standard article part of Joomla, and I can't turn it off without damaging the current content...
I hope you can take a look at the flexicontent component combined with edoc..
If I can be of any help please feel free to contact me.

Sebastiaan
Quote
 
 
0 #75 MediaEventi - Developer 2010-05-17 16:47
Sure!
The problem can rely on the fact that you are using this plugin inside a component (com_flexiconte nt). Try to use it in a simple article using the default joomla content management. If it works, then your problem is on flexicontent, so we can check this later. Let me know
Quote
 
 
0 #74 Sebastiaan 2010-05-17 16:25
Check, check double check....

I checked again and the plugin is active...

Do you have another idea ??

Sebastiaan
Quote
 
 
0 #73 MediaEventi - Developer 2010-05-17 13:31
Unfortunately for the moment Google didn't release any api to customize the viewer, so as I know there's no way to block the download of a pdf

PS. Thank you for the code you provided! I'm gonna give it a try :-)
Quote
 
 
0 #72 MediaEventi - Developer 2010-05-17 13:29
I'm sure you did, but you never knows.. :-) did you activate the plugin?
Quote
 

Add comment


Security code
Refresh

Your are currently browsing this site with Internet Explorer 6 (IE6).

Your current web browser must be updated to version 7 of Internet Explorer (IE7) to take advantage of all of template's capabilities.

Why should I upgrade to Internet Explorer 7? Microsoft has redesigned Internet Explorer from the ground up, with better security, new capabilities, and a whole new interface. Many changes resulted from the feedback of millions of users who tested prerelease versions of the new browser. The most compelling reason to upgrade is the improved security. The Internet of today is not the Internet of five years ago. There are dangers that simply didn't exist back in 2001, when Internet Explorer 6 was released to the world. Internet Explorer 7 makes surfing the web fundamentally safer by offering greater protection against viruses, spyware, and other online risks.

Get free downloads for Internet Explorer 7, including recommended updates as they become available. To download Internet Explorer 7 in the language of your choice, please visit the Internet Explorer 7 worldwide page.