RSS Aggregator

Creating and modifying plugins.
Post Reply
lauterunfug
Regular
Posts: 54
Joined: Wed Mar 16, 2005 9:26 am

RSS Aggregator

Post by lauterunfug »

I installed the RSS Aggregator Plugin.

With it I can import other RSS-Feeds. It works fine.

I thought the plugin would (also) link to the site of the RSS-Feed. But there ist no link to that page. It just shows its content.

So I am wondering if this is legal. I only would 'steal' the content without linking back.

What do you guys think about that :?:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: RSS Aggregator

Post by garvinhicking »

Inside the aggregator plugin path there's a patch for the default template to show the extra information about the source of your RSS feed. You can apply that to your template to show this information, then all should be well.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lauterunfug
Regular
Posts: 54
Joined: Wed Mar 16, 2005 9:26 am

wie?

Post by lauterunfug »

Code: Select all

diff -ru default/entries.tpl isoplanet/entries.tpl
--- default/entries.tpl	2005-03-15 00:04:33.000000000 +0100
+++ isoplanet/entries.tpl	2005-04-29 20:26:00.000000000 +0200
@@ -10,7 +10,7 @@
         {/if}
 
         {foreach from=$dategroup.entries item="entry"}
-        <h4 class="serendipity_title"><a href="{$entry.link}">{$entry.title}</a></h4>
+        <h4 class="serendipity_title">{$entry.properties.ep_aggregator_feedname}: <a href="{$entry.link}">{$entry.title}</a> <span style="font-size: 6pt">(<a href="{$entry.properties.ep_aggregator_articleurl}">Original</a>)</span></h4>
 
         <div class="serendipity_entry serendipity_entry_author_{$entry.author|@makeFilename} {if $entry.is_entry_owner}serendipity_entry_author_self{/if}">
             {if $entry.categories}
@@ -24,7 +24,11 @@
             {/if}
 
             <div class="serendipity_entry_body">
+            {if $entry.body == ""}
+                <a href="{$entry.properties.ep_aggregator_articleurl}">Read Article</a>
+            {else}
                 {$entry.body}
+            {/if}
             </div>
 
             {if $entry.is_extended}
@@ -36,7 +40,7 @@
             {/if}
 
             <div class='serendipity_entryFooter'>
-                {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a>
+                {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.properties.ep_aggregator_feedname}</a>
                 {if $entry.categories}
                    {$CONST.IN} {foreach from=$entry.categories item="category" name="categories"}<a href="{$category.category_link}">{$category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach}
                 {/if}
I guess I had to edit the first line of the code? I'd like to use the joshua-template...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: wie?

Post by garvinhicking »

Yeah, you can basically apply the same patch to joshua by looking at the code and inserting those lines into the joshua file.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lauterunfug
Regular
Posts: 54
Joined: Wed Mar 16, 2005 9:26 am

Post by lauterunfug »

I don't really understand what I have to do here:

'+' means probably to add that line
'-' means to delete that line

but what about

diff -ru default/entries.tpl isoplanet/entries.tpl
--- default/entries.tpl 2005-03-15 00:04:33.000000000 +0100
+++ isoplanet/entries.tpl 2005-04-29 20:26:00.000000000 +0200

and what means

@@ -10,7 +10,7 @@

:?:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, the "-" means "delete that line" and "+" means "insert that line".

This is the common "patch" format, understood by the GNU patch/diff utils for automatted application.

The other lines you refer to just indicate which file to edit. The "@" lines indicate the line number where the patch is to be applied.

Regards,
garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lauterunfug
Regular
Posts: 54
Joined: Wed Mar 16, 2005 9:26 am

Post by lauterunfug »

allright!

changed those lines in the template i'd like to use and it works! great!

thanx to you
Harry

Missing post info in aggregator

Post by Harry »

Hi all,

just testing the aggregator for my new combined s9y/podcast site.

http://www.7summits.com/blog

Problem now is that though the aggregated original feed contains a .mp3 link in its XML, see example item here:

Code: Select all

<item>
<title>Harry thuis (05 Dec 2004, 17:05:36)</title>
-
	<link>
http://7summits.com/romke/audio/msg_%2b31206837851_05_Dec_2004_17_05_36.mp3
</link>
-
	<description>
Audio recording from/with Harry thuis, recorded on 05 Dec 2004, 17:05:36
</description>
<pubDate>Sun, 05 Dec 2004 17:05:57 +0100</pubDate>
<enclosure url="http://7summits.com/romke/audio/msg_%2b31206837851_05_Dec_2004_17_05_36.mp3" length="65472" type="audio/mpeg"/>
</item>
This works ok when using the p3k.org javascript or the feedburner tools as you can see in the side bar: a list of
- p3k detailed
- p3k basic
- feedburner
In all feeds in the sidebar is a link to the mp3 file.

However, when aggregating the feed (http://www.7summits.com/romke/HarryOnMountVinson.xml) into s9y the title etc get displayed ok, but the link to the Mp3 is nowhere to be found?!?

How can I fix this? I can add the

Code: Select all

(<a href="{$entry.properties.ep_aggregator_articleurl}">Original</a>)
line, but that is quite silly as for regular text entries they link back to the index page of my blog and if I change 'original' to 'mp3' then all (including non-mp3) posts will have that mp3 link next to it.

Any idea why the 'enclosure url=' and/or 'link'-tag does not get aggregated? Or any other solution how I can differ the aggregated items from the s9y posts?

Thanks in advance,
Harry
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Now, keep in mind that my Smarty skills are weak. But, here's my idea:

Code: Select all

{if $entry.properties.ep_aggregator_articleurl|replace:".mp3":"" != $entry.properties.ep_aggregator_articleurl}
(<a href="{$entry.properties.ep_aggregator_articleurl}">MP3</a>)
{/if}
Replace any .mp3 extension with nothing. Check to see if the link is the same; if so, there was no MP3 in the article. If there was an MP3 (the substituted text and the new text are different), write an MP3 link. Otherwise ignore it.
Harry
Posts: 1
Joined: Mon Dec 05, 2005 6:43 pm

Post by Harry »

Thanks a lot Judebert, that works like a charm!

Cheers,
Harry
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I must be improving: my code is working on the first try. :lol:

Glad to be of service.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

(Just to add a couple of $0.02: The aggregator plugin does not evaluate the "enclosure" tag at all. It only pays attention to description/title/timestamp of any entry and would need to be re-coded if the enclose tag should be taken into account)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply