| Edocs - Embed Documents |
A simple, smart and effective way to embed documents in your contents What it doesThis 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): 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 itIt'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} ![]() 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" (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 & TricksBypass the default root pathSometimes 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 documentsIf 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 documentsEach 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! TroubleshootingIf you wrote the right code but the result is a blank space, you can enable the debug mode in the plugin parameter page. With 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.
DemoDownload Download Edocs - Version 1.1To 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 |



To change the text of the download link, edit the plugin parameter "Download link label".
To 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).
With 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.
Download Edocs
Comments
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
Sebastiaan
As said, if I can be of any help, feel free...
Sebastiaan
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.
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
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
I checked again and the plugin is active...
Do you have another idea ??
Sebastiaan
PS. Thank you for the code you provided! I'm gonna give it a try
RSS feed for comments to this post