Getting the number of times an item is flagged

Insert following code where you want:

  1. <?php
  2. $flag = flag_get_flag('like');
  3.  
  4. if (
  5. $flag) {
  6. print "The number of people who voted for this proposal:";
  7. print $flag->get_count($node->nid);
  8. }
  9. ?>


Article Information
Article ID Categories Tags Levels Status
#24
Free
Solved