Changeset 574:6430df826043 for themes/ductile/_public.php
- Timestamp:
- 07/11/11 18:29:40 (14 years ago)
- Branch:
- themes
- File:
-
- 1 edited
-
themes/ductile/_public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_public.php
r563 r574 19 19 # Templates 20 20 $core->tpl->addValue('ductileEntriesList',array('tplDuctileTheme','ductileEntriesList')); 21 $core->tpl->addBlock('EntryIfContentIsCut',array('tplDuctileTheme','EntryIfContentIsCut')); 21 22 22 23 class tplDuctileTheme 23 24 { 25 public static function EntryIfContentIsCut($attr,$content) 26 { 27 global $core; 28 29 if (empty($attr['cut_string']) || empty($attr['cut_string'])) { 30 return ''; 31 } 32 33 $urls = '0'; 34 if (!empty($attr['absolute_urls'])) { 35 $urls = '1'; 36 } 37 38 $short = $core->tpl->getFilters($attr); 39 $attr['cut_string'] = 0; 40 $full = $core->tpl->getFilters($attr); 41 42 return '<?php if (strlen('.sprintf($full,'$_ctx->posts->getContent('.$urls.')').') > '. 43 'strlen('.sprintf($short,'$_ctx->posts->getContent('.$urls.')').')) : ?>'. 44 $content. 45 '<?php endif; ?>'; 46 } 47 24 48 public static function ductileEntriesList($attr) 25 49 {
Note: See TracChangeset
for help on using the changeset viewer.
