I really like the flexibility and number of services this module offers. However, I would like to prevent the links/widgets to show up on my RSS feeds and possible also on Search results.

Is there a way of doing this?

Would be great if it was possible to have full control over where the links show up in the configuration.

CommentFileSizeAuthor
#9 service_links-1201700.patch5.58 KBTheCrow

Comments

bryansd’s picture

+1 To either know how to do this or as a feature request.

TheCrow’s picture

actually only handling templates and phptemplate functions

Docc’s picture

Sub

liliplanet’s picture

subscribe thx!

maxiorel’s picture

1. Go to admin/config/services/service-links and disable all "Where to show service links".
2. Go to your template.php and paste here the function as mentioned withing the template.php in service_links module folder. If you already have the themename_preprocess_node() paste only it's inner part.

function themename_preprocess_node(&$vars) {
  if (module_exists('service_links')) {
    if (user_access('access service links') && service_links_show($vars['node'])) {
      $vars['twitter'] = theme('links', array('links' => array($vars['node']->service_links['service-links-twitter'])));
    }
  }  
}

3. Go to your node.tpl.php and paste this to the place when the service links should be displayed

  <?php if ($page): ?>
    <?php print $service_links_rendered; ?>
  <?php endif; ?>

Using this steps the service links will be displayed only in full node view.

liliplanet’s picture

subscribe thx! tried #5 but output links as a list ..

looking forward to a solution :)

TheCrow’s picture

TheCrow’s picture

Status: Active » Needs work

working for introduce a page filter, the same used by blocks. This will be the last feature added, after i'll release the 2.1

TheCrow’s picture

Status: Needs work » Needs review
StatusFileSize
new5.58 KB

patch ready

TheCrow’s picture

Status: Needs review » Fixed

committed, if there are troubles just follow here

remkovdz’s picture

Sorry, but I'm a Drupal noob... What to do with the patch? Thanks!

TheCrow’s picture

nothing because has been committed... that means you can download the latest stable and you have this feature (page filtering for include/exclude paths) working.

tsvenson’s picture

@remkovdz:

Just add '*rss.xml' in the Pages text area in the "Page specific visibility settings" fieldgroup and have "All pages except those listed". That will exclude the share links on all rss.xml feed pages.

remkovdz’s picture

Thanks @TheCrow and @tsvenson! I installed the new module and excluded the RSS-pages. Great, thanks for the help.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.