Page Index Toggle Pages: 1 2 3 [4] 5 6 7 Send TopicPrint
Very Hot Topic (More than 25 Replies) Enable HTML v1.4 (Read 32160 times)
Sambs
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 20
Joined: Aug 7th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #45 - Aug 12th, 2003 at 7:16pm
Print Post  
Yeah!, it's all working now. Thanks again Mic  Grin
  
Back to top
 
IP Logged
 
Othellobloke
New Member
*
Offline


Carpe Diem!

Posts: 25
Location: Kenora
Joined: Sep 2nd, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #46 - Sep 2nd, 2003 at 10:57pm
Print Post  
I've installed this mod and all posts that I've enabled HTML with, won't show when I go to Print page.  It just prints the title, when it was started and then a blank page.

Also, i know this isn't to do with this mod, but when you go to print page on any normal topic, without html, it only shows the very first post of a thread.

My forum is http://www.othellobloke.co.uk/cgi-bin/yabb/YaBB.cgi

Can you help me with this?  Thank you very much indeed.
  

There is nothing wrong with California that a rise in the ocean would not cure.
Back to top
WWWYIM  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Enable HTML v1.4
Reply #47 - Sep 4th, 2003 at 12:33pm
Print Post  
If you have the most recent version of this mod installed, then it should display on the print page as well. This has been fixed in version 1.2:

Quote:
v1.2:
- added html to recent posts, user's recent posts, search, printpage and topic summary


If your printpage doesn't display the replies, maybe it got broken by anther mod?
  

The Administrator.
Back to top
WWW  
IP Logged
 
np6s4x
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 21
Location: Eau Claire
Joined: Nov 12th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #48 - Nov 12th, 2003 at 4:52am
Print Post  
just got this installed, had two problems, but got them worked out so it works fine now, it even works in im's too Grin, i figured it wouldn't from some of the post in this thread...

#1 was at step 4:

had to change this in the mod file:

Code
Select All
<search for>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'690'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="clicklogtime" size="5" value="$ClickLogTime"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'376'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="max_log_days_old" size="5" value="$max_log_days_old"></td>
  </tr><tr>
    <td colspan=2 class="windowbg2" bgcolor="$color{'windowbg2'}">
    <HR size=1 width="100%" class="hr"></td>
</search for> 



to this:

Code
Select All
<search for>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'690'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="clicklogtime" size="5" value="$ClickLogTime"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$amv_txt{'13'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="OnlineLogTime" size="5" value="$OnlineLogTime"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'376'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="max_log_days_old" size="5" value="$max_log_days_old"></td>
  </tr><tr>
    <td colspan=2 class="windowbg2" bgcolor="$color{'windowbg2'}">
    <HR size=1 width="100%" class="hr"></td>
</search for> 



and #2 at step 30

i tried out the post on the first page, but that didn't work so...

so i changed this:

Code
Select All
<search for>
            &wrap;
            $displayname = $mname;
            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;
                  if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                  &wrap2;
            }
            ### End Enable HTML Mod
</replace> 



to this:

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> 





considering that post about html in im's not working, with media player mod installed, i figured it wouldn't but it does, hmm, i probably did something different then...

on a side note: since i don't know hardly anything about perl, or yabb, (only installed my first board less then two months ago) i was gonna post a question here about those two problems, but boardmod seemed to be down at the time, so i figured, i'd try to fix them myself, and i guess it probably turned out better this way too...

and one last pointless thing, lol, i finally decided to reg, been posting as a guest, Tongue...
  
Back to top
 
IP Logged
 
yesforreal
Junior Member
**
Offline


Carsten is King

Posts: 79
Joined: Nov 25th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #49 - Nov 29th, 2003 at 11:04pm
Print Post  
Getting error in step 4 any ideas?

starting log...

script path: D:\YabbforBoardmod\YaBB.pl

detected script: autodetect failed

selected script: YaBB 1 Gold - SP 1.3

installed mods: 13

YaBB 1 Gold - SP 1.3\adv_memberview_plus_31b.mod

YaBB 1 Gold - SP 1.3\hotlinks_12_sp131.mod

YaBB 1 Gold - SP 1.3\chat_v1_98a_SP_1_3.mod

