Ranking method title

proxydesign

Visiolist-Fan
Hello,

Is it possible to make a simple plugin which writes a <h1> title above the stats, which say which rankingmethod is showing. Like the SEO plugin, which creates category-title name above the category-toplist.

Hope you understand:)
 

Mark

Administrator
Staff member
Its possible, but this is probably not semantically correct usage for h1 tag.

You can make the plugin easily though:

make PHP plugin file: rankings_order_by.php

add this to it:
$TMPL['ranking_method'] = $ranking_method;

then in your template you can add {$ranking_method} and display how/where you want
 

proxydesign

Visiolist-Fan
That worked, thank you...
But the language is a bit problem, because instead of showing the translated strength of ex. pageviews, it shows "pv", "in", "out". How can I edit that string?
Thank you.
 

Basti

Administrator
Staff member
It not really display a language phrase at all, but the ranking method used in the url, pv, in, out. So that tag don't have a phrase
A switch would work good here
PHP:
$TMPL['ranking_method'] = '';
switch($ranking_method) {
    case 'pv'  : $TMPL['ranking_method'] = 'Pageviews'; break;
    case 'in'  : $TMPL['ranking_method'] = 'Hits in';   break;
    case 'out' : $TMPL['ranking_method'] = 'Hits out';  break;
}
 
Top