Author Topic: add "html" BBCode and image  (Read 55 times)

Offline Chip (OP)

  • Server Admin
  • Moderator
  • Hero Member
  • ***
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 5594
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 04:08:52 AM
  • Deeply Confused Learner
add "html" BBCode and image
« on: October 09, 2018, 06:11:38 AM »
https://www.simplemachines.org/community/index.php?topic=484559.0

to ./Sources/Subs-Editor.php add in the region of line 1566:

Code: [Select]
                        array(
'image' => 'html',
'code' => 'html',
'before' => '[html]',
'after' => '[/html]',
'description' => $txt['html']                        ),
« Last Edit: October 14, 2018, 04:45:39 AM by Chip »
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair !

Offline Chip (OP)

  • Server Admin
  • Moderator
  • Hero Member
  • ***
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 5594
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 04:08:52 AM
  • Deeply Confused Learner
Re: add "html" BBCode and image
« Reply #1 on: October 16, 2018, 04:01:25 AM »
Admin > Simple Portal Shoutbox config:

1. Exempt Admins box ticked

2. Regex Filter is (array('#<html>m#','#</html>#m'),array(' ',' ')

3. Regex Callback is preg_replace('/<html[^>]+?[^>]+>|</html>/i','',$m[0]) (courtesy of Simple Portal)

see more on Callback > https://www.exakat.io/the-art-of-php-callback/
« Last Edit: October 18, 2018, 12:43:23 AM by Chip »
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair !

Tags:
 




TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE



Founded December 2014