Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
aggregator.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Jan 2007 at 06:00 UTC
Updated:
27 Feb 2009 at 04:57 UTC
It seems bloody obvious to me that aggregator items are something someone might want to use as grist for a blog entry. I mean, that's why I aggregate items is so I can find things to blog about.
I am shocked that the only "blog this" button is in the (to me) useless blocks associated with individual feeds. So the following code change enables "blog this" in the regular aggregator page. The diff is against drupal 5rc1. In case it's not obvious all I did was duplicate some code from theme_aggregator_block_item into theme_aggregator_page_item.
--- aggregator.module~ 2006-12-17 20:15:10.000000000 -0800
+++ aggregator.module 2007-01-05 21:51:38.000000000 -0800
@@ -1357,6 +1357,7 @@
* @ingroup themeable
*/
function theme_aggregator_page_item($item) {
+ global $user;
$source = '';
if ($item->ftitle && $item->fid) {
@@ -1371,6 +1372,7 @@
}
$output .= "<div class=\"feed-item\">\n";
+
$output .= '<h3 class="feed-item-title"><a href="'. check_url($item->link) .'">'. check_plain($item->title) ."</a></h3>\n";
$output .= "<div class=\"feed-item-meta\">$source <span class=\"feed-item-date\">$source_date</span></div>\n";
@@ -1387,6 +1389,12 @@
$output .= '<div class="feed-item-categories">'. t('Categories') .': '. implode(', ', $categories) ."</div>\n";
}
+ if ($user->uid && module_exists('blog') && user_access('edit own blog')) {
+ if ($image = theme('image', 'misc/blog.png', t('blog it'), t('blog it'))) {
+ $output .= '<div class="icon">'. l($image, 'node/add/blog', array('title' => t('Comment on this news item in your personal blog.'), 'class' => 'blog-it'), "iid=$item->iid", NULL, FALSE, TRUE) .'</div>';
+ }
+ }
+
$output .= "</div>\n";
return $output;
Comments
Comment #1
tcblack commentedI too would like to include this in my current installation of 5rc1 but I am not a programmer and I'm not sure how to implement this. Do I simply load the aggregator module in an editor and delete the lines that start with "-" while adding lines that start with "+"?
Comment #2
reikiman commentedtcblack, that is essentially correct.
Comment #3
reikiman commentedFor anybody else who is reading this ...
I thought a bit more about this and it seems to me that individuals may want to do more than just blog about an aggregator item. I did some searching on the site and found some discussion about an alternative, to instead of blog about an item, to discuss it on a forum thread. This would require the iid=### support to be duplicated into the forum module, right?
But beyond that my thinking quickly points to it being a broader feature. Why should it be limited to a blog or forum posting? Why not provide general support to post any given content type from an aggregator item.
I tried to figure out whether the rendering of an aggregator item was "themable" in that you could write some kind of .tpl.php file to render an aggregator item the way an individual site admin wants it to look.
Second the iid=### support needs to become a method in the aggregator.module that retrieves the given data, so that other node types can more easily do this.
Comment #4
RobRoy commented@reikiman - If you want to override that block or page, then override theme_aggregator_block_item() or theme_aggregator_page_item() in your template.php file.
Please submit a proper patch as per http://drupal.org/diffandpatch if you want to change that page core function for 6.x-dev as this is a feature request and we're in a freeze.
Comment #5
agentrickardPatch provided at http://drupal.org/node/130732.
Comment #6
Shai commentedThis topic now being discussed, but with the proposal to remove the "blog-it" feature completely. Best left to contrib:
http://drupal.org/node/233407
Comment #7
ggevalt commentedKeep the feature and extend it to the aggregator page.
Give users an option of turning it on or turning it off.
thanks
Comment #8
HS commentedThis needs to be in the module and as the comment above states it should give the admin an option to turn on and off.