skeeks/yii2-link-activation Conversion of inactive links in the text into active clickable links

Conversion of inactive links in the text ΒΆ

  1. Installation
  2. Client replace (on js)
  3. Backend replace
  4. Screenshot
  5. Video
  6. Links

SkeekS blog

A small extension to convert active links in the text to active (clickable). It can convert html or text, it is possible to convert on the client (js) as well as on the backend (php).

НСбольшоС Ρ€Π°ΡΡˆΠΈΡ€Π΅Π½ΠΈΠ΅ для прСобразования Π½Π΅Π°ΠΊΡ‚ΠΈΠ²Π½Ρ‹Ρ… ссылок Π² тСкстС Π² Π°ΠΊΡ‚ΠΈΠ²Π½Ρ‹Π΅ (ΠΊΠ»ΠΈΠΊΠ°Π±Π΅Π»ΡŒΠ½Ρ‹Π΅). ΠœΠΎΠΆΠ΅Ρ‚ ΠΏΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΠΎΠ²Ρ‹Π²Π°Ρ‚ΡŒ html ΠΈΠ»ΠΈ тСкст, Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ ΠΏΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΠΎΠ²Ρ‹Π²Π°Ρ‚ΡŒ Π½Π° ΠΊΠ»ΠΈΠ΅Π½Ρ‚Π΅ (js) Π° Ρ‚Π°ΠΊ ΠΆΠ΅ Π½Π° бэкСндС (php).

Latest Stable Version Total Downloads

Installation ΒΆ

$ composer require skeeks/yii2-link-activation "^0.0.3"

Or add this to your composer.json file:

{
    "require": {
        "skeeks/yii2-link-activation": "^0.0.3"
    }
}

Client replace (on js) ΒΆ

<?
\skeeks\yii2\linkActivation\assets\TextHandlerAsset::register($this);
$this->registerJs(<<<JS
new sx.classes.LinkActivation(".description");
JS
);
?>
<div class="description">
Какой Ρ‚ΠΎ тСкст со ссылками https://test.ru,
https://google.ru/search
ВсС ссылки Π±ΡƒΠ΄ΡƒΡ‚ автоматичСски https://cms.skeeks.com/blog/releases/2-zapusk-sayta-dlya-skeeks-cms ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Ρ‹ Π² этом тСкстС ΠΈ станут ΠΊΠ»ΠΈΠΊΠ°Π±Π΅Π»ΡŒΠ½Ρ‹ΠΌΠΈ
</div>

Backend replace ΒΆ

<?
    $handler = new \skeeks\yii2\linkActivation\TextHandler();
    $handler->short_link_max_length = 45;
    echo $handler->replace($yourText);
?>
<?= (new \skeeks\yii2\linkActivation\TextHandler())->replace($yourText); ?>

Screenshot ΒΆ

SkeekS blog

Video ΒΆ

Video

Links ΒΆ

skeeks!
SkeekS CMS (Yii2) β€” quickly, easily and effectively!
skeeks.com | cms.skeeks.com

1 0
1 follower
910 downloads
Yii Version: 2.0
License: BSD-3-Clause
Category: Web Service
Developed by: skeeks skeeks
Created on: Apr 7, 2019
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions