Code for total registered users - e.g: {online}

Status
Not open for further replies.

Waleed

Member
May 28, 2012
68
14
Does anyone know what the code is for the total registered members? I'd like to add it to my index page.
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
Does anyone know what the code is for the total registered members? I'd like to add it to my index page.

If its RevCMS,

PHP:
<?php
$query = mysql_query("SELECT COUNT(*) AS aantalleden FROM users") or die(mysql_error());
$data = mysql_fetch_assoc($query);
 
echo $data['aantalleden'];
?>
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,132
2,456
Go to the map app and open class.template.php

Search in the file:
PHP:
$this->setParams('online', $core->getOnline());

Add below:
PHP:
$this->setParams('registeredusers', $engine->num_rows("SELECT id FROM users"));

Now like {online}, this works the same for {registeredusers}
 
Status
Not open for further replies.

Users who are viewing this thread

Top