TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

October 04, 2024, 03:44:39 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,394
  • Total Topics: 21,243
  • Online today: 52
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 31
  • Total: 31

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.

asklife

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

deef

Nobody a idea how to do this ?

Greetings,

Deef

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
$modSettings['male']

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

grtz,

deef


Lord Anubis

#62
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

EDIT: NEVERMIND I FIXED IT

This is a great addition THANKS

ranKoto

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 ..

JPDeni

Please post the exact code you're using.

ranKoto

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'];

JPDeni

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.

ranKoto

#67
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

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.

ranKoto

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 :)