Something that always bothered me was when you go to "Today's Active Topics", one of the columns was the date which was of course...TODAY! LOL. It didn't make much sense so I've made some modifications to take out that column and I've changed it to "Last Response By". I've also taken out the "Forum" column and instead made it a row with the respective topics underneath it. It now looks a TON better. http://www.baylorfans.com/cgi-bin/search.cgi?action=getdaily
Here are the instructions (my version is 5.46 but it will probably work with most of the 5.4* series). Make a backup before doing this of course!
treszoks, I just did a quick check of your board too and they are mostly all wrong too.
For example, in "Was Jesus a Sinner?", it says last posted by Bear1969, but it was really last posted by Phil320. Although Bear1969 does post in that thread.
Well, looked at it some more and realized that the bug is due to the fact that the last poster needs to be derived from the order of the entries in the daily log, but that is messed-up when the sort function is called to group the array entries by forum.
The following change corrects the last person bug, but doesn't necessarily group all the posts from the same forum together.
Well at least it's not a problem with my mod;) I'll have to take a look at it later and see if I can figure out a fix. Maybe you'll come up with something.
Well, I decided to take the easy road and just let the posts be in time-order instead of forum-grouped. (Which I did basically with the small hack shown above and some table formatting).
treszoks, I appreciate you jump starting me on this hack. Here's my version:
How can I add a column for total number of replies to a post and total views in the Active Topics list like Thermit has done? I do have the Views hack intalled already.
Those items aren't part of the normal index used for today's active topics so you'll have to ask Thermit for documentation. It will add more load to your server however because you'll have to open the file with the views in it plus another file to find out the number of replies.
This is a nice hack as I've never liked the Active Topics screen. I like this layout a lot better. Just one thing I'd like to change...
Right now the topics are listed within each message board from oldest to newest. I'd like to reverse the order so that the newest topic is at the top of the list instead of the bottom. What would I change in the code to accomplish this?
Also, another cool thing I'd really like to see is a simple total of the number of new posts for that day as well. Maybe at the top, just a simple line that reads... Total Posts Today: 168. Can this be done fairly easily??
Well everything looks okay from what you posted. I'm not for sure what the deal is. It may have something to do with your version but I don't know. I'm using 5.46 which really shouldn't be too much different from yours. Try changing "$total_posts = $#daily;" to "$total_posts = $#daily2;"
You might also look to see if the variable $total_posts is used anywhere else to make sure it isn't an already existing variable.
Lord Dexter,
Not a bad idea and would be easy to do. Find this: $LastPerson = "$goodline[2]";
Treszoks, it's working now! But, strangely, it works either way now whether I use $#daily or $#daily2 as the variable.
Because I first tested this just after midnight when there was only one message listed in the Daily Active Topics, I'm wondering if the $#daily variable needs a +1 added to make it truly accurate. For example, if there were two messages, maybe it would have indicated 1 instead of Zero as it was with only 1 message. Does this make sense?
Anyway, it seems to be working now, thank you VERY much for your fast feedback and assistance. I also added the link to the profiles that you told Lord Dexter how to do. I made a small change...
Is there a way to somehow store total posts for the previous day so you could show how many new messages there were yesterday, as well as the message count for the current day on the Today's Active Topics screen?
It seems to me cron wouldn't be necessary, because the UBB already has some function which deletes the old "daily index" read by Active Topics and starts a new one. If this true, then some extra code could probably be added to save yesterdays count before it gets removed.
You're right, I forgot that the daily index filename was changed everyday. Look in "ubb_library2.pl" for "sub cleandailies". That's the subroutine that deletes all old daily indexes. Just add in your own code there to store the info before it gets deleted.
This sounds like something I might be interested in doing after thinking about it...I'll try to cook something up.
You're right. I fixed that plus I added some date checking since it turns out the date placed is actually the next day. The code I put in will work most of the time except for special years when dealing with the number of days in February. It'd be more of a hassle to figure out the code for those few instances every few years so I'm just leaving it as is I've uploaded the fixes.