Download & Extend

A problem with pubdlcnt_nodeapi

Project:Public Download Count
Version:6.x-1.0-beta5
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:active

Issue Summary

Just letting you know that inside of pubdlcnt_nodeapi function, you are using the wrong $op option... 'alter'. It should be 'load', so the links get replaced, right now it doesn't do anything (module basically doesn't work). With this changed everything works great, good job!

Like so:

<?php
function pubdlcnt_nodeapi(&$node, $op, $a3, $a4) {
  switch (
$op) {
    case
'load':
      if(
$node->nid == '') {
       
// preview - we do nothing and just return
       
return;
      }
     
$node->body = _filter_pubdlcnt($node->body, $node->nid);
     
$node->teaser  = _filter_pubdlcnt($node->teaser, $node->nid);
      break;
  }
}
?>
nobody click here