YaBB 1 Gold - SP 1.3\mbc2_sp13.mod

YaBB 1 Gold - SP 1.3\yams_502_sp13.mod

YaBB 1 Gold - SP 1.3\ratings_45_sp13.mod

YaBB 1 Gold - SP 1.3\rating45_mbco2_sp13_addon_13.mod

YaBB 1 Gold - SP 1.3\yams_502_profil_add_ip.mod

YaBB 1 Gold - SP 1.3\YaBBCHelpSP1_3.mod

YaBB 1 Gold - SP 1.3\Board Search.mod

Quick Repy Box\quick_reply_box_13.mod

YaBB 1 Gold - SP 1.3\SplitSplice_1_SP13.mod

YaBB 1 Gold - SP 1.3\Latest Subject SP1-1.3.mod





now installing: Enable HTML 1.4 for SP1.3 (enable_html_v14_sp13.mod)



Step 4 ... failed - ERR(1): Search string could not be found

> modifications failed! 1 errors occured. No files will be modified. Please see readme for help on the
error messages.
  
Back to top
WWW  
IP Logged
 
np6s4x
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 21
Location: Eau Claire
Joined: Nov 12th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #50 - Nov 30th, 2003 at 8:45am
Print Post  
don't know if it'll work or not, but since it looks like we have most of the same mods installed, maybe u could try what i did to get it to work with step 4? just an idea...
  
Back to top
 
IP Logged
 
yesforreal
Junior Member
**
Offline


Carsten is King

Posts: 79
Joined: Nov 25th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #51 - Dec 2nd, 2003 at 3:59am
Print Post  
np6s4x Thanks I really appreciate the try, still get an error at number 4 with your fix. It now says, error search string is empty
  
Back to top
WWW  
IP Logged
 
yesforreal
Junior Member
**
Offline


Carsten is King

Posts: 79
Joined: Nov 25th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #52 - Dec 3rd, 2003 at 6:23am
Print Post  
Can someone please help me with this.  I really need this mod.  My inability to use HTML is creating many additional hours of work.  Any help is greatly appreciated.

In advance,

Thank you
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Enable HTML v1.4
Reply #53 - Dec 5th, 2003 at 7:43pm
Print Post  
You propably did something wrong when modifying the mod. Can you attach your modified mod file here?
  

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


Carsten is King

Posts: 79
Joined: Nov 25th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #54 - Dec 6th, 2003 at 6:41am
Print Post  
Michael,

Here is the original that I had (just in case corrupted) followed by the modified.  And an update on Mods installed.

[code]<id>
Enable HTML
</id>

<version>
1.4 for SP1.3
</version>

<mod info>
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 FOR SP1.3

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).

Version history:
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
</mod info>

<author>
Michael Prager
</author>

<homepage>
http://www.boardmod.org
</homepage>

<edit file>
Sources/Display.pl
</edit file>

<search for>
           # Should we show "last modified by?"
</search for>

<add before>
           $lastmoduser = $mlmb;
</add before>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $html_username = $musername;
                 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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
english.lng
</edit file>

<search for>
1;
</search for>

<add before>
%txt_allow_html_mod = (
'1' => "Enable HTML",
'2' => "Allow HTML for the following groups (Example: Administrator,group2,Group3):",
'3' => "Allow HTML for the following users (Example: admin,username2,username3):",
'4' => "Here you can allow certain people to use HTML in their posts. They'll have to enable HTML in every post seperately.<br>Please concern that <b>allowing HTML is a security risk</b>! Only allow to reliable persons!<br><br>",
'5' => "Enabled HTML for this post (note: this will <b>disable UBBC</b> code)"
);


</add before>

<edit file>
Sources/AdminEdit.pl
</edit file>

<search for>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'690'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="clicklogtime" size="5" value="$ClickLogTime"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'376'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="max_log_days_old" size="5" value="$max_log_days_old"></td>
  </tr><tr>
    <td colspan=2 class="windowbg2" bgcolor="$color{'windowbg2'}">
    <HR size=1 width="100%" class="hr"></td>
</search for>

