|
#54553
09/03/2002 2:14 PM
|
Joined: Jul 2002
Posts: 45
Member
|
Member
Joined: Jul 2002
Posts: 45 |
hi. i am using mrstormynight's advanced ubbcodebutton hack on 6.3 (the one meant for 6.2). it works fine except when i go to edit a post the ubbcodes turn into html.
how would i go about fixing this?
thanks!
|
|
|
#54554
09/03/2002 2:19 PM
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
Rehack ubb_lib_posting.cgi, sub reverse_ubb_code. 
|
|
|
#54555
09/04/2002 2:29 PM
|
Joined: Jul 2002
Posts: 45
Member
|
Member
Joined: Jul 2002
Posts: 45 |
quote: Originally posted by CTM: Rehack ubb_lib_posting.cgi, sub reverse_ubb_code. I'm sorry can you elaborate a tad? I am quite stupid. Do you think I put in the sub_reverse_ubb_code part incorrectly?
|
|
|
#54556
09/04/2002 3:42 PM
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
Maybe.  Search for "reverse_ubb_code" in ubb_lib_posting.cgi, and retry the instructions it gave you in the install text file for that file. In other words, redo this step: quote:
############################## ## in ubb_lib_posting.cgi ## ############################## ################## ## find ## ################## code: [qb]sub reverse_ubb_code {
# two parameters: # $_[0] : the text to convert # $_[1] : ubbcode [IMG] enabled? (ON/OFF)
my $match = 1;
# Kludge the second while($match != 0) { $match = 0;
# new URL $match++ if $_[0] =~ s/(<a href=")(http|https|ftp)(://)(S+)(" target="_blank">)(.+?)(</a>)/$2://$4/isg; # old URL $match++ if $_[0] =~ s/(<A HREF=")(http|https|ftp)(://)(S+)(" TARGET=_blank>)(.+?)(</A>)/$2://$4/isg;
$match++ if $_[0] =~ s/(<a href="mailto:)(S+)(">)(S+)(</a>)/[email]$2[/email]/isg;
$match++ if $_[0] =~ s/(<i>)(.+?)(</i>)/$2/isg; $match++ if $_[0] =~ s/(<b>)(.+?)(</b>)/$2/isg; $match++ if $_[0] =~ s/(<strong>)(.+?)(</strong>)/[qb]$2[/qb]/isg;
# new quote/code $match++ if $_[0] =~ s/(</font><blockquote><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_code}:</font><hr /><pre style="[^"]*?">)(.+?)(</pre><HR /></BLOCKQUOTE><font size="[^"]*?" face="[^"]*?">)/$2</pre></div></div>/isg;<br> $match++ if $_[0] =~ s/(</font><blockquote><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_quote}:</font><hr /><font size="[^"]*?" face="[^"]*?">)(.+?)(</font><hr /></blockquote><font size="[^"]*?" face="[^"]*?">)/<div class="ubbcode-block"><div class="ubbcode-header">Quote</div><div class="ubbcode-body">$2</div></div>/isg;<br> # old quote/code<br> $match++ if $_[0] =~ s/(<BLOCKQUOTE><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_code}:</font><HR><pre>?)(.+?)(</pre><HR></BLOCKQUOTE>)/<div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>$2</pre></div></div>/isg;<br> $match++ if $_[0] =~ s/(<BLOCKQUOTE><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_quote}:</font><HR>?)(.+?)(<HR></BLOCKQUOTE>)/<div class="ubbcode-block"><div class="ubbcode-header">Quote</div><div class="ubbcode-body">$2</div></div>/isg;<br><br> if ($_[1] ne "OFF") {<br> # New<br> $match++ if $_[0] =~ s/(<img src=")(S+)(" alt="" />)/[img]$2[/img]/isg;<br> # old<br> $match++ if $_[0] =~ s/(<img src=")(S+)(">)/[img]$2[/img]/isg;<br> }<br><br> # new lists<br> $match++ if $_[0] =~ s/(</font><ul type="square">)(.+?)(</ul><font size=".*?" face=".*?">)/<ul style="list-style-type:disc;"><li>$2</li></ul>/isg;<br> $match++ if $_[0] =~ s/(</font><ol type=")(A|1)(">)(.+?)(</ol><font size=".*?" face=".*?">)/[list=$2]$4<li>/isg;<br> # old lists<br> $match++ if $_[0] =~ s/(<UL TYPE="SQUARE">)(.+?)(</UL>)/<ul style="list-style-type:disc;">$2</ul></li><li>/isg;<br> $match++ if $_[0] =~ s/(<OL TYPE=")(A|1)(">)(.+?)(</OL>)/[list=$2]$4</li><li>/isg;<br> $match++ if $_[0] =~ s/(<ul type=square>)(.+?)(</ul>)/<ul style="list-style-type:disc;"><li>$2</li></ul></li><li>/isg;<br><br> # newer li<br> $match++ if $_[0] =~ s/(<li><font size=".*?" face=".*?">)(.+?)(</font></li>)/</li><li>$2/isg;<br> # new li<br> $match++ if $_[0] =~ s/(<li>)(.+?)(</li>)/</li><li>$2/isg;<br> # old li<br> $match++ if $_[0] =~ s/<LI>/</li><li>/isg;<br> } # end while<br><br> return ($_[0]);<br>} #end EditUBBConvert [/qb] ######################## ## and replace with ## ########################
sub reverse_ubb_code {<br><br> # two parameters:<br> # $_[0] : the text to convert<br> # $_[1] : ubbcode [IMG] enabled? (ON/OFF)<br><br> my $match = 1;<br><br> # Kludge the second<br> while($match != 0) {<br> $match = 0;<br><br> # new URL<br> $match++ if $_[0] =~ s/(<a href=")(http|https|ftp)(://)(S+)(" target="_blank">)(.+?)(</a>)/$2://$4/isg;<br> # old URL<br> $match++ if $_[0] =~ s/(<a href=")(http|https|ftp)(://)(S+)(" target=_blank>)(.+?)(</a>)/$2://$4/isg;<br><br> $match++ if $_[0] =~ s/(<a href="mailto:)(S+)(">)(S+)(</a>)/[email]$2[/email]/isg;<br><br> $match++ if $_[0] =~ s/(<i>)(.+?)(</i>)/<span style="font-style: italic">$2</span>/isg;<br> $match++ if $_[0] =~ s/(<b>)(.+?)(</b>)/<span style="font-weight: bold">$2</span>/isg;<br> $match++ if $_[0] =~ s/(<strong>)(.+?)(</strong>)/[qb]$2[/qb]/isg;<br><br> # new quote/code<br> $match++ if $_[0] =~ s/(</font><blockquote><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_code}:</font><hr /><pre style="[^"]*?">)(.+?)(</pre><HR /></BLOCKQUOTE><font size="[^"]*?" face="[^"]*?">)/<div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>$2</pre></div></div>/isg;<br> $match++ if $_[0] =~ s/(</font><blockquote><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_quote}:</font><hr /><font size="[^"]*?" face="[^"]*?">)(.+?)(</font><hr /></blockquote><font size="[^"]*?" face="[^"]*?">)/<div class="ubbcode-block"><div class="ubbcode-header">Quote</div><div class="ubbcode-body">$2</div></div>/isg;<br> # old quote/code<br> $match++ if $_[0] =~ s/(<BLOCKQUOTE><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_code}:</font><HR><pre>?)(.+?)(</pre><HR></BLOCKQUOTE>)/<div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>$2</pre></div></div>/isg;<br> $match++ if $_[0] =~ s/(<BLOCKQUOTE><font size="1" face="[^"]*?">$vars_wordlets{ubbcode_quote}:</font><HR>?)(.+?)(<HR></BLOCKQUOTE>)/<div class="ubbcode-block"><div class="ubbcode-header">Quote</div><div class="ubbcode-body">$2</div></div>/isg;<br><br> # new lists<br> $match++ if $_[0] =~ s/(</font><ul type="square">)(.+?)(</ul><font size=".*?" face=".*?">)/<ul style="list-style-type:disc;"><li>$2</li></ul></li><li>/isg;<br> $match++ if $_[0] =~ s/(</font><ol type=")(A|1)(">)(.+?)(</ol><font size=".*?" face=".*?">)/[list=$2]$4</li><li>/isg;<br> # old lists<br> $match++ if $_[0] =~ s/(<UL TYPE="SQUARE">)(.+?)(</UL>)/<ul style="list-style-type:disc;"><li>$2</li></ul></li><li>/isg;<br> $match++ if $_[0] =~ s/(<OL TYPE=")(A|1)(">)(.+?)(</OL>)/[list=$2]$4</li><li>/isg;<br> $match++ if $_[0] =~ s/(<ul type=square>)(.+?)(</ul>)/<ul style="list-style-type:disc;"><li>$2</li></ul></li><li>/isg;<br><br> # newer li<br> $match++ if $_[0] =~ s/(<li><font size=".*?" face=".*?">)(.+?)(</font></li>)/</li><li>$2/isg;<br> # new li<br> $match++ if $_[0] =~ s/(<li>)(.+?)(</li>)/</li><li>$2/isg;<br> # old li<br> $match++ if $_[0] =~ s/<LI>/</li><li>/isg;<br><br> $match++ if $_[0] =~ s/(<embed src=")(.+?)(">)(</embed>)/[embed]$2[/embed]/isg;<br> $match++ if $_[0] =~ s/(<font color=")(S+?)(">)(.+?)(</font c>)/[color:$2]$4[/color]/isg;<br> $match++ if $_[0] =~ s/(<center>)(.+?)(</center>)/[center]$2[/center]/isg;<br> $match++ if $_[0] =~ s/(<u>)(.+?)(</u>)/<span style="text-decoration: underline">$2</span>/isg;<br> $match++ if $_[0] =~ s/(<font face=")(.+?)(">)(.+?)(</font f>)/[font:$2]$4[/font]/isg;<br> $match++ if $_[0] =~ s/(<font size=")(S+?)(">)(.+?)(</font s>)/ $4 /isg;<br> $match++ if $_[0] =~ s/(<h1>)(.+?)(</h1>)/[h1]$2[/h1]/isg;<br> $match++ if $_[0] =~ s/(<h2>)(.+?)(</h2>)/[h2]$2[/h2]/isg;<br> $match++ if $_[0] =~ s/(<h3>)(.+?)(</h3>)/[h3]$2[/h3]/isg;<br> $match++ if $_[0] =~ s/(<table style="filter:fliph">)(.+?)(</table>)/[fliph]$2[/fliph]/isg;<br> $match++ if $_[0] =~ s/(<table style="filter:flipv">)(.+?)(</table>)/[flipv]$2[/flipv]/isg;<br> $match++ if $_[0] =~ s/(<table style="filter:invert">)(.+?)(</table>)/[invert]$2[/invert]/isg;<br> $match++ if $_[0] =~ s/(<table style="filter:xray">)(.+?)(</table>)/[xray]$2[/xray]/isg;<br> $match++ if $_[0] =~ s/(<table border="5" cellpadding="15" bordercolor=")(S+)("><tr><td>)(.+?)(</td></tr></table>)/[border=$2]$4[/border]/isg;<br> $match++ if $_[0] =~ s/(<marquee behavior="alternate">)(.+?)(</marquee>)/[marquee]$2[/marquee]/isg;<br> $match++ if $_[0] =~ s/(<hr color=")(S+?)(" />)/[hr=$2][/hr]/isg;<br> $match++ if $_[0] =~ s/(<font size=")(S+?)(" color=")(S+?)(">)(.+?)(</font sc>)/[szcolor=$2,$4]$6[/szcolor]/isg;<br> $match++ if $_[0] =~ s/(<font face=")(.+?)(" size=")(S+?)(" color=")(S+?)(">)(.+?)(</font fsc>)/[fsc=$2,$4,$6]$8[/fsc]/isg;<br><br> if ($_[1] ne "OFF") {<br> # New<br> $match++ if $_[0] =~ s/(<img src=")(S+)(" alt="" />)/[img]$2[/img]/isg;<br> # old<br> $match++ if $_[0] =~ s/(<img src=")(S+)(">)/[img]$2[/img]/isg;<br> }<br><br> } # end while<br><br> return ($_[0]);<br>} #end EditUBBConvert
Hope that makes things clearer for you. 
|
|
|
#54557
09/07/2002 9:39 PM
|
Joined: Jul 2002
Posts: 45
Member
|
Member
Joined: Jul 2002
Posts: 45 |
That didn't help. And it also happens when I go to edit my signature in my profile. Help 
|
|
|
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.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|