Hey, I have a news section on my site that has external links to the news stories so I'm wanting the external link to open with a banner frame at the top to allow my users to be able to navigate back to my site once they have finished reading the article.

Can you add an option to have a banner at the top of the external page?

Thanks.

Comments

vkr11’s picture

+1

SolomonGifford’s picture

This seems like a really easy modification. For a reasonable bounty I'd be willing too take a stab at it. solomongifford at gmail dot com.

quicksketch’s picture

Status: Active » Closed (duplicate)
never123456’s picture

Status: Closed (duplicate) » Fixed

now.. we will create 2 files
outgoinglink.php
frame.php

outgoinglink.php

 <?php 

//default url if none is set
$nourl = "http://www.domainname.com";	

	$url=$_GET["url"];
	if(!$url)
	{
		$url=$nourl;
	}
?>
<html>
<head>
<title>YOUR TITILE</title>
</head>

<frameset rows="85px,*" frameborder="NO" border="0" framespacing="0">
  <frame src="frame.php?url=<?php echo"$url" ?>" name="frame" scrolling="NO" noresize>
  <frame src="<?php echo "$url"; ?>" name="main">
</frameset>
<noframes>
<body>

</body>
</noframes>
</html> 

frame.php

you can put any html here to show in frame 

in your template file for example node.tpl your put to http://xxx.com/outgoinglink.php?url= before<?php print $link ?>

FOR EXAMPLE THIS node.tpl file sends users to external link in new page with a banner .dont forget put your banner image to frame.php...
<a target="_blank" href="http://yourdomainname.com/outgoinglink.php?url=<?php print $link ?>" title="<?php print $title ?>"><?php print $title ?></a>

vkr11’s picture

This is great suggetion.
If you add "in your template file for example node.tpl your put to http://xxx.com/outgoinglink.php?url= before print $link " will this convert only the external links to something like this? Also will the extlink icon show up next to the link?

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

taqwa’s picture

@never123456: Thanks for your code. Do you know if there is a way of providing the $node variable to the frame.php file?