[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.
.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro

Re: [BETA] Forum Statistics

Post by .:: Chico ::. »

RedTrinity wrote: (all ranks say there are 0 members when this is not the case)

I haven't upgraded to the new version yet though, so will let you know if these fix up.

.
I did not understand the bug.
But you did not upgraded it yet. Could you see if there are those bug here:
http://www.emd-forum.com/testboard :?:
.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro

Re: [BETA] Forum Statistics

Post by .:: Chico ::. »

.:: Chico ::. wrote:
RedTrinity wrote: (all ranks say there are 0 members when this is not the case)

I haven't upgraded to the new version yet though, so will let you know if these fix up.

.
I did not understand the bug.
But you did not upgraded it yet. Could you see if there are those bug here:
http://www.emd-forum.com/testboard :?:
I tested it and did not happen in beta2
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Forum Statistics

Post by RedTrinity »

.:: Chico ::. wrote:
.:: Chico ::. wrote:
RedTrinity wrote: (all ranks say there are 0 members when this is not the case)

I haven't upgraded to the new version yet though, so will let you know if these fix up.

.
I did not understand the bug.
But you did not upgraded it yet. Could you see if there are those bug here:
http://www.emd-forum.com/testboard :?:
I tested it and did not happen in beta2
I just upgraded to the latest version - the months stats are fixed :) But the rank section has completely disappeared now? I can't find it where it was listed before (between 'Groups' and 'Who Is Online')

Went to the test board linked above but its not there either anymore :S
.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro

Re: [BETA] Forum Statistics

Post by .:: Chico ::. »

RedTrinity wrote:
I just upgraded to the latest version - the months stats are fixed :) But the rank section has completely disappeared now? I can't find it where it was listed before (between 'Groups' and 'Who Is Online')

Went to the test board linked above but its not there either anymore :S
I don't remember any rank section :lol:
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Forum Statistics

Post by RedTrinity »

That's what my 2nd screenshot was of in one of my earlier posts, the rank statistic i am referring to - it had the count wrong and had 0 members for all ranks when it was incorrect as obviously those ranks are used all over the forum.

ETA: This -

Image

It was included in the last version but is missing from the current one.
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India

Re: [BETA] Forum Statistics

Post by TheUniqueTiger »

@RedTrinity,
How many members do you have belonging to the particular ranks? As I said, if all the counts are zero, the Ranks section will not be shown. So the question is if you have certain number of members belonging to certain ranks, then why is it not showing up... The periodic stats bug has been fixed as confirmed.
.::Chico::. didn't see any Ranks section at all, due to this reason in the first place.

I'm looking into the ranks issue now.

@.::Chico::.,
I just noticed a few display issues like placement etc, which I had modified in this version to look good. I didn't see those changes when I visited your forum. Thats why... Can you please refresh the template...

To all,
Yes the permissions thing is not so difficult to implement. The only thing it'll show then is 'Hidden' in place of the actual forum/topic name... Is that OK? Plus an option in ACP to allow guests to view statistics.

Its just a matter of few minutes... Most probably I'll post later today. You can anyway install the current version as the new version will have update instructions.
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

Re: [BETA] Forum Statistics

Post by TheUniqueTiger »

Oh God, just noticed on a live forum that phpBB3 doesn't update the user_rank field in the users table... Thats the reason the ranks are always zero. I'll do the fix right now, will post later today. (Why is that field there anyway if it is always zero? Any ideas if it has a value anytime?)
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Forum Statistics

Post by RedTrinity »

TheUniqueTiger wrote:@RedTrinity,
How many members do you have belonging to the particular ranks?
I have approx 660 members currently using the rank system - varying on what their postcount is as to what rank they have (as per the screenshot above) :D
TheUniqueTiger wrote: To all,
Yes the permissions thing is not so difficult to implement. The only thing it'll show then is 'Hidden' in place of the actual forum/topic name... Is that OK? Plus an option in ACP to allow guests to view statistics.
Why not have it display alternative statistics if private ones have to be removed?

For example:
Admin view of list:

