1
Universe
Create a block "Total"?
  • 2004/2/10 3:31

  • Universe

  • Just popping in

  • Posts: 13

  • Since: 2003/12/25


Hi everyone!
I found everywhere in System Admin --> Blocks and I don't saw this block I want.

So, I created a PHP block and insert PHP code. This code will print Total user, Total user inactive. That code below.

global $xoopsUser,$xoopsDB;

if(
$xoopsUser){
$sql "SELECT count(*) FROM ".$xoopsDB->prefix('users');
list(
$count) = $xoopsDB->fetchRow($xoopsDB->queryF($sql));
echo 
"<b>$count</b> Members <br>";

$sql "SELECT count(*) FROM ".$xoopsDB->prefix('users')." WHERE  level =0";
list(
$count) = $xoopsDB->fetchRow($xoopsDB->queryF($sql));
echo 
"<b>$count</b>: Inactive <br>";
}


Then, I want to write more code for print Total post and Total Thread. Someone can help me....

2
kahumbu
Re: Create a block "Total"?
  • 2004/2/10 4:10

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


The Lykos_Blocks and/or Topic_Blocks module already has this block ready-made. It's called the Site Statistics block: "Site has x members with y posts; x Forum topics with y posts; x number of articles with y hits; etc". Do a search for these modules.

3
Anonymous
Re: Create a block "Total"?
  • 2004/2/10 8:02

  • Anonymous

  • Posts: 0

  • Since:


If your lazy like me here's a link:

http://lykoszine.co.uk/~code/

Login

Who's Online

116 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 116


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits