Skip to content

Commit

Permalink
Version 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronef committed Mar 29, 2021
2 parents 9da2968 + 4774ece commit 480367d
Show file tree
Hide file tree
Showing 8 changed files with 459 additions and 317 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# (MODX)EvolutionCMS.snippets.ddTypograph changelog


## Version 2.5 (2021-03-29)
* \* Attention! PHP >= 5.6 is required.
* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.48.1 is required.
* \+ You can just call `\DDTools\Snippet::runSnippet` to run the snippet without DB and eval (see README → Examples).
* \+ `\ddDomainComparator\Snippet`: The new class. All snippet code was moved here.
* \+ README → Links.
* \* Composer.json:
* \+ `homepage`
* \+ `authors`.
* \* `require` → `dd/evolutioncms-libraries-ddtools`: Renamed from `dd/modxevo-library-ddtools`.


## Version 2.4.2 (2020-05-06)
* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.32 is required.
* \* Compatibility with (MODX)EvolutionCMS.libraries.ddTools >= 0.32.
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG_ru.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# (MODX)EvolutionCMS.snippets.ddTypograph changelog


## Version 2.5 (2021-03-29)
* \* Внимание! Требуется PHP >= 5.6.
* \* Внимание! Требуется (MODX)EvolutionCMS.libraries.ddTools >= 0.48.1.
* \+ Запустить сниппет без DB и eval можно через `\DDTools\Snippet::runSnippet` (см. примеры в README).
* \+ `\ddTypograph\Snippet`: Новый класс. Весь код сниппета перенесён туда.
* \+ README → Ссылки.
* \* Composer.json:
* \+ `homepage`
* \+ `authors`.
* \* `require` → `dd/evolutioncms-libraries-ddtools`: Переименовано из `dd/modxevo-library-ddtools`.


## Версия 2.4.2 (2020-05-06)
* \* Внимание! Требуется (MODX)EvolutionCMS.libraries.ddTools >= 0.32.
* \* Совместимость с (MODX)EvolutionCMS.libraries.ddTools >= 0.32.
Expand Down
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ The snippet doesn’t use third-party services, also it sends no requests. In ot

## Requires

