Changeset 2802:17635642bd03
- Timestamp:
- 11/19/14 13:42:04 (11 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/public/lib.tpl.context.php
r2774 r2802 103 103 } 104 104 105 106 # Static methods 107 public static function global_filter($str, 108 $encode_xml, $remove_html, $cut_string, $lower_case, $upper_case ,$encode_url ,$tag='') 109 { 110 $args = func_get_args(); 111 array_pop($args); 112 $args[0] =& $str; 113 114 # --BEHAVIOR-- publicBeforeContentFilter 115 $res = $GLOBALS['core']->callBehavior('publicBeforeContentFilter',$GLOBALS['core'],$tag,$args); 116 117 if ($remove_html) { 118 $str = self::remove_html($str); 119 $str = preg_replace('/\s+/',' ',$str); 120 } 121 122 if ($encode_xml) { 123 $str = self::encode_xml($str); 124 } 125 126 if ($cut_string) { 127 $str = self::cut_string($str,(integer) $cut_string); 128 } 129 130 if ($lower_case) { 131 $str = self::lower_case($str); 132 } elseif ($upper_case) { 133 if ($upper_case == 2) { 134 $str = self::capitalize($str); 135 } else { 136 $str = self::upper_case($str); 137 } 138 } 139 if ($encode_url) { 140 $str = self::encode_url($str); 141 } 142 143 # --BEHAVIOR-- publicAfterContentFilter 144 $res = $GLOBALS['core']->callBehavior('publicAfterContentFilter',$GLOBALS['core'],$tag,$args); 145 146 return $str; 147 } 148 149 public static function encode_url($str) 150 { 151 return urlencode($str); 152 } 105 # Static methods 106 public static function global_filter($str, 107 $encode_xml, $remove_html, $cut_string, $lower_case, $upper_case ,$encode_url ,$tag='') 108 { 109 $args = func_get_args(); 110 array_pop($args); 111 $args[0] =& $str; 112 113 # --BEHAVIOR-- publicBeforeContentFilter 114 $res = $GLOBALS['core']->callBehavior('publicBeforeContentFilter',$GLOBALS['core'],$tag,$args); 115 116 if ($remove_html) { 117 $str = self::remove_html($str); 118 $str = preg_replace('/\s+/',' ',$str); 119 } 120 121 if ($encode_xml) { 122 $str = self::encode_xml($str); 123 } 124 125 if ($cut_string) { 126 $str = self::cut_string($str,(integer) $cut_string); 127 } 128 129 if ($lower_case) { 130 $str = self::lower_case($str); 131 } elseif ($upper_case) { 132 if ($upper_case == 2) { 133 $str = self::capitalize($str); 134 } else { 135 $str = self::upper_case($str); 136 } 137 } 138 if ($encode_url) { 139 $str = self::encode_url($str); 140 } 141 142 # --BEHAVIOR-- publicAfterContentFilter 143 $res = $GLOBALS['core']->callBehavior('publicAfterContentFilter',$GLOBALS['core'],$tag,$args); 144 145 return $str; 146 } 147 148 public static function encode_url($str) 149 { 150 return urlencode($str); 151 } 153 152 154 153 public static function cut_string($str,$l) -
themes/ductile/tpl/_head.html
r2566 r2802 11 11 <link rel="stylesheet" type="text/css" href="{{tpl:BlogThemeURL}}/../default/print.css" media="print" /> 12 12 13 <script type="text/javascript" src="{{tpl:Blog ThemeURL}}/../default/js/jquery.js"></script>14 <script type="text/javascript" src="{{tpl:Blog ThemeURL}}/../default/js/jquery.cookie.js"></script>13 <script type="text/javascript" src="{{tpl:BlogQmarkURL}}pf={{tpl:BlogJsJQuery}}/jquery.js"></script> 14 <script type="text/javascript" src="{{tpl:BlogQmarkURL}}pf={{tpl:BlogJsJQuery}}/jquery.cookie.js"></script> 15 15 16 16 {{tpl:include src="user_head.html"}}
Note: See TracChangeset
for help on using the changeset viewer.