UBB.Dev
Posted By: AllenAyres Sticky Threads - 12/08/2000 7:54 PM
I noticed we don't have a thread for this one, so I'm adding it...[Linked Image]

Dave has updated this one several times in the last month, so if you have it installed, it's a good idea to go over your code for bug-fixes.

click here

This mod allows your admin or moderator to temporarily or permanently "bump" a thread to the top of a forum.

------------------
Allen

- http://www.stand318.com
Posted By: MorphStar Re: Sticky Threads - 12/09/2000 11:53 AM
neat! the bump feature! I've been looking all over the place for this! thanks Allen

------------------
www.skinningworld.net
Posted By: Master Tom Re: Sticky Threads - 12/18/2000 9:06 PM
Same at my UBB !!!

All Done.....

And now i get an white page if i start my UBB.

And the same error in CP !!
Posted By: saehoon Re: Sticky Threads - 12/18/2000 9:29 PM
yeah, I've tried multiple times installing this hack and everytime I get an error. I'm trying to install it on 5.47a, any ideas what's wrong?

------------------
http://www.saehoon.com
Posted By: Polgas Re: Sticky Threads - 12/20/2000 10:58 PM
This mod has two minor problems:



    [*]When you bump a thread and you have the latest Reply By mod installed, the UBB main page will display the incorrect username. It will show the correct last reply timestamp but not the username.

    [*]If you go to the Control Panel/General Settings and let it save with the Update threads/timestamp checkbox selected, the Last Timestamp will be for the bumped thread which may not be the latest in the first place.


Btw, the Bump feature on this board seems to allow ANYONE to bump a thread. It must be a bug.

[Linked Image]


This message has been edited by Polgas on December 20, 2000 at 03:03 PM
Posted By: GoTorankusuKu Re: Sticky Threads - 12/21/2000 12:12 AM
Polgas - Everyone is able to bump temporarily not permanent. It's not a bug [Linked Image]

------------------
The Fusion of Goku & Trunks...GoTorankusuKu

Posted By: indoe Re: Sticky Threads - 12/24/2000 9:11 AM
I installed this once and it work now when I go to install this on a different board I keep getting a some err I will try to install and past the err so you guy can tell me how dumb I am ok

l8r
.
.
ps: dose this work whit all ver
Posted By: Hello World Re: Sticky Threads - 12/25/2000 9:52 PM
Hi,
I applied this hack to my UBB, though nothing is happening...I can top and de-top my threads but they stay the same as they would without this feature... i get - nothing....any ideas to what might be wrong?
Posted By: KBEEs Re: Sticky Threads - 12/27/2000 5:51 PM
Is it work at 5.47c too? i see this forum can be use this hack but i got error on it @@

