Page 1 of 1

Re: Opening Docs in CMS

Posted: Mon Jul 28, 2014 12:29 pm
by velden
- open Word, PDF and Excel docs in an embedded page of CMS MS not download the file and open in the program
Note that this usually is a client side setting (which I think it should be). A visitor can choose what his browser should do with those documents and where to open them. Further the specific programs need to be installed on the visitors computer; pdf reader, MS Word (Viewer), Excel (viewer) etc.

Unless you know of server side renderers. I don't expect those to exist in CMSMS modules.
- play a video in an embedded page
I would suggest to host the videos somewhere else (Youtube, Vimeo,...) and use code from those parties to embed it in your page.
- an easier forms module as I cant get my head around form builder.
Form Builder is probably the best. What is the problem? Perhaps better open new topic.

Many Thanks[/quote]

Re: Opening Docs in CMS

Posted: Tue Jul 29, 2014 6:59 am
by chandra
The easiest way to embed files like yours is to use the html object tag. Example

Code: Select all

 
<object width="710“ height="960" type="application/pdf" data="{uploads_url}/pdf/your.pdf" />


This shows a pdf in letter format. The same could be done with every other files. You have only to change the type param.

The result is browser call the program which is assigned to the file type on client machine. In worst case (there's no assign for a special file type on client machine) visitors will see nothing.

The HTML5 tags audio and video follows a similar approach.

A little bit more difficult is using something like Mozilla pdf.js for pdf files.

https://blog.oio.de/2014/04/11/integrat ... plication/

But this provides a real embedding, independent from client defaults.

For the file types from MS family you can use a solution like PHPOffice.

https://github.com/PHPOffice

But as I said it's a little bit more difficult and depending on your knowledges.