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.

CommentFileSizeAuthor
#2 aggregator.module_5.patch1.11 KBtatonca

Comments

drumm’s picture

Category: bug » support

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.

tatonca’s picture

Category: support » feature
StatusFileSize
new1.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~

wal’s picture

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

bloggator’s picture

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

maui1’s picture

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.

johnpg’s picture

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 .= '

\n";

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

John

johnpg’s picture

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"><a href="'. check_url($item->link) .'">'. check_plain($item->title) ."</a></div>\n";

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

John

geekarena’s picture

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.

boris mann’s picture

Version: » 4.6.0
Status: Active » Needs review

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.

Prometheus6’s picture

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.

maui1’s picture

Version: 4.6.0 » 4.6.2

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.

Bèr Kessels’s picture

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.

Prometheus6’s picture

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.

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

drumm’s picture

Status: Needs review » Active

Looks like the patch file in update #2 was superseded. Need a patch file for the agreed-upon approach instead of pasted code.

Prometheus6’s picture

What is the agreed-upon approach?

SamHa1n@www.biosentral.info_drupal’s picture

Version: 4.6.2 » 4.6.3
Priority: Normal » Minor

I simply replaced this around line 1109 (might be dif line number because I have made other mods to my copy of the agg mod):


$output .= '  <div class="title"><a href="'. check_url($item->link) .'">'. check_plain($item->title) ."</a></div>\n";

With this:


$output .= '<div class="title"><a href="node/add/blog?iid='. $item->iid .'"><img src="misc/blog.png" border="0" alt="Post This Headline"></a>&nbsp;<a href="'. check_url($item->link) .'" target="new">'. check_plain($item->title) ."</a></div>\n";

Doesn't do any fancy user checks, but it works....for me atleast.

kvarnelis’s picture

i'd like to chime in to support the default inclusion of the blog it links in the main aggregator page. having it only in blocks makes no sense to me.

kvarnelis’s picture

the code SamHa1n posted works fine, but it doesn't offer the blog it link for aggregator items in categories. that would be really useful!

magico’s picture

Version: 4.6.3 » x.y.z
LAsan’s picture

Version: x.y.z » 7.x-dev

Feature request go to cvs.

mdupont’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Closed (won't fix)

It's D8 time now, this feature has been removed for years and it is agreed that it belongs in contrib rather than core. Closing.