/
home
/
techb158
/
exp.abdallabala.com
/
vendor
/
smarty
/
smarty
/
libs
/
plugins
/
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins
mkdir
upload
Name
Size
Mode
Actions
block.textformat.php
3664
0644
edit
dl
rm
function.counter.php
1823
0644
edit
dl
rm
function.cycle.php
3308
0644
edit
dl
rm
function.fetch.php
8068
0644
edit
dl
rm
function.html_checkboxes.php
9592
0644
edit
dl
rm
function.html_image.php
5668
0644
edit
dl
rm
function.html_options.php
8246
0644
edit
dl
rm
function.html_radios.php
8434
0644
edit
dl
rm
function.html_select_date.php
15183
0644
edit
dl
rm
function.html_select_time.php
14375
0644
edit
dl
rm
function.html_table.php
5375
0644
edit
dl
rm
function.mailto.php
5386
0644
edit
dl
rm
function.math.php
3785
0644
edit
dl
rm
modifier.capitalize.php
4211
0644
edit
dl
rm
modifier.date_format.php
2691
0644
edit
dl
rm
modifier.debug_print_var.php
3929
0644
edit
dl
rm
modifier.escape.php
9669
0644
edit
dl
rm
modifier.mb_wordwrap.php
2346
0644
edit
dl
rm
modifier.regex_replace.php
1657
0644
edit
dl
rm
modifier.replace.php
999
0644
edit
dl
rm
modifier.spacify.php
756
0644
edit
dl
rm
modifier.truncate.php
2231
0644
edit
dl
rm
modifiercompiler.cat.php
612
0644
edit
dl
rm
modifiercompiler.count_characters.php
918
0644
edit
dl
rm
modifiercompiler.count_paragraphs.php
659
0644
edit
dl
rm
modifiercompiler.count_sentences.php
745
0644
edit
dl
rm
modifiercompiler.count_words.php
979
0644
edit
dl
rm
modifiercompiler.default.php
770
0644
edit
dl
rm
modifiercompiler.escape.php
5125
0644
edit
dl
rm
modifiercompiler.from_charset.php
752
0644
edit
dl
rm
modifiercompiler.indent.php
712
0644
edit
dl
rm
modifiercompiler.lower.php
724
0644
edit
dl
rm
modifiercompiler.noprint.php
340
0644
edit
dl
rm
modifiercompiler.string_format.php
574
0644
edit
dl
rm
modifiercompiler.strip.php
798
0644
edit
dl
rm
modifiercompiler.strip_tags.php
720
0644
edit
dl
rm
modifiercompiler.to_charset.php
746
0644
edit
dl
rm
modifiercompiler.unescape.php
1190
0644
edit
dl
rm
modifiercompiler.upper.php
678
0644
edit
dl
rm
modifiercompiler.wordwrap.php
1112
0644
edit
dl
rm
outputfilter.trimwhitespace.php
3777
0644
edit
dl
rm
shared.escape_special_chars.php
977
0644
edit
dl
rm
shared.literal_compiler_param.php
1047
0644
edit
dl
rm
shared.make_timestamp.php
1483
0644
edit
dl
rm
shared.mb_str_replace.php
1790
0644
edit
dl
rm
shared.mb_unicode.php
1530
0644
edit
dl
rm
variablefilter.htmlspecialchars.php
451
0644
edit
dl
rm
Edit:
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins/modifier.mb_wordwrap.php
(2346B)
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsModifier */ /** * Smarty wordwrap modifier plugin * Type: modifier * Name: mb_wordwrap * Purpose: Wrap a string to a given number of characters * * @link http://php.net/manual/en/function.wordwrap.php for similarity * * @param string $str the string to wrap * @param int $width the width of the output * @param string $break the character used to break the line * @param boolean $cut ignored parameter, just for the sake of * * @return string wrapped string * @author Rodney Rehm */ function smarty_modifier_mb_wordwrap($str, $width = 75, $break = "\n", $cut = false) { // break words into tokens using white space as a delimiter $tokens = preg_split('!(\s)!S' . Smarty::$_UTF8_MODIFIER, $str, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE); $length = 0; $t = ''; $_previous = false; $_space = false; foreach ($tokens as $_token) { $token_length = mb_strlen($_token, Smarty::$_CHARSET); $_tokens = array($_token); if ($token_length > $width) { if ($cut) { $_tokens = preg_split( '!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE ); } } foreach ($_tokens as $token) { $_space = !!preg_match('!^\s$!S' . Smarty::$_UTF8_MODIFIER, $token); $token_length = mb_strlen($token, Smarty::$_CHARSET); $length += $token_length; if ($length > $width) { // remove space before inserted break if ($_previous) { $t = mb_substr($t, 0, -1, Smarty::$_CHARSET); } if (!$_space) { // add the break before the token if (!empty($t)) { $t .= $break; } $length = $token_length; } } elseif ($token === "\n") { // hard break must reset counters $length = 0; } $_previous = $_space; // add the token $t .= $token; } } return $t; }
Save
cmd:
run