Welcome to Geeklog, Anonymous Wednesday, December 11 2024 @ 04:30 am EST
Geeklog Forums
RSS Block
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
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... :
I know this is not easy but there must be a hack ???
Thanks... :
18
14
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
If I understand you correctly, all you need to do is find this line in COM_rdfImport() from lib-common.php:
. $title . '</a>';
and make it
. $title . '</a>';
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>';
14
15
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Thanks I changed that I can see how it should work, do I need to wait for the next import for this to work ... ???
19
16
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
all that is printed is a solitary . ?
23
21
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Quote by: jmucchiello
. $title . '</a>';
and make it
. $title . '</a>';
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>';
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.
16
15
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
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....
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....
21
18
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
It should be something like this:
replace this:
by this:
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
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>';Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
23
24
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Ok it fills the block with this...
<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 ???
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 ???
17
19
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
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?
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
19
14
Quote
beewee
Anonymous
Quote 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
Yes, Dirk is right , that means you've forgotten the
Text Formatted Code
' . $title . '
19
14
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Quote by: beewee
Yes, Dirk is right , that means you've forgotten the
Quote 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
Yes, Dirk is right , that means you've forgotten the
Text Formatted Code
' . $title . 'Thanks but where would go
17
14
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
OK I have finally sorted this out......
replace
. $feed->articles[$i]['title'] . '</a>';
With...
. $feed->articles[$i]['title'] . '</a>';
in lib.common.php
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
13
14
Quote
All times are EST. The time is now 04:30 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content