Hello,
In aggregator block, you can see "B" icon next to the item title. After clickinpg on that "B", you can create blog content type based on title and description from aggregated feed. I am looking for somebody who can modiffy this. I like to be able to post this not as blog but as page node type (or other custom node type) tOther user ptried to explain similar situation in here: http://drupal.org/node/79434

If you can do something like that for me, please let me know. Fixed price only. Will pay via PayPal.

Comments

Anildrupalservices’s picture

Hi

I can do this work. Please contact me. I am waiting your favorable response.

Thanks
services.drupal
India

suro.solutions’s picture

Hi,

Here is the solution to your problem

In aggregator module replace this code

  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>';
    }
  }

WITH

  if ($user->uid && module_exists('forum') && user_access('edit own forum topics')) {
    if ($image = theme('image', 'misc/blog.png', t('discuss it'), t('discuss it'))) {
      $output .= '<div class="icon">'. l($image, 'node/add/forum', array('title' => t('Discuss this.'), 'class' => 'blog-it'), "iid=$item->iid", NULL, FALSE, TRUE) .'</div>';
    }
  }

In forum module under function forum_form add the following lines

  global $nid;
  $iid = $_GET['iid'];
  $type = node_get_types('type', $node);

  if (empty($node->body)) {
    /*
    ** If the user clicked a "blog it" link, we load the data from the
    ** database and quote it in the blog:
    */

    if ($nid && $forum = node_load($nid)) {
      $node->body = '<em>'. $forum->body .'</em> ['. l($forum->name, "node/$nid") .']';
    }

    if ($iid && $item = db_fetch_object(db_query('SELECT i.*, f.title as ftitle, f.link as flink FROM {aggregator_item} i, {aggregator_feed} f WHERE i.iid = %d AND i.fid = f.fid', $iid))) {
      $node->title = $item->title;
      // Note: $item->description has been validated on aggregation.
      $node->body = '<a href="'. check_url($item->link) .'">'. check_plain($item->title) .'</a> - <em>'. $item->description .'</em> [<a href="'. check_url($item->flink) .'">'. check_plain($item->ftitle) ."</a>]\n";
    }

  }

I have done this form forum topic, likewise you may do it for any content types. Contact me if you need any customised solution.

My Email and Paypal email id is suro.solutions(AT)yahoo.co.in

Thanks,

Suro

parzoe’s picture

A few minor revisions in v6 but worked great for me.

affordableweb’s picture

It would be great to have this functionality in Drupal 6 on the Aggregator Module. I have played with the code included on this page but it is not working properly. I have the code for create new forum topic included but it will not copy over the article title, body or attribution like Blog It button does. Anyone can fix the code above for Drupal 6?

fadgadget’s picture

Id love to change the content type for the blog this button too for drupal 6. thanks