By eddiep123 on
Hello,
How can I display an external page inside the main screen of Drupal?
So for example when I click on a menu-button named google, I want to show the google-page in the right-screen (i think it's called the body). Do I need a special module?
TIA, Edwin, The Netherlands
Comments
Re: Show external page in the main screen of Drupal?
You have to create a page with an "Input Format" type of "PHP Code", then insert the following PHP code into that page:
Be careful of fancy CSS styles in the included page because they can screw up the formatting of your overall Drupal page.
Just a clarification, although the Drupal.org HandbookTerminology page doesn't describe this, there are two sidebar columns that contain "blocks". The center wide column is the content column. Note that the right sidebar column doesn't necessarily show, so in that case (your case), the content column would be right column.
Ben in DC
Wrapped External Page Links Broken
Hello,
I stumbled accross this solution while trying to integrate an external site into the content area of a Drupal site.
I have followed the instructions above for creating this solution and adjusted the Input Formats to include PHP just incase that was causing my weird results.
My problem is this (please excuse me if I'm trying the impossible here)
The external website shows up in my test site using the code:
Unfortunately no graphics or interactivity is supplied with this method - instead of the graphics URL's maintaining thier original filepath such as http://www.externalsite/picture.jpg they resort to http://mysite/picture.jpg which of course doesn't host the picture and unfortunately this applies to all links on the external page also.
I'm not a programmer, I'm sure this must be blindingly obvious to some of you more experienced Drupalers.
Witht he greatest respect I have tried hard to understand where I'm going wrong here and any advice would be greatly appreciated.
Thanks in advance for your help.
www.dawnofthereplicants.com
Wrapped External Page Links Broken
I to need to fix the image issue, can someone please help, im not linking to google but out old site.
Display external website in content area of drupal
Did you ever find a solution to display external website in content area of drupal that didn't screw up the links of that external site? I'm using the code below and I'm running into the same problems you did.
What did you to get it to work?
Thanks,
Jason
(no title)
I don't think so.
Try an iframe instead:
http://www.w3schools.com/tags/tag_iframe.asp
If what you display fits in, then the borders won't appear.
There is also something similar and more trendy, called an "object"
http://www.w3schools.com/tags/tag_object.asp
But it seems really buggy across browsers. In some cases it crashes IE6 very badly.
Simple yet Efficient.
Thanks. I posted a similar question yesterday. I spent several hours testing solutions and then found yours this morning. I've got a separate web server that has a lot of php programs. I didn't want to have to convert or migrate all of this code to my Drupal intranet site. This works perfectly for me.
JS
How if the link is dynamic
Is there away to display external dynamic link in Drupal windows? For example the link of news feeds from other sites.
Online Business
(no title)
What is a dynamic link?
dynamic link means
A link which you do not know exactly its path at writing the code, for example a link in news feed when clicked it takes you to the source page.
Online Business
(no title)
I am not sure I understand. Feeds have fixed links...
Do you mean some code which produces different links dynamically? Perhaps the l()function?
http://api.drupal.org/api/function/l/5
yes it's possible using
yes it's possible using curl, regex the result and then output what you want in your theme.
shakethetv.com - lyrics - music
Shakethetv would you give
Shakethetv would you give more explanation on how to do.
Online Business
yes curl is a powerfull
yes curl is a powerfull library in php you can check those links :
fr.php.net/curl and curl.haxx.se
it must be compiled with your php installation (package for php5 : php5-curl)
here is an example how to use it :
this code will download the youtube.com main page.
if you want to check the result within drupal copy this code in an enable module or directy in your template with phptag
function...:now in your template : page.tpl.php or an existing template page write this somewhere in the page :
$test = _curl_test(); echo"$test";you will see the youtube mainpage in drupal it's just the result of the curl function.
now the regular expression :
you will need to parse the curl result in order to retrieve what you need and not just the whole page, regex will do that.
download this software http://www.radsoftware.com.au/ you will be able to test your regex with this one.
search some websites with tutorials ex: www.regular-expressions.info
need some php function:
preg_match_all
preg_match
how array in php works :
array
now quick and simple example to retrieve youtube page title :
$pattern is the regular expression and $matches the result of the regex (array).
$youtube_title is the final result.
sorry for my english but i hope it will help you.
shakethetv.com - lyrics - music
Menu links and news aggregators
How do I adapt this solution to enable me open the external links in my menu and the news aggregator in drupal's main content area?
Thanks.
FYI
Google's terms of service don't allow this.
what do you mean by google terms of services
Do you mean Google penalize in search engine ranking sites who does this? Yahoo takes its news from AP and other sources and it displays it in its own page. I think what matters is the permission of the original content owner. From the point of view of user friendliness opening in the same window sometimes can be preferable.
Online Business
I mean that if you wrap
I mean that if you wrap google.com in your page, their lawyers will contact you with a nice little letter.
Hate to bring back an old
Hate to bring back an old topic but this is the only post I found that was close to what I was looking for.
My problem is rather than opening an external link inside the body, I would like to open different pages in the content column. These pages are located on the same server as the Drupal site but are separate from Drupal. For example, if my main page is www.example.com, the pages I have are located at www.example.com/pages. I tried the first solution and while it does open the page, the links and images on that page don't seem to work.
Many thanks for any advice in advance.
I can't give you any
I can't give you any support, but Here's what I did to to do that for legacy pages.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards