UBB.Dev
Posted By: MTO So what other comment were you replying to? - 01/08/2001 3:08 AM
How many times has it happened to you that when replying to someones post, and get to the preview area you decide to continue editing the post but realize that you no longer have the text you are replying to available to read and comment? You have to either have great memory in your brain or hit the browsers back button.
It often happens to me -I always hit the browsers back button making the preview-edit screen almost useless.

Do we want the post being replied to to follow us as we preview-edit?

Mateo Byler
CruceDeCaminos.com
In reply to:

Do we want the post being replied to to follow us as we preview-edit?


Ah, yes, that would be quite desirable.

Posted By: poil Re: So what other comment were you replying to? - 01/08/2001 6:20 AM
i agree, it is a good idea, i do do that quite a bit of times.

[:red]--------------
http://extremeforums.org/index
Been there, done that []/w3timages/icons/wink.gif[/]... and I mean, I just hacked it to be that way. Feel free to visit my Test board and give it a spin. Since my addpost.pl has been so much hacked by now, [:red]I have no idea if my hack would work for anyone else, but if anyone wants to try it out, here it is:

in preview.pl below
# ----------------
# Assign the stuff
my ($ResUsername,$Main,$Subject,$Body,$Approved,$Icon) = $sth ->fetchrow_array;

add this:

# ----------------------------------------------------------------------
# Copy everything to forward to preview screen (hack by Gerrit 01-08-01)
my $FormSubject = w3t::url_encode($Subject);
my $FormBody = w3t::url_encode($Body);

and below

  <input type=hidden name=vc value="$vc">

add this:

  <input type=hidden name=ResBody value="$FormBody">
<input type=hidden name=ResSubject value="$FormSubject">
<input type=hidden name=ResUsername value="$ResUsername">

and in addpost.pl below

  my $vc        = $FORM{'vc'};

add this:

  my $ResBody   = $FORM{'ResBody'};
my $ResSubject = $FORM{'ResSubject'};
my $ResUsername = $FORM{'ResUsername'};
my $FormResSubject = w3t::url_encode($ResSubject);
my $FormResBody = w3t::url_encode($ResBody);
my $FormResUsername = w3t::url_encode($ResUsername);

and below

    <input type=hidden name=part value="$part">

add this:

    <input type=hidden name=ResBody value="$FormResBody">
<input type=hidden name=ResSubject value="$FormResSubject">
<input type=hidden name=ResUsername value="$FormResUsername">

and right before

   $sth -> finish;
w3t::send_footer;
w3t::exit();
}

# ---------------------------------------------------------
# Now everything below here is for actually adding the post

add this:

   if ($ResSubject) {
$ResSubject =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
$ResBody =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
print "<p> </p>";
w3t::table_header("$lang{'IN_RESPONSE'}: ");
w3t::open_table();
print "<tr bgcolor="$theme{'tddark'}"><td>";
print "<b>$lang{'POSTER_TEXT'}: $ResUsername<b r>";
print "$lang{'SUBJECT_TEXT'}: $ResSubject</b>";
$Body =~s/"/"/g;
print "</td></tr><tr bgcolor="$theme{'tdlight'}"><td>";
print "<b r>$ResBody";
w3t::close_table();
}

(remove the space in the two occurances of <b r>)

Good luck and enjoy... at least when Scream adds this little bit to the release version, I'm sure he can work it in (if my code is incompatible) if there are enough requests for this feature.

Posted By: Eileen Re: So what other comment were you replying to? - 01/08/2001 12:56 PM
Brilliant answer to a maiden's prayer, Gerrit. []/w3timages/icons/smile.gif[/]
Am I going to have to reverse engineer it to work with 5.0.9?

[]http://www.amdragon.com/images/eileensig.gif[/]
Well, this is just exactly what I have... in my 5.0.9.X []/w3timages/icons/wink.gif[/] so it just might work for you... just back up your files and try it out... that's all I can say... I have not tested it on any higher version... since I'm still on a highly modified 5.0.9.... []/w3timages/icons/crazy.gif[/]

Yes!!!!!!! That's what I was hoping. []/w3timages/icons/smile.gif[/]

[]http://www.amdragon.com/images/eileensig.gif[/]
Posted By: MTO Re: So what other comment were you replying to? - 01/08/2001 8:28 PM
Now that we agree this would be cool -at least so far... Do we need to move this to the feature request board? Or do we not want it in the main distribution? (I do).

Mateo Byler
CruceDeCaminos.com
Posted By: Eileen Re: So what other comment were you replying to? - 01/08/2001 11:10 PM
Yes, put a message on the Requests board with a link back to this thread.

[]http://www.amdragon.com/images/eileensig.gif[/]
© UBB.Developers