PDA

View Full Version : [release] java stat


Arabs Emperor
12-17-2002, 10:00 PM
this is java stat it's good and take from all forums stat

also you should put this

topposter code in phpinclude

if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
$topposters=$DB_site->query_first("SELECT username,posts,userid FROM user ORDER BY posts desc LIMIT 1");
$toptstarter=$DB_site->query_first("SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1");
}
if (strpos($_SERVER['PHP_SELF'], "index.php") != false)
{
$result = $DB_site->query("SELECT SUM(views) AS totalviews FROM thread");
$totalviews = $DB_site->fetch_array($result);
$totalviews = number_format($totalviews['totalviews']);
}

//
Converted to work with phpinclude by Anime-loo, hack by Lesane
//
Total Thread Views
by filburt1
---------------------------------------
demo :- http://www.freewebz.com/arabse/demo_vbt.htm
backgroun:- images/back1.jpg
you can used this http://www.freewebz.com/arabse/back1.jpg
---------------------------------------
i put the code in Attach
just put it any where in forumhome

my regards

sory for my bad english *_*

filburt1
12-18-2002, 04:35 PM
You basically combined the two mods? There's some optimization that can be done (the two FROM thread queries can be combined). Also the second strpos... doesn't need to be there :)

filburt1
12-18-2002, 04:36 PM
Almost forgot: please post that PHP code in its own text file to avoid breaking the page layout here :)

Brad
12-18-2002, 05:08 PM
Also the second strpos... doesn't need to be there

If anyone dosent know what hes talking about, use this.

if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
$topposters=$DB_site->query_first("SELECT username,posts,userid FROM user ORDER BY posts desc LIMIT 1");
$toptstarter=$DB_site->query_first("SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1");
//start second mod
$result = $DB_site->query("SELECT SUM(views) AS totalviews FROM thread");
$totalviews = $DB_site->fetch_array($result);
$totalviews = number_format($totalviews['totalviews']);
}

Brad
12-18-2002, 05:20 PM
Also, people that wish to release my mods as part of there please pm me about it frist, i really dont mind but i like to know. 99.9% of the time ill always say yes, but check with me frist.

Arabs Emperor
12-18-2002, 05:24 PM
oh .................................................. ..!!

imported_khaledtrm
12-18-2002, 11:52 PM
very nice

Arabs Emperor
12-20-2002, 08:33 AM
thanks khaledtrm *_*

imported_msu
12-20-2002, 09:10 PM
great work Arabs Emperor

thanx :)

Arabs Emperor
12-20-2002, 11:40 PM
thanks msu

x-wave
01-29-2003, 07:35 PM
working. nice job :)