Multiple Ranks Mod 2.0.3 - User_totalpages »  Show posts from    to     

Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - Multiple Ranks Mod 2.0.3 - User_totalpages



symphosius [ Fri 13 Apr, 2007 00:24 ]
Post 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: [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


Mighty Gorgon [ Sun 15 Apr, 2007 20:25 ]
Post 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: [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).


symphosius [ Mon 16 Apr, 2007 23:24 ]
Post 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!




Powered by Icy Phoenix