[RC2] Statistics Mod 4.2.9

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
pjjacobs
Registered User
Posts: 179
Joined: Wed Nov 15, 2006 8:08 pm

Re: [BETA] Statistics Mod 4.x.x

Post by pjjacobs » Fri May 25, 2007 10:19 am

Thanx...now they can add this to the mod

Fisch.666
Registered User
Posts: 219
Joined: Sat Jul 30, 2005 10:58 am

Re: [BETA] Statistics Mod 4.x.x

Post by Fisch.666 » Fri May 25, 2007 11:27 pm

Hi!

When i activate the top_words module, it takes up to 3 minutes to open the statistics.php. Without this module, the statistics.php is generated in a few seconds.

I run a board with 1246 users and 372906 posts, maybe the postings are too much for this module?

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Statistics Mod 4.x.x

Post by Wicher » Sun May 27, 2007 3:53 pm

Your words tables contain probably more then 100s of thousend words, so i guess that can slow down things.

TPIMaster
Registered User
Posts: 25
Joined: Fri May 04, 2007 10:39 pm

Re: [BETA] Statistics Mod 4.x.x

Post by TPIMaster » Sat Jun 09, 2007 1:37 pm

"Cannot open modules/statistics_updates.txt for writing, create an (empty) file modules/statistics_updates.txt and chmod it to 666."

How do I chmod it to 666? I'm a complete n00b on that. :D

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Statistics Mod 4.x.x

Post by Wicher » Sat Jun 09, 2007 1:42 pm

most ftp programs like ws_ftp have the function on board to chmod files.
Or you can do it mostly trough the controlpanel that came with your host account.

TPIMaster
Registered User
Posts: 25
Joined: Fri May 04, 2007 10:39 pm

Re: [BETA] Statistics Mod 4.x.x

Post by TPIMaster » Sat Jun 09, 2007 1:53 pm

Ah yes, found it. Did that, now it gives:
Fatal error: Call to undefined function: curl_init() in /usr/export/www/vhosts/funnetwork/hosting/tomwollaert/forum/admin/statistics_admin_index_check.php on line 45
my statistics_admin_index_check:

Code: Select all

<?php

global $session_id;
include($phpbb_root_path . 'stats_mod/includes/constants.' . $phpEx);
@include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_statistics.' . $phpEx);

$sql = "SELECT * FROM " . STATS_CONFIG_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query statistics config table', '', __LINE__, __FILE__, $sql);
}
$stats_config = array();
while ($row = $db->sql_fetchrow($result))
{
	$stats_config[$row['config_name']] = trim($row['config_value']);
}

// See wich modules are installed and get current versions and new versions
$sql = "SELECT i.*, m.short_name FROM ".MODULE_INFO_TABLE." i, ".MODULES_TABLE." m 
		WHERE i.module_id = m.module_id
		ORDER BY i.long_name ASC";
