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.

le="color: #000000"><?php 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: 0


If your lazy like me here's a link:

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