__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @copyright Copyright (C) 2011 Simplify Your Web, Inc. All rights reserved.
* @license GNU General Public License version 3 or later; see LICENSE.txt
*/
namespace SYW\Library;
defined('_JEXEC') or die;
use Joomla\CMS\HTML\Helpers\StringHelper;
class Text
{
/**
* Get text from string with or without stripped html tags
* Strips out Joomla plugin tags
* Joomla 3.1+ only
*
*/
static function getText($text, $type='html', $max_letter_count = 0, $strip_tags = true, $tags_to_keep = '', $strip_plugin_tags = true, $split_last_word = false)
{
if ($max_letter_count == 0) {
return '';
}
if ($max_letter_count > 0) {
if ($type === 'html') {
$text = self::stripPluginTags($text);
if ($strip_tags) {
$text = strip_tags($text, $tags_to_keep);
return StringHelper::truncateComplex($text, $max_letter_count, !$split_last_word);
} else {
return StringHelper::truncateComplex($text, $max_letter_count, !$split_last_word);
}
} else { // 'txt'
return StringHelper::truncate($text, $max_letter_count, !$split_last_word, false); // no html allowed
}
} else { // take everything
if ($type === 'html') {
if ($strip_plugin_tags) {
$text = self::stripPluginTags($text);
}
if ($strip_tags) {
if ($tags_to_keep == '') {
$text = strip_tags($text);
return html_entity_decode($text, ENT_QUOTES, 'UTF-8');
} else {
$text = strip_tags($text, $tags_to_keep);
return html_entity_decode($text, ENT_QUOTES, 'UTF-8');
}
} else {
return html_entity_decode($text, ENT_QUOTES, 'UTF-8');
}
}
}
return $text;
}
static function stripPluginTags($output)
{
$plugins = array();
preg_match_all('/\{\w*/', $output, $matches);
foreach ($matches[0] as $match) {
$match = str_replace('{', '', $match);
if (strlen($match)) {
$plugins[$match] = $match;
}
}
$find = array();
foreach ($plugins as $plugin) {
$find[] = '\{'.$plugin.'\s?.*?\}.*?\{/'.$plugin.'\}';
$find[] = '\{'.$plugin.'\s?.*?\}';
}
if(!empty($find)) {
foreach($find as $key=>$f) {
$f = '/'.str_replace('/','\/',$f).'/';
$find[$key] = $f;
}
$output = preg_replace($find ,'', $output);
}
return $output;
}
}
?>| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Field | Folder | 0775 |
|
|
| Image | Folder | 0775 |
|
|
| Vendor | Folder | 0775 |
|
|
| Cache.php | File | 7.02 KB | 0664 |
|
| Fields.php | File | 6.86 KB | 0664 |
|
| Fonts.php | File | 13.75 KB | 0664 |
|
| HeaderFilesCache.php | File | 5.02 KB | 0664 |
|
| Image.php | File | 23.43 KB | 0664 |
|
| K2.php | File | 3.39 KB | 0664 |
|
| Libraries.php | File | 17.95 KB | 0664 |
|
| Plugin.php | File | 1.71 KB | 0664 |
|
| Stylesheets.php | File | 54.61 KB | 0664 |
|
| Tags.php | File | 2.36 KB | 0664 |
|
| Text.php | File | 2.31 KB | 0664 |
|
| Utilities.php | File | 30.4 KB | 0664 |
|
| Version.php | File | 3.29 KB | 0664 |
|