People need to do a SEARCH before asking for a hack!!!
############################################################## # Edit Topic Subject # Created By: Dave Downin ([email protected]) # http://www.arlo.net # # Last Updated: 07/04/00 ##############################################################
What does it do? * Allows the original poster, forum administrator or moderator to change the subject of a message (by editing the first/original message of a topic). Tested on: * This hack was created for UBB 5.45x Make Backups of: * postings.cgi
Install Instructions:
Open up postings.cgi and find: ---------------------------------------------------- if ($Name eq "TopicSubject") { $TopicSubject = $Value; $TopicSubject =~ s/<.+?>//g; $TopicSubject = &UNHTMLIFY($TopicSubject); } ----------------------------------------------------
Right AFTER it, add: ---------------------------------------------------- if ($Name eq "NewTopicSubject") { $NewTopicSubject = $Value; $NewTopicSubject =~ s/<.+?>//g; $NewTopicSubject = &UNHTMLIFY($NewTopicSubject); } ----------------------------------------------------
Next, find: ---------------------------------------------------- &Lock("lock.file"); open (POST, ">$ForumsPath/$ExactPath/$topic"); foreach $thisone(@revised) { chomp($thisone); print POST ("$thisonen"); } close(POST); &Unlock("lock.file"); ----------------------------------------------------
REPLACE that with: ---------------------------------------------------- if ($NewTopicSubject ne $TopicSubject && $NewTopicSubject && $in{'ReplyNum'} eq "000000") { $NewTopicSubject = &CensorCheck("$NewTopicSubject"); @stats = split(/||/,$revised[0]); $stats[4] = $NewTopicSubject; $revised[0] = "$stats[0]||$stats[1]||$stats[2]||$stats[3]||$stats[4]||$stats[5]||$stats[6]||$stats[7]"; }
&Lock("lock.file"); open (POST, ">$ForumsPath/$ExactPath/$topic"); foreach $thisone(@revised) { chomp($thisone); print POST ("$thisonen"); } close(POST); &Unlock("lock.file");
if ($NewTopicSubject ne $TopicSubject && $NewTopicSubject && $in{'ReplyNum'} eq "000000") { &UpdateForumSummary($number, $topic); } ----------------------------------------------------
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.