Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   Most Visited Users (http://www.bvlist.com/showthread.php?t=7329)

SpEnSeR 12th December 2011 09:39

Most Visited Users
 
1 Attachment(s)
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("Error! Direct initialization of this file is not allowed.");

}



// 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 = '';

    $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 .= ''.get_user_color($mv['username'], $mv['namestyle']).' ('.ts_nf($mv['visitorcount']).')';

    }

    $mostvisitedusers .= '';

    cache_save2('mostvisitedusers', $mostvisitedusers);

}

// END Plugin: mostvisitedusers

?>

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

Marco 28th December 2011 23:50

hello
 
off course you can have to change from 5 to 10 the limit

eckeO5 8th January 2012 22:17

use tsse 5.6 nightcrawler....setting up to 10 works :ok::ok:

SpEnSeR 9th January 2012 02:35

Quote:

Originally Posted by eckeO5 (Post 32138)
use tsse 5.6 nightcrawler....setting up to 10 works :ok::ok:


hi mate, can you pls post it here.. which part of the code you replace.. Thanks

eckeO5 19th February 2012 13:35

Quote:

Originally Posted by SpEnSeR (Post 31609)
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("Error! Direct initialization of this file is not allowed.");

}



// 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 = '';

    $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 .= ''.get_user_color($mv['username'], $mv['namestyle']).' ('.ts_nf($mv['visitorcount']).')';

    }

    $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 :lol:

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

have a nice day


All times are GMT +2. The time now is 14:13.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.