View Single Post
  #5  
Old 19th February 2012, 13:35
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Default
Quote:
Originally Posted by SpEnSeR View Post
hi mates,

How can I increase the number of Most visited users in the list.. coz only Top 5 Most visited users will be posted.. I tried to change the code. i set the LIMIT to 10.. but error.. any help?

Heres the code of the mostvisitedusers.php

Code:
if (!defined('TS_P_VERSION'))

{

    define('TS_P_VERSION', '1.1 by xam');

}

// Security Check.

if (!defined('IN_PLUGIN_SYSTEM'))

{

    die("<font face='verdana' size='2' color='darkred'><b>Error!</b> Direct initialization of this file is not allowed.</font>");

}



// BEGIN Plugin: mostvisitedusers

if (!defined('SKIP_CACHE_MESSAGE'))

{

    define('SKIP_CACHE_MESSAGE', true);

}

require_once(INC_PATH.'/functions_cache2.php');

if (!($mostvisitedusers=cache_check2('mostvisitedusers')))

{

    $mostvisitedusers = '<!-- begin mostvisitedusers -->';

    $query = sql_query("SELECT u.id, u.username, u.visitorcount, g.namestyle FROM users u LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE u.visitorcount > 0 ORDER BY u.visitorcount DESC LIMIT 5") or sqlerr(__FILE__,__LINE__);

    while($mv=mysql_fetch_assoc($query))

    {

        $mostvisitedusers .= '<a href="'.ts_seo($mv['id'], $mv['username']).'">'.get_user_color($mv['username'], $mv['namestyle']).'</a> ('.ts_nf($mv['visitorcount']).')<br />';

    }

    $mostvisitedusers .= '<!-- end mostvisitedusers -->';

    cache_save2('mostvisitedusers', $mostvisitedusers);

}

// END Plugin: mostvisitedusers

?>
I highlighted the code that i edited.. but its not working.. pls help.. TIA


Hi Spenser, read just now that you asked again.

Change DESC LIMIT 5" to DESC LIMIT 10".
Then wait for about the next 2 cleanups.
During that time visit one userprofil with enough users

normally there canīt be an error when you change to 10.

have a nice day

Last edited by eckeO5; 19th February 2012 at 13:36. Reason: none
Reply With Quote