Changeset 1464 for plugins/splitPost/_public.php
- Timestamp:
- 09/16/09 10:39:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/splitPost/_public.php
r1423 r1464 14 14 15 15 $core->tpl->addValue('PostPagination',array('splitPostTpl','PostPagination')); 16 $core->tpl->addValue('EntryContent',array('splitPostTpl','EntryContent')); 16 17 17 18 $core->url->register('post','post','^post/(.+)$',array('splitPostUrl','post')); … … 197 198 class splitPostTpl 198 199 { 200 public static function EntryContent($attr) 201 { 202 $urls = '0'; 203 if (!empty($attr['absolute_urls'])) { 204 $urls = '1'; 205 } 206 207 $f = $GLOBALS['core']->tpl->getFilters($attr); 208 209 $res = ''; 210 211 212 if (!empty($attr['full'])) { 213 $res = '<?php echo '.sprintf($f, 214 '$_ctx->posts->getExcerpt('.$urls.')." ".$_ctx->posts->getContent('.$urls.')').'; ?>'; 215 } else { 216 $res = '<?php echo '.sprintf($f,'$_ctx->posts->getContent('.$urls.')').'; ?>'; 217 } 218 219 $res .= "<?php if (\$core->blog->settings->splitpost_auto_insert) : ?>\n"; 220 $res .= splitPostTpl::PostPagination($attr); 221 $res .= "<?php endif; ?>\n"; 222 223 return $res; 224 } 225 199 226 public static function PostPagination($attr) 200 227 { … … 219 246 $res .= "\$pager = new splitPostPager(\$_ctx->post_page_current,\$_ctx->post_page_count,".$max.");\n"; 220 247 $res .= "\$pager->init(\$params);\n"; 221 $res .= "echo \$pager->getLinks();\n";248 $res .= "echo ".sprintf($f,'$pager->getLinks()').";\n"; 222 249 $res .= "?>\n"; 223 250
Note: See TracChangeset
for help on using the changeset viewer.