However I have one unsolved problem, the phpbb-script that I like to install is the day-per-week registrations. Phpbb uses the UNIX-time in the database for the registration-date of the members while PHPNuke uses the '23 aug 2004'-format. I post the script below, is there a way that the script will check the registration dates in the PHPNuke users-table so that it perfectly works?
I think it's in the $sql and FROM_UNIXTIME but really don't know how set the conversion. Thanks for the help!
Code:
<?php
/***************************************************************************
* File: module.php
* -------------------
* Statistic: 'Day-of-Week Traffic: Registrations' v 1.0.0
* Description: Returns statistics for the volume of new registrations
* grouped by day of the week.
* Copyright: (C) 2003 John McKernan, All rights reserved.
*
****************************************************************************/
/***************************************************************************
*
* Statistics Module for use with the Statistics System by Acyd Burn.
*
****************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
// return statistics
$sql = 'SELECT DAYOFWEEK(FROM_UNIXTIME(user_regdate)) as dow, COUNT(*) AS ct
FROM ' . USERS_TABLE . '
WHERE user_id <> -1
GROUP BY DAYOFWEEK(FROM_UNIXTIME(user_regdate))
ORDER BY DAYOFWEEK(FROM_UNIXTIME(user_regdate)) ASC';
if ( !($result = $stat_db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Unable to retrieve users data', '', __LINE__, __FILE__, $sql);
}
$reg_data = $stat_db->sql_fetchrowset($result);
// get highest new users' count
$max_reg_ct = '0';
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum