<div class="gmail_quote"><div class="gmail_quote"><div>It should work with javascript as normal (at least a quick test page did that included jquery from Google's CDN and then operating on the dom).</div><div><br></div>
<div>You're right that drupal_http_request gets everything including any html, css etc and you're at the mercy of how well-formed they are. You could either create versions of the pages which just output the exact html you want (e.g. ignoring <html> and <head> tags) or you could manipulate it back in drupal (explode on "body>"?). You could optionally run it through something like HTML Purifier (can you run stuff functionally through Drupal's filters?) if you don't trust your content.</div>
<div><br></div><div>Anyway - it was just a thought based on what could be a quick and dirty solution.</div><div><div></div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 21 Jun 2011 16:06:18 -0700<br>
From: "Metzler, David" <<a href="mailto:metzlerd@evergreen.edu" target="_blank">metzlerd@evergreen.edu</a>><br>
Subject: Re: [support] Integrating completely unrelated pages into<br>
Drupal<br>
To: <<a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a>><br>
Message-ID:<br>
<<a href="mailto:52177C930FA90F4D9888B0343FDB79FB0277E52D@birch.evergreen.edu" target="_blank">52177C930FA90F4D9888B0343FDB79FB0277E52D@birch.evergreen.edu</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
This is a clever idea, but be warned that the embedded javascript is not<br>
likely to render or "include" properly, and unless you run this through<br>
an html filter likely to cause malformed html. IIRC the data property<br>
returned includes all of the data including headers, html head, body<br>
tags css references etc.<br>
<br>
<br>
<br>
Someone please correct me if I am wrong.<br>
<br>
<br>
<br>
Dave<br>
<br>
<br>
<br>
________________________________<br>
<br>
From: <a href="mailto:support-bounces@drupal.org" target="_blank">support-bounces@drupal.org</a> [mailto:<a href="mailto:support-bounces@drupal.org" target="_blank">support-bounces@drupal.org</a>] On<br>
Behalf Of DTH<br>
Sent: Tuesday, June 21, 2011 3:47 PM<br>
To: <a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a><br>
Subject: Re: [support] Integrating completely unrelated pages into<br>
Drupal<br>
<br>
<br>
<br>
Maybe kludgy, but could be very quick to do depending on your structure:<br>
in a custom module:<br>
<br>
<br>
<br>
/**<br>
<br>
* Implementation of hook_menu().<br>
<br>
*/<br>
<br>
function example_menu() {<br>
<br>
<br>
<br>
$items['test/page'] = array(<br>
<br>
'title' => 'Test Page Title',<br>
<br>
'page callback' => 'test_page',<br>
<br>
'access arguments' => array('access content'),<br>
<br>
'type'=>MENU_NORMAL_ITEM<br>
<br>
);<br>
<br>
<br>
<br>
return $items;<br>
<br>
}<br>
<br>
<br>
<br>
function test_page(){<br>
<br>
$request =<br>
drupal_http_request("<a href="http://www.example.com/pages/test.php" target="_blank">http://www.example.com/pages/test.php</a>");<br>
<br>
return $request->data;<br>
<br>
}<br>
<br>
<br>
<br>
<br>
<br>
Date: Tue, 21 Jun 2011 12:29:20 -0500<br>
From: Scott Massey <<a href="mailto:scott.massey@gmail.com" target="_blank">scott.massey@gmail.com</a>><br>
Subject: [support] Integrating completely unrelated pages into<br>
Drupal<br>
To: <a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a><br>
Message-ID: <<a href="mailto:BANLkTik7m%2BC8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com" target="_blank">BANLkTik7m+C8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com</a><br>
<mailto:<a href="mailto:BANLkTik7m%252BC8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com" target="_blank">BANLkTik7m%2BC8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com</a>> ><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi!<br>
<br>
I am about 6 months into Drupal and enjoy it immensely. I am<br>
putting<br>
together a portfolio of some web development I have done and<br>
have several<br>
pages of data visualiztions using php and a javascript library<br>
called<br>
Protovis. If I want to bring that into drupal as a page, is<br>
there a way to<br>
do that? There are library calls, jquery, etc. I am having<br>
trouble wrapping<br>
my head around how to do it. I would like the pages to be a menu<br>
item that<br>
opens a page within the drupal site. Here is an example of a<br>
page:<br>
<a href="http://modernamericanman.com/ids499/protovis7.php" target="_blank">http://modernamericanman.com/ids499/protovis7.php</a><br>
<br>
Thanks!<br>
<br>
Scott<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.drupal.org/pipermail/support/attachments/20110621/a63c514c/attachment-0001.html" target="_blank">http://lists.drupal.org/pipermail/support/attachments/20110621/a63c514c/attachment-0001.html</a><br>
</blockquote></div></div></div>
</div><br>