<add after>
  </tr><tr>
    <td colspan="2" class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="1">$txt_allow_html_mod{'4'}</font></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt_allow_html_mod{'2'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="allow_html_to_groups" size="30" value="$allow_html_to_groups"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt_allow_html_mod{'3'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="allow_html_to_users" size="30" value="$allow_html_to_users"></td>
  </tr><tr>
    <td colspan=2 class="windowbg2" bgcolor="$color{'windowbg2'}">
    <HR size=1 width="100%" class="hr"></td>
</add after>

<search for>
     $userpic_limits = $FORM{'userpic_limits'} || 'Please note that your image has to be <b>gif</b> or <b>jpg</b> and that it will be resized!';
     $userpic_limits =~ s/\"/\'/g;
</search for>

<add after>
     $allow_html_to_groups = $FORM{'allow_html_to_groups'};
     $allow_html_to_users = $FORM{'allow_html_to_users'};
</add after>

<search for>
########## File Locking ##########
</search for>

<add before>
########## Enable HTML Mod ##########

\$allow_html_to_groups = "$allow_html_to_groups";      # Allow HTML for all users which are in one of these groups. List groups with commas. e.g. 'Administrator,Mod Writer'
\$allow_html_to_users = "$allow_html_to_users";            # Allow HTML for all users with these usernames. e.g. 'admin,michael,dave,guests'


</add before>

<edit file>
Sources/Post.pl
</edit file>

<search for>
if($enable_ubbc && $showyabbcbutt) {
</search for>

<add before>
### Begin Enable HTML Mod
if ($post eq "post" || $post eq "postmodify" || $post eq "imsend") {
     $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
     $enable_html = HTML_allow($username);
     $message = $message_backup;
     if ($enable_html == 1) {
           if ($message =~ /\#enable_html/isg || $FORM{enable_html} eq "1") {
                 $enable_html_check = ' checked';
                 $message =~ s/\#enable_html//isg;
           } else { $enable_html_check = '' }
           $enable_html_checkbox = qq~<tr>
             <td class="windowbg" bgcolor="$color{'windowbg'}" width="23%"><font size=2><b>$txt_allow_html_mod{'1'}:</b></font></td>
             <td class="windowbg" bgcolor="$color{'windowbg'}"><input type=checkbox name="enable_html" value="1"$enable_html_check> <font size="1"> $txt_allow_html_mod{'5'}</font></td>
           </tr>~;
     } else { $enable_html_checkbox = ''; }
}
### End Enable HTML Mod

</add before>

<search for>
$notification
$lastmod
</search for>

<add before>
$enable_html_checkbox
</add before>

<search for>
     &wrap;
     $displayname = $settings[1];
     if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
     &wrap2;
</search for>

<replace>
     ### Begin Enable HTML Mod
     $html_username = $username;
     if($FORM{enable_html} eq "1") { $message .= qq~#enable_html~; }
     if ($message =~ /\#enable_html/isg) {
           $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 = $settings[1];
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
     }
     ### End Enable HTML Mod
</replace>

<search for>
     if(-e("$datadir/.txt")) { unlink("$datadir/.txt"); }
</search for>

<add before>
     ### Begin Enable HTML Mod
     $message =~ s/\#enable_html//isg;
     if($FORM{enable_html} eq "1") {
           $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
           $enable_html = HTML_allow($username);
           $message = $message_backup;
           if ($enable_html == 1) { $message .= qq~#enable_html~; }
     }
     ### End Enable HTML Mod

</add before>

<search for>
sub doshowthread {
     my( $line, $trash, $tempname, $tempdate, $temppost );
</search for>

<add after>
     my( $html_username, $lastmoduser, $enable_html );
</add after>

<search for>
                 ($trash, $tempname, $trash, $tempdate, $trash, $trash, $trash, $trash, $message, $ns) = split(/\|/,$line);
</search for>

<replace>
                 ($trash, $tempname, $trash, $tempdate, $html_username, $trash, $trash, $trash, $message, $ns, $trash, $lastmoduser) = split(/\|/,$line);
</replace>

<search for>
                 &wrap;
                 $displayname = $tempname;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
</search for>

<replace>
                 ### Begin Enable HTML Mod
                 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 = $tempname;
                       if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                       &wrap2;
                 }
                 ### End Enable HTML Mod
</replace>

<edit file>
Sources/Subs.pl
</edit file>

<search for>
sub Sticky_remove {
</search for>

<add before>
sub HTML_allow {
     my ($enable_html,$usrname,@myuserprofile,$groupname);
     my $username = $_[0];

     $enable_html = 0;
     # disallow guests to use HTML at all cost
     if ($username ne 'Guest') {
           if(! $yyUDLoaded{$username} && -e("$memberdir/$username.dat") && $allow_html_to_groups ne '') {
                 &LoadUserDisplay($username);      # If user is not in memory, s/he must be loaded.
           }
           # check if user is in autorized group
           if($yyUDLoaded{$username}) {
                 if ($allow_html_to_groups ne '') {
                       @myuserprofile = @{$userprofile{$username}};
                       foreach $groupname (split( /\,/, $allow_html_to_groups)) {
                             if ($myuserprofile[7] eq $groupname && $groupname ne '') {
                                   $enable_html = 1;
                                   last;
                             }
                       }
                 }
           }
           # check if user's name is in list
           if ($enable_html == 0 && $allow_html_to_users ne '') {
                 foreach $usrname (split( /\,/, $allow_html_to_users)) {
                       if ($username eq $usrname && $usrname ne '') {
                             $enable_html = 1;
                             last;
                       }
                 }
           }
     }
     return $enable_html;
}


</add before>

<edit file>
Sources/Recent.pl
</edit file>

<search for>
sub RecentPosts {
</search for>

<add after>
     my( $lastmoddate, $lastmoduser );
</add after>

<search for>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$message);
</search for>

<replace>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = split(/\|/,$message);
</replace>

<search for>
                                   $data{$mtime} = [$curboard, $tnum, $treplies, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate];
</search for>

<replace>
                                   $data{$mtime} = [$curboard, $tnum, $treplies, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate, $lastmoddate, $lastmoduser];
</replace>

<search for>
           ($board, $tnum, $c, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate) = @{ $data{$messages[$i]} };
</search for>

<replace>
           ($board, $tnum, $c, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate, $lastmoddate, $lastmoduser) = @{ $data{$messages[$i]} };
</replace>

<search for>
           &wrap;
           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;
                 if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
Sources/Search.pl
</edit file>

<search for>
sub plushSearch2 {
</search for>

<add after>
     my( $lastmoddate, $lastmoduser );
</add after>

<search for>
                       ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$curpost);
</search for>

<replace>
                       ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = split(/\|/,$curpost);
</replace>

<search for>
                       $data{$mtime} = [$curboard, $tnum, $msgnum, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate];
</search for>

<replace>
                       $data{$mtime} = [$curboard, $tnum, $msgnum, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate, $lastmoddate, $lastmoduser];
</replace>

<search for>
           &wrap;
           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;
                 if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
Sources/Printpage.pl
</edit file>

<search for>
           ($threadtitle, $threadposter, $trash, $threaddate, $trash, $trash, $trash, $trash, $threadpost) = split (/\|/,$thread);
</search for>

<replace>
           ($threadtitle, $threadposter, $trash, $threaddate, $html_username, $trash, $trash, $trash, $threadpost, $ns, $lastmoddate, $lastmoduser) = split (/\|/,$thread);

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

           ### Do/Undo YaBBC Stuff ###
           if($enable_ubbc && $enable_html != 1) {
</replace>

<search for>
           $threadpost =~ s~\n~<br>~g;
</search for>

<add after>
           }
</add after>

<edit file>
Sources/Profile.pl
</edit file>

<search for>
sub usersrecentposts {
</search for>

<add after>
     my( $lastmoddate, $lastmoduser );
</add after>

<search for>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$messages[$c]);
</search for>

<replace>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = split(/\|/,$messages[$c]);
</replace>

<search for>
                                         $data{$mtime} = [$curboard, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns];
</search for>

<replace>
                                         $data{$mtime} = [$curboard, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser];
</replace>

<search for>
           ($board, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = @{ $data{$messages[$i]} };
</search for>

<replace>
           ($board, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = @{ $data{$messages[$i]} };
</replace>

<search for>
           &wrap;
           $displayname = $mname;
           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;
                 if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
Sources/ModifyMessage.pl
</edit file>

<search for>
           if( $postid == 0 ) {
                 $tsub = $subject;
                 $ticon = $icon;
           }
</search for>

<add after>
           ### Begin Enable HTML Mod
           $message =~ s/\#enable_html//isg;
           if($FORM{enable_html} eq "1") {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($username);
                 $message = $message_backup;
                 if ($enable_html == 1) { $message .= qq~#enable_html~; }
           }
           ### End Enable HTML Mod
</add after>

<edit file>
Sources/InstantMessage.pl
</edit file>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($musername);
                 $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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($musername);
                 $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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($musername);
                 $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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<search for>
if ($FORM{'ns'} eq "NS") {$message .= "";}
</search for>

<add after>
### Begin Enable HTML Mod
$message =~ s/\#enable_html//isg;
if($FORM{enable_html} eq "1") {
     $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
     $enable_html = HTML_allow($username);
     $message = $message_backup;
     if ($enable_html == 1) { $message .= qq~#enable_html~; }
}
### End Enable HTML Mod
</add after>[/code]

Modified:

[code]<id>
Enable HTML
</id>

<version>
1.4 for SP1.3
</version>

<mod info>
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 FOR SP1.3

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).

Version history:
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
</mod info>

<author>
Michael Prager
</author>

<homepage>
http://www.boardmod.org
</homepage>

<edit file>
Sources/Display.pl
</edit file>

<search for>
           # Should we show "last modified by?"
</search for>

<add before>
           $lastmoduser = $mlmb;
</add before>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $html_username = $musername;
                 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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
english.lng
</edit file>

<search for>
1;
</search for>

<add before>
%txt_allow_html_mod = (
'1' => "Enable HTML",
'2' => "Allow HTML for the following groups (Example: Administrator,group2,Group3):",
'3' => "Allow HTML for the following users (Example: admin,username2,username3):",
'4' => "Here you can allow certain people to use HTML in their posts. They'll have to enable HTML in every post seperately.<br>Please concern that <b>allowing HTML is a security risk</b>! Only allow to reliable persons!<br><br>",
'5' => "Enabled HTML for this post (note: this will <b>disable UBBC</b> code)"
);


</add before>

<edit file>
Sources/AdminEdit.pl
</edit file>

<search for>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'690'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="clicklogtime" size="5" value="$ClickLogTime"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$amv_txt{'13'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="OnlineLogTime" size="5" value="$OnlineLogTime"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt{'376'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="max_log_days_old" size="5" value="$max_log_days_old"></td>
  </tr><tr>
    <td colspan=2 class="windowbg2" bgcolor="$color{'windowbg2'}">
    <HR size=1 width="100%" class="hr"></td>
</search for>

<add after>
  </tr><tr>
    <td colspan="2" class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="1">$txt_allow_html_mod{'4'}</font></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt_allow_html_mod{'2'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="allow_html_to_groups" size="30" value="$allow_html_to_groups"></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size="2">$txt_allow_html_mod{'3'}</font></td>
    <td class="windowbg2" bgcolor="$color{'windowbg2'}"><input type=text name="allow_html_to_users" size="30" value="$allow_html_to_users"></td>
  </tr><tr>
    <td colspan=2 class="windowbg2" bgcolor="$color{'windowbg2'}">
    <HR size=1 width="100%" class="hr"></td>
</add after>

<search for>
     $userpic_limits = $FORM{'userpic_limits'} || 'Please note that your image has to be <b>gif</b> or <b>jpg</b> and that it will be resized!';
     $userpic_limits =~ s/\"/\'/g;
</search for>

<add after>
     $allow_html_to_groups = $FORM{'allow_html_to_groups'};
     $allow_html_to_users = $FORM{'allow_html_to_users'};
</add after>

<search for>
########## File Locking ##########
</search for>

<add before>
########## Enable HTML Mod ##########

\$allow_html_to_groups = "$allow_html_to_groups";      # Allow HTML for all users which are in one of these groups. List groups with commas. e.g. 'Administrator,Mod Writer'
\$allow_html_to_users = "$allow_html_to_users";            # Allow HTML for all users with these usernames. e.g. 'admin,michael,dave,guests'


</add before>

<edit file>
Sources/Post.pl
</edit file>

<search for>
if($enable_ubbc && $showyabbcbutt) {
</search for>

<add before>
### Begin Enable HTML Mod
if ($post eq "post" || $post eq "postmodify" || $post eq "imsend") {
     $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
     $enable_html = HTML_allow($username);
     $message = $message_backup;
     if ($enable_html == 1) {
           if ($message =~ /\#enable_html/isg || $FORM{enable_html} eq "1") {
                 $enable_html_check = ' checked';
                 $message =~ s/\#enable_html//isg;
           } else { $enable_html_check = '' }
           $enable_html_checkbox = qq~<tr>
             <td class="windowbg" bgcolor="$color{'windowbg'}" width="23%"><font size=2><b>$txt_allow_html_mod{'1'}:</b></font></td>
             <td class="windowbg" bgcolor="$color{'windowbg'}"><input type=checkbox name="enable_html" value="1"$enable_html_check> <font size="1"> $txt_allow_html_mod{'5'}</font></td>
           </tr>~;
     } else { $enable_html_checkbox = ''; }
}
### End Enable HTML Mod

</add before>

<search for>
$notification
$lastmod
</search for>

<add before>
$enable_html_checkbox
</add before>

<search for>
     &wrap;
     $displayname = $settings[1];
     if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
     &wrap2;
</search for>

<replace>
     ### Begin Enable HTML Mod
     $html_username = $username;
     if($FORM{enable_html} eq "1") { $message .= qq~#enable_html~; }
     if ($message =~ /\#enable_html/isg) {
           $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 = $settings[1];
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
     }
     ### End Enable HTML Mod
</replace>

<search for>
     if(-e("$datadir/.txt")) { unlink("$datadir/.txt"); }
</search for>

<add before>
     ### Begin Enable HTML Mod
     $message =~ s/\#enable_html//isg;
     if($FORM{enable_html} eq "1") {
           $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
           $enable_html = HTML_allow($username);
           $message = $message_backup;
           if ($enable_html == 1) { $message .= qq~#enable_html~; }
     }
     ### End Enable HTML Mod

</add before>

<search for>
sub doshowthread {
     my( $line, $trash, $tempname, $tempdate, $temppost );
</search for>

<add after>
     my( $html_username, $lastmoduser, $enable_html );
</add after>

<search for>
                 ($trash, $tempname, $trash, $tempdate, $trash, $trash, $trash, $trash, $message, $ns) = split(/\|/,$line);
</search for>

<replace>
                 ($trash, $tempname, $trash, $tempdate, $html_username, $trash, $trash, $trash, $message, $ns, $trash, $lastmoduser) = split(/\|/,$line);
</replace>

<search for>
                 &wrap;
                 $displayname = $tempname;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
</search for>

<replace>
                 ### Begin Enable HTML Mod
                 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 = $tempname;
                       if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                       &wrap2;
                 }
                 ### End Enable HTML Mod
</replace>

<edit file>
Sources/Subs.pl
</edit file>

<search for>
sub Sticky_remove {
</search for>

<add before>
sub HTML_allow {
     my ($enable_html,$usrname,@myuserprofile,$groupname);
     my $username = $_[0];

     $enable_html = 0;
     # disallow guests to use HTML at all cost
     if ($username ne 'Guest') {
           if(! $yyUDLoaded{$username} && -e("$memberdir/$username.dat") && $allow_html_to_groups ne '') {
                 &LoadUserDisplay($username);      # If user is not in memory, s/he must be loaded.
           }
           # check if user is in autorized group
           if($yyUDLoaded{$username}) {
                 if ($allow_html_to_groups ne '') {
                       @myuserprofile = @{$userprofile{$username}};
                       foreach $groupname (split( /\,/, $allow_html_to_groups)) {
                             if ($myuserprofile[7] eq $groupname && $groupname ne '') {
                                   $enable_html = 1;
                                   last;
                             }
                       }
                 }
           }
           # check if user's name is in list
           if ($enable_html == 0 && $allow_html_to_users ne '') {
                 foreach $usrname (split( /\,/, $allow_html_to_users)) {
                       if ($username eq $usrname && $usrname ne '') {
                             $enable_html = 1;
                             last;
                       }
                 }
           }
     }
     return $enable_html;
}


</add before>

<edit file>
Sources/Recent.pl
</edit file>

<search for>
sub RecentPosts {
</search for>

<add after>
     my( $lastmoddate, $lastmoduser );
</add after>

<search for>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$message);
</search for>

<replace>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = split(/\|/,$message);
</replace>

<search for>
                                   $data{$mtime} = [$curboard, $tnum, $treplies, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate];
</search for>

<replace>
                                   $data{$mtime} = [$curboard, $tnum, $treplies, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate, $lastmoddate, $lastmoduser];
</replace>

<search for>
           ($board, $tnum, $c, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate) = @{ $data{$messages[$i]} };
</search for>

<replace>
           ($board, $tnum, $c, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate, $lastmoddate, $lastmoduser) = @{ $data{$messages[$i]} };
</replace>

<search for>
           &wrap;
           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;
                 if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
Sources/Search.pl
</edit file>

<search for>
sub plushSearch2 {
</search for>

<add after>
     my( $lastmoddate, $lastmoduser );
</add after>

<search for>
                       ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$curpost);
</search for>

<replace>
                       ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = split(/\|/,$curpost);
</replace>

<search for>
                       $data{$mtime} = [$curboard, $tnum, $msgnum, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate];
</search for>

<replace>
                       $data{$mtime} = [$curboard, $tnum, $msgnum, $tusername, $tname, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $tstate, $lastmoddate, $lastmoduser];
</replace>

<search for>
           &wrap;
           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;
                 if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
Sources/Printpage.pl
</edit file>

<search for>
           ($threadtitle, $threadposter, $trash, $threaddate, $trash, $trash, $trash, $trash, $threadpost) = split (/\|/,$thread);
</search for>

<replace>
           ($threadtitle, $threadposter, $trash, $threaddate, $html_username, $trash, $trash, $trash, $threadpost, $ns, $lastmoddate, $lastmoduser) = split (/\|/,$thread);

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

           ### Do/Undo YaBBC Stuff ###
           if($enable_ubbc && $enable_html != 1) {
</replace>

<search for>
           $threadpost =~ s~\n~<br>~g;
</search for>

<add after>
           }
</add after>

<edit file>
Sources/Profile.pl
</edit file>

<search for>
sub usersrecentposts {
</search for>

<add after>
     my( $lastmoddate, $lastmoduser );
</add after>

<search for>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$messages[$c]);
</search for>

<replace>
                             ($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = split(/\|/,$messages[$c]);
</replace>

<search for>
                                         $data{$mtime} = [$curboard, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns];
</search for>

<replace>
                                         $data{$mtime} = [$curboard, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser];
</replace>

<search for>
           ($board, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = @{ $data{$messages[$i]} };
</search for>

<replace>
           ($board, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns, $lastmoddate, $lastmoduser) = @{ $data{$messages[$i]} };
</replace>

<search for>
           &wrap;
           $displayname = $mname;
           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;
                 if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<edit file>
Sources/ModifyMessage.pl
</edit file>

<search for>
           if( $postid == 0 ) {
                 $tsub = $subject;
                 $ticon = $icon;
           }
</search for>

<add after>
           ### Begin Enable HTML Mod
           $message =~ s/\#enable_html//isg;
           if($FORM{enable_html} eq "1") {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($username);
                 $message = $message_backup;
                 if ($enable_html == 1) { $message .= qq~#enable_html~; }
           }
           ### End Enable HTML Mod
</add after>

<edit file>
Sources/InstantMessage.pl
</edit file>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($musername);
                 $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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($musername);
                 $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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<search for>
           &wrap;
           if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
           &wrap2;
</search for>

<replace>
           ### Begin Enable HTML Mod
           if ($message =~ /\#enable_html/isg) {
                 $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
                 $enable_html = HTML_allow($musername);
                 $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;
                 if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &DoUBBC; }
                 &wrap2;
           }
           ### End Enable HTML Mod
</replace>

<search for>
if ($FORM{'ns'} eq "NS") {$message .= "";}
</search for>

<add after>
### Begin Enable HTML Mod
$message =~ s/\#enable_html//isg;
if($FORM{enable_html} eq "1") {
     $message_backup = $message; # since $message is no local variable, it often gets overwritten accidently somehwere (couldn't find out where)
     $enable_html = HTML_allow($username);
     $message = $message_backup;
     if ($enable_html == 1) { $message .= qq~#enable_html~; }
}
### End Enable HTML Mod
</add after>[/code]

Mod install log:

YaBB 1 Gold - SP 1.3\adv_memberview_plus_31b.mod
YaBB 1 Gold - SP 1.3\hotlinks_12_sp131.mod
YaBB 1 Gold - SP 1.3\chat_v1_98a_SP_1_3.mod
YaBB 1 Gold - SP 1.3\mbc2_sp13.mod
YaBB 1 Gold - SP 1.3\yams_502_sp13.mod
YaBB 1 Gold - SP 1.3\ratings_45_sp13.mod
YaBB 1 Gold - SP 1.3\yams_502_profil_add_ip.mod
YaBB 1 Gold - SP 1.3\YaBBCHelpSP1_3.mod
YaBB 1 Gold - SP 1.3\Board Search.mod
Quick Repy Box\quick_reply_box_13.mod
YaBB 1 Gold - SP 1.3\SplitSplice_1_SP13.mod
YaBB 1 Gold - SP 1.3\Latest Subject SP1-1.3.mod
YaBB 1 Gold - SP 1.3\better_add_board.mod
YaBB 1 Gold - SP 1.3\rating45_mbco2_sp13_addon_13.mod
YaBB 1 Gold - SP 1.3\Message_Sort_SP11.mod
YaBB 1 Gold - SP 1.3\PreviousNext Page mod.mod
YaBB 1 Gold - SP 1.3\new_topic_in_next.mod
YaBB 1 Gold - SP 1.3\Recent Users List.mod
YaBB 1 Gold - SP 1.3\TopStats_102_sp131.mod


Thanks for the help,

Craig
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Enable HTML v1.4
Reply #55 - Dec 6th, 2003 at 3:01pm
Print Post  
Your mod file seems to be fine, I could not reproduce your "search string is empty" error though... Undecided
  

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


Carsten is King

Posts: 79
Joined: Nov 25th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #56 - Dec 7th, 2003 at 5:39am
Print Post  
Michael,

This is the error I get with the second (altered) mod.
Step 4 ... failed - ERR(10): The search string is empty! However an empty <search for> argument is
not allowed because it would make the mod unremoveable.

Is there some other file I can send you that could help me to get this installed.  Hell I would be willing to give up other mods I have to get this installed, I really do need this mod.  I'd be willing to set you up as an admin or give you access to install this if needed.

Thanks,

Craig
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Enable HTML v1.4
Reply #57 - Dec 7th, 2003 at 10:02am
Print Post  
I would help if I could but I don't have the time, I have to leave till next friday in a couple of hours. Undecided
  

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


Carsten is King

Posts: 79
Joined: Nov 25th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #58 - Dec 7th, 2003 at 10:31am
Print Post  
You are a late nighter I see as am I.  No problem, I understand.  If at sometime in the future you have some extra time it would be appreciated.  Thanks for the quick response.

Craig
  
Back to top
WWW  
IP Logged
 
yesforreal
Junior Member
**
Offline


Carsten is King

Posts: 79
Joined: Nov 25th, 2003
Gender: Male
Re: Enable HTML v1.4
Reply #59 - Dec 8th, 2003 at 12:12pm
Print Post  
Never mind Michael,  I installed it manually.  One of my mods had added code in step 4.  I just added your code after it.  The proper string was in step 13, not sure why boardmod couldn't find it.  Only thing I can think of was you had it as the last step to modify and the string was actually at the top of the file not at the bottom so possibly boardmod didn't go back and search thru the whole txt.

Anyway got it installed, it works great.  Thanks for a great mod.  Now to go back uninstall it.  Make the changes in your mod and reinstall with boardmod.   Then again maybe I won't  Wink

Craig
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 2 3 [4] 5 6 7
Send TopicPrint