Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
tsbalaban CreditAttribution: tsbalaban commentedFound another solution. Copy iframe contents with jQuery. Then hide iframe.
Comment #2
tsbalaban CreditAttribution: tsbalaban commentedCopy iframe to body with jQuery, then hide iframe.
Comment #3
nfriend CreditAttribution: nfriend commentedThis 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
Comment #4
tsbalaban CreditAttribution: tsbalaban commentedThat 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