daily gadgets, computers, and electronic news
30/06
2005

Hacking Popularity Contest Plugin

Sponsored Links

In BlogDrive’s blog, it is possible to display the value of post popularity beside the popular post list. I’ve tried to find a way to do it with the Popularity Contest plugin, but it only display the list, without the value. So, after reading the source code, I found out a way to do that :) )

First, by using WordPress Plugin Editor feature, open up Popularity Contest plugin source. Look for:

function show_top_ranked($limit, $before, $after) {

below it, change:

SELECT p.ID, p.post_title

to

SELECT p.ID, p.post_title, pop.single_views

and:

print(
$before.''
.$post->post_title.'
'.$after
);

to:

print(
$before.''
.$post->post_title.'
(' . $post->single_views . ')'.$after
);

Save and done :d

You can the result on my popular post list on the front page.

Enjoy! :) )

Hacking Popularity Contest Plugin is written by cosa and posted under Crack & Hack, WordPress , , , . If you like it, you might consider subscribing to our feed, follows us on Twitter, or receive our latest posts via email. Or else, you could also or store it to your favourite social bookmark sites. Further information about this article can be found.

1 Comment »

  1. 1
    abdul says:

    i am learing hacking i like

Leave a comment