Please read the installation procedure in the plugin source /// Version: 0.2 /***** Installation: 1) Go to http://amphetarate.sourceforge.net/dinka-create-uid.php?client=Gregarius0.5 2) Copy the returned 6-character user id (say ABC123) 3) Edit the following constant and replace XXXXXX with your user id: */ define ('AMPHETARATE_UID','XXXXXX'); /* 4) Subscribe the following feed in your Gregarius installation: http://amphetarate.sourceforge.net/dinka-get-rss.php?uid=XXXXXX (replace XXXXXX with the your user id recevied above) **********/ function __amphetarate_submit_rating($in) { list($iid, $rating) = $in; $query = "select i.title, i.url as url, c.url as xmlurl from " . getTable('item') ." i, " . getTable('channels') . " c " ." where i.cid = c.id and i.id=$iid"; list ($title,$url,$xmlurl) = rss_fetch_row(rss_query($query)); __ar_log("query = " . $query); if ($title && $url && $xmlurl) { $submitUrl = "http://amphetarate.sourceforge.net/dinka-add-rating.php" ."?rating=" . (2 * $rating) ."&encoding=UTF-8" ."&title=".rawurlencode($title) ."&xmlurl=".rawurlencode($xmlurl) ."&link=".rawurlencode($url) ."&guid=" ."&uid=" . AMPHETARATE_UID; __ar_log("url = " . $submitUrl); $ret = getUrl($submitUrl); __ar_log("returned = " . $ret); } return null; } define ('AMPHETARATE_LOGGING', false); function __ar_log($str) { if (AMPHETARATE_LOGGING) { $file="/tmp/amphetarate.log"; $fp=@fopen($file,"a"); @fputs($fp,"-== " . date('r') . " =======================================-\n"); @fputs($fp,trim($str)."\n\n"); @fclose($fp); } } rss_set_hook('rss.plugins.rating.rated','__amphetarate_submit_rating'); ?>