Warning: The author of this contribution does not provide support for it anymore.

Former Account Stats

formeraccountstats_00.jpg
1.0.2 phpBB 3.0.12
Released:
Wed Dec 04, 2013 11:05 pm
File size:
184.23 KiB
Validated for:
phpBB 3.0.12
MD5 checksum:
1ba541106128b19f0c0a0dd0689869b6
Install Time
About 15 Minute(s)
Install Level
Easy
Description
Sometimes registered members leave your board. Sometimes they also come back. With this MOD you can return to your users their original register date and post count, especially when you want to show your newer members that there was life even before they joined the jolly group of yours.

Why would you want to do such a thing? The MOD was born for a situation where an old board was moved from a free forum host to a self-hosted one. The software was different, and anyway there was no possibility to take a database copy with the board, so the only way to do the work was to re-create a board. Forums were the same, but there was no messages, of course, and all members had to re-register to the new board. So all the old members looked like new. That didn't feel quite right, as some of them had been members for years and had written tons of messages, so I thought there had to be a way to somehow separate them from the newer registered members (some of the new ones actually registered to the new board before the old board ones found their way there, which made the whole thing even more confusing) and because I didn't find any other solution for that, I wrote the MOD. And as a silly creature that I am, I thought I might share it as well.

Moving from one forum software to another without a database copy but with need to take the stats with you isn't maybe the most common problem in the world, but the board change isn't necessary when using this MOD. Sometimes, when user account is removed, user comes back and wants to be a member again. Even though the messages (if they are not removed, of course) can be returned to account with STK, the registration date can not. Being two weeks without account doesn't actually change the fact that user was member for two years before being deleted because (s)he was sick when you checked active members, though. Returning the original registration date is, at least in my opinion, quite a reasonable thing to do in situations like that. Returning the post count, on the other hand, is needed only if posts were deleted also, when account was deleted.

So there. What does this MOD actually do?

First, it changes the way phpBB sorts users by rank. The default way is, in my opinion, quite weird, as sorting doesn't have effect in ranks given by post count. This, as I already said (wrote), is the first thing changed: non-special ranks are sorted same way that post count is sorted. Users are also sorted by user_id instead of registration date, if no sorting is selected (that's because I didn't want to change the default order of memberlist if registration dates are changed, more about that later). If you don't want these changes, but still want to use the MOD, you can follow the instructions given in comments of edits for memberlist.php. That has to be done manually, though, as I didn't see a real reason to put edits in separate xml file that could be installed with AutoMOD... the edits are quite minimal, anyway. Sorting was actually a side effect and not a real purpose of the MOD, but as it is the only part that shows to normal user if nothing is really set up, I thought it was important to mention first.

Secondly the main part, stats and settings. Original registration date and former account post count can be set in user overview in ACP, where you can see fields for that after installation (see DIY instructions for more info on that). Anyone who has permissions to administrate users can set these values as well, there is no way to set it founder only or something like that (of course unless you have only founders authorized to administrate users). If original registration date is set, it is used in viewtopic and memberlist instead of current account ones. If former account post count is used, it is added to current account post count in viewtopic and memberlist. If, for example, you have a member called "Josef K" who has written 10 posts on current account, and you put 1537 posts as his former post count, miniprofile in viewtopic shows 1547 posts as his post count (but of course, if you search his messages via search, you can't find that many). In memberlist these values have effect in sorting, too, so changing registration date actually sorts the user as older member of the board. While viewing a profile statistics are more accurate, so there is couple of new settings in Board features of ACP so you can choose how you want to show these stats. By default they are shown separately ("Joined" = original registration date if available, additionally "Current account created"; "Total posts" = former account posts + current account posts, additionally "former account posts" & "current account posts") but you can choose to show only one value for both, if you want ("Joined" = original registration date if available, "Total posts" = current account posts + former account posts). You may also choose if you want to show them as former account stats (which, I guess, is the way most of people want it) or former board stats (which is the way I need it - that's the reason I made the whole MOD, after all) but that has effect only if you show post counts separately, as it simply chooses the text line when showing separate post counts.
formeraccountstats_01.jpg formeraccountstats_02.jpg formeraccountstats_03.jpg formeraccountstats_04.jpg formeraccountstats_05.jpg formeraccountstats_06.jpg
  • Revisions
    Version
    phpBB Version(s)
  • 1.0.2
    3.0.12
    Validation time: Dec 04, 2013 11:05 pm
    Install Time: About 15 Minute(s)
    Install Level: Easy
    Downloads: 1161
  • 1.0.1
    3.0.11
    Validation time: Mar 12, 2013 9:28 am
    Install Time: About 15 Minute(s)
    Install Level: Easy
    Downloads: 1609