Premium Users

Basti

Administrator
Staff member
It should work with a simple plugin. We have a plugin hook in rankings.php to extend the query which selects which members to show

1) Folder named RankByPremium
2) RankByPremium/languages/english.php ( can be empty )
3) RankByPremium/languages/index.htm ( empty )
4) RankByPremium/index.htm ( empty )
5) RankByPremium/info.php ( Look at a different plugin to see the contents, mostly plugin name, version and such )
6) RankByPremium/rankings_extend_where.php

6.1) In rankings_extend_where.php we would extend the query to only show members whos db column "premium_flag" is set to 1
Code:
// We are on a category page, so nothing extra
if ($TMPL['cat_exist']) {
    // Do nothing
}
else {
    // Get members with premium_flag = 1
    $where_extra .= " AND premium_flag = 1";
}
Note that this is untested, but should work

What i think will not work is the pagination. If i'am right it should still display the old number of pages like it was before the plugin.
If thats the case post back, you would need to edit rankings.php with a small fix then
 
Top