Changeset 220
- Timestamp:
- 07/02/10 16:07:08 (19 months ago)
- Location:
- branches/fuze
- Files:
-
- 1 added
- 2 edited
-
modules/mod_comments/module.php (modified) (2 diffs)
-
templates/_default_/css/styles.css (modified) (2 diffs)
-
templates/_default_/modules/mod_comments.tpl (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/fuze/modules/mod_comments/module.php
r181 r220 57 57 58 58 $result = $inDB->query($sql); 59 59 $is_com = false; 60 60 if ($inDB->num_rows($result)){ 61 61 $is_com = true; 62 62 $count = 0; 63 64 echo '<table cellspacing="2" cellpadding="4" border="0">'; 63 $comments = array(); 65 64 while($con = $inDB->fetch_assoc($result)){ 66 65 … … 69 68 if ($con['rating'] >= $cfg['minrate']){ 70 69 71 $link = $con['target_link'] . '#c'.$con['id']; 72 $text = strip_tags($inCore->parseSmiles($con['content'], true)); 70 $con['link'] = $con['target_link'] . '#c'.$con['id']; 71 $con['text'] = strip_tags($inCore->parseSmiles($con['content'], true)); 72 if (strlen($con['text'])>60) { $con['text'] = substr($con['text'], 0, 60). '...'; } 73 if (!$con['text']) { $con['text'] = '...'; } 73 74 74 if (strlen($text)>50) { $text = substr($text, 0, 50). '...'; } 75 $con['user_url'] = $con['user_id'] ? cmsUser::getProfileURL($con['author_login']) : $con['link']; 76 $con['author'] = $con['user_id'] ? $con['author'] : $con['guestname']; 77 $con['fpubdate'] = $inCore->dateFormat($con['fpubdate']); 75 78 76 if (!$text) { $text = '...'; } 77 78 $user_url = $con['user_id'] ? cmsUser::getProfileURL($con['author_login']) : $link; 79 $author = $con['user_id'] ? $con['author'] : $con['guestname']; 80 81 echo '<tr>'; 82 echo '<td valign="top">'; 83 echo '<div><a class="mod_com_userlink" href="'.$user_url.'">'.$author.'</a> → '; 84 echo '<a class="mod_com_link" href="'.$link.'">'.$text.'</a> ('.$inCore->dateFormat($con['fpubdate']).')</td>'; 85 echo '</tr>'; 86 87 $count++; 88 79 $comments[] = $con; 80 $count++; 89 81 } 90 82 91 83 } 92 echo '</table>';93 84 94 if ($cfg['showrss']){95 echo '<table align="right" style="margin-top:5px"><tr>'; 96 echo '<td width="16"><img src="/images/markers/rssfeed.png" /></td>'; 97 echo '<td><a href="/rss/comments/all/feed.rss" style="text-decoration:underline;color:#333">'.$_LANG['COMMENTS_RSS'].'</a></td>';98 echo '</tr></table>';99 } 100 } else { echo '<p>'.$_LANG['COMMENTS_NOT_COMM'].'</p>'; } 101 85 } 86 87 $smarty = $inCore->initSmarty('modules', 'mod_comments.tpl'); 88 $smarty->assign('comments', $comments); 89 $smarty->assign('cfg', $cfg); 90 $smarty->assign('is_com', $is_com); 91 $smarty->display('mod_comments.tpl'); 92 102 93 return true; 103 94 } -
branches/fuze/templates/_default_/css/styles.css
r216 r220 393 393 height:16px; 394 394 line-height:16px; 395 text-decoration:underline; 396 color:#333 395 397 } 396 398 … … 602 604 color:#666666; 603 605 } 604 606 .mod_com_line{ 607 margin:7px 0; 608 } 605 609 /*--------------------- MODULE "LATEST FORUM WEB2.0" -------------------------*/ 606 610 .mod_fweb2_userlink{
Note: See TracChangeset
for help on using the changeset viewer.
