Changeset 1748
- Timestamp:
- 04/03/08 09:10:13 (19 months ago)
- Location:
- branches/dipper
- Files:
-
- 4 modified
-
lib/MT/Template/ContextHandlers.pm (modified) (1 diff)
-
php/lib/archive_lib.php (modified) (2 diffs)
-
php/lib/function.mtarchivecount.php (modified) (2 diffs)
-
plugins/WidgetManager/default_widgets/current_category_monthly_archive_list.mtml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/dipper/lib/MT/Template/ContextHandlers.pm
r1282 r1748 5885 5885 sub _hdlr_archive_count { 5886 5886 my $ctx = $_[0]; 5887 if ($ctx->{inside_mt_categories}) { 5887 my $at = $ctx->{current_archive_type} || $ctx->{archive_type}; 5888 my $archiver = MT->publisher->archiver($at); 5889 if ($ctx->{inside_mt_categories} && !$archiver->date_based) { 5888 5890 return _hdlr_category_count($ctx); 5889 5891 } elsif (my $count = $ctx->stash('archive_count')) { -
branches/dipper/php/lib/archive_lib.php
r1174 r1748 68 68 function setup_args($ctx, &$args) { } 69 69 function template_params(&$ctx) { } 70 function is_date_based() { return false; } 70 71 } 71 72 … … 147 148 148 149 // Override Method 150 function is_date_based() { return true; } 151 149 152 function archive_prev_next($args, $content, &$ctx, &$repeat, $tag, $at) { 150 153 $localvars = array('current_timestamp', 'current_timestamp_end', 'entries'); -
branches/dipper/php/lib/function.mtarchivecount.php
r1174 r1748 7 7 8 8 function smarty_function_mtarchivecount($args, &$ctx) { 9 if ($ctx->stash('inside_mt_categories')) { 9 $at = ''; 10 $archiver = null; 11 if ($at = $ctx->stash('current_archive_type')) { 12 require_once("archive_lib.php"); 13 global $_archivers; 14 $archiver = $_archivers[$at]; 15 } 16 if ($ctx->stash('inside_mt_categories') && !$archiver->is_date_based()) { 10 17 return $ctx->tag('MTCategoryCount', $args); 11 18 } elseif ($count = $ctx->stash('archive_count')) { … … 16 23 $eargs = array(); 17 24 $eargs['blog_id'] = $ctx->stash('blog_id'); 18 if ($at = $ctx->stash('current_archive_type')) {25 if ($at) { 19 26 require_once("archive_lib.php"); 20 27 $ts = $ctx->stash('current_timestamp'); 21 28 $tse = $ctx->stash('current_timestamp_end'); 22 global $_archivers;23 $archiver = $_archivers[$at];24 29 if (isset($archiver)) { 25 30 if ($ts && $tse) { -
branches/dipper/plugins/WidgetManager/default_widgets/current_category_monthly_archive_list.mtml
r1104 r1748 7 7 <ul class="widget-list"> 8 8 </mt:ArchiveListHeader> 9 <li class="widget-list-item"><a href="<$mt:ArchiveLink$>"><__trans phrase="[_1] ([_2])" params="<$mt:ArchiveTitle$>%%<$mt:ArchiveCount$>"></a></li>9 <li class="widget-list-item"><a href="<$mt:ArchiveLink$>"><__trans phrase="[_1]" params="<$mt:ArchiveTitle$>"></a></li> 10 10 <mt:ArchiveListFooter> 11 11 </ul>
