#43366
06/28/2001 7:12 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
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! Modified files: search.cgi only Find: Paste ABOVE: Find and REMOVE: Find: Paste ABOVE: Find: REPLACE with:
|
|
|
#43367
06/28/2001 8:48 PM
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
Hmm...I might try it but I don't really care about Todays active topics but, what the heck...I'll try it later. 
|
|
|
#43368
07/02/2001 5:09 PM
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
|
|
|
#43369
07/03/2001 12:58 AM
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
What do you mean by 25% right sometimes?
|
|
|
#43370
07/03/2001 1:45 PM
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
I can't see any pattern to it, but it is mostly wrong.
|
|
|
#43371
07/03/2001 2:04 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
I just did a quick check on my board and they all seem to be correct. Maybe it's another hack you have installed?
|
|
|
#43372
07/03/2001 2:38 PM
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
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.
This is exactly what I'm seeing too.
Driving me crazy cause I can't see the pattern...
|
|
|
#43373
07/03/2001 3:14 PM
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
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. [ July 03, 2001 03:16 PM: Message edited by: Thermit ]
|
|
|
#43374
07/03/2001 7:52 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
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.
|
|
|
#43375
07/03/2001 9:58 PM
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
Yeah, I checked too and It seems to be stuffed, Try looking around the code a bit in forumdisplay.cgi since thats where the last poster is installed.
|
|
|
#43376
07/05/2001 7:23 PM
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
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: Active Topics
|
|
|
#43377
07/05/2001 9:57 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
Try this fix out and let me know how it goes.
Find this: @daily = sort(@daily2);
And change to this: @daily = reverse(@daily2);
Now find this: $MatchTotal = @good;
And add right above it this: @good = sort(@good);
|
|
|
#43378
07/23/2001 9:31 PM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
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.
|
|
|
#43379
07/24/2001 10:20 AM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
kshock,
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.
|
|
|
#43380
07/24/2001 6:00 PM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
Thanks for the info on that. As my server is already taxed with traffic, it might be better to leave off the views and reply counts.
|
|
|
#43381
07/25/2001 1:38 PM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
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??
Thanks!
[ July 25, 2001 03:23 PM: Message edited by: kshock ]
|
|
|
#43382
07/25/2001 5:12 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
kshock,
Find this: @daily = reverse(@daily2);
Add below it: $total_posts = $#daily;
Now just put $total_posts further below where you'd like it to be displayed. For example, find $MatchTotal and place it near that.
|
|
|
#43383
07/25/2001 11:34 PM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
I got the display to work, but, it always says 0 messages wherever I use $total_posts, but, there are messages there.
|
|
|
#43384
07/25/2001 11:50 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
Where exactly are you placing it? Make sure you're doing it within the other plain HTML stuff.
|
|
|
#43385
07/26/2001 12:20 AM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
That's where I put it, right near the $MatchTotal variable within the HTML as you suggested.
|
|
|
#43386
07/26/2001 12:23 AM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
The only thing I can think of is make sure you put the "$total_posts = $#daily;" in the right spot. What version are you using?
|
|
|
#43387
07/26/2001 12:59 AM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
Here's how it looks in my code: Here's where the variable is used... But even with new messages, the total keeps coming up Zero. I'm using version 5.47a. [ July 26, 2001 01:00 AM: Message edited by: kshock ]
|
|
|
#43388
07/26/2001 2:13 AM
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
Just an Idea, Link the Last Reponse by member and link it to there profile. That might be a good idea. 
|
|
|
#43389
07/26/2001 10:18 AM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
kshock, 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]"; Add this below it: $goodline[2] =~ tr/ /+/; $LastPerson = " $LastPerson"; [ July 26, 2001 10:21 AM: Message edited by: treszoks ]
|
|
|
#43390
07/26/2001 2:29 PM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
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... $LastPerson = " $LastPerson"; I just added the target=_blank part so that it pops open a new window when viewing the profile. Thanks!
|
|
|
#43391
07/26/2001 5:27 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
Yep, I bet you are right!
Edit: Make that "$total_posts = $#daily + 1;"
Don't use the ++ in this instance because it increments the array itself as well.
[ July 27, 2001 12:20 AM: Message edited by: treszoks ]
|
|
|
#43392
07/28/2001 1:54 AM
|
Joined: Mar 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Mar 2001
Posts: 13 |
Had another idea...
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?
|
|
|
#43393
07/28/2001 10:00 AM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
Yes there is, but you would probably have to run a cron script once every night to save the info.
|
|
|
#43394
07/28/2001 2:01 PM
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
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.
|
|
|
#43395
07/28/2001 2:12 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
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.
|
|
|
#43396
07/28/2001 3:19 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
Okay, I wrote some stuff but I won't know if it works until it's a new day of course. I'll post tomorrow with the results!
|
|
|
#43397
07/28/2001 8:53 PM
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
Thats great, Hope the hack works out good for you. 
|
|
|
#43399
07/29/2001 7:54 PM
|
Joined: Oct 2000
Posts: 49
Member
|
Member
Joined: Oct 2000
Posts: 49 |
Good work dude. That's pretty cool. I think posts/topics are reversed in dailies.cgi chart. Thanks again.
|
|
|
#43400
07/29/2001 9:26 PM
|
Joined: Apr 2001
Posts: 57
Member
|
Member
Joined: Apr 2001
Posts: 57 |
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.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 808
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|