HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome to TinyPortal. Please login or sign up.

September 25, 2023, 01:25:03 AM

Login with username, password and session length
  • Total Posts: 194,548
  • Total Topics: 21,181
  • Online today: 64
  • Online ever: 3,540
  • (September 03, 2022, 01:38:54 AM)
Users Online
Users: 0
Guests: 43
Total: 43

New members Block

Started by akulion, October 09, 2006, 07:08:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


txks. alot this really worked for my site, but i have a problem, codes work only for center block, it dont work for left & right block. does anyone has code for left & right block?

Edited:- it works for right block


Nobody a idea how to do this ?



Quote from: deef on June 12, 2007, 11:19:12 AM
Is there a way how I can add for example:

Female: 450
Male: 1200

I thougt to do it in:

'.$bullet. ' '.$modSettings['male']. '

'.$bullet. ' '.$modSettings['female']. '

The $bullet I wish to change to the male and female symbol (but where to do that ?) The text I have deleted becausse I have allreadye the male and female symbol.  But where I have to find this

or where I have to make it ?  Or is there a other way ?



Lord Anubis

Mine has a bit of a problem...

I had 8 people register today and it says 0, but the week and month are correct

it shows

New This Month: 164
New This Week: 19
New Today: 0

I dunno why it works with the other two and not that...Oh and I added it to a mini-user CP but I don't see how that could be the conflict

Check it out HERE it is the first block on the right and click stats


This is a great addition THANKS


Hi all

im having this error using the code in the first page :

Database Error
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '= 1' at line 1
File: C:\apache2\htdocs\smf\Sources\Load.php(1771) : eval()'d code
Line: 558

any help please ..


Please post the exact code you're using.


Hi JPDeni

im using this code below

global $db_prefix,$modSettings;

$today = strtotime("24 hours ago");
date('j') == 1 ? $thismonth = $today : $thismonth = strtotime(date('F') . ' 1');
date('l') == 'Sunday' ? $thisweek = $today : $thisweek = strtotime('last Sunday');
date('M') == 'January' ? $thisyear = $thismonth : $thisyear = strtotime('January 1');

$query = db_query("SELECT
COUNT(dateRegistered > $thisyear OR NULL) as year,
COUNT(dateRegistered > $thismonth OR NULL) as month,
COUNT(dateRegistered > $thisweek OR NULL) as week,
COUNT(dateRegistered > $today OR NULL) as today
FROM {$db_prefix}members
WHERE is_activated = 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($query);

settype($row['today'], "integer");
settype($row['week'], "integer");
settype($row['month'], "integer");

echo 'Total Members: ', $modSettings['totalMembers'],'<br />';
echo 'New This Month: ', $row['month'],'<br />';
echo 'New This Week: ', $row['week'],'<br />';
echo 'New Today: ', $row['today'];


I was just trying to figure out how you got to line 558 in that code. I guess with the queries it's different.

I don't know what could be wrong. It's been a very long time since I wrote that, so I don't remember anything about it. But it looks like it should work.

Try turning off that block to see if there's any errors. The only thing I can think of is that other code is interfering with the function.


i already removed this block, and as you said there was no error at all

other code ? you mean another block ? or mod ?

yes im tryin it in my testing forum which is full with other block and mod, ok ill try it first in other testing forum

it works in my other testing forum..thanks JPDeni


Quoteother code ? you mean another block ? or mod ?
Yes, that's what I was thinking. Or possibly your theme.

If it works in your testing forum, then there is definitely something else that's interfering.


i think it was the forum with all of the mod i used, in the new one i still used the same theme though ..

thanks again JPDeni :)