Permalink
Browse files

Merge pull request #66 from VSEphpbb/3.0.10-dev

BBcodes and Permissions Fixes
  • Loading branch information...
2 parents bf66385 + c2c287b commit 8094a0ca6dd897e313a8e065521443312f50a15b @mssti committed Sep 24, 2011
View
@@ -1,6 +1,6 @@
= Advanced BBCode Box 3 (aka ABBC3)
-* Release Version 3.0.8-PL2
-* Development Version 3.0.9.3
+* Release Version 3.0.9.3
+* Development Version 3.0.10
The source code, issue tracker and wiki can be found at:
@@ -48,6 +48,7 @@
<li><a href="#Notes">Author notes</a></li>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: square;">
+ <li><a href="#abbc3_v3010">Changes in 3.0.10</a></li>
<li><a href="#abbc3_v3093">Changes in 3.0.9.3</a></li>
<li><a href="#abbc3_v308PL2">Changes in 3.0.8-PL2</a></li>
<li><a href="#abbc3_v308PL1">Changes in 3.0.8-PL1</a></li>
@@ -144,6 +145,20 @@
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
+ <a name="abbc3_v3010"></a><h3>Changes in 3.0.10</h3>
+ <ul>
+ <li> [Fix] phpBB's built-in BBcodes will follow ABBC3's group permission settings</li>
+ <li> [Fix] Fixed fatal error when custom BBcodes (not assigned an image/icon) are assigned group permissions by ABBC3</li>
+ <li> [Fix] URL and FLASH BBcodes will only appear in message editors if they are allowed under Post Settings in the ACP</li>
+ </ul>
+ <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
+ </div>
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <div class="paragraph">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="content">
<a name="abbc3_v3093"></a><h3>Changes in 3.0.9.3</h3>
<ul>
<li> [New] Add support for youtu.be, Facebook, allocine, cnbc and msnbc links to BBvideo BBcode</li>
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
+<!--NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.-->
+<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD.\nAlthough MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD.\nNo support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
+<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
+ <header>
+ <meta name="generator" content="MODX file generated with PP MODX Creator by tumba25 (online version)"/>
+ <license><![CDATA[http://opensource.org/licenses/gpl-license.php GNU General Public License v2]]></license>
+ <title lang="en"><![CDATA[Advanced BBCode Box 3 (aka ABBC3) - Update from 3.0.8-PL1 to 3.0.10]]></title>
+ <description lang="en"><![CDATA[This file provides instructions for upgrading ABBC3 MOD from version 3.0.8-PL1 to version 3.0.10]]></description>
+ <author-notes lang="en"><![CDATA[IMPORTANT : If you were using HighSlide, LightBox, LightView or PopBox as your Image Resizer method, we have updated them to work with newer versions and you should download the latest versions of these scripts to replace your current scripts, as we could not include these scripts with this MOD.
+
+ Highslide v4.1.12: get a new "highslide-full.js" at http://highslide.com/download.php
+ LightBox v2.05: get a new "lightbox.js" at http://www.lokeshdhakar.com/projects/lightbox2/#download
+ LightView v2.74: get a new "lightview.js" at http://www.nickstakenburg.com/projects/lightview/
+ PopBox v2.7a: get a new "PopBox.js" at http://www.c6software.com/Products/PopBox/]]></author-notes>
+ <author-group>
+ <author>
+ <realname><![CDATA[Gabriel]]></realname>
+ <username><![CDATA[leviatan21]]></username>
+ <homepage><![CDATA[http://www.mssti.com/phpbb3/]]></homepage>
+ <email><![CDATA[info@mssti.com]]></email>
+ <contributions-group>
+ <contributions status="current" from="2008-01-10" position="Developer"/>
+ </contributions-group>
+ </author>
+ <author>
+ <username><![CDATA[VSE]]></username>
+ <contributions-group>
+ <contributions status="current" from="2010-03-02" position="Developer"/>
+ </contributions-group>
+ </author>
+ </author-group>
+ <mod-version>3.0.10</mod-version>
+ <installation>
+ <level>intermediate</level>
+ <time>300</time>
+ <target-version>3.0.9</target-version>
+ </installation>
+ <link-group>
+ <link type="parent" href="../install_ABBC3.xml" lang="en">Main Install Instructions</link>
+ </link-group>
+ </header>
+ <action-group>
+ <copy>
+ <file from="root/abbcode_page.php" to="abbcode_page.php"/>
+ <file from="root/adm/style/acp_abbcodes.html" to="adm/style/acp_abbcodes.html"/>
+ <file from="root/includes/*.*" to="includes/*.*"/>
+ <file from="root/install_abbc3.php" to="install_abbc3.php"/>
+ <file from="root/language/en/mods/*.*" to="language/en/mods/*.*"/>
+ <file from="root/styles/abbcode/abbcode_header.html" to="styles/abbcode/abbcode_header.html"/>
+ <file from="root/styles/abbcode/abbcode.css" to="styles/abbcode/abbcode.css"/>
+ <file from="root/styles/abbcode/AdvancedBox.js" to="styles/abbcode/AdvancedBox.js"/>
+ <file from="root/styles/abbcode/highslide/*.*" to="styles/abbcode/highslide/*.*"/>
+ <file from="root/styles/abbcode/lightbox/*.*" to="styles/abbcode/lightbox/*.*"/>
+ <file from="root/styles/abbcode/lightview/*.*" to="styles/abbcode/lightview/*.*"/>
+ <file from="root/styles/abbcode/PopBox/*.*" to="styles/abbcode/PopBox/*.*"/>
+ <file from="root/styles/abbcode/posting_abbcode_buttons.js" to="styles/abbcode/posting_abbcode_buttons.js"/>
+ <file from="root/styles/abbcode/posting_abbcode_wizards.js" to="styles/abbcode/posting_abbcode_wizards.js"/>
+ <file from="root/styles/abbcode/shadowbox/*.*" to="styles/abbcode/shadowbox/*.*"/>
+ <file from="root/styles/prosilver/template/posting_abbcode_wizards.html" to="styles/prosilver/template/posting_abbcode_wizards.html"/>
+ <file from="root/styles/subsilver2/template/posting_abbcode_wizards.html" to="styles/subsilver2/template/posting_abbcode_wizards.html"/>
+ <file from="root/umil/*.*" to="umil/*.*"/>
+ </copy>
+
+ <php-installer><![CDATA[install_abbc3.php]]></php-installer>
+
+ <open src="includes/bbcode.php">
+
+ <edit>
+ <find><![CDATA[// MOD : MSSTI ABBC3 - Start
+ // Try to avoid duplicates anchor ID's inside quotes
+ if (preg_match('#\[quote(?:=&quot;(.*?)&quot;)?:' . $this->bbcode_uid . '\](.*?)?\[anchor(=(.*?)([\s]?))?#is', $message))
+ {
+ $message = preg_replace('#(\[quote(?:=&quot;(.*?)&quot;)?:' . $this->bbcode_uid . '\](.*?))?\[anchor((=|)(.*?)([\s]))?#is',"$1[anchor$5quoted$6$7", $message);
+ }
+// MOD : MSSTI ABBC3 - End]]></find>
+ <action type="replace-with"><![CDATA[// MOD : MSSTI ABBC3 - Start
+ // Try to avoid duplicates anchor ID's inside quotes
+ if (preg_match('#\[quote(?:=&quot;(.*?)&quot;)?:' . $this->bbcode_uid . '\](.*?)\[anchor=(.*?)?\sgoto=(.*?)?:' . $this->bbcode_uid . '\](.*?)\[/anchor:' . $this->bbcode_uid . '\](.*?)\[/quote:' . $this->bbcode_uid . '\]#is', $message))
+ {
+ $message = preg_replace('#(\[anchor=(.*?)(\s)goto=(.*?):' . $this->bbcode_uid . '\](.*?)\[/anchor:' . $this->bbcode_uid . '\]?)#is', "[anchor=quoted$2 goto=quoted$4:" . $this->bbcode_uid . "]$5[/anchor:" . $this->bbcode_uid . "]", $message);
+ }
+// MOD : MSSTI ABBC3 - End]]></action>
+ </edit>
+
+ <edit>
+ <find><![CDATA[ $sql .= ' AND bbcode_match <> "." ';]]></find>
+ <action type="replace-with"><![CDATA[ $sql .= " AND bbcode_match <> '" . $db->sql_escape(utf8_clean_string('.')) . "'";]]></action>
+ </edit>
+
+ </open>
+
+ <open src="includes/functions_content.php">
+ <edit>
+ <find><![CDATA[ 'L_DOWNLOAD_COUNT' => $l_download_count
+ );]]></find>
+ <action type="after-add"><![CDATA[// MOD : MSSTI ABBC3 - Start
+ global $abbcode;
+ // We need to check if ABBC3 is property initialized for attached images and the ABBC3 img resizer
+ if (@$config['ABBC3_MOD'])
+ {
+ // For attached image resizer in private message only when bbcodes are not present
+ if (!class_exists('abbcode'))
+ {
+ include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
+ }
+ // For attached image resizer regular messages when bbcodes are not present
+ if ($abbcode->abbcode_config['S_ABBC3_RESIZE'] && !isset($template->_rootref['S_ABBC3_RESIZE']) && ($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB))
+ {
+ $abbcode->abbcode_init();
+ }
+ }
+// MOD : MSSTI ABBC3 - End
+]]></action>
+ </edit>
+ </open>
+
+ <open src="includes/functions_display.php">
+
+ <edit>
+ <find><![CDATA[ $abbc3 = (@$config['ABBC3_UCP_MODE'] && isset($user->data['user_abbcode_mod'])) ? $user->data['user_abbcode_mod'] : $abbc3;]]></find>
+ <action type="replace-with"><![CDATA[ $abbc3 = ($abbc3 && @$config['ABBC3_UCP_MODE'] && isset($user->data['user_abbcode_mod'])) ? $user->data['user_abbcode_mod'] : $abbc3;]]></action>
+ </edit>
+
+ <edit>
+ <find><![CDATA[ $sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline]]></find>
+ <inline-edit>
+ <inline-find><![CDATA[bbcode_helpline]]></inline-find>
+ <inline-action type="after-add"><![CDATA[, bbcode_group]]></inline-action>
+ </inline-edit>
+ </edit>
+
+ <edit>
+ <find><![CDATA[ while ($row = $db->sql_fetchrow($result))
+ {]]></find>
+ <action type="after-add"><![CDATA[// MOD : MSSTI ABBC3 - Start
+ if ($abbc3 && @$config['ABBC3_MOD'])
+ {
+ // Check phpbb permissions status
+ // Check ABBC3 groups permission
+ // try to make it as quicky as it can be
+ $auth_tag = preg_replace('#\=(.*)?#', '', strtoupper(trim($row['bbcode_tag'])));
+ if (isset($row['bbcode_group']) && $row['bbcode_group'])
+ {
+ if (!$abbcode->abbcode_permissions($auth_tag, $row['bbcode_group']))
+ {
+ continue;
+ }
+ }
+ }
+// MOD : MSSTI ABBC3 - End]]></action>
+ </edit>
+
+ </open>
+
+ <open src="includes/message_parser.php">
+
+ <edit>
+ <remove><![CDATA[// MOD : MSSTI ABBC3 - Start
+ $sql .= ' WHERE bbcode_match <> "." ';
+// MOD : MSSTI ABBC3 - End]]></remove>
+ </edit>
+
+ <edit>
+ <find><![CDATA[ $this->bbcodes[$row['bbcode_tag']] = array(]]></find>
+ <action type="before-add"><![CDATA[// MOD : MSSTI ABBC3 - Start
+ if ($row['bbcode_match'] == '.')
+ {
+ if (isset($this->bbcodes[$row['bbcode_tag']]) && $this->bbcodes[$row['bbcode_tag']])
+ {
+ $this->bbcodes[$row['bbcode_tag']]['bbcode_group'] = $row['bbcode_group'];
+ }
+ continue;
+ }
+// MOD : MSSTI ABBC3 - End]]></action>
+ </edit>
+
+ </open>
+
+ <diy-instructions lang="en"><![CDATA[You can delete the ibox folder located at root/styles/abbcode/ibox/]]></diy-instructions>
+
+ </action-group>
+</mod>
Oops, something went wrong.

0 comments on commit 8094a0c

Please sign in to comment.