php forum
php mysql forum
php mysql smarty
 
Page 2 of 2 < 1 2
Topic Options
#43386 - 07/26/01 12:23 AM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
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?

Top
#43387 - 07/26/01 12:59 AM Re: Today's Active Topics Beautification Hack
kshock Offline
Junior Member

Registered: 03/06/01
Posts: 13
Loc: NYC
Here's how it looks in my code:

Code:
code:


Here's where the variable is used...

Code:
code:


But even with new messages, the total keeps coming up Zero. I'm using version 5.47a.

<FONT COLOR="#000000" SIZE="1">[ July 26, 2001 01:00 AM: Message edited by: kshock ]</font>

Top
#43388 - 07/26/01 02:13 AM Re: Today's Active Topics Beautification Hack
Lord Dexter Offline
Member

Registered: 05/25/01
Posts: 6503
Loc: Melbourne, Australia
Just an Idea, Link the Last Reponse by member and link it to there profile. That might be a good idea. smile

Top
#43389 - 07/26/01 10:18 AM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
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 = "<A HREF="$CGIURL/ubbmisc.cgi?action=getbio&UserName=$goodline[2]">$LastPerson</A>";

<FONT COLOR="#000000" SIZE="1">[ July 26, 2001 10:21 AM: Message edited by: treszoks ]</font>

Top
#43390 - 07/26/01 02:29 PM Re: Today's Active Topics Beautification Hack
kshock Offline
Junior Member

Registered: 03/06/01
Posts: 13
Loc: NYC
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 = "<A HREF="$CGIURL/ubbmisc.cgi?action=getbio&UserName=$goodline[2]" TARGET=_blank>$LastPerson</A>";

I just added the target=_blank part so that it pops open a new window when viewing the profile.

Thanks!

Top
#43391 - 07/26/01 05:27 PM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
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.

<FONT COLOR="#000000" SIZE="1">[ July 27, 2001 12:20 AM: Message edited by: treszoks ]</font>

Top
#43392 - 07/28/01 01:54 AM Re: Today's Active Topics Beautification Hack
kshock Offline
Junior Member

Registered: 03/06/01
Posts: 13
Loc: NYC
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?

Top
#43393 - 07/28/01 10:00 AM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
Yes there is, but you would probably have to run a cron script once every night to save the info.

Top
#43394 - 07/28/01 02:01 PM Re: Today's Active Topics Beautification Hack
Thermit Offline
Member

Registered: 10/09/00
Posts: 69
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.

Top
#43395 - 07/28/01 02:12 PM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
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.

Top
#43396 - 07/28/01 03:19 PM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
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!

Top
#43397 - 07/28/01 08:53 PM Re: Today's Active Topics Beautification Hack
Lord Dexter Offline
Member

Registered: 05/25/01
Posts: 6503
Loc: Melbourne, Australia
Thats great, Hope the hack works out good for you. smile

Top
#43398 - 07/29/01 01:45 PM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
Well my new script worked fine. I've made a new topic since it's a new hack. Thanks to kshock and Thermit for the ideas! Here's the link for instructions:
http://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=7&t=000606

Top
#43399 - 07/29/01 07:54 PM Re: Today's Active Topics Beautification Hack
Thermit Offline
Member

Registered: 10/09/00
Posts: 69
Good work dude. That's pretty cool.
I think posts/topics are reversed in dailies.cgi chart.
Thanks again.

Top
#43400 - 07/29/01 09:26 PM Re: Today's Active Topics Beautification Hack
treszoks Offline
Member

Registered: 04/29/01
Posts: 58
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 smile I've uploaded the fixes.

Top
Page 2 of 2 < 1 2


Who's Online
0 registered (), 29 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
How to hide sub forums from summary page
by Ruben Rocha
Today at 02:58 PM
Spell Check [beta]
by Bill B
Yesterday at 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
Yesterday at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Yesterday at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Yesterday at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks