HELP ME ABOUT - COUNTER VISIT

Basti

Administrator
Staff member
I cant help you if you not provide what you have done. I cant foresee things.

What did you inserted exactly into the files? post the hole content here
 
I cant help you if you not provide what you have done. I cant foresee things.

What did you inserted exactly into the files? post the hole content here
You dont get me, but I will try to explain.

WHAT IS THE CURRENT RANK POSITION DETERMINE IN THE BADGE? IS IT GLOBAL OR BY CATEGORY?
I WANT TO HAVE THE CURRENT RANK POSITION IN BADGE BY CATEGORY.
 

Basti

Administrator
Staff member
No need to write in caps. I help you here for free, so I demand some kind of normal civil behavior

I told you exactly what to do, and what does the 2 tags do
Where you place these 2 tags is up to you, In the badge or wherever is up to you

It will display on category view: Rank # overall
And on overall view will display: Rank # in category

Place {$rank_overall} and {$rank_category} in the following files where you want the text to appear...
so you place these 2 tags into the files I mentioned. Like I said {$rank_overall} will only be displayed when you view a category, and will display the users overall rank
and {$rank_category} will only display on the overall page, giving you the rank in the category the user is listed in.

I cant make it any more clear than this.
 
No need to write in caps. I help you here for free, so I demand some kind of normal civil behavior

I told you exactly what to do, and what does the 2 tags do
Where you place these 2 tags is up to you, In the badge or wherever is up to you



so you place these 2 tags into the files I mentioned. Like I said {$rank_overall} will only be displayed when you view a category, and will display the users overall rank
and {$rank_category} will only display on the overall page, giving you the rank in the category the user is listed in.

I cant make it any more clear than this.
Sorry, auto caps.
So can I use this

imagestring($img, 2, 80, 90, $TMPL['rank_category'], $color1);
 

Basti

Administrator
Staff member
Wait what? You said badge right? Badge is the badge on the website rankings. The code I provided was the website, not button

Huge misunderstanding here? You want the category rank on the button? try this is settings_buttons.php
Code:
    // Make ORDER BY clause
    require_once "{$CONF['path']}/sources/misc/classes.php";
    $order_by = base::rank_by($CONF['ranking_method'])." DESC, unq_{$CONF['ranking_method']}_overall DESC";

    // Escape users category
    $category_rank_sql = $DB->escape($TMPL['category'], 1);

    $rank_category = 1;
    $rank_result = $DB->query("SELECT sites.username FROM {$CONF['sql_prefix']}_sites sites, {$CONF['sql_prefix']}_stats stats WHERE sites.username = stats.username AND active = 1 AND category = '{$category_rank_sql}' ORDER BY {$order_by}", __FILE__, __LINE__);
    while (list($username) = $DB->fetch_array($rank_result))
    {
        if($username == $TMPL['username'])
        {
            break;
        }
        $rank_category++;
    }

    imagestring($img, 2, 80, 90, $rank_category, $color1);
 
Wait what? You said badge right? Badge is the badge on the website rankings. The code I provided was the website, not button

Huge misunderstanding here? You want the category rank on the button? try this is settings_buttons.php
Code:
    // Make ORDER BY clause
    require_once "{$CONF['path']}/sources/misc/classes.php";
    $order_by = base::rank_by($CONF['ranking_method'])." DESC, unq_{$CONF['ranking_method']}_overall DESC";

    // Escape users category
    $category_rank_sql = $DB->escape($TMPL['category'], 1);

    $rank_category = 1;
    $rank_result = $DB->query("SELECT sites.username FROM {$CONF['sql_prefix']}_sites sites, {$CONF['sql_prefix']}_stats stats WHERE sites.username = stats.username AND active = 1 AND category = '{$category_rank_sql}' ORDER BY {$order_by}", __FILE__, __LINE__);
    while (list($username) = $DB->fetch_array($rank_result))
    {
        if($username == $TMPL['username'])
        {
            break;
        }
        $rank_category++;
    }

    imagestring($img, 2, 80, 90, $rank_category, $color1);

Yes that is what I mean :).
In the button / badge .
 
Top