I want to put the contents of the Google file in the body. I created a file "file--field_files.tpl.php". I tried file_get_contents - it uses memory cacheing and loads and loads in PHP 5.2.17. I tried fopen and handle is incorrect. The body will be "$element['#field_files_body']. Alternatively I could read the iframe contents. How do you do that in PHP?

Any help is appreciated.

Comments

tsbalaban’s picture

Status: Active » Closed (won't fix)

Found another solution. Copy iframe contents with jQuery. Then hide iframe.

tsbalaban’s picture

Copy iframe to body with jQuery, then hide iframe.

nfriend’s picture

This looks like an option I could use but it's not clear what you mean.

Could you share the code snippet you used to make this work?

Thanks

Neil

tsbalaban’s picture

That did not pan out. I think you could do it with HTML5 PostMessage.
I'm now looking for a contributed module that does all the work and
modify that -
Google Viewer File Formatter
Ajax Document Viewer