[drupal-devel] [feature] "blog it" link lost in aggregator

Prometheus6 drupal-devel at drupal.org
Mon Aug 8 15:40:52 UTC 2005


Issue status update for 
http://drupal.org/node/10752
Post a follow up: 
http://drupal.org/project/comments/add/10752

 Project:      Drupal
 Version:      4.6.2
 Component:    aggregator.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Gunnar Langemark at www.langemark.com
 Updated by:   Prometheus6
 Status:       patch (code needs review)

Would adding the blog it link to the aggregator pages instead of the
block be considered a new feature? I'm told new features are only added
to CVS [1].


And how does one find out who maintains the aggregator module? I'm
building a couple of modules that sit on top of the aggregator and have
done a couple of things that would be generally useful to
aggregator.module itself...like extending "blog it" to the node type of
your choice and configuring which HTML tags are not stripped from the
feed
[1] http://drupal.org/node/27736#comment-37111




Prometheus6



Previous comments:
------------------------------------------------------------------------

Sun, 12 Sep 2004 07:51:48 +0000 : Gunnar Langemark at www.langemark.com

I upgraded Langemarks Cafe and noticed that the "blog it" link from
aggregator posts is no more. So I did a clean install of cvs - and it
is still not there.
I use it every day as it is an integrated part of my site maintenance
routine. So for me it is critical - even though Drupal runs fine
without.
Sure hope this is a bug and not something which has been removed.




------------------------------------------------------------------------

Sun, 12 Sep 2004 23:44:20 +0000 : drumm

I am on my slow computer and haven't done a full test (subscribe to
feeds and confirm it works), but the permisison name recently changed
from maintain blog to edit own blog. Make sure you have those all
selected properly in admin >> users >> configure >> roles.


Setting as a support request for now as I could not find any
inconsistencies in the code yet.




------------------------------------------------------------------------

Fri, 18 Feb 2005 02:54:36 +0000 : tatonca

Attachment: http://drupal.org/files/issues/aggregator.module_5.patch (1.11 KB)

I hope this is the way to do this...


There is a thread discussing this issue:  http://drupal.org/node/10740


and I think Dries confirms that this was changed by design.  I myself
liked having the feature, so I added it back in on my site.  Patch
attached - hope folks find this useful...


I thought it might be kewl to make this an option to be turned on or
off in the aggregator admin settings - haven't got as far as figuring
out how to do that yet ;) when I do I'll post that too...


Since this was originally removed by design I've changed the status to
feature request.


I also tried to find another thread or issue but this seemed to be the
only one...


~Tat~




------------------------------------------------------------------------

Sat, 26 Mar 2005 07:14:04 +0000 : wal

>From what I found, you have to be the original admin account to get the
"blog it" icon. I even tried making an "admin" role and giving it all
the permissions. The only way I see the icon is if I am logged in as
the original admin account. Giving all the permissions to the
"authenticated user" role didn't seem to be enough. 


I simply changed the original account to be my username. I know this
isn't a real fix but since I am the only person using that specific
install it fixes my issue.


Good luck,


--Bill




------------------------------------------------------------------------

Sat, 09 Apr 2005 17:22:49 +0000 : bloggator

This worked for me:


In your aggregator.module, replace everything from line 1111 to the end
with:


   $output .= "<div class=\"news-item\">\n";
   $output .= ' <div class="date">'. date('H:i', $item->timestamp)
."</div>\n";
   $output .= " <div class=\"body\">\n";
  $output .= "  <div class=\"title\"><a
