<?php wikiovote(); ?> at the beginning of the template wp-content/themes/your_theme/comments.php INSTALL : Put at the top of this template: "wp-content/themes/votre_theme/comments.php" */ function wikiovote(){ Global $wikio_i; $wikio_i++; $wikioThisUrl=htmlspecialchars(strip_tags(get_permalink()),ENT_QUOTES); $wikioReferer = htmlspecialchars(strip_tags('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']),ENT_QUOTES); global $wikiostyle; if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $wikioCliIp = $_SERVER['HTTP_X_FORWARDED_FOR']; elseif(isset($_SERVER['HTTP_CLIENT_IP'])) $wikioCliIp = $_SERVER['HTTP_CLIENT_IP']; else $wikioCliIp = $_SERVER['REMOTE_ADDR']; $wikioSuffix="it"; $wikioUrl="web.wikio.".$wikioSuffix; $wikioSuffix=""; $wikioNote=0; $wikioId=0; $wikioPattern1=""; $wikioPattern2=""; $wikioPattern3="/article="; $wikiohasVoted=""; $bVoted=0; $wikioAllowVote=1; if($wikioNote=file_get_contents("http://".$wikioUrl.$wikioSuffix."/getnote?u=".MD5($wikioThisUrl)."&i=".$wikioCliIp."&referer=".MD5($wikioReferer))){ if(ereg("([0-9]*)\|([0-9]*)\|(.*)\|(.*)\|([0-9]*)\|(.*)\|([0-9]*)\|",$wikioNote,$res)) { $wikioNote=$res[1]; $wikioId=$res[2]; $wikioPattern1=($res[5]==1)? $res[4]:$res[3]; $wikioPattern2=$res[4]; $wikiohasVoted=($res[5]==0 && $res[7]==1)? "&vote=1":""; $bVoted=$res[5]; $wikioSuffix=$res[6]; $wikioAllowVote=$res[7]; } } $wikioUrl="www.wikio.".$wikioSuffix; if($wikioId > 0) { echo "\n"; if($wikiostyle!=1){ /*echo " ";*/ $wikiostyle=1; } echo "
\"www.wikio.".$wikioSuffix."\"
"; } } ?>