Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
Thread Tools
  #1  
Old 12th December 2011, 09:39
SpEnSeR SpEnSeR is offline
Senior Member
 
Join Date: Nov 2011
P2P
Posts: 48
Default Most Visited Users
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
Attached Files
File Type: php mostvisitedusers.php (1.9 KB, 7 views)
Reply With Quote
The Following User Says Thank You to SpEnSeR For This Useful Post:
eckeO5 (8th January 2012)
  #2  
Old 28th December 2011, 23:50
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default hello
off course you can have to change from 5 to 10 the limit
Reply With Quote
  #3  
Old 8th January 2012, 22:17
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Thumbs up
use tsse 5.6 nightcrawler....setting up to 10 works
Reply With Quote
  #4  
Old 9th January 2012, 02:35
SpEnSeR SpEnSeR is offline
Senior Member
 
Join Date: Nov 2011
P2P
Posts: 48
Default
Quote:
Originally Posted by eckeO5 View Post
use tsse 5.6 nightcrawler....setting up to 10 works

hi mate, can you pls post it here.. which part of the code you replace.. Thanks
Reply With Quote
  #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
Reply

Tags
users , visited


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 08:19. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.