href=\"$item->link\">$item->title</a> ";
  if ($user->uid && module_exist('blog') && user_access('edit own
blog')) {
    if ($image = theme('image', 'misc/blog.png', t('blog it'),
t('blog it'))) {
      $output .= '<span 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") .'</span>';
  $output .="</div>\n";
    }
  }
   if ($item->description) {
     $output .= "  <div
class=\"description\">$item->description</div>\n";
   }
  if ($item->ftitle && $item->fid) {
    $output .= "  <div class=\"description\"> </div>\n";
    $output .= '  <div class="source">'. t('Source') .': '.
l($item->ftitle, "aggregator/sources/$item->fid") ."</div>\n";
  }
  $result = db_query('SELECT c.title, c.cid FROM
{aggregator_category_item} ci LEFT JOIN {aggregator_category} c ON
ci.cid = c.cid WHERE ci.iid = %d ORDER BY c.title', $item->iid);
  $categories = array();
  while ($category = db_fetch_object($result)) {
    $categories[] = l($category->title, 'aggregator/categories/'.
$category->cid);
  }
  $output .= " </div>\n";
  $output .= "</div>\n";
  return $output;
}
?>


Best regards,
Jeff




------------------------------------------------------------------------

Tue, 26 Apr 2005 22:58:57 +0000 : maui1

Hi Jeff,


I tried your code patch for the aggregator module in 4.6 and it didn't
get the blogIt and Post as Story links back.  It did seem to slow
access to aggregator down, but no links.  


Where was this design decision made, I would like to contribute my
reasons for needing this functionality.




------------------------------------------------------------------------

Tue, 05 Jul 2005 04:11:13 +0000 : johnpg

It's missing the $user declaration so it never gets past the "if"
statements.


Edit the theme_aggregator_page_item function so it looks like this.


function theme_aggregator_page_item($item) {
  static $last;
  global $user;


Then add 


  if ($user->uid && module_exist('blog') && user_access('edit own
blog')) {
    if ($image = theme('image', 'misc/blog.png', t('blog it'), t('blog
it'))) {
      $output .= ''. 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) .'';
    }
  }


Directly after this line:


  $output .= '  '. check_plain($item->title) .\" [2]\n";


This should really be back in the code as standard, very useful.


John


[2] http://drupal.org/'. check_url($item->link) .'




------------------------------------------------------------------------

Tue, 05 Jul 2005 04:12:50 +0000 : johnpg

It's missing the $user declaration so it never gets past the "if"
statements.


Edit the theme_aggregator_page_item function so it looks like this.


function theme_aggregator_page_item($item) {
  static $last;
  global $user;


Then add
  if ($user->uid && module_exist('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>';
    }
  }
Directly after this line:
  $output .= '  <div class="title">'. check_plain($item->title) .\"
[3]</div>\n";
This should really be back in the code as standard, very useful.


John


[3] http://drupal.org/'. check_url($item->link) .'




------------------------------------------------------------------------

Fri, 05 Aug 2005 17:06:24 +0000 : peacearena

I get this working but with a strange problem. In the aggregator
contents after the title, where the blog.png image should be, the
actual code to the image file shows: <img src="misc/blog.png" alt="blog
it" title="blog it" /> as a link. Yes the image exists, yes img span and
div are allowed in that format. What am I doing wrong?


I tried changing the path to the image, making it absolute, putting the
image in the theme directory, but then nothing shows at all after the
title. 


I hope someone can help me with this, I'd really like this feature.


Using Drupal 4.6.2. Thanks.




------------------------------------------------------------------------

Sat, 06 Aug 2005 08:00:42 +0000 : Boris Mann

Why the hell does this keep getting taken out?! Many people use it, it
shouldn't be removed. If some developers somewhere don't like it, then
add an admin setting to toggle this on or off.


It really should be added to both 4.6 and 4.7.




------------------------------------------------------------------------

Sat, 06 Aug 2005 10:27:44 +0000 : Prometheus6

The link exists, but in the blocks created by the aggregator, not the
page that displays the actual items. That's a somewhat less useful
place.




------------------------------------------------------------------------

Sun, 07 Aug 2005 17:56:35 +0000 : maui1

I couldn't agree more. Placing the "Blogit" link in the block is almost
worse than not having it.  I only decide to blog an item or post it as
a story based on reading the description, not from the title alone.


Blogit and Post as Story were the two most used features in my
Aggregator installation and users are screaming bloddy murder over
their dissapearance.  Please, Please add these features back to the
main distribution and if necessary for some designers, have an admin
check box to dissable it.




------------------------------------------------------------------------

Mon, 08 Aug 2005 15:00:47 +0000 : Bèr Kessels

If there is a good reason to not have it in aggregator, then I will
happily add it to node aggregator.
IMO this feature is somewhat "off" in core. It does not really fit in
our keep it simple, clean and lean mantra. IMO this is a very good
feature for a contribution, like node aggregator.







More information about the drupal-devel mailing list