Download & Extend

Add Blog it icon to democratica theme news items

Project:Democratica
Version:4.5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Democratica uses its own function in template.php to display news items in the aggregator. This patch adds the blog it icon to the end of the title.

It changes:

  $output .= " <h3 class=\"news-item-title\"><a href=\"$item->link\">$item->title</a></h3>\n";

to:
  $output .= " <h3 class=\"news-item-title\"><a href=\"$item->link\">$item->title</a>\n";
  if (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 .= "</h3>\n";

You will need the blog it icon which you can download from http://drupal.org/misc/blog.png.

Thanks

JJ

AttachmentSize
template.patch1.09 KB
nobody click here