We would like to limit so only anonymous users are able to 'emit' energy.

There is 1 semi-related issue but from an older version of the module:
#452288: How to limit to authenticated users?

Thank you,
-hg

Comments

HyperGlide’s picture

Believe this commit helps to address -- http://drupalcode.org/project/radioactivity.git/commit/588fe05

Noe.

spidersilk’s picture

Could someone explain this a bit further? I have a similar concern on a site I'm working on - they would like to exclude page views by their own staff from being counted toward the content's popularity.

The date on that commit is from before version 2.8 came out, so I would expect it would be included in version 2.8? But I still haven't been able to find any way in the settings or permissions to control which user roles content accesses count toward the content's "hotness". If there is a way to do this that I'm missing, could someone please explain?

spidersilk’s picture

Version: 7.x-2.7 » 7.x-2.8
Issue summary: View changes
spidersilk’s picture

A further thought: one thing that might help with this is if the module exposed more events to Rules. A co-worker had suggested that Rules might be able to be used for this, to prevent a point from being added to a node's energy count depending on user rule, but the only event Radioactivity exposes to Rules is "Energy is below the cutoff level", which is not helpful here. If the addition of energy to a node was available as an event in Rules, it would help people to customize the module's functioning in a variety of ways, including the one this issue concerns.

lzimmerman’s picture

A hacky approach might be to check in radioactivity.js for a class or variable indicating whether a user is authenticated or not, and clearing the available incidents - e.g. (to allow only anonymous emits):

if ($("body").hasClass("logged-in")) {
  Drupal.behaviors.radioactivity.activeIncidents = Array();
}