Page 1 of 40

[DISC] Statistics Mod Version 4

Posted: Sun Mar 26, 2006 1:08 pm
by danb00
As you may know this mod was killed of a long time ago.
So what im trying to do is create a new topic and get people as a whole to post bugs and fixes and such. I dont know enough php to do this mod but im trying to revive it and need your help to do so. As this mod has been requested time and time again and needs to be updated and such.

See here for a list of updates and downloads
http://www.phpbb.com/phpBB/viewtopic.ph ... 86#2064786

Posted: Sun Mar 26, 2006 1:39 pm
by igorw
I hope somebody wants to do this! Here's what i've got:

Use the Query found here.

Code: Select all

#
# Table structure for table `phpbb_stats_config`
#

DROP TABLE IF EXISTS phpbb_stats_config;
CREATE TABLE phpbb_stats_config (
  config_name varchar(50) NOT NULL default '',
  config_value varchar(255) NOT NULL default '',
  PRIMARY KEY  (config_name)
) TYPE=MyISAM;

#
# Dumping data for table `phpbb_stats_config`
#

INSERT INTO phpbb_stats_config VALUES ('install_date', '1140869473');
INSERT INTO phpbb_stats_config VALUES ('return_limit', '10');
INSERT INTO phpbb_stats_config VALUES ('version', '2.1.5');
INSERT INTO phpbb_stats_config VALUES ('modules_dir', 'stat_modules');
INSERT INTO phpbb_stats_config VALUES ('page_views', '0');
# --------------------------------------------------------

#
# Table structure for table `phpbb_stats_modules`
#

DROP TABLE IF EXISTS phpbb_stats_modules;
CREATE TABLE phpbb_stats_modules (
  module_id tinyint(8) NOT NULL default '0',
  name varchar(150) NOT NULL default '',
  active tinyint(1) NOT NULL default '0',
  installed tinyint(1) NOT NULL default '0',
  display_order mediumint(8) unsigned NOT NULL default '0',
  update_time mediumint(8) unsigned NOT NULL default '0',
  auth_value tinyint(2) NOT NULL default '0',
  module_info_cache blob,
  module_db_cache blob,
  module_result_cache blob,
  module_info_time int(10) unsigned NOT NULL default '0',
  module_cache_time int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (module_id)
) TYPE=MyISAM;
If you're using eXtreme Styles: Find the eXtreme Styles Fix here. Thanks to Interlog!
pentapenguin wrote: Hello.
Unfortunately, Acyd Burn's Statistics MOD doesn't fully work with CyberAlien's eXtreme Styles MOD.
However, there's a simple fix.
Credit: partial credit goes to chadsmith from this post on phpBB.com.

1st, if you don't have a copy of the original includes/template.php, download a copy of phpBB and rename template.php to phpbb_template.php and upload it to your site.

2nd, follow these directions: (be sure to keep a backup all files just in case!)

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
common.php


#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/template.'.$phpEx);


#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($non_xs)
{
include($phpbb_root_path . 'includes/phpbb_template.'.$phpEx);
}

else
{
include($phpbb_root_path . 'includes/template.'.$phpEx);
}


#
#-----[ OPEN ]------------------------------------------
#
statistics.php


#
#-----[ FIND ]------------------------------------------
#
$phpbb_root_path = './';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$non_xs = 1;


#
#-----[ OPEN ]------------------------------------------
#
admin/admin_statistics.php


#
#-----[ FIND ]------------------------------------------
#
$phpbb_root_path = './';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$non_xs = 1;


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#EoM
Now the Statistics MOD should be working.
Enjoy!


Another one:

This is a Fix for stats_overview_section. Find it here.
helluvaguy wrote: Mußte erstmal suchen. war wohl eine Uraltversion, konnte aber so abgeändert werden das es nun funzt:

Code: Select all

$other_module_info = get_module_info($module_data[$i]['module_id']);
Change that to:

Code: Select all

$other_module_info = generate_module_info($module_data[$i]);
Then, on line 90:

Find:

Code: Select all

// unset (eventually included) language variable of last loop
unset($lang['module_name']);
Change it to:

Code: Select all

// unset (eventually included) language variable of last loop
unset($lang['module_name']);
unset($mod_name);



See a Demo here: http://www.ut4e.com/evil/forum/statistics.php

Posted: Mon Mar 27, 2006 3:34 pm
by GameraFan
evil, you're talking about a different version than the original poster.

However, were you able to get 2.1.5 working with phpbb 2.0.19 and extreme styles 2.3.1? I get a blank left-hand column in the ACP using the fixes you've outlined.

Posted: Mon Mar 27, 2006 3:43 pm
by ShadyCrazy
defender39 wrote: I have followed a couple users advice here and have made the solution a touch easier and still secure (mostly).

In these admin statistics files:

admin/admin_edit_module.php
admin/admin_statistics.php
admin/admin_stats_config.php
admin/admin_stats_lang.php
admin/admin_mod_package.php

Locate

Code: Select all

define('IN_PHPBB', true);

Add After

Code: Select all

define('IN_ADMIN_STATS', true);

Then open root/common.php

locate

Code: Select all

if (!in_array($var, $not_unset))

replace with

Code: Select all

if (!in_array($var, $not_unset) && ( !defined('IN_ADMIN_STATS') ) )

This is the best that I could do. Rewriting the sloppy admin pages to work was taking too much time.

Posted: Wed Mar 29, 2006 1:07 am
by Wicher
[The development of Statistics mod is being continued in a new topic]

Posted: Wed Mar 29, 2006 2:03 am
by yexusbeliever
Wicher wrote: Everything you need for getting version 3 to work is expained in the old topic where you already put a link to in your first post here.
You just need to read it all very carefully...


I think it is time for a new update. Like danb00 said, it will require someone who knows php. Can someone just take over this project and get an updated version going, please?

Posted: Wed Mar 29, 2006 4:52 am
by NGLeader
yexusbeliever

There's nothing wrong with the 3.0.0 beta, I've got it working on my site. And I'm running 2.0.19

Posted: Wed Mar 29, 2006 11:30 am
by igorw
Sorry for posting about the wrong version :oops: ...

I'd really like somebody to take over this project. I'll see if i can get it working, like NGLeader. Did you need to make any changes to it?

Posted: Wed Mar 29, 2006 1:09 pm
by danb00
nope but i hope to get all fixes added and then if someone wants to take it over they can, but like i said in my topic im trying to get everyone to help fix it and post fixes.

Posted: Wed Mar 29, 2006 2:23 pm
by Wicher
[edit]

Posted: Thu Mar 30, 2006 7:18 am
by khsjr1970
Has anyone tried this on a CH 2.1.4 modified board ?

Posted: Thu Mar 30, 2006 7:51 am
by danb00
well i fixed the database connection issue

Also this does not work with subforums mod it needs fixes. I will try my best to fix it although i never used this mod before :) as i use the older 2.0.5 build but anyway i will look at it and see what i can do

Updated stats mod to fix installer issue
[link removed, see first post for latest version]

Posted: Thu Mar 30, 2006 8:00 am
by khsjr1970
same error. there was a work around for this error for 2.1.5 on acyd's board., but the support forums there have been removed.

:shruggin shoulders:

Posted: Thu Mar 30, 2006 8:06 am
by danb00
see the topic above :) includes installer fix

Posted: Thu Mar 30, 2006 1:12 pm
by Wicher
  • 1. I added 7 more pak files
    2. Fixed version check in top_attachments.pak
    3. Fixed debug line at bottom of the statistics page, now only visible to the admin
    4. Changed .htaccess, because the Explain link in debugline had no access to the debug info.