I am using a neat implementation of d7 > commentrss > twitterfeed > twitter/facebook / SMS twitter updates

this whole kaboodle of "log in or register to post comments" is totally annoying and gobbles up a bunch of the 140 character twitter limit and when I am using in combination with bit.ly which is already providing a real direct link I just want to get rid of it entirely so I can use that space for more of the description/title.

I can't find any kind of an admin page for commentRSS. How do I get rid of this peice of text. As it appears in every single message, it's probably hardcoded in the code somewhere.

If you point me to a line item in a file or if a maintainer were to just rip this out I would be very appreciative. It is kind of a waste when I'm limited to 140 characters, it even looks silly in facebook updates using my RSS feed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

computerology’s picture

keepalive

mwallenberg’s picture

I have the same issue. It seems to me that setting the feed content on admin/config/services/rss-publishing to "Titles only" should affect the RSS-feeds for comments as well, but this doesn't seem to be the case.

mwallenberg’s picture

I added an option to include/exclude the links from the feed. Though I am unable to produce patches, here's what I did:

In commentrss.admin.inc, beginning from line 30:

<?php
  $form['commentrss_term'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable individual comment feeds for each taxonomy term listing on the website'),
    '#description' => t('Feeds will be accessible at @url type of URLs. Only supports one term, no composition.', array('@url' => url('crss/term/...', array('absolute' => TRUE)))),
    '#default_value' => variable_get('commentrss_term', FALSE),
    '#access' => FALSE,
  );
  // Modified to add setting to include/exclude links
  $form['commentrss_links'] = array(
    '#type' => 'checkbox',
    '#title' => t('Inlude links in comment feed'),
    '#description' => t("Whether to include links such as \"Reply\" in the comment feed."),
    '#default_value' => variable_get('commentrss_links', TRUE),
  );

  return system_settings_form($form);
?>

And in commentrss.module, function commentrss_feed (line 205):

<?php
function commentrss_feed(array $cids = NULL, array $channel = array()) {
  // ... snip to line 236...
  $nodes = node_load_multiple($nids);
  $accounts = user_load_multiple($uids);
  
  // Should we include the comments' links?
  $include_links = variable_get('commentrss_links', TRUE);

  $items = '';
  foreach ($comments as $comment) {
    // ...snip again, to line 266

    if (!empty($comment->rss_namespaces)) {
      $namespaces = array_merge($namespaces, $comment->rss_namespaces);
    }

    if ($include_links) {
      // We render comment contents and force links to be last.
      $build['links']['#weight'] = 1000;
    }
    else {
      unset($build['links']);
    }
    
  // Snip rest of function...
}
?>
mwallenberg’s picture

Status: Active » Needs review
mwallenberg’s picture

Attached patch for the changes described in post #4. There are a few people following this issue, so it would be great to hear what thoughts the module's maintaner has on this.

computerology’s picture

hey I havent checked back on this issue in a long time. thanks for the fix. I havent tried it yet but I certainly will. Dealing with a blackhole exploit that has trashed my site right now so will have to wait until I get the thing stable to try out your fix