Hi, thanks for this module. I want to make a sorting algorithm like the used by Hackernews or Digg. It will have two variables: the age of the node and the sum of the votes. I want the result of this calculation in a CCK field, and after that, I will sort the nodes using views.
I have already created a computed field for the age of the node, here is the code:
$entity_type = 'node';
$created = $entity->created;
$now = time();
$age = ($now-$created);
$entity_field[0]['value'] = $age;
I have a Fivestar field, with only one star. The users can vote the nodes they like. I would like to create another computed field, which displays the sum of the votes. I have tried several ways but I'm not able to do it.
Thanks for your help.
Comments
Comment #1
colanThere is no CCK in Drupal 7. Perhaps you have the Version set wrong here?
Comment #2
federico commentedSorry, I meant node field (It will be a computed field). I'm coming from D6.
Comment #3
colanComment #3.0
colanedit
Comment #4
dqdDue to the Drupal core life cycle policy and security support advisery, Drupal 6 is no longer supported. So issues for Drupal 6 cannot be longer maintained. The project maintainer has asked for closing all D6 issues to clean up the issue queue. Feel free to reopen the issue if required or set it to "needs to be ported" and latest D8 dev version, if the issue discusses a still missing feature which can be implemented in the D8 version.
Comment #5
dqd