* PHP >= 5.4
* [(MODX)EvolutionCMS.libraries.ddTools](https://code.divandesign.biz/modx/ddtools) >= 0.32
* PHP >= 5.6
* [(MODX)EvolutionCMS.libraries.ddTools](https://code.divandesign.biz/modx/ddtools) >= 0.48.1
* [PHP.libraries.EMT](http://mdash.ru) 3.5 (contains in archive)


Expand All @@ -20,7 +20,7 @@ The snippet doesn’t use third-party services, also it sends no requests. In ot
#### 1. Elements → Snippets: Create a new snippet with the following data

1. Snippet name: `ddTypograph`.
2. Description: `<b>2.4.2</b> Snippet for text typography. The snippet doesn’t use third-party services, also it sends no requests. In other words, everything is performed on your server.`.
2. Description: `<b>2.5</b> Snippet for text typography. The snippet doesn’t use third-party services, also it sends no requests. In other words, everything is performed on your server.`.
3. Category: `Core`.
4. Parse DocBlock: `no`.
5. Snippet code (php): Insert content of the `ddTypograph_snippet.php` file from the archive.
Expand Down Expand Up @@ -121,7 +121,38 @@ The snippet doesn’t use third-party services, also it sends no requests. In ot
```


## [Home page →](https://code.divandesign.biz/modx/ddtypograph)
#### Run the snippet through `\DDTools\Snippet::runSnippet` without DB and eval

```php
\DDTools\Snippet::runSnippet([
'name' => 'ddTypograph',
'params' => [
'text' => "
There's nothing you can do that can't be done
Nothing you can sing that can't be sung

https://en.wikipedia.org/wiki/The_Beatles
",
'text_paragraphs' => true,
'text_autoLinks' => true
]
]);
```

Returns:

```
<p>There’s nothing you can do&nbsp;that can’t be&nbsp;done<br>
Nothing you can sing that can’t be&nbsp;sung</p>
<p><a href="https://en.wikipedia.org/wiki/The_Beatles">en.wikipedia.org/wiki/The_Beatles</a></p>
```


## Links

* [Home page](https://code.divandesign.biz/modx/ddtypograph)
* [Telegram chat](https://t.me/dd_code)
* [Packagist](https://packagist.org/packages/dd/evolutioncms-snippets-ddtypograph)


<link rel="stylesheet" type="text/css" href="https://DivanDesign.ru/assets/files/ddMarkdown.css" />
39 changes: 35 additions & 4 deletions README_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

## Использует

* PHP >= 5.4
* [(MODX)EvolutionCMS.libraries.ddTools](https://code.divandesign.biz/modx/ddtools) >= 0.32
* PHP >= 5.6
* [(MODX)EvolutionCMS.libraries.ddTools](https://code.divandesign.biz/modx/ddtools) >= 0.48.1
* [PHP.libraries.EMT](http://mdash.ru) 3.5 (содержится в архиве)


Expand All @@ -19,7 +19,7 @@
#### 1. Элементы → Сниппеты: Создайте новый сниппет со следующими параметрами

1. Название сниппета: `ddTypograph`.
2. Описание: `<b>2.4.2</b> Сниппет типографирует текст. Не использует сторонних сервисов, не отправляет никаких запросов, всё делается прямо у вас на сервере.`.
2. Описание: `<b>2.5</b> Сниппет типографирует текст. Не использует сторонних сервисов, не отправляет никаких запросов, всё делается прямо у вас на сервере.`.
3. Категория: `Core`.
4. Анализировать DocBlock: `no`.
5. Код сниппета (php): Вставьте содержимое файла `ddTypograph_snippet.php` из архива.
Expand Down Expand Up @@ -120,7 +120,38 @@
```


## [Home page →](https://code.divandesign.biz/modx/ddtypograph)
#### Запустить сниппет без DB и eval через `\DDTools\Snippet::runSnippet`

```php
\DDTools\Snippet::runSnippet([
'name' => 'ddTypograph',
'params' => [
'text' => "
There's nothing you can do that can't be done
Nothing you can sing that can't be sung

https://ru.wikipedia.org/wiki/The_Beatles
",
'text_paragraphs' => true,
'text_autoLinks' => true
]
]);
```

Вернёт:

```
<p>There’s nothing you can do&nbsp;that can’t be&nbsp;done<br>
Nothing you can sing that can’t be&nbsp;sung</p>
<p><a href="https://en.wikipedia.org/wiki/The_Beatles">en.wikipedia.org/wiki/The_Beatles</a></p>
```


## Ссылки

* [Home page](https://code.divandesign.ru/modx/ddtypograph)
* [Telegram chat](https://t.me/dd_code)
* [Packagist](https://packagist.org/packages/dd/evolutioncms-snippets-ddtypograph)


<link rel="stylesheet" type="text/css" href="https://DivanDesign.ru/assets/files/ddMarkdown.css" />
21 changes: 18 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dd/evolutioncms-snippets-ddtypograph",
"type": "modxevo-snippet",
"version": "2.4.2",
"version": "2.5.0",
"description": "Snippet for text typography. The snippet doesn't use third-party services, also it sends no requests. In other words, everything is performed on your server.",
"keywords": [
"modx",
Expand All @@ -21,8 +21,23 @@
"text correction",
"text typography"
],
"homepage": "https://code.divandesign.biz/modx/ddtypograph",
"authors": [
{
"name": "DD Group",
"email": "code@DivanDesign.biz",
"homepage": "https://code.divandesign.biz",
"role": "Owner"
},
{
"name": "Ilyas Ronef",
"email": "ilyas@DivanDesign.ru",
"homepage": "https://ronef.ru",
"role": "Developer"
}
],
"require": {
"php": ">=5.4.0",
"dd/modxevo-library-ddtools": ">=0.32.0"
"php": ">=5.6.0",
"dd/evolutioncms-libraries-ddtools": ">=0.48.1"
}
}
Loading

0 comments on commit 480367d

Please sign in to comment.