cache[ 'options' ][ 'alloptions' ][ 'siteurl' ] . '/wp-content/plugins/pitchvote'; wp_print_scripts( array( 'sack' ) ); ?> comment_ID); //$comment->_cv_vote = $votes; if( $votes == 0 || !$pitchvoteOptions[ 'display_rating' ] ) { $class = ''; $votes = ''; } else if($votes < 0) $class = 'pitchvote_negative'; else { $class = 'pitchvote_positive'; $votes = '+' . $votes; } $results = '
' . $votes . ' Vote -1 Vote +1' . $author; return $results; } function pitchvoteContent($content) { global $pitchvoteOptions; global $comment; if( !isset( $pitchvoteOptions ) ) $pitchvoteOptions = CVGetOptions(); $hideComment = ($pitchvoteOptions[ 'threshold' ] > 0 && ( $comment->_cv_vote <= -$pitchvoteOptions[ 'threshold' ] ) ); if( $hideComment ) { $content = '(click to show comment)'; } return $content; } function pitchvote_install() { global $wpdb; $dbVersion = get_option('pitchvote_db_version'); if( $dbVersion < 1 ) { $cvTable = $wpdb->prefix . 'pitchvote'; $wpdb->query( "CREATE TABLE $cvTable ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, commentID INT UNSIGNED NOT NULL, userID INT UNSIGNED NOT NULL, vote TINYINT(1) NOT NULL, ip INT UNSIGNED NOT NULL, voteTime INT UNSIGNED NOT NULL, UNIQUE KEY (id), INDEX (commentID, userID), INDEX (commentID, ip) )" ); add_option( 'pitchvote_db_version', 1 ); add_option( 'pitchvote_display_rating', 1 ); add_option( 'pitchvote_threshold', 0 ); add_option( 'pitchvote_require_login', 0 ); } } ?>