Page Index Toggle Pages: [1] 2 3 ... 7 Send TopicPrint
Very Hot Topic (More than 25 Replies) Enable HTML v1.4 (Read 32163 times)
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Enable HTML v1.4
May 10th, 2003 at 4:19pm
Print Post  
#enable_html
<table align="center" width="95%" cellspacing="0" cellpadding="0" border="0"><tr height="35"><td width="13" width="13"><img src="../box1a.gif" width="13" height="35" border="0"></td><td valign="top" background="../box1b.gif"><table align="left" cellspacing="0" cellpadding="0" border="0"><tr><td valign="bottom" width="100%" height="21"><font face="tahoma" color="#00007F" size="2"><nobr><img src="http://boardmod.yabbforum.com/yabb/YaBBImages/wink.gif" alt=""> <b>Enable HTML</b><font size="1"> :: 10/05/03 18:30 :: Michael Prager</font></nobr></font></td></tr></table></td><td width="14"><img src="../box1c.gif" width="14" height="35" border="0"></td></tr><tr><td background="../box2a.gif"> </td><td bgcolor="#96652B"><font face="Arial" color="#FFFFFF" size="2">
<center><b><font size="4"><a href="http://www.boardmod.org/mods.php?searchfor=enable_html_v14a.zip">Enable HTML v1.4a</a></font></b></center>

<b>Description:</b>
This mod allows you to define certain grounds and users which are allowed to use HTML in their posts.
To set the permission, goto Admin Center -> "Forum Preferences and Settings" and set the group- and/or userlist.
Please concern that allowing HTML is a serious security risk! Only allow to reliable persons.

This mod is compatible with SP1.1, SP1.2, SP1.3, SP1.3.1, SP1.3.2 and SP1.4

In this mod, HTML is disabled per default. When someone has permission to use HTML, he will have an additional checkbox when posting messages where he can enable HTML.
Note that when HTML is enabled in a post, UBBC will be disabled for it to prevent conflicts (for example with auto-url).

<b>Version history:</b>
v1.4a:
- made compatible with SP1.3.2 and SP1.4
v1.4:
- linebreaks in text input box are no longer shown as <br> in message display
- fixed autourl beeing applied although UBBC has been disabled
- compatible with SP1.2 and SP1.3.x
v1.3:
- added checkbox in post form, so you no longer have to add # enable_html yourself
- added html support for IMs
- added missing html support user's recent posts
- fixed html support in recent posts
v1.2:
- added html to recent posts, user's recent posts, search, printpage and topic summary
v1.1:
- fixed security issue. When someone modifies a post which contains HTML then the user must have HTML access too or HTML will be disabled on that post.
- fixed HTML in post preview
</font></td><td background="../box2c.gif"> </td></tr><tr><td background="../box3a.gif"><img src="../box3a.gif" width="13" height="14" border="0"></td><td background="../box3b.gif"><img src="../box3b.gif" width="9" height="14" border="0"></td><td background="../box3c.gif"><img src="../box3c.gif" width="14" height="14" border="0"></td></tr></table>

Here is a little screenshot of the checkbox:
<img src="http://boardmod.yabbforum.com/stuff/enable_html.gif">
« Last Edit: Dec 19th, 2004 at 12:06am by Administrator »  

enable_html_v14.zip (Attachment deleted)

The Administrator.
Back to top
WWW  
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Enable HTML v1.4
Reply #1 - May 10th, 2003 at 4:43pm
Print Post  
hmm...I have to install this now Smiley
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Jake
God Member
*****
Offline



Posts: 1265
Location: asia
Joined: Jun 22nd, 2002
Gender: Male
Re: Enable HTML v1.4
Reply #2 - May 10th, 2003 at 5:03pm
Print Post  
have any update mod from1.3 Grin
Thanks
  

   
Back to top
 
IP Logged
 
davepoobond
Full Member
***
Offline


go to squackle

Posts: 112
Location: Squackle! Land
Joined: Dec 25th, 2002
Gender: Male
Re: Enable HTML v1.4
Reply #3 - May 15th, 2003 at 11:07pm
Print Post  
there were 2 errors....and it was for the Instand Message source.

I have AIMB, so i'm guessing this isn't compatible with AIMB?

will it matter whether or not the instant message is able to have html?

meaning, if i took out the code from the mod to edit the Instant Message.pl will that be ok
  
Back to top
WWWAIM  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Enable HTML v1.4
Reply #4 - May 17th, 2003 at 1:07pm
Print Post  
Yes you can simply leave out the code for IMs to prevent conflicts with mods changing the IM system. HTML will then not be available in IMs though.
  

