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.