Changeset 7012
- Timestamp:
- May 7, 2008, 5:27:14 PM (14 years ago)
- Location:
- OpenPNE/branches/stable-2.12.x/webapp/modules/portal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/branches/stable-2.12.x/webapp/modules/portal/lib/db_portal.php
r6527 r7012 274 274 $is_recurred = false; 275 275 276 $select = "SELECT ct.*, c.name as commu_name, c tc.r_datetime as comment_datetime, c.image_filename as image_filename";276 $select = "SELECT ct.*, c.name as commu_name, c.image_filename as image_filename"; 277 277 $from = " FROM c_commu_topic as ct" 278 . " LEFT JOIN c_commu as c ON c.c_commu_id = ct.c_commu_id" 279 . " LEFT JOIN c_commu_topic_comment as ctc ON (ctc.c_commu_topic_id = ct.c_commu_topic_id AND ctc.number = (select max(number) FROM c_commu_topic_comment where c_commu_topic_id = ct.c_commu_topic_id))"; 278 . " LEFT JOIN c_commu as c ON c.c_commu_id = ct.c_commu_id"; 280 279 $where = " WHERE c.public_flag = 'public'"; 281 $order = " ORDER BY c omment_datetime DESC";280 $order = " ORDER BY ct.u_datetime DESC"; 282 281 283 282 $sql = $select . $from . $where . $order; -
OpenPNE/branches/stable-2.12.x/webapp/modules/portal/templates/inc_portal_Contents_Layout.tpl
r6410 r7012 11 11 <span><img src="({t_img_url filename=$item.image_filename w=76 h=76 noimg=no_logo_small})" alt="({$item.commu_name})" /></span> 12 12 <dl> 13 <dt>({$item. comment_datetime|date_format:"%m/%d"})</dt>13 <dt>({$item.u_datetime|date_format:"%m/%d"})</dt> 14 14 <dd>({$item.name}) (({$item.count_comments|number_format})) (({$item.commu_name}))</dd> 15 15 </dl> … … 32 32 <dl> 33 33 ({foreach from=$data.contents item=item}) 34 <dt>({$item. comment_datetime|date_format:"%m/%d"})</dt>34 <dt>({$item.u_datetime|date_format:"%m/%d"})</dt> 35 35 <dd>({$item.name}) (({$item.count_comments|number_format})) (({$item.commu_name}))</dd> 36 36 ({/foreach})
Note: See TracChangeset
for help on using the changeset viewer.