Is there a Drupal module which acts as a 'wrapper' for external content? There are two main uses for this:

1. Displaying HTML created by an external editor (perhaps Dreamweaver) as part of a Drupal site without importing it into nodes.

2. Executing a PHP application within the Drupal theme, using Drupal's session/user data etc. As well as being ugly, an IFRAME solution would not achieve tight enough integration with Drupal sessions.

Comments

bomarmonk’s picture

I don't know this will help, but it will consolidate our questions:

I asked a similar question and pointed to an open source utility that I hoped might be ported (webgrab). Xstatic sounds like it might do what you want, but I need a wrapper that can incorporate even non-php scripting from the wrapped content (webgrab!)-- I have an external catalog server/interface that would be nice to have Drupal display.

Also check out the links to xstatic in the following post:

http://drupal.org/node/24443

djnz’s picture

bomarmonk, your problem should be technically easier to solve because there is no interaction required between Drupal and the external code. This can be done with an IFRAME, but if you don't like that you could just try file_get_contents('http://www.sitetograb.com/'). You would then want to extract the ... of course, and extracting style sheet links would be non-trivial.

However, these problems are insignificant compared to the copyright/passing off issues associated with grabbing content from somewhere else and presenting it as your own - if the catalog site wanted you to do that, they would present an easy API to help you!

bomarmonk’s picture

Don't worry-- I am trying to link things together that are under my supervision or authority... thanks for the warning though. It will probably do someone some good, even though I know better.

mwoodwar’s picture

I'm intrigued by the "file_get_contents" solution, and have a question. I'm using a two column Friendselectric theme, could I display the result of the 'get contents' over both the left and center blocks? I have most of my navigation up in the logo area (primary links)

Mark