Welcome to Geeklog, Anonymous Friday, October 18 2024 @ 12:00 am EDT
Geeklog Forums
RSS Link Target?
Status: offline
LCAngela
Forum User
Newbie
Registered: 12/07/04
Posts: 6
Is there any way to open links in RSS feeds (from external sites) in a new window?
I used SamStone's "Portal block in center" hack, which is working beautifully, but I don't want the reader to leave my site should they decide to explore the newsfeed links.
Thanks in advance!
"That's because it's -fly soup-, sir..."
I used SamStone's "Portal block in center" hack, which is working beautifully, but I don't want the reader to leave my site should they decide to explore the newsfeed links.
Thanks in advance!
"That's because it's -fly soup-, sir..."
7
6
Quote
g00ch
Anonymous
yeah, does anyone know how to do this one?
6
5
Quote
Status: offline
THEMike
Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
Find the function:
COM_rdfImport
in lib-common.php
In this file it builds up the urls to display, now, I can't get access to the 1.3.11 version easily from here, so I don't have the exact fix, but, in the new system in CVS the code looks like:
$content = '<a href="' . $feed->articles[$i]['link'] . '">'
. $feed->articles[$i]['title'] . '</a>';
Which you would change to:
$content = '<a href="' . $feed->articles[$i]['link'] . '" target="_blank">'
. $feed->articles[$i]['title'] . '</a>';
Note I've added the attribute target="_blank" to the url. Copying the above into the 1.3.11 version of lib-common.php will almost certainly break it. The above code comes from the new syndication system in the current CVS. I do not recommend you upgrade to this, just try and translate the tweak to your current version.
Text Formatted Code
COM_rdfImport
in lib-common.php
In this file it builds up the urls to display, now, I can't get access to the 1.3.11 version easily from here, so I don't have the exact fix, but, in the new system in CVS the code looks like:
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '">'
. $feed->articles[$i]['title'] . '</a>';
Which you would change to:
Text Formatted Code
$content = '<a href="' . $feed->articles[$i]['link'] . '" target="_blank">'
. $feed->articles[$i]['title'] . '</a>';
Note I've added the attribute target="_blank" to the url. Copying the above into the 1.3.11 version of lib-common.php will almost certainly break it. The above code comes from the new syndication system in the current CVS. I do not recommend you upgrade to this, just try and translate the tweak to your current version.
5
6
Quote
tngator
Anonymous
I appreciate your help!!
In 1.3.11 here is the change:
Find:
{
$RDFtitle = str_replace( '$', '$', $RDFtitle );
$RDFheadlines[] = '<a href="' . addslashes( trim( $RDFlink )) . '">' . addslashes( trim( $RDFtitle )) . '</a>';
and simply change it to this:
{
$RDFtitle = str_replace( '$', '$', $RDFtitle );
$RDFheadlines[] = '<a href="' . addslashes( trim( $RDFlink )) . '"target="_blank">' . addslashes( trim( $RDFtitle )) . '</a>';
In 1.3.11 here is the change:
Find:
Text Formatted Code
if( $name == 'ITEM' ){
$RDFtitle = str_replace( '$', '$', $RDFtitle );
$RDFheadlines[] = '<a href="' . addslashes( trim( $RDFlink )) . '">' . addslashes( trim( $RDFtitle )) . '</a>';
and simply change it to this:
Text Formatted Code
if( $name == 'ITEM' ){
$RDFtitle = str_replace( '$', '$', $RDFtitle );
$RDFheadlines[] = '<a href="' . addslashes( trim( $RDFlink )) . '"target="_blank">' . addslashes( trim( $RDFtitle )) . '</a>';
5
8
Quote
Lex
Anonymous
I just installed 1.4 and I'm absolutely amazed that Geeklog doesn't have link target options built in all over the place.
This is one of the most important features a professional website should have. When can we expect to see this?
This is one of the most important features a professional website should have. When can we expect to see this?
7
5
Quote
All times are EDT. The time is now 12:00 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