Previous Thread
Next Thread
Print Thread
Rate Thread
#125858 06/05/2001 4:13 PM
Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139
Why won't this hack work on 5.47 ???

################################################################
# EDIT SUBJECT HACK FOR UBB #
# Last Updated: 7/17/00 at 000 hours #
# Version 1.00 #
# #
# Created By: Jason Axelrod *Jaxel* ([email protected]) #
# http://bbs.upnetwork.com/ #
################################################################
# Changes Log: #
# #
# 07/17/00 - Finalized the script, found out what was wrong... #
################################################################

A working demo of this script can be seen here:
http://bbs.upnetwork.com/

This hack works perfectly in 5.45 at later versions.

##########################
Hacking in ubb_library2.pl
##########################

Find code:
----------------------------------------------
$DeleteOption = qq(Delete Topic);
----------------------------------------------

Add AFTER code above:
----------------------------------------------
$SubjectOption = qq(Edit Subject);
----------------------------------------------
Find code:
Near text "Administrative Options:"
----------------------------------------------
$ArchiveOption
----------------------------------------------

Add AFTER $ArchiveOption:
This is BEFORE $DeleteOption:
----------------------------------------------
$SubjectOption
----------------------------------------------


###################
Hacking in edit.cgi
###################

Find code:
----------------------------------------------
if ($in{'EditFunction'} eq "DoDeleteThread") {
&DoDeleteThread;
}
----------------------------------------------

Add AFTER code above:
----------------------------------------------
if ($in{'EditFunction'} eq "GetEditSubject") {
&GetEditSubject;
}
----------------------------------------------
Find subroutine "GetEditThreads", ends with:
----------------------------------------------
&BOTTOMHTML;
} ## END GetEditThreads sr
----------------------------------------------

Add AFTER subroutine "GetEditThreads":
This is BEFORE subroutine "AdminEditForum":
----------------------------------------------
###########################################################
# BEGIN EDIT SUBJECT HACK FOR UBB (v1.00) #
# Created By: Jason Axelrod *Jaxel* ([email protected]) #
# http://bbs.upnetwork.com/ #
###########################################################

sub GetEditSubject {
my ($topic,$junk) = split(/./,$in{topic});
&CheckBadChars($topic);
@thisforum = &GetForumRecord($number);

$TopicNumber = substr($in{'topic'}, 0, 6);
($junk, $number) = split(/orum/, $in{'forum'});

@message = &OpenThread($in{'topic'});
@stats = split(/||/, $message[0]);

$ThreadSubject = $stats[4];
chomp($ThreadSubject);
$ThreadSubject =~ s/"/"/g;

print<$Header



$BBName - Edit Subject Topic





E D I T T O P I C




Only forum leaders (Administrator, Moderator) may perform this function.













Edit the subject, re-enter your UserName & Password, and then click Submit button!
Topic Subject:
Your User Name
Your Password










$Footer
otherHTML

} ## End GetEditSubject Message
----------------------------------------------

Sponsored Links
#125859 06/05/2001 6:02 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
It works fine on my 5.47d board!
You need to click on the first post in the thread to be able to edit the topic.


I can't afford a good signature editor frown
#125860 06/06/2001 4:00 AM
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Works on my 5.45b too..:p

#125861 06/06/2001 11:11 AM
Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139
hmmmm....can one of you guys send me the code? I have tried adding this 3 times, and when I click the edit topic link I get a "no output from edit.cgi" error. :rolleyes:

I know I'm adding the hack correctly, it's obviously very simple, and I've installed around 45 hacks on board to date.

#125862 06/06/2001 2:57 PM
Joined: Nov 2000
Posts: 123
CT Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 123
No output from edit.cgi? That's a weird error...

Is this line still intact in edit.cgi:

Code
code:

(at the beginning of edit.cgi...)

Sponsored Links
#125863 06/06/2001 3:50 PM
Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139
Code
quote:</font><HR>Originally posted by CT:
No output from edit.cgi? That's a weird error...

Is this line still intact in edit.cgi:

<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, Arial">code:

(at the beginning of edit.cgi...)


Yes it is.

#125864 06/06/2001 5:56 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
There are a few different releases of this hack. I got mine from Arlo.net, the hack released by Dave


I can't afford a good signature editor frown


);
}
----------------------------------------------------

Next, find:
----------------------------------------------------
Delete? To delete this post, check this box.
$WarningWords

----------------------------------------------------

Right AFTER it, add:
----------------------------------------------------
$SubjectEdit
----------------------------------------------------

Save the file and you are done!

Enjoy!
#125865 06/07/2001 11:39 AM
Joined: Dec 2000
Posts: 139
Member
Member
Offline
Joined: Dec 2000
Posts: 139
Here is the one that works!:)##############################################################
# 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);
}
----------------------------------------------------

Next, find:
----------------------------------------------------
print <----------------------------------------------------

Right BEFORE that, add:
----------------------------------------------------
if ($in{'ReplyNum'} eq "000000") {
$SubjectEdit = qq(

Subject:


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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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
WebGuy 2
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)