-
Notifications
You must be signed in to change notification settings - Fork 1
/
OharaYTEmbed.xml
27 lines (24 loc) · 1.4 KB
/
OharaYTEmbed.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" ?>
<!DOCTYPE modification SYSTEM "https://www.simplemachines.org/xml/modification">
<modification xmlns="https://www.simplemachines.org/xml/modification" xmlns:smf="https://www.simplemachines.org/">
<id>Suki:ohara_youtube_embed</id>
<version>1.2.15</version>
<file name="$sourcedir/Post.php">
<operation>
<search position="replace"><![CDATA[if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '' && (!allowedTo('admin_forum') || strpos($_POST['message'], '[html]') === false))]]></search>
<add><![CDATA[if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><iframe><video><div>')) === '' && (!allowedTo('admin_forum') || strpos($_POST['message'], '[html]') === false))]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '')]]></search>
<add><![CDATA[if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><iframe><video><div>')) === '')]]></add>
</operation>
</file>
<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[// Sift out the bbc for a performance improvement.]]></search>
<add><![CDATA[// Ohara youtube embed
$message = OYTE_Preparse($message);
// Sift out the bbc for a performance improvement.]]></add>
</operation>
</file>
</modification>