Changeset 21420 for branches/version-2_12-dev/data/smarty_extends
- Timestamp:
- 2012/01/23 04:49:37 (10 years ago)
- Location:
- branches/version-2_12-dev/data/smarty_extends
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/smarty_extends/block.marquee.php
r21010 r21420 9 9 */ 10 10 function smarty_block_marquee($params, $content, &$smarty, &$repeat) { 11 12 13 14 11 // {/marquee}の場合のみ出力する。 12 if ($repeat || !isset($content)) { 13 return null; 14 } 15 15 16 17 16 // 末尾の改行などを取り除く。 17 $content = rtrim($content); 18 18 19 20 21 22 19 // marqueeタグを使用しない場合 20 if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE && SC_MobileUserAgent::getCarrier() == 'docomo') { 21 return "<div>\n$content\n</div>\n"; 22 } 23 23 24 24 return "<marquee>\n$content\n</marquee>\n"; 25 25 } 26 ?> -
branches/version-2_12-dev/data/smarty_extends/function.from_to.php
r20540 r21420 66 66 } 67 67 } 68 69 ?> -
branches/version-2_12-dev/data/smarty_extends/function.html_checkboxes_ex.php
r18234 r21420 49 49 $separator = ''; 50 50 $labels = true; 51 51 $label_ids = true; 52 52 $output = null; 53 53 … … 56 56 foreach($params as $_key => $_val) { 57 57 switch($_key) { 58 59 60 58 case 'tags': 59 $$_key = split("\|", $_val); 60 break; 61 61 case 'name': 62 62 case 'separator': … … 65 65 66 66 case 'labels': 67 67 case 'label_ids': 68 68 $$_key = (bool)$_val; 69 69 break; … … 129 129 130 130 function smarty_function_html_checkboxes_output_ex($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $tags) { 131 132 131 $_output = ''; 132 133 133 $_output .= '<input type="checkbox" name="' 134 134 . smarty_function_escape_special_chars($name) . '[]" value="' 135 135 . smarty_function_escape_special_chars($value) . '"'; 136 137 138 139 140 141 136 137 if ($labels && $label_ids) { 138 $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value)); 139 $_output .= ' id="' . $_id . '"'; 140 } 141 142 142 if (in_array((string)$value, $selected)) { 143 143 $_output .= ' checked="checked"'; 144 144 } 145 145 $_output .= $extra . ' />'; 146 147 148 149 150 151 152 153 154 $_output .= '<label>'; 155 156 157 158 159 160 161 162 146 147 $_output .= $tags[0]; 148 149 if ($labels) { 150 if($label_ids) { 151 $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value)); 152 $_output .= '<label for="' . $_id . '">'; 153 } else { 154 $_output .= '<label>'; 155 } 156 } 157 158 // 値を挿入 159 $_output .= $output; 160 161 $_output .= $tags[1]; 162 163 163 if ($labels) $_output .= '</label>'; 164 164 $_output .= $separator; … … 166 166 return $_output; 167 167 } 168 169 ?> -
branches/version-2_12-dev/data/smarty_extends/function.html_radios_ex.php
r20540 r21420 55 55 foreach($params as $_key => $_val) { 56 56 switch($_key) { 57 58 59 57 case 'tags': 58 $$_key = split("\|", $_val); 59 break; 60 60 case 'name': 61 61 case 'separator': … … 92 92 case 'assign': 93 93 break; 94 94 95 95 default: 96 96 if(!is_array($_val)) { … … 136 136 . smarty_function_escape_special_chars($name) . '" value="' 137 137 . smarty_function_escape_special_chars($value) . '"'; 138 138 139 139 if ($labels && $label_ids) { 140 141 140 $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value)); 141 $_output .= ' id="' . $_id . '"'; 142 142 } 143 143 if ((string)$value == $selected) { 144 144 $_output .= ' checked="checked"'; 145 145 } 146 147 $_output .= $extra . ' />';148 146 149 $_output .= $tags[0]; 150 151 if ($labels) { 147 $_output .= $extra . ' />'; 148 149 $_output .= $tags[0]; 150 151 if ($labels) { 152 152 if($label_ids) { 153 153 $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value)); 154 154 $_output .= '<label for="' . $_id . '">'; 155 155 } else { … … 157 157 } 158 158 } 159 160 161 162 163 164 165 159 160 // 値を挿入 161 $_output .= $output; 162 163 $_output .= $tags[1]; 164 165 if ($labels) $_output .= '</label>'; 166 166 $_output .= $separator; 167 167 168 168 return $_output; 169 169 } 170 171 ?> -
branches/version-2_12-dev/data/smarty_extends/modifier.nl2br_html.php
r20540 r21420 38 38 return implode('', $lines); 39 39 } 40 41 ?> -
branches/version-2_12-dev/data/smarty_extends/modifier.numeric_emoji.php
r21302 r21420 10 10 */ 11 11 function smarty_modifier_numeric_emoji($value) { 12 13 12 // 数字絵文字 (0~9) の絵文字番号 13 static $numeric_emoji_index = array('134', '125', '126', '127', '128', '129', '130', '131', '132', '133'); 14 14 15 15 if ((SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) 16 16 && isset($numeric_emoji_index[$value]) 17 17 ) { 18 19 20 21 18 return '[emoji:' . $numeric_emoji_index[$value] . ']'; 19 } else { 20 return '[' . $value . ']'; 21 } 22 22 } 23 ?> -
branches/version-2_12-dev/data/smarty_extends/modifier.script_escape.php
r18234 r21420 19 19 } 20 20 } 21 ?>
Note: See TracChangeset
for help on using the changeset viewer.