Migration SVN
This commit is contained in:
38
system/libs/smarty/plugins/modifier.vertical.php
Executable file
38
system/libs/smarty/plugins/modifier.vertical.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage plugins
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Smarty plugin
|
||||
*
|
||||
* Type: modifier<br>
|
||||
* Name: vertical<br>
|
||||
* Date: Oct 20, 2008
|
||||
* Purpose: Vertical Word
|
||||
* Input:<br>
|
||||
* - contents = contents to replace
|
||||
* - preceed_test = if true, includes preceeding break tags
|
||||
* in replacement
|
||||
* Example: {$text|nl2br}
|
||||
* @link http://smarty.php.net/manual/en/language.modifier.nl2br.php
|
||||
* nl2br (Smarty online manual)
|
||||
* @version 1.0
|
||||
* @author Revolution
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function smarty_modifier_vertical($string)
|
||||
{
|
||||
$retour = "";
|
||||
for ($i = 0; $i < strlen($string); $i++)
|
||||
$retour .= $string{$i}."<br />";
|
||||
return ($retour);
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user