if (!($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Unable to get Module Informations', '', __LINE__, __FILE__, $sql);
}
if ($db->sql_numrows($result) == 0)
{
	message_die(GENERAL_MESSAGE, 'No modules found on your board.');
}

$url = 'http://www.detecties.com/modforum/stat_updates/statistics_updates.txt';
$allow_url_fopen = ini_get('allow_url_fopen');
if ($allow_url_fopen == 1)
{
	if (!@copy ($url, $phpbb_root_path.'modules/statistics_updates.txt')) 
	{
		message_die(GENERAL_MESSAGE, 'Cannot get remote file needed for updatescheck, it seems to be missing.<br />Please contact the MOD Author about this issue.');
	}
}
else if (CURLOPT_HTTPGET)
{
	if (substr(sprintf('%o', @fileperms($phpbb_root_path.'modules/statistics_updates.txt')), -4) == '0666')
	{
    	$fp = fopen($phpbb_root_path.'modules/statistics_updates.txt', 'wt');
    	$curl = curl_init();
    	curl_setopt ($curl, CURLOPT_URL, $url);
    	curl_setopt($curl, CURLOPT_FILE, $fp);
    	curl_exec ($curl);
    	curl_close ($curl);
		fclose($fp);
	}
	else
	{
		message_die(GENERAL_MESSAGE, 'Cannot open modules/statistics_updates.txt for writing, create an (empty) file modules/statistics_updates.txt and chmod it to 666.');
	}
}
else
{
	message_die(GENERAL_MESSAGE, 'Cannot get remote file, needed for checking for updates.');
}

$infofile = $phpbb_root_path.'modules/statistics_updates.txt';

// Get Statistics MOD version
$handle = fopen($infofile, "rt");
if ($handle) 
{
		$line = fgets($handle);
		$pos1 = strpos($line, ']');
		$pos2 = strpos($line, '@');
		$statistics = substr($line, 1, $pos1-1);
		$newversion = substr($line, $pos1+1, ($pos2-1)-$pos1);
		if ($newversion != $stats_config['version'])
		{
			$updates = 1;
		}
}
fclose($handle);

while ($row = $db->sql_fetchrow($result))
{
	$handle = fopen($infofile, "rt");
	if ($handle) 
	{
		$line = fgets($handle); //rule out first line
		while (!feof($handle)) 
		{
			$line = fgets($handle);
			$pos1 = strpos($line, ']');
			$pos2 = strpos($line, '@');
			$newmodule = substr($line, 1, $pos1-1);
			if ($newmodule == trim($row['long_name']))
			{
				$newversion = substr($line, $pos1+1, ($pos2-1)-$pos1);
				$download = '<a href="'.substr($line, $pos2+1, strlen($line)-($pos2-1)).'">'.$newmodule.'</a>';
				if (trim($newversion) != trim($row['version']))
				{
					$updates = 1;
				}
			}
		}
	}
	fclose($handle);
}
//@unlink($phpbb_root_path.'modules/statistics_updates.txt');

if ($updates == 1)
{
	$template->assign_vars(array(
		'L_STATISTICS_VERSION_INFORMATION' => $lang['statistics_version_info'],
		'STATS_AVAILABLE' => '<p style="color:red">' . $lang['updates_available']. ' <a href="./admin_statistics_updates.'.$phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['here'] .'</a></p>'
	));
}
?>

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Statistics Mod 4.x.x

Post by Wicher » Sat Jun 09, 2007 2:08 pm

That means your host dont have the php functions allow_url_open and cURL installed.
You need to ask your host about them.
You only need one of the two.

Or:

Undo the changes made by the mod in admin/index.php
and delete admin_statistics_updates.php

TPIMaster
Registered User
Posts: 25
Joined: Fri May 04, 2007 10:39 pm

Re: [BETA] Statistics Mod 4.x.x

Post by TPIMaster » Sat Jun 09, 2007 4:22 pm

Thanks! It's a free host, so I don't think they'll install them for me, so I just undid the things in the admin index. ;)

Seeing as you're from the Netherlands: Waren alle makers van mods maar zo behulpzaam! 8-)

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Statistics Mod 4.x.x

Post by Wicher » Sat Jun 09, 2007 6:06 pm

Ik ben niet iemand die iets publiek maakt en er van uit gaat dat niemand er problemen mee kan hebben.
Als ik kan zal ik mijn best doen om te helpen te meer omdat ik niet graag zie dat mijn mods niet werken. :D

kevb8ll
Registered User
Posts: 196
Joined: Mon Jan 30, 2006 10:08 am

Re: [BETA] Statistics Mod 4.x.x

Post by kevb8ll » Tue Jun 26, 2007 9:44 pm

Hi Wicher, is there a quick way of updating from 4.2.3 to 4.2.5 rather than doing the whole thing?

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Statistics Mod 4.x.x

Post by Wicher » Tue Jun 26, 2007 9:56 pm

Follow the instructions in the update files you find within the mod, in the folder updates.

kevb8ll
Registered User
Posts: 196
Joined: Mon Jan 30, 2006 10:08 am

Re: [BETA] Statistics Mod 4.x.x

Post by kevb8ll » Tue Jun 26, 2007 10:03 pm

So sorry mate - I didn't look all the way down the list of the files.

Thanks.

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Statistics Mod 4.x.x

Post by Wicher » Tue Jun 26, 2007 10:06 pm

shit happens...

dantman
Registered User
Posts: 2
Joined: Thu Jun 07, 2007 12:21 am

Re: [BETA] Statistics Mod 4.x.x

Post by dantman » Wed Jul 04, 2007 12:52 am

This statistics mod is fantastic.

Could someone kindly help me install the modules for "activity mod plus"

I've download "activity_mod_plus_stats" from http://phpbb-tweaks.com/

I've extracted the folder into root/stat_module and also root/modules

Still can't find it in the drop down menu in the ACP.

do I have to modified a PAK file to point to it ?

Any help would greatly be appreciated.

Cheers

Dan

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Statistics Mod 4.x.x

Post by Wicher » Wed Jul 04, 2007 10:55 am

Normally the modules come in pak form yes.
if your module is not in pak form, it is probably for an old version of the statistics mod, presumably version 2.1.5

The site you downloaded it from is currently offline, so i cannot check it.
If you can give me a download link to the module, i can look for you if it is for 2.1.5 or for the latest statistics mod.

Post Reply

Return to “[2.0.x] MODs in Development”