[ABD] Forum Statistics 0.3.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
simple12
Registered User
Posts: 84
Joined: Fri Jun 01, 2007 7:39 am
Location: Varanasi, India

Re: [BETA] Forum Statistics 0.3.0

Post by simple12 »

TheUniqueTiger wrote: The ones with the script error, just replace current_title with current_topic. I'm sorry, was an unnoticed typo, hehe!
i fixed the typos and now no errors are shown.
may be you should fix this in your package also.
TheUniqueTiger wrote: For the ones with the language file error, please read the instruction carefully. You have to copy the file from language/en/mods/fs.php to language/en/fs.php.
sorry i missed that.
waiting for the help in latest post mod.

thanks for the support.
MewDragon
Registered User
Posts: 191
Joined: Fri Dec 23, 2005 6:24 pm

Re: [BETA] Forum Statistics 0.3.0

Post by MewDragon »

I was lookin' through the thread and I didn't see anybody ask this.

Is the mod compatible with 3.0.0?
jklnl65
Registered User
Posts: 15
Joined: Fri Apr 20, 2007 8:01 am

Re: [BETA] Forum Statistics 0.3.0

Post by jklnl65 »

TheUniqueTiger wrote:
jklnl65 wrote:I get this error:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/fs/fs_settings.php on line 75: Undefined index: 0
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3442: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
My line 74, 75 and 76 of fs_settings.php:

Code: Select all

//get top forums by topics
$top_forums_by_topics = get_top_forums($limit_count, 'topics', 'DESC', $no_forum_ary);
$max_count = $top_forums_by_topics[0]['count'];
Jan.
The file fs_settings.php does not contain these lines.
Sorry, wrong file :roll:

This is the line:

Code: Select all

$style_users_count[$temp_user['user_style']]++;  
Jan
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by TheUniqueTiger »

@ jklnl65,
I see no reason why there will be a call to the zero index as it is accessing the index which is the same as the user_style (which is always an integer greater than zero). So check your db if there is any such user with style as zero. (users table, field 'user_style'). Other than that I have nothing to say. In fact, no one else has this error so its probably specific to you. Check the db and tell me...

@ MewDragon,
I installed this MOD on RC7, then upgraded and run smoothly on RC8, and now upgraded to 3.0.0 and it still runs smooth, so I can say IT IS compatible with 3.0.0.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by TheUniqueTiger »

I'm sorry for the error in the attachment statistics...

Please do the following edit...
File includes/functions_fs.php

Jump to the function get_top_attachments in this file.

in the case block for filesize, (case 'filesize':)
replace ORDER BY filetime
by ORDER BY filesize

I had thought that I had fixed this (was a typo initially) and included the updated file in the 0.3.0 MOD package, but I had packed an earlier version before this fix. Please correct this... This was actually fixed before 0.3.0 but will be reflected only in the next version.

All who have installed this mod, PLEASE DO THE ABOVE CORRECTION. I'm sorry for the inconvenience.

I've also thought for the following changes for the next version...

Optimization of the code for speed and memory. (Yes there are some possibilities)
Less number of db queries on the polls stats page.
Handling of forum links for global topics, which is built in top topics, top attachments and top polls, so it won't cause any error.
Caching of only static statistics (which do not change frequently), thus increasing the speed. This is optional, and will be done only if I find it feasible.
Numerous other fixes for the bugs reported earlier.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
jklnl65
Registered User
Posts: 15
Joined: Fri Apr 20, 2007 8:01 am

Re: [BETA] Forum Statistics 0.3.0

Post by jklnl65 »

TheUniqueTiger wrote:@ jklnl65,
I see no reason why there will be a call to the zero index as it is accessing the index which is the same as the user_style (which is always an integer greater than zero). So check your db if there is any such user with style as zero. (users table, field 'user_style'). Other than that I have nothing to say. In fact, no one else has this error so its probably specific to you. Check the db and tell me...
Thanx! Some kind of strange way there were 12 users with "user-style" 0 :roll:

Works perfect now, on 3.0.0 :mrgreen:

Jan.
User avatar
NeoID
Registered User
Posts: 406
Joined: Mon Jun 06, 2005 10:12 pm
Location: Norway
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by NeoID »

I have a hard time displaying the stats, especially the "'Forum Activity'" section tends to lock the mysql database for over a minute... then displays a white page (works after refreshing the page)
My log is filled with slow queries, most of them caused by the stats mod...

My board isn't that big with 2.000users and 100.000 posts... while I'm now testing on localhost (wamp) I don't know how the performance will be on my life server, but if can't speed it up it will just be a burden to my db I guess...
Norsk Anime Forum
http://www.AnimeNord.com
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by TheUniqueTiger »

It should not be taking 1 minute at all... Max as I can imagine for a forum as big as yours it should take not more than 2-5 secs, if at all it takes that much time... Since I don't have a forum even as big as 100 posts, I'll have to wait for some reviews about how this MOD works on other's moderate-large forums.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
NeoID
Registered User
Posts: 406
Joined: Mon Jun 06, 2005 10:12 pm
Location: Norway
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by NeoID »

TheUniqueTiger wrote:It should not be taking 1 minute at all... Max as I can imagine for a forum as big as yours it should take not more than 2-5 secs, if at all it takes that much time... Since I don't have a forum even as big as 100 posts, I'll have to wait for some reviews about how this MOD works on other's moderate-large forums.
After replacing all files with the original once in the archive it looks like it's the gender add-on (contrib/addons/gender) which is the causing the problem. Maybe I made a mistake somewhere, I'll try to change the code again, maybe I made a mistake somewhere...

