Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdesign committed May 22, 2020
1 parent 4a1feb6 commit 64c76dd
Show file tree
Hide file tree
Showing 34 changed files with 4,394 additions and 4,631 deletions.
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<project name="juarticlesave" default="dist" basedir=".">

<property name="VERSION" value="1.0.3"/>
<property name="VERSION" value="1.0.4"/>

<tstamp>
<format property="DATE" pattern="%d.%m.%Y" />
Expand Down Expand Up @@ -34,7 +34,7 @@

<copy todir="${build}/lib">
<fileset dir="lib">
<include name="**"/>
<include name="vendor/**"/>
</fileset>
</copy>

Expand Down
27 changes: 19 additions & 8 deletions juarticlesave.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
* @subpackage plg_content_juarticlesave
*
* @author Denys Nosov, [email protected]
* @copyright 2018-2019 (C) Joomla! Ukraine, https://joomla-ua.org. All rights reserved.
* @copyright 2018-2020 (C) Joomla! Ukraine, https://joomla-ua.org. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

require_once __DIR__ . '/lib/emt/EMT.php';
require_once __DIR__ . '/lib/vendor/autoload.php';

use Emuravjev\Mdash\Typograph;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;
Expand Down Expand Up @@ -104,18 +105,28 @@ public function onContentBeforeSave($context, $article, $isNew)
*/
public function _typo($text, $tags = 1)
{
$typograf = new EMTypograph();
$typograf = new Typograph();

preg_match_all('!(\[socpost\].*?\[/socpost\])!si', $text, $pre);
$text = preg_replace('!\[socpost\].*?\[/socpost\]!si', '#pre#', $text);

$typograf->set_text($text);
$typograf->setup([
'Text.paragraphs' => 'off',
'Text.breakline' => 'off',
'OptAlign.all' => 'off',
'Nobr.spaces_nobr_in_surname_abbr' => 'off',
'Etc.split_number_to_triads' => 'off'
'Text.paragraphs' => 'off',
'Text.breakline' => 'off',
'OptAlign.all' => 'off',
'Nobr.spaces_nobr_in_surname_abbr' => 'off',
'Nobr.nbsp_org_abbr' => 'off',
'Nobr.nbsp_in_the_end' => 'off',
'Nobr.phone_builder' => 'off',
'Nobr.phone_builder_v2' => 'off',
'Nobr.ip_address' => 'off',
'Nobr.dots_for_surname_abbr' => 'off',
'Nobr.hyphen_nowrap_in_small_words' => 'off',
'Abbr.nobr_abbreviation' => 'off',
'Abbr.nobr_acronym' => 'off',
'Etc.unicode_convert' => 'off',
'Etc.split_number_to_triads' => 'off'
]);

if($tags == 0)
Expand Down
2 changes: 1 addition & 1 deletion juarticlesave.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>https://joomla-ua.org</authorUrl>
<version>@version@</version>
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
<copyright>(C) 2018-2019 Joomla! Ukraine. All rights reserved!</copyright>
<copyright>(C) 2018-2020 Joomla! Ukraine. All rights reserved!</copyright>
<description>PLG_CONTENT_JUARTICLESAVE_XML_DESCRIPTION</description>
<files>
<folder>lib</folder>
Expand Down
Loading

0 comments on commit 64c76dd

Please sign in to comment.