Posted on: 09/03/07 06:18am
By: trampoline
Hi I have an RSS feed in a block on our site, I would like stories clicked to open a new window not replace the site.
I know this is not easy but there must be a hack ???
Thanks...
:
Re: RSS Block
Posted on: 09/04/07 12:17am
By: jmucchiello
If I understand you correctly, all you need to do is find this line in COM_rdfImport() from lib-common.php:
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '">'
. $title . '</a>';
and make it
Text Formatted Code
$content = '<a target="_blank" href="' . $feed->articles[$i]['link'] . '">'
. $title . '</a>';
Re: RSS Block
Posted on: 09/04/07 04:31am
By: trampoline
Thanks I changed that I can see how it should work, do I need to wait for the next import for this to work ... ???
Re: RSS Block
Posted on: 09/04/07 05:08am
By: trampoline
all that is printed is a solitary . ?
Re: RSS Block
Posted on: 09/16/07 01:14pm
By: trampoline
Quote by: jmucchielloIf I understand you correctly, all you need to do is find this line in COM_rdfImport() from lib-common.php:
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '">'
. $title . '</a>';
and make it
Text Formatted Code
$content = '<a target="_blank" href="' . $feed->articles[$i]['link'] . '">'
. $title . '</a>';
I tried this and it just did not work can anyone let me know what to put in the RSS block to resolve this ?
Thanks.
Re: RSS Block
Posted on: 11/04/07 08:10am
By: trampoline
This is still not working,
any other suggestions ?
It seems I may not have the latest geeklog....
My config.php version is
// $Id: config.php,v 1.237 2006/11/04 22:46:09 dhaun Exp $
and I am using lib-common.php version
// $Id: lib-common.php,v 1.593 2006/11/04 14:57:20 dhaun Exp $
So do I need to upgrade ? I hope not I have so much custom code on the Story templates etc....
Re: RSS Block
Posted on: 11/04/07 09:30am
By: beewee
It should be something like this:
replace this:
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '">' . $title . '</a>';
by this:
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '" target="_blank">' . $title . '</a>';
Re: RSS Block
Posted on: 11/04/07 10:06am
By: trampoline
Ok it fills the block with this...
Text Formatted Code
<ul class="list-feed"> <li><a href="http://www.jamaica-gleaner.com/gleaner/20071104/focus/focus5.html" target="_blank"></a></li> <li><a href="http://www.theglobeandmail.com/servlet/story/LAC.20071103.TIBETCANADA03/TPStory/National" target="_blank"></a></li> <li><a href="http://www.hindu.com/thehindu/holnus/006200711031121.htm" target="_blank"></a></li> <li><a href="http://www.chinadaily.com.cn/china/2007-11/04/content_6229047.htm" target="_blank"></a></li> <li><a href="http://news.xinhuanet.com/english/2007-11/01/content_6992727.htm" target="_blank"></a></li> <li><a href="http://in.reuters.com/article/worldNews/idINIndia-30274120071101" target="_blank"></a></li> <li><a href="http://www.daily-journal.com/archives/dj/display.php?id=406962" target="_blank"></a></li> <li><a href="http://www.ctv.ca/servlet/ArticleNews/story/CTVNews/20071031/Dalai_lama_071031/20071031?hub=TopStories" target="_blank"></a></li> <li><a href="http://lfpress.ca/newsstand/News/National/2007/10/31/4618880-sun.html" target="_blank"></a></li> <li><a href="http://www.dailyindia.com/show/188464.php/Tibetan-Govt-in-exile-PM-hails-US-highest-civilian-award-to-Dalai-Lama" target="_blank"></a></li></ul>
But only prints out a dot " . " in the block and nothing else ???
Re: RSS Block
Posted on: 11/04/07 06:29pm
By: beewee
The generated HTML seems fine to me, unless I oversee something (don't know what the dot means..). What does ' class="list-feed" ' do to the formatting? Does it hide something?
Re: RSS Block
Posted on: 11/05/07 01:57am
By: Dirk
Actually, the generated HTML is not fine - it's missing the story titles. All it seems to be doing is to generate empty links, i.e. <a href="..."></a>
bye, Dirk
Re: RSS Block
Posted on: 11/05/07 06:22am
By: Anonymous (beewee)
Quote by: DirkActually, the generated HTML is not fine - it's missing the story titles. All it seems to be doing is to generate empty links, i.e. <a href="..."></a>
bye, Dirk
Yes, Dirk is right
, that means you've forgotten the
Text Formatted Code
' . $title . '
Re: RSS Block
Posted on: 11/05/07 06:27am
By: trampoline
Quote by: beeweeQuote by: DirkActually, the generated HTML is not fine - it's missing the story titles. All it seems to be doing is to generate empty links, i.e. <a href="..."></a>
bye, Dirk
Yes, Dirk is right
, that means you've forgotten the
Text Formatted Code
' . $title . '
Thanks but where would go
Re: RSS Block
Posted on: 11/28/07 03:49pm
By: trampoline
OK I have finally sorted this out......
replace
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '">'
. $feed->articles[$i]['title'] . '</a>';
With...
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '" target="_blank" ">'
. $feed->articles[$i]['title'] . '</a>';
in lib.common.php