Edit: I've added my mySQL log, maybe it helps...

Code: Select all

# Time: 071218 12:46:14
# User@Host: *****[*****] @ localhost [127.0.0.1]
# Query_time: 132  Lock_time: 0  Rows_sent: 10  Rows_examined: 211217
SELECT COUNT(DISTINCT p.poster_id) AS count, t.topic_id as t_id, t.topic_title as t_title, f.forum_id AS f_id, f.forum_name AS f_name 
				FROM phpbb3_posts p, phpbb3_topics t, phpbb3_forums f 
				WHERE p.topic_id = t.topic_id
					AND t.forum_id = f.forum_id
					AND p.post_approved = 1 AND f.forum_id NOT IN (3, 6, 43, 51, 52, 54, 55, 56, 57, 58, 85, 86, 87, 88, 89, 90)
				GROUP BY t_id 
				ORDER BY count DESC
Norsk Anime Forum
http://www.AnimeNord.com
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by TheUniqueTiger »

NeoID wrote:
TheUniqueTiger wrote:It should not be taking 1 minute at all... Max as I can imagine for a forum as big as yours it should take not more than 2-5 secs, if at all it takes that much time... Since I don't have a forum even as big as 100 posts, I'll have to wait for some reviews about how this MOD works on other's moderate-large forums.
After replacing all files with the original once in the archive it looks like it's the gender add-on (contrib/addons/gender) which is the causing the problem. Maybe I made a mistake somewhere, I'll try to change the code again, maybe I made a mistake somewhere...

Edit: I've added my mySQL log, maybe it helps...

Code: Select all

# Time: 071218 12:46:14
# User@Host: *****[*****] @ localhost [127.0.0.1]
# Query_time: 132  Lock_time: 0  Rows_sent: 10  Rows_examined: 211217
SELECT COUNT(DISTINCT p.poster_id) AS count, t.topic_id as t_id, t.topic_title as t_title, f.forum_id AS f_id, f.forum_name AS f_name 
				FROM phpbb3_posts p, phpbb3_topics t, phpbb3_forums f 
				WHERE p.topic_id = t.topic_id
					AND t.forum_id = f.forum_id
					AND p.post_approved = 1 AND f.forum_id NOT IN (3, 6, 43, 51, 52, 54, 55, 56, 57, 58, 85, 86, 87, 88, 89, 90)
				GROUP BY t_id 
				ORDER BY count DESC
But the gender addon is for the Settings stats page and not the Forum activity section, although the log you have given is different from that. The query that you have given shows the top topics by user participation. Your forum has 211217 posts, so I guess it takes longer time... There is another way for this using the topics_posted_table... May be that could take a little less time, but I'm not sure...

Btw, in the log what does "Query_time: 132" mean? Is it seconds? How much time did the query take?
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
NeoID
Registered User
Posts: 406
Joined: Mon Jun 06, 2005 10:12 pm
Location: Norway
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by NeoID »

TheUniqueTiger wrote:

Code: Select all

Btw, in the log what does "Query_time: 132" mean? Is it seconds? How much time did the query take?
Yes, it's in seconds and the query ended up giving me a blank screen...
You said it hasn't anything to do with the gender-mod and I agrre... can't see how the query should be related to it, but the fact is that the problem only exist if I add the addon....

Give me some time to look into the problem myself...

Edit: I moved the code I added to function_fs.php right before this piece of code/comment:

Code: Select all

/*function get_formatted_tz --- returns the formatted tz --> 5.50 => + 5:30
@param tz_decimal : the tz in decimal
Everything seems to work pretty good now.. the stats loads in an instant...strange... ;)
Norsk Anime Forum
http://www.AnimeNord.com
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by TheUniqueTiger »

Yes thats pretty strange. I scrapped the use of that commented function, as I found out a quicker way of doing it... Can you please exactly tell me what did you remove? Even I don't see any reason for the stats to lag then and now load in an instant.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
User avatar
NeoID
Registered User
Posts: 406
Joined: Mon Jun 06, 2005 10:12 pm
Location: Norway
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by NeoID »

TheUniqueTiger wrote:Yes thats pretty strange. I scrapped the use of that commented function, as I found out a quicker way of doing it... Can you please exactly tell me what did you remove? Even I don't see any reason for the stats to lag then and now load in an instant.
I didn't remove anything, just moved the code added by the gender add-on nearer to the top of the php file... for some reason the statistic page loads within an instant now... but if I move the code to the bottom of the page again the stats are horrible slow...
Norsk Anime Forum
http://www.AnimeNord.com
User avatar
crackerboy
Registered User
Posts: 255
Joined: Sun Jul 15, 2007 5:49 pm

Re: [BETA] Forum Statistics 0.3.0

Post by crackerboy »

all is workin exept this in my error log

Code: Select all

[21-Dec-2007  12:40:13 3600] [phpBB Debug] 
[21-Dec-2007  12:40:13 3600] [phpBB Debug] [client 88.91.66.181] [File index.php] PHP Notice: in file /var/www/vhosts/dreambox-norway.com/httpdocs/forum/index.php on line 267 : Undefined index:  allow_guests_view_fs
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India
Contact:

Re: [BETA] Forum Statistics 0.3.0

Post by TheUniqueTiger »

Have you purged the cache as said in the install instructions?
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
Locked

Return to “[3.0.x] Abandoned MODs”