Multiple Ranks Mod 2.0.3 - User_totalpages


Subject: Multiple Ranks Mod 2.0.3 - User_totalpages
Hi Folks,
it should be possible to assign a rank to the number of pages a member has visited (user_totalpages) insted of the number of postings or days of membership (regarding user_regdate).
Could you please give me a hint, where to screw? Changing user_regdate to user_totalpages in funktions_mg_ranks.php

Code: [Download] [Hide] [Select]
$day_diff = intval( (time() - $user_row['user_regdate']) / 86400 );
to $totalpages = intval($user_row['user_totalpages']);

and

case '-1':
if (($user_row[$user_fields_array[$k]] == '-1') && ($totalpages >= $ranks_sql['ranksrow'][$j]['rank_min']))
{
$rank_sw = true;
}
break;


does not work, 'user_totalpages' seems not to be read from the database.

Thank you,
symphosius

Subject: Re: Multiple Ranks Mod 2.0.3 - User_totalpages
Maybe user_totalpages isn't queried... that's why.

Try to check the original SQL in viewtopic.

Code: [Download] [Hide] [Select]
// Go ahead and pull all data for this topic
$sql = "SELECT u.username, u.user_id, u.user_posts, ...


Add that field and try again.

Let me know.


P.S.: I would like just to specify for normal phpBB users that for this to work you should have an old Niels Mod installed (user_totalpages isn't part of standard phpBB).

Subject: Re: Multiple Ranks Mod 2.0.3 - User_totalpages
Mighty Gorgon wrote: [View Post]
Maybe user_totalpages isn't queried... that's why.
Try to check the original SQL in viewtopic.
Add that field and try again.


Right, that was the missing piece as I found out yesterday. I changed case '0' from 'user_posts' to 'user_totalpages' as I did'nt arrive to get it to work as an additional option (case '-3'). The case-variable -3 is written to the database, but the rank isn't shown up this way. :?


Mighty Gorgon wrote: [View Post]
Let me know.
P.S.: I would like just to specify for normal phpBB users that for this to work you should have an old Niels Mod installed (user_totalpages isn't part of standard phpBB).

Yes, It comes with Niels Last Visit Mod. If the rank should be avaliable in the memberlist too, the same field must be added to the query in memberlist.php as in viewtopic.php.

Thank's a lot!


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.9128s (PHP: 2% SQL: 98%)
SQL queries: 15 - Debug Off - GZIP Enabled