The Administrator.
Back to top
WWW  
IP Logged
 
delrick
Senior Member
****
Offline


Write more...talk less

Posts: 362
Location: Fort Smith
Joined: Nov 28th, 2002
Gender: Male
Re: Enable HTML v1.4
Reply #5 - May 26th, 2003 at 6:08pm
Print Post  
in step 23 it calls to replace three lines but in my search.pl I believe it has been modified by avanced search.mod This is what I have
Code
Select All
		&wrap;
		# Highlight search strings in Message
		if( $autolinkurls ) {
			$message =~ s~([^\w\"\=\[\]]|[\n\b]|\A)\\*(\w+://[\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1\[url=$2\]$2\[\/url\]~isg;
			$message =~ s~([^\"\=\[\]/\:\.(\://\w+)]|[\n\b]|\A)\\*(www\.[^\.][\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1\[url=$2\]$2\[\/url\]~isg;
		}
		$message =~ s~\[(url|link|email)\](.*?)\[/\1\]~\[$1=$2\]$2\[/$1\]~ig;
		$message =~ s~\[(news|gopher|ftp|flash|img)(.*?)\](.*?)\[/\1\]~\[$1$2 tmp=$3\](.*?)\[/$1\]~ig;
		foreach $tmp ( @search ) {
			if($searchtype == 4) { $message =~ s~(\Q$tmp\E)~\[highlight size=$searchcolor{'sizem'} color=$searchcolor{'colorm'} background=$searchcolor{'highlightm'}\]$1\[/highlight\]~ig; }
			else { $message =~ s~(^|\W|_)(\Q$tmp\E)(?=$|\W|_)~$1\[highlight size=$searchcolor{'sizem'} color=$searchcolor{'colorm'} background=$searchcolor{'highlightm'}\]$2\[/highlight\]$3~ig; }
		}
		$tmp=1;
		while($tmp) {
			$message =~ s~\[([^\]]*?)\[/?highlight(.*?)\]~\[$1~ig;			if ($message !~ m~\[([^\]]*?)\[/?highlight(.*?)\]~i) { $tmp=0; }
		}
		$message =~ s~\[(news|gopher|ftp|flash|img)(.*?) tmp=(.*?)\](.*?)\[/\1\]~\[$1$2\]$3\[/$1\]~ig;
		if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
		&wrap2; 



Any way around this?
  

Delrick Gist
Writer's Block

WRITERSBLOCK.COM
Back to top
IP Logged
 
Jake
God Member
*****
Offline



Posts: 1265
Location: asia
Joined: Jun 22nd, 2002
Gender: Male
Re: Enable HTML v1.4
Reply #6 - May 26th, 2003 at 7:14pm
Print Post  
The final code after installing this mod should be something like this
Code
Select All
# Highlight search strings in Subject heading
  foreach $tmp ( @search ) {
   if( $searchtype == 4 ) {$msub =~ s~(\Q$tmp\E)~<font size="$searchcolor{'sizeh'}" color="$searchcolor{'colorh'}" class="highlight" style="background-color:$searchcolor{'highlighth'};"></b>$1</b></font>~ig;}
   else {$msub =~ s~(^|\W|_)(\Q$tmp\E)(?=$|\W|_)~$1<font size="$searchcolor{'sizeh'}" color="$searchcolor{'colorh'}" class="highlight" style="background-color:$searchcolor{'highlighth'};"></b>$2</b></font>$3~ig;}
  }

  &wrap;
  ### Begin HTML MOD
  $html_username = $musername;
  if ($message =~ /\#enable_html/isg) {
   $lastmoduser =~ s~\n~~g;
   if ($lastmoduser ne $html_username && $lastmoduser ne '') {
   $html_username = $lastmoduser;
   }
   $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
   $enable_html = HTML_allow($html_username);
   $message = $message_backup;
   if ($enable_html == 1) {
   $message =~ s/\#enable_html//isg;
    &FromHTML($message);
   }
  } else { $enable_html = 0; }
  if($enable_ubbc && $enable_html == 0) {
   # Highlight search strings in Message
   if( $autolinkurls ) {
    $message =~ s~([^\w\"\=\[\]]|[\n\b]|\A)\\*(\w+://[\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1\[url=$2\]$2\[\/url\]~isg;
    $message =~ s~([^\"\=\[\]/\:\.(\://\w+)]|[\n\b]|\A)\\*(www\.[^\.][\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1\[url=$2\]$2\[\/url\]~isg;
   }
   $message =~ s~\[(url|link|email)\](.*?)\[/\1\]~\[$1=$2\]$2\[/$1\]~ig;
   $message =~ s~\[(news|gopher|ftp|flash|img)(.*?)\](.*?)\[/\1\]~\[$1$2 tmp=$3\](.*?)\[/$1\]~ig;
   foreach $tmp ( @search ) {
    if($searchtype == 4) { $message =~ s~(\Q$tmp\E)~\[highlight size=$searchcolor{'sizem'} color=$searchcolor{'colorm'} background=$searchcolor{'highlightm'}\]$1\[/highlight\]~ig; }
    else { $message =~ s~(^|\W|_)(\Q$tmp\E)(?=$|\W|_)~$1\[highlight size=$searchcolor{'sizem'} color=$searchcolor{'colorm'} background=$searchcolor{'highlightm'}\]$2\[/highlight\]$3~ig; }
   }
   $tmp=1;
   while($tmp) {
    $message =~ s~\[([^\]]*?)\[/?highlight(.*?)\]~\[$1~ig;   if ($message !~ m~\[([^\]]*?)\[/?highlight(.*?)\]~i) { $tmp=0; }
   }
   $message =~ s~\[(news|gopher|ftp|flash|img)(.*?) tmp=(.*?)\](.*?)\[/\1\]~\[$1$2\]$3\[/$1\]~ig;

   $ns = $mns;
   if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; }
   &DoUBBC;
   }
  ### End HTML MOD
  &wrap2;   

  

   
Back to top
 
IP Logged
 
Javvy
Full Member
***
Offline


YaBB ROCKS!!

Posts: 207
Location: Jacksonville
Joined: Oct 7th, 2002
Gender: Male
Re: Enable HTML v1.4
Reply #7 - May 27th, 2003 at 2:00am
Print Post  
If you:
1. Remove the mods for InstantMessage.pl

2. Change the following step in Profile.pl to add part of the Media Player Mod -
Code
Select All
<search for>
            &wrap;
            $displayname = $mname;
### Media Player mod
            $mediausername = $mname;
### Media Player mod end
            if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
            &wrap2;
</search for>

<replace>
            ### Begin Enable HTML Mod
            $html_username = $musername;
            if ($message =~ /\#enable_html/isg) {
                  $lastmoduser =~ s~\n~~g;
                  if ($lastmoduser ne $html_username && $lastmoduser ne '') {
                        $html_username = $lastmoduser;
                  }
                  $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                  $enable_html = HTML_allow($html_username);
                  $message = $message_backup;
                  if ($enable_html == 1) {
                        $message =~ s/\#enable_html//isg;
                        $message =~ s/<br>/\n/ig;
                        &FromHTML($message);
                  }
            } else { $enable_html = 0; }

            if ($enable_html != 1) {
                  &wrap;
                  $displayname = $mname;
### Media Player mod
            $mediausername = $mname;
### Media Player mod end
                  if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                  &wrap2;
            }
            ### End Enable HTML Mod
</replace> 



and this mod will work with Media Player mod but you will not be able to use HTML in IM's (no big deal).


  
Back to top
WWW  
IP Logged
 
krysia322
Junior Member
**
Offline


"It's Good to be The King"
- Mel Brooks

Posts: 85
Location: Miles City
Joined: Jul 10th, 2002
Gender: Female
Re: Enable HTML v1.4
Reply #8 - Jun 2nd, 2003 at 4:10pm
Print Post  
THANK YOU! THANK YOU! THANK YOU!

I've been in the process of moving story chapters from HTML pages to board posts... Some of these stories have well over 50 chapters. You have no idea how much work you've saved me... Now I can simply copy/paste from the HTML page for each chapter rather than having to add in the BBC coding by hand.

I love you for this, Michael. Seriously. I could kiss you. In fact... I will. MMMMMMMWAH!  Kiss

Thank you so much!  Cheesy
  

Dream BIG!
MAC User = 100% by hand modding

STORM CLOUD
Back to top
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Enable HTML v1.4
Reply #9 - Jun 2nd, 2003 at 11:22pm
Print Post  
:blush:
  

The Administrator.
Back to top
WWW  
IP Logged
 
krysia322
Junior Member
**
Offline


"It's Good to be The King"
- Mel Brooks

Posts: 85
Location: Miles City
Joined: Jul 10th, 2002
Gender: Female
Re: Enable HTML v1.4
Reply #10 - Jun 3rd, 2003 at 1:29am
Print Post  
Cheesy
Unfortunately, my love for you has not kept me immune from snags, LOL!
I've run into technical difficulty with the coding of the InstantMessage.pl source. It seems my InstantMessage source file has only one occurance of:
Quote:
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;


Your mod requires (seems to, at least) 3 of those. I do have Advanced IM Box installed; could that be the problem?
please no, please no, please no! lol
  

Dream BIG!
MAC User = 100% by hand modding

STORM CLOUD
Back to top
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Enable HTML v1.4
Reply #11 - Jun 3rd, 2003 at 1:31am
Print Post  
The Advanced IM Box does change a lot of code so its not compatible with this mod. But you can simply remove all steps concerning InstantMessage.pl. It won't break anything, you'll not be able to use HTML in IMs however.
  

The Administrator.
Back to top
WWW  
IP Logged
 
Michael Griffin
God Member
*****
Offline


Black Panther's are cool!!!

Posts: 1337
Location: Crossville
Joined: Mar 30th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #12 - Jun 3rd, 2003 at 2:26am
Print Post  
Code
Select All
&wrap;
  if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
  &wrap2; 



I got an error on step 23 (search string cant be found) I got all this inbetween the &wrap; and &wrap2; code...

Code
Select All
		&wrap;
		# Highlight search strings in Message
		if( $autolinkurls ) {
			$message =~ s~([^\w\"\=\[\]]|[\n\b]|\A)\\*(\w+://[\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1\[url=$2\]$2\[\/url\]~isg;
			$message =~ s~([^\"\=\[\]/\:\.(\://\w+)]|[\n\b]|\A)\\*(www\.[^\.][\w\~\.\;\:\,\$\-\+\!\*\?/\=\&\@\#\%]+\.[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%]+[\w\~\;\:\$\-\+\!\*\?/\=\&\@\#\%])~$1\[url=$2\]$2\[\/url\]~isg;
		}
		$message =~ s~\[(url|link|email)\](.*?)\[/\1\]~\[$1=$2\]$2\[/$1\]~ig;
		$message =~ s~\[(news|gopher|ftp|flash|img)(.*?)\](.*?)\[/\1\]~\[$1$2 tmp=$3\](.*?)\[/$1\]~ig;
		foreach $tmp ( @search ) {
			if($searchtype == 4) { $message =~ s~(\Q$tmp\E)~\[highlight size=$searchcolor{'sizem'} color=$searchcolor{'colorm'} background=$searchcolor{'highlightm'}\]$1\[/highlight\]~ig; }
			else { $message =~ s~(^|\W|_)(\Q$tmp\E)(?=$|\W|_)~$1\[highlight size=$searchcolor{'sizem'} color=$searchcolor{'colorm'} background=$searchcolor{'highlightm'}\]$2\[/highlight\]$3~ig; }
		}
		$tmp=1;
		while($tmp) {
			$message =~ s~\[([^\]]*?)\[/?highlight(.*?)\]~\[$1~ig;			if ($message !~ m~\[([^\]]*?)\[/?highlight(.*?)\]~i) { $tmp=0; }
		}
		$message =~ s~\[(news|gopher|ftp|flash|img)(.*?) tmp=(.*?)\](.*?)\[/\1\]~\[$1$2\]$3\[/$1\]~ig;
		if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
		&wrap2; 



this mod and "search_color_options_sp1 with Highlighter and Search Update SP1.3" I dont think is compatible Sad

Panther
  

Michael T Griffin
Back to top
YIM  
IP Logged
 
krysia322
Junior Member
**
Offline


"It's Good to be The King"
- Mel Brooks

Posts: 85
Location: Miles City
Joined: Jul 10th, 2002
Gender: Female
Re: Enable HTML v1.4
Reply #13 - Jun 3rd, 2003 at 4:26am
Print Post  
Quote:
The Advanced IM Box does change a lot of code so its not compatible with this mod. But you can simply remove all steps concerning InstantMessage.pl. It won't break anything, you'll not be able to use HTML in IMs however.


I rather confident that I can live with that. Wink
(Seeing as how I won't be posting 17-page chapters into IMs. LOL!)
Thank you again, Michael.
You are a sanity-saver.
Kiss
  

Dream BIG!
MAC User = 100% by hand modding

STORM CLOUD
Back to top
IP Logged
 
Jake
God Member
*****
Offline



Posts: 1265
Location: asia
Joined: Jun 22nd, 2002
Gender: Male
Re: Enable HTML v1.4
Reply #14 - Jun 24th, 2003 at 5:46am
Print Post  
My forum staff try to post with applet object but it didn't appear.

Can someone take a look at <<THIS POST>>

Any suggession to solve this

Thanks
  

   
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 7
Send TopicPrint