the ubb_libery.pl got error in it ... after did this step
REPLACE that with:
---------------------------------------------------
if ($checkit[1] eq "$threadnum") {
if ($openclose eq "open") {
$checkit[6] =~ s/X//isg;
} else {
if ($itWasMoved eq 'yes') { $checkit[6] = "Y$checkit[6]";
} elsif ($openclose eq "close") {
$checkit[6] = "X$checkit[6]";
} elsif ($openclose eq "top") {
$length = $in{'length'};
if (($TimeZoneOffset ne "") || ($TimeZoneOffset ne "0")) {
$adjustTime = time() + ($TimeZoneOffset * 3600);
} else { $adjustTime = time(); }
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($adjustTime);
$year = $year +1900;
if ($length eq "perm") { $year = $year + 10; }
$mon++;
$JulianDate = &jday($mon, $mday, $year);
$Time = ("$hour" . "$min");
$JulianTime = ($JulianDate + ($Time * 0.0001));
$JulianTime = sprintf("%7.4f", $JulianTime);
$JulianTime =~ tr/ /0/;
$checkit[0] = $JulianTime;
} else {
$year = substr($checkit[5],0,4);
$mon = substr($checkit[5],4,2);
$mday = substr($checkit[5],6,2);
$hour = substr($checkit[5],8,2);
$min = substr($checkit[5],10,2);
$JulianDate = &jday($mon, $mday, $year);
$Time = ("$hour" . "$min");
$JulianTime = ($JulianDate + ($Time * 0.0001));
$JulianTime = sprintf("%7.4f", $JulianTime);
$JulianTime =~ tr/ /0/;
$checkit[0] = $JulianTime;
}

then error will be occcur. Is there any new fixed version? THX
Posted By: TyRaN Re: Sticky Threads - 12/28/2000 9:57 AM
replace with that:

if ($checkit[1] eq "$threadnum") {
if ($itWasMoved eq 'yes') {
$checkit[6] = "Y$checkit[6]";
} else {
$checkit[6] =~ s/Y//isg;
}
if ($openclose eq "open") {
$checkit[6] =~ s/X//isg;
} elsif ($openclose eq "close") {
$checkit[6] = "X$checkit[6]";
} elsif ($openclose eq "top") {
$length = $in{'length'};
if (($TimeZoneOffset ne "") || ($TimeZoneOffset ne "0")) {
$adjustTime = time() + ($TimeZoneOffset * 3600);
} else { $adjustTime = time(); }
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($adjustTime);
$year = $year +1900;
if ($length eq "perm") { $year = $year + 10; }
$mon++;
$JulianDate = &jday($mon, $mday, $year);
$Time = ("$hour" . "$min");
$JulianTime = ($JulianDate + ($Time * 0.0001));
$JulianTime = sprintf("%7.4f", $JulianTime);
$JulianTime =~ tr/ /0/;
$checkit[0] = $JulianTime;
} else {
$year = substr($checkit[5],0,4);
$mon = substr($checkit[5],4,2);
$mday = substr($checkit[5],6,2);
$hour = substr($checkit[5],8,2);
$min = substr($checkit[5],10,2);
$JulianDate = &jday($mon, $mday, $year);
$Time = ("$hour" . "$min");
$JulianTime = ($JulianDate + ($Time * 0.0001));
$JulianTime = sprintf("%7.4f", $JulianTime);
$JulianTime =~ tr/ /0/;
$checkit[0] = $JulianTime;
}
$newline = join("|^|", @checkit);
push(@theupdatedts, $newline);
} else {
push(@theupdatedts, $checkthis);
}
} # end foreach @threadsum


that's what somebody told... i think it was AllenAyres

------------------
TyRaN
Posted By: indoe Re: Sticky Threads - 12/31/2000 1:19 PM
i keep geting this err

Code
code:

------------------
Posted By: cRackY Re: Sticky Threads - 01/04/2001 12:42 PM
When I delete the first non bumped Thread in the Forum the Last Post Time in Ultimate.cgi isn't update anymore!
I don't have the Last Post by in Ultimate.cgi installed, just the normal Latest Post Time...

Please help me, i'm trying for weeks now and dont have an idea what to change [Linked Image]

Im using 5.47d since a few days, and now when i move a Thread to a forum with a bumped thread the latest time ist the time from the bumped thread [Linked Image]
With 5.45c there was this just the Problem with the delete first topic, this would maybe just be a problem in update the last time file but i dont have any idea how to do that.

greets, cRackY

--------------
NEED MONEY for Beer, Pot and Woman (Hey at least I'm not Bull****ting You!)

This message has been edited by cRackY on January 04, 2001 at 04:56 AM
Posted By: no1knows Re: Sticky Threads - 01/18/2001 8:05 PM
i've just attempted to install the hack, i went over the problem file twice and still get these errors when trying to update the threads:
syntax error at /usr40/home/no1knows/public_html/cgi-bin/ubb_library.pl line 1985, near "} else" syntax error at /usr40/home/no1knows/public_html/cgi-bin/ubb_library.pl line 2006, near "}"

Version 5.47d

------------------
Posted By: no1knows Re: Sticky Threads - 01/18/2001 8:18 PM
i assume there isnt a fix for it, as there are no replys from admins [Linked Image]
thx anyway guys
Posted By: AllenAyres Re: Sticky Threads - 01/18/2001 8:25 PM
There are a few bugs in this script, especially if you have "latest reply by in Ultimate.cgi". You forum will slow to a crawl if someone permanently bumps a thread, it happens here. I really would not recommend installing this until it is updated/ fixed. The last fix was supposed to help, but it doesn't seem to.

------------------
Allen

- http://www.stand318.com
Posted By: Adamski Re: Sticky Threads - 01/31/2001 7:52 PM
I have a problem with the instrucions for this script. It says find this:

Code
code:

but my file has

Code
code:

so i don't know if it will work.
I am using 5.47b

http://www.demo3w.com/_cgi/Ultimate.cgi

Thanks for any help.

Adam Osborne
Posted By: GoTorankusuKu Re: Sticky Threads - 02/01/2001 2:03 AM
That's the same thing if you didn't look closely. Just continue with that step.

------------------
Posted By: Adamski Re: Sticky Threads - 02/01/2001 1:29 PM
Thanks,

I wasn't too sure if it would make a difference as the lines were commented on my file. I'll give it a go... the worst that could happen is that I have to restore my files right?
Posted By: evafan Re: Sticky Threads - 03/04/2001 10:18 PM
Is there any news on this hack for 5.47d ?
Posted By: GoTorankusuKu Re: Sticky Threads - 03/04/2001 11:21 PM
It should work with 5.4x
Posted By: evafan Re: Sticky Threads - 03/07/2001 12:49 AM
ignore this--

[ March 06, 2001: Message edited by: evafan ]
Posted By: csn23 Re: Sticky Threads - 04/19/2001 11:08 AM
it shows me 500 Internal server error...

What's wrong w/ it?

thanks! smile
Posted By: Night Wolf Re: Sticky Threads - 07/15/2001 10:22 PM
Could someone please post a link to the latest version of this hack? the link in the firts post does not seem to work.

thank you,
Night Wolf
Posted By: fluffy Re: Sticky Threads - 01/01/2002 8:19 PM
Is this hack thats included in the database still full of bugs or have they been fixed?

BTW I do not have the last reply hack installed and I am using 5.47e
Posted By: Vipermad Re: Sticky Threads - 01/01/2002 9:42 PM
I have an updated file from Night Wolf I still have to get in the databasse...but I've uploaded it CLICK HERE for the time being.
Posted By: fluffy Re: Sticky Threads - 01/02/2002 3:05 AM
Is it now bug free and does it work for 5.47e?
Posted By: Vipermad Re: Sticky Threads - 01/02/2002 3:22 AM
I cannot say because I do not know. I don't run any 5.47 boards, and it was sent to me to upload as an update. Hack away...make back-ups..and let us know!!
Posted By: Lord Dexter Re: Sticky Threads - 01/02/2002 3:27 AM
What version have you tested it on Viper?
Posted By: Vipermad Re: Sticky Threads - 01/02/2002 5:21 AM
smile
Posted By: Lord Dexter Re: Sticky Threads - 01/02/2002 10:14 AM
Ok I'll wait. Tell me when you get it working successfully.
Posted By: Blue5.0 Re: Sticky Threads - 01/19/2002 2:18 PM
Hi there. I have this hack installed on my 5.47d and it works perfectly, even with the 'Last Post By' hack in ultimate.cgi. The bug fix for the 'Last Post By' works. The bumped thread does not show in 'Last Post By'; only the 'real' last post does.

I would just like to say, I have used a lot of hacks from this UBB, and sincerely thank all of the people here who make these hacks possible! They really do add a lot to the V5 boards.

Thanks!
Dave
Posted By: Dr_C Re: Sticky Threads - 01/23/2002 2:54 PM
I just installed this hack yesterday and it slowed my forum (with over 500,000 messages) down to a crawl. Deleting or moving threads became completely impossible. I had a look at their code and found some code that was a bit (without trying to belittle the efforts of the original coder) not-so-efficient programming.

In my case which so many messages, it took about 20 minutes to close/move/delete a thread, causing the browser to time out and the cgi-script to fail. I've made a few changes that brought this 20 minutes down to 0.6 seconds (yes, less than a second).

Since this is an old hack, and I'm not sure anyone is still using it, let me know if you're interested in the fix and I'll post it here.
Posted By: Vipermad Re: Sticky Threads - 01/23/2002 8:09 PM
Sure!!! Post it here. Prefer a link to a .txt file instead of putting all the code into a message.

That is what this place is all about...happy to see the variation myself!!!
Posted By: Dr_C Re: Sticky Threads - 01/23/2002 8:49 PM
I'll post it here since it's a small change. Change this in the files that already contain the changes for the Sticky Hacl.

In ubb_library.pl, sub ForumSummary:

Find:
-----------------
@threadsum = &OpenFile("$ForumsPath/$ExactPath/forum$thisnumber.threads");

Replace with:
-----------------
open( THREADS, "$ForumsPath/$ExactPath/forum$thisnumber.threads" );
while( ) {
$line = $_;
chomp( $line ); # not necessary, but always good practice.
@fields = split( /|^|/, $line );
$threadsum{$fields[1]} = $line;
}
close( THREADS );

Find:
-----------------
@tmpitemline = grep{/|^|$tmpthreadnum|^|/} @threadsum; #C
@tmpstats = split(/|^|/,$tmpitemline[0]);

Replace with:
-----------------
@tmpstats = split(/|^|/,$threadsum{$tmpthreadnum});


That's it! This will get rid of the incredible time-consuming "grep", not to mention "grep" will generate an error if a topic-title contains more than 3 question marks in a row.

The original loop with the grep took about 20 minutes going through 7000 threads. If you make the above change, it will take about 0.5s.

Enjoy the new and improved Sticky Threads!
Posted By: BassTeQ Re: Sticky Threads - 01/24/2002 6:45 AM
Thanks Dr_C, Ive got this hack on my board, and Ive noticied that on my larger forums, it can take a substantial amount of time to move/delete a post thread. Although I was unable to diagnose the cause of the problem myself. Im going to make the changes you suggested and hopefully it will remedy my problem also
Cheers
Posted By: CoCoT Re: Sticky Threads - 03/23/2002 4:56 AM
I have just installed this hack on my version 5.45c...when I make a thread "sticky" it deletes the thread! Whether I make it temporary or permanent...anyone have any ideas why?

T.........
Posted By: CoCoT Re: Sticky Threads - 03/23/2002 5:01 AM
Actually...it doesn't delete the thread, it just makes it invisible...

The only way I can see the thread is if I do a search for it. ???

Anyone know why?
Posted By: errol Re: Sticky Threads - 07/08/2002 3:15 PM
Hi ya folks,

I installed this but I only get a blank page after I click the link for TOP. frown

Any help would be appreciated.

Thanks,
Errol
Posted By: Lord Dexter Re: Sticky Threads - 07/09/2002 3:36 AM
Check your CHmodding of your files.
© UBB.Developers