1. A
2. B (admin only topic)
3. C (admin only topic)
4. D
5. E

Current view of list by general member:

1. A
2. B (admin only topic)
3. C (admin only topic)
4. D
5. E
----
6. F
7. G
8. H

(6-8 not displayed since its top 5 results)

General Member View after permissions set properly - as explained below:

1. A
2. D
3. E
4. F
5. G
--
6. H

(admin entries are removed and replaced by entries underneath, and 2 new entries brought in to complete list
So in other words, for a general member the admin only entries are removed, and the list is pushed up so that topics ranking after these two replace the ones that are taken out, and ones not previously shown due to lower rank are pushed up to complete the list.

Does that make sense? Its hard to explain! But that is what the Statistics Mod on PHPBB2 used to do and it worked great, that way general members would not know otherwise that any topics with permissions set higher had been removed as it only displayed the top entries of those they can actually see and access.

Cheers :)
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium

Re: [BETA] Forum Statistics

Post by saaiberke »

I just tried to install the new version but I'm experiencing serious problems to get it done:

In the instructions I see:

Code: Select all

Open: index.php
Find
Tip: This may be a partial find and not the whole line.

Code: Select All
	'U_MCP'				=> ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : ''
In-line Find
Tip: This is a partial match of a line for in-line operations.

Code: Select All
	'U_MCP'				=> ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : ''
In-line Replace With


Code: Select All
	'U_MCP'				=> ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : ''
	//MOD Forum Statistics
	, 'U_STATISTICS'		=> "<a href=\"{$phpbb_root_path}fs.$phpEx\">" . $user->lang['STATISTICS'] . '</a>'
	//END MOD

But the line to find in my board is not exactly the same, so when I try to do the replace with, my indexpage turns blank. I think there is an error in the instruction line.

Then:

Code: Select all

Login to your ACP, go to 'SYSTEM' tab. Here click 'Forum statistics' under Module management. Create the following modules...
I don't see 'Forum statistics' under Module management although I edited includes/acp/info/acp_modules.php correctly to have it shown (I double checked).

So I'm stuck now with a blank indexpage and a module management that doesn't show the 'Forum statistics' link.

I'm using RC8 on Prosilver and I have already several mods installed.

Any idea how I have to proceed now?

Grtz,

Nic
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India

Re: [BETA] Forum Statistics

Post by TheUniqueTiger »

The main reason why I oppose this is that this would mean reporting wrong statistics... The main role of permissions is to disallow a limited user from reading forums, and not the wrong statistics... Its not a big deal in case of showing latest posts or the list of forums/topics as it has a purpose. The purpose of this MOD is to show the statistics. And now it will also respect the permissions by labelling the appropriate forums, topics, attachments and polls as 'hidden'. So in my view this is better than showing wrong wrong statistics.

On the technical front, the way you suggested, would mean an extra query to get all the forums that the user is not allowed to read. (since I think only the readable forums are cached and if you want the unreadable forums, it gets them by another query). Thats not all, in case he is a limited user, it would mean complex queries with the 'NOT IN' clause which will get more complex with more number of unreadable forums. The way I wish to do this is by getting all the readable forums (from the cache, so no extra query), then compare each entry in the display results with isset() which is faster than in_array() and label the appropriate ones as 'hidden'. The entries will be shown but with the text as 'hidden'.

I hope you understand... I'm not making a replica of the phpBB2 MOD, but my own. I respect your opinions and feedbacks but this is what I felt appropriate instead of showing wrong statistics.

And yes, the ranks issue has been fixed, I had to do a different algorithm altogether. :P
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

Re: [BETA] Forum Statistics

Post by TheUniqueTiger »

@saaiberke,

The line given in the install instructions is the default in phpBB3... May be you have another MOD installed for which you have modified that line earlier. Make sure that the array elements are separated by comma on each line... If there's a comma at the end of the line to find, remove that comma and put a new comma on a new line after the '//END MOD'.
You may post the last line of that array on your earlier index page code (index.php) so that I may help. You may also PM the same. Otherwise since others have got it working I don't think there is any mistake in those instructions.

