Previous Thread
Next Thread
Print Thread
Rate Thread
#125679 05/22/2001 11:35 PM
Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139
The hack does not delete the previous "edited by" line, it just keeps adding more. It does add the number of times edited, but it's supposed to remove any existing "edited by" lines and then change the number to how many times it has been edited!


Total Edits hack by Dark Templar

##############################
#In postings.cgi, search for:
##############################

# append edit note to the message
$EditedMessage .= qq(

[This message has been edited by $UserName (edited $EditDate).]);
$EditedMessage= &PipeCleaner("$EditedMessage");

########################
#REPLACE with:
########################

# append edit note to the message
open(LOG, "<$CGIPath/edits/$ExactPath-$in{'ReplyNum'}-$topic");
$messageedited = ;
close(LOG);
open(LOG, ">$CGIPath/edits/$ExactPath-$in{'ReplyNum'}-$topic");
$messageedited = ++$messageedited;
print(LOG"$messageedited");
close(LOG);
if ($messageedited > 1) {
$EditedMessage .= qq(

[Edited $messageedited times, lastly by $UserName on $EditDate at $FormatTime] );
} else {
$EditedMessage .= qq(

[Edited $messageedited time by $UserName on $EditDate at $FormatTime] );
}


#######################
#In postings.cgi, find:
#######################

} else {
$EditDate = &DateFormat("$HyphenDate", "EuroExpanded");
}

#########################
#Add below that:
#########################

#format time
if ($TimeFormat eq "24HR") {
@timearray = split(/ /, $Time);
chomp($timearray[1]);
($gethour, $getmin) = split(/:/, $timearray[0]);
if ($timearray[1] eq "PM") {
if ($gethour < 12) {
$gethour = ($gethour + 12);
}
}
if ($AMpm eq "AM") {
if ($gethour == 12) {
$gethour = "0";
}
}
$gethour = sprintf ("%2d", $gethour);
$gethour =~tr/ /0/;
$getmin = sprintf ("%2d", $getmin);
$getmin =~tr/ /0/;
$FormatTime = "$gethour:$getmin";
} else {
$FormatTime = "$Time";
}


###############################
#In ubb_library.pl, search for:
###############################

sub EditUBBConvert {
my $EditThis = shift;


###################
#Add this below it:
###################

$EditThis =~ s/(nrn[Edited)(.*)( )//isg;


Upload both, CHMOD them to 755. Create a folder in your cgi folder called "edits" and CHMOD to 777

Sponsored Links
Joined: Jul 2000
Posts: 610
Member
Member
Offline
Joined: Jul 2000
Posts: 610
Search for latest hack by mastermind it sure does work

Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139
Quote
quote:

Found it, installed it, and it does not work! It does not delete the previous "edited by" lines, it just keeps adding more. confused

Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139

Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139
does anyone around here still help out with ubb 5.x ???

Sponsored Links
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Quote
quote:
People do but ubb6 has became more popular than ubb5 people don't hang around here as much as they used to when there wasn't a ubb6.

Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Sorry Double Post.

[ May 25, 2001 06:19 AM: Message edited by: Lord Dexter ]


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)