Changeset 16782
- Timestamp:
- 03/31/09 00:07:49 (4 years ago)
- Files:
-
- plugins/sfSympalBlogPlugin/trunk/config/sfSympalBlogPluginConfiguration.class.php (modified) (1 diff)
- plugins/sfSympalBlogPlugin/trunk/lib/model/doctrine/PluginBlogPostTable.class.php (modified) (1 diff)
- plugins/sfSympalBlogPlugin/trunk/modules/sympal_blog/templates/_blog_list.php (modified) (1 diff)
- plugins/sfSympalBlogPlugin/trunk/modules/sympal_blog/templates/_sidebar.php (modified) (1 diff)
- plugins/sfSympalBlogPlugin/trunk/modules/sympal_blog/templates/_view.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfSympalBlogPlugin/trunk/config/sfSympalBlogPluginConfiguration.class.php
r16689 r16782 5 5 $dependencies = array( 6 6 'sfSympalPlugin', 7 'sfSympalSecurityPlugin', 8 'sfSympalUserProfilePlugin', 7 'sfSympalUserPlugin' 9 8 ); 10 9 } plugins/sfSympalBlogPlugin/trunk/lib/model/doctrine/PluginBlogPostTable.class.php
r16576 r16782 17 17 public function retrieveTopAuthors($num) 18 18 { 19 Doctrine::getTable('UserProfile'); 20 21 $q = Doctrine::getTable('Content') 22 ->createQuery('e') 23 ->select('*, count(ce.id) as num_posts') 24 ->innerJoin('e.Type t2') 25 ->innerJoin('e.UserProfile p') 26 ->innerJoin('p.User u2') 27 ->innerJoin('u2.CreatedContent ce') 28 ->innerJoin('ce.Type t WITH t.name = ?', 'BlogPost') 29 ->groupBy('e.id') 19 $q = Doctrine::getTable('User') 20 ->createQuery('u') 21 ->select('*, count(uc.id) as num_posts') 22 ->innerJoin('u.CreatedContent uc') 23 ->innerJoin('uc.Type t WITH t.name = ?', 'BlogPost') 24 ->groupBy('u.id') 30 25 ->limit($num); 31 26 plugins/sfSympalBlogPlugin/trunk/modules/sympal_blog/templates/_blog_list.php
r16576 r16782 8 8 <div class="row"> 9 9 <h3><?php echo link_to($content, $content->getRoute()) ?></h3> 10 <?php echo image_tag($content->CreatedBy-> Profile->getGravatarUrl(), 'align=right') ?>10 <?php echo image_tag($content->CreatedBy->getGravatarUrl(), 'align=right') ?> 11 11 <p class="date"> 12 12 <strong> 13 Posted by <?php echo link_to($content->CreatedBy->username, $content->CreatedBy->Profile->Content->getRoute()) ?> on13 Posted by <?php echo $content->CreatedBy->getName() ?> on 14 14 <?php echo date('m/d/Y h:i:s', strtotime($content->created_at)) ?> 15 15 </strong> plugins/sfSympalBlogPlugin/trunk/modules/sympal_blog/templates/_sidebar.php
r16576 r16782 10 10 11 11 <ul> 12 <?php foreach ($authors as $ content): ?>13 <li><?php echo link_to($content, $content->getRoute()) ?> (<?php echo $content->num_posts ?>)</li>12 <?php foreach ($authors as $author): ?> 13 <li><?php echo $author->getName() ?> (<?php echo $author->num_posts ?>)</li> 14 14 <?php endforeach; ?> 15 15 </ul> plugins/sfSympalBlogPlugin/trunk/modules/sympal_blog/templates/_view.php
r16731 r16782 7 7 <h2><?php echo get_sympal_column_content_slot($content, 'title') ?></h2> 8 8 9 <?php echo image_tag($content->CreatedBy-> Profile->getGravatarUrl(), 'align=right') ?>9 <?php echo image_tag($content->CreatedBy->getGravatarUrl(), 'align=right') ?> 10 10 11 11 <p> … … 24 24 </div> 25 25 26 <?php echo get_sympal_comments($content) ?> 26 <?php if (sfSympalConfig::get('sfSympalCommentsPlugin', 'enabled') && sfSympalConfig::get('BlogPost', 'enable_comments')): ?> 27 <?php echo get_sympal_comments($content) ?> 28 <?php endif; ?> 27 29 </div> 28 30