Aggregator module displays hard coded links to add blog posts if (module_exists('blog'))
which has been around since at least 4.6
This issue came up on Remove blog module from core which I'm going to mark postponed until there's a solution for this.
I can see a couple of ways to deal with this:
*Make the Comment on this news item in your personal blog.
link configurable for different node types
* Remove it from the aggregator theme function and implement it in blog.module or somewhere else
* Wait and see happens with aggregator module if there's an effort to get feedapi into core - which might mean a cleaner version of 1.
Comment | File | Size | Author |
---|---|---|---|
#11 | blogit.patch | 4.87 KB | R.Muilwijk |
#9 | blogit.patch | 4.88 KB | catch |
#6 | aggregator-blog-233407-6.patch | 4.84 KB | floretan |
Comments
Comment #1
Shai CreditAttribution: Shai commentedI believe the functionality provided by the "blog-it" feature is of little use. Removing it will solve the problem that catch raises. For folks who want that feature, it is better to provide as a code snippet for someone to add, and leave it out of core.
It's fired only when a person with blogging rights is on a page in which there are feeds created from the aggregator module. By clicking on an icon you get node/add/blog with the blog item id appended so as to insert the html from the blog post into the body field.
The explanation for this functionality (which actually shows up in the blog module, not the aggregator module where the theme function resides) says:
Why this functionality should be removed:
Here is the function in question. It begins on line 889 in aggregator.module:
function theme_aggregator_block_item($item, $feed = 0) {
global $user;
$output = '';
if ($user->uid && module_exists('blog') && user_access('create blog entries')) {
if ($image = theme('image', 'misc/blog.png', t('blog it'), t('blog it'))) {
$output .= '<div class="icon">'. l($image, 'node/add/blog', array('attributes' => array('title' => t('Comment on this news item in your personal blog.'), 'class' => 'blog-it'), 'query' => "iid=$item->iid", 'html' => TRUE)) .'</div>';
}
}
// Display the external link to the item.
$output .= '<a href="'. check_url($item->link) .'">'. check_plain($item->title) ."</a>\n";
return $output;
}
I propose changing it to:
function theme_aggregator_block_item($item, $feed = 0) {
// Display the external link to the item.
$output .= '<a href="'. check_url($item->link) .'">'. check_plain($item->title) ."</a>\n";
return $output;
}
There is some text in blog.module that describes this feature. That text would also need to be removed.
I'll write a patch for both modules if this thread spurs any interest.
Shai
Comment #2
keith.smith CreditAttribution: keith.smith commentedShai, removing the functionality seems reasonable to me (as you describe) and would move us toward resolution on the larger issue of blog-module-in-core. Sounds good to me.
Comment #3
Shai CreditAttribution: Shai commentedHere is a feature request from a Sept. 05, with patch, to add "blog-it" functionality to the story module:
http://drupal.org/node/31972
That patch would make the issue at hand even worse. Not that it's going anywhere, but thought I'd reference it. Note the patch includes the use of the quote module to format the quoted blog -- which seeks to remedy one of my complaints.
All in all I think the existence of that issue and the fact it didn't go anywhere is more support that "blog-it" functionality should be outside of Drupal core.
Shai
Comment #4
eigentor CreditAttribution: eigentor commented+1 for removing it. There is nothing it gives that could not be easily archieved otherwise.
Comment #5
catchShai, unsurprisingly, +1 from me.
Comment #6
floretan CreditAttribution: floretan commentedIn my opinion, the blogging etiquette issue is already enough to remove this functionality from core. This mechanisms is also in conflict with the idea of attaching fields to remote content (if fields make it in core) and I think that it doesn't fit with the idea of "infinite interoperability" that Dries mentioned in his keynote speech at DrupalCon.
This functionality is also not very obvious (I've personally never noticed that the "blog" icon had a different url than the aggregator links), so removing it shouldn't have a large impact on existing users. Here's a patch that removes the related code.
The blog.png icon is used by devel_generate.module, so an issue should be posted there if this file is removed.
Comment #7
catchflobruit: thanks for patching this.
I think to get this in, we'd probably need a CHANGELOG.txt entry, and Handbook page with the modified theme function to link to from the 6.x-7.x updates page. Do people think that'd be enough to supply an upgrade path? (although there's no user data here to upgrade of course).
Comment #8
catchhttp://drupal.org/node/235772 was marked as duplicate, fwiw.
Comment #9
catchRe-roll to keep up with HEAD. Question remains whether this is replaced with a handbook page or very small contrib module.
Comment #10
charly71 CreditAttribution: charly71 commentedIf you don't want to change the code try to hide the icon with
.block-aggregator div.icon {display:none}
Comment #11
R.Muilwijk CreditAttribution: R.Muilwijk commented@charly71, why would you want to tell the browser to load an image and then make CSS don't display it? Sounds like a 'hack' to me....
New version which applies to Head attached.
Comment #12
ggevalt CreditAttribution: ggevalt commentedJust to throw a different opinion in here....
I think the blog it feature is great. I wish there was an easy way to enable it for the page views (it looks nice in the blocks). Users of our sites use it quite a bit. They blog on a news item and because the blog it feature embeds the news story and link other users coming along have the context of the blogger's opinions.
Yes, you could do this manually.
And yes I could set up the site manually to do this if I were given a patch.
But I think you are talking about a usability feature here. Why take it out just because you don't use it? Why not keep it but make it more user friendly, ie creating the ability to turn it on or off and to associate with whatever content type the admin feels like?
For what it's worth.
cheers
geoff
Comment #13
Dave ReidAgreed that this should be removed from core and available as a contrib module.
Comment #14
mvcThis patch works for me, and would save me having to override that theme function for every site which happens to use both modules. I completely agree that the blog module should move to contrib, from whence this sort of feature can be added for anyone who wants it. And hopefully whoever does that will make this feature an option, which is disabled by default.
Comment #15
Dries CreditAttribution: Dries commentedReviewed, looks perfect. Committed to CVS HEAD. Thanks. :-)
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #17
Michael3185 CreditAttribution: Michael3185 commented[Here is the function in question. It begins on line 889 in aggregator.module]
Many thanks for this. The icons were a real eyesore, and no use to my site users, so I've modified my D6.13 aggregator module and all is well.
Comment #18
Roger34 CreditAttribution: Roger34 commentedSorry for reopening this issue. Is this feature still in the core aggregator. My feed blocks display the blue "b" links. Please tell me a way to remove this blog it link.