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! 