About the ACP, you have to edit two files in order to see the Forum Statistics link under Module management. The one you mentioned and the other being language/en/acp/common.php. I would suggest completing all the edits before creating modules.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Forum Statistics

Post by RedTrinity »

Saaiberke, did you try Chico's info for this maybe? As I followed his advice from the start for the edit on the index page and didn't have any probs with it... going by the fact your problem is related to the same edit, it might help with it - though I am not sure if UniqueTiger may have fixed this problem in the updated version?
TheUniqueTiger wrote:The main reason why I oppose this is that this would mean reporting wrong statistics... The main role of permissions is to disallow a limited user from reading forums, and not the wrong statistics... Its not a big deal in case of showing latest posts or the list of forums/topics as it has a purpose. The purpose of this MOD is to show the statistics. And now it will also respect the permissions by labelling the appropriate forums, topics, attachments and polls as 'hidden'. So in my view this is better than showing wrong wrong statistics.
Well it would not be reporting the wrong statistics really since the members don't usually see topics/posts within restricted areas anyway (ie. admin/moderator sections) - so it would be accurate in the way of only listing the top 10 etc. from those they can actually see and access. Which makes more sense to me, personally. If topics and posts are completely hidden from members for a certain reason decided on by administrators, then it should be the same for the statistic results as well - not teasing members with knowing there is something there but they can't see nor access (especially if its a popular enough topic to make it to the top rankings and yet they cant see/access it at any stage).

I think it would only cause problems in the long run :/

But as you said its your MOD, so at the end of the day its up to you of course in regards to what you do with it. I am sure it will turn out great regardless!
User avatar
TheUniqueTiger
Registered User
Posts: 303
Joined: Wed Sep 05, 2007 7:57 pm
Location: India

Re: [BETA] Forum Statistics

Post by TheUniqueTiger »

Ok ok... i made the 'Hidden' thing but I'm myself not satisfied with the output... And as you said its really teasing for the limited members... I tried limiting the forum with maximum posts and the result - the guest will see the most popular forum as hidden!!!

I'm changing this and implementing the way you suggested, although it'll be a little more load on the database queries.

I've made the install instruction for that line as an inline replace so that its a workaround... Saaiberke may have some other mods installed so thats not my lookout.
You have only One Life... So before you are History, make sure you make it to the History books! - TheUniqueTiger
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium

Re: [BETA] Forum Statistics

Post by saaiberke »

I managed to fix my problems. First I had to install the forum statistics module, via the admin control panel under the system tab. It wasn't shown by default.

Concerning the find command, it was my fault. I use Textpad to search the files, didn't see that regular expression was enabled in the search window. Stupid me. :oops:

So, finally it is working.

I also have the Users count by age ranges problem that it shows • 1990 - 100 for 51 users. Would it be possible that these are the bots and spiders info? I remember that I have about 51 of them on the board.

Further, I'm working on a Dutch translation. I will share it here for those interested when finished.

UniqueTiger: Mostly mods share their language files in the language/XX/mods dir, maybe it would be interesting to place the fs.php language file in the mods dir?

Anyway, this is a fantastic mod and I'm sure it will become very popular. :) Thank you UniqueTiger for your time and work in this.

Greetings,

Nic
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Forum Statistics

Post by RedTrinity »

TheUniqueTiger wrote:I tried limiting the forum with maximum posts and the result - the guest will see the most popular forum as hidden!!!
That is the problem we are having atm - our most popular forum for all #1 results is our "vault" where all old and expired topics go (due to the amount of content stored in it, its 2 years worth) but its only accessible to moderators and admin, who move some content in and out as they see fit.

So to all non-moderators and admin atm, the #1 forum and a lot of the topics as well are all for a section which is generally not accessible and hidden from members.

If the alternative option is taken then it will just replace the restricted entries with the commonly accessed ones - thus making a complete list and not causing any questions to be asked as to what is exactly "hidden" lol.

Look forward to the results - you are doing very well with this MOD!

Nikki :)

Return to “[3.0.x] Abandoned MODs”