Show
Ignore:
Timestamp:
02/10/09 09:35:07 (3 years ago)
Author:
daris
Message:

portal: fixes for recent posts panel

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/portal_by_daris/panels/recent_posts.php

    r5 r19  
    3737if ($forum_db->num_rows($result) > 0) 
    3838{ 
     39 
     40?> 
     41                <ul class="recent-posts"> 
     42<?php 
     43 
    3944        while ($cur_topic = $forum_db->fetch_assoc($result)) 
    4045        { 
     
    4550                $subject = (utf8_strlen($cur_topic['subject']) > $subject_len ? utf8_substr($cur_topic['subject'], 0, $subject_len).'...' : $cur_topic['subject']); 
    4651                $subject = forum_htmlencode($subject); 
     52                $title = forum_htmlencode($cur_topic['subject']); 
     53                $title .= ', '.$lang_portal['By'].': '.forum_htmlencode($cur_topic['last_poster']); 
     54                $title .= ', '.$lang_portal['Posted'].': '.format_time($cur_topic['last_post']) 
     55                 
    4756?> 
    48                         <ul class="recent-post"> 
    49                                 <li><a href="<?php echo forum_link($forum_url['post'], array($cur_topic['last_post_id'])) ?>" title="<?php echo forum_htmlencode($cur_topic['subject']) ?>"><?php echo $subject ?></a></li> 
    50                                 <li class="by"><span><?php echo $lang_portal['By'].': '.forum_htmlencode($cur_topic['last_poster']) ?></span></li> 
    51                                 <li class="posted"><span><?php echo $lang_portal['Posted'].': '.format_time($cur_topic['last_post']) ?></span></li> 
    52                         </ul> 
     57                        <li><a href="<?php echo forum_link($forum_url['post'], array($cur_topic['last_post_id'])) ?>" title="<?php echo $title ?>"><?php echo $subject ?></a></li> 
    5358<?php 
    5459 
    5560        } 
     61 
     62?> 
     63                </ul> 
     64<?php 
    5665} 
    57 // Else there are no posts 
    58 else 
    59 { 
    60         echo $lang_portal['No posts']; 
    61 } 
     66// If there are no posts do not display panel