function MostVotedAllTime_SidebarWidget()
{
    $a = SortVotes();
    //Before
    ?>
<div class="votewidget">
<?php 
    $rows = 0;
    //Now does not include deleted posts
    $i = 0;
    while ($rows < get_option('voteiu_widgetcount')) {
        if ($a[0][$i][0] != '') {
            $postdat = get_post($a[0][$i][0]);
            if (!empty($postdat)) {
                $rows++;
                if (round($rows / 2) == $rows / 2) {
                    echo '<div class="fore">';
                } else {
                    echo '<div class="back">';
                }
                echo '<div class="votecount" style="width: 1em; color: #555555; font-weight: bold;">' . $a[1][$i][0] . ' </div><div><a href="' . $postdat->guid . '" title="' . $postdat->post_title . '">' . $postdat->post_title . '</a></div>';
                echo '</div>';
            }
        }
        if ($i < count($a[0])) {
            $i++;
        } else {
            break;
            //exit the loop
        }
    }
    //End
    ?>

</div>
<?php 
}
示例#2
0
function LoadVoteWidget()
{
    $a = SortVotes();
    //Before
    ?>
<div class="votewidget_skin">
<?php 
    $rows = 0;
    //Now does not include deleted posts
    $i = 0;
    while ($rows < get_option('voteiu_widgetcount')) {
        if ($a[0][$i][0] != '') {
            $postdat = get_post($a[0][$i][0]);
            if (!empty($postdat)) {
                $rows++;
                $postdat = get_post($a[0][$i][0]);
                echo '<div class="votelistind"><div class="votemicro">' . $a[1][$i][0] . '</div><span class="votemicrotext"><a href="' . $postdat->guid . '" title="' . $postdat->post_title . '">' . $postdat->post_title . '</a></span></div>';
            }
        }
        if ($i < count($a[0])) {
            $i++;
        } else {
            break;
            //exit the loop
        }
    }
    ?>
</div>

<?php 
}
function MostVotedAllTime_SidebarWidget()
{
    $a = SortVotes();
    //Before
    ?>
<div class="votewidget"><?php 
    $rows = 0;
    // Display the top few posts
    $i = 0;
    while ($rows < get_option('voteiu_widgetcount')) {
        if ($a[0][$i][0] != '') {
            $postdat = get_post($a[0][$i][0]);
            if (!empty($postdat)) {
                $rows++;
                if (round($rows / 2) == $rows / 2) {
                    echo '<div class="fore">';
                } else {
                    echo '<div class="back">';
                }
                echo '<div class="votecount">' . $a[1][$i][0] . '</div><div><a href="' . $postdat->guid . '" title="' . $postdat->post_title . '">' . $postdat->post_title . '</a></div>';
                echo '</div>';
            }
        }
        if ($i < count($a[0])) {
            $i++;
        } else {
            break;
            //exit the loop
        }
    }
    //End
    ?>
</div><?php 
}