You are here:  » Make Links open in New Window


Make Links open in New Window

Submitted by ROYW1000 on Tue, 2011-06-14 13:46 in

Hi

If I pass this file http://news.google.com/news?q=cctv&output=rss

The links want open in the current window rather than a new one. Is there anyway to make all links open in a New Window. The link one is straight forward but how can we change the one in Description or anywhere else they decide to put links.

Thanks
Roy

Submitted by support on Tue, 2011-06-14 13:49

Hi Roy,

You could use str_replace to insert a target='_BLANK' after every <a tag. For example (within your myRecordHandler function):

$record["DESCRIPTION"] = str_replace("<a ","<a target='_BLANK ' ",$record["DESCRIPTION"]);

Hope this helps!
Cheers,
David
--
MagicParser.com