Changeset 225 for branches/fuze/modules/mod_latestblogs/module.php
- Timestamp:
- 07/05/10 13:52:23 (23 months ago)
- File:
-
- 1 edited
-
branches/fuze/modules/mod_latestblogs/module.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/fuze/modules/mod_latestblogs/module.php
r181 r225 47 47 48 48 $result = $inDB->query($sql); 49 $is_blog = false; 50 if ($inDB->num_rows($result)){ 49 51 50 if ($inDB->num_rows($result)){ 51 echo '<table cellspacing="2" cellpadding="4" border="0">'; 52 52 $is_blog = true; 53 53 $count = 1; 54 54 $posts = array(); 55 55 56 while($con = $inDB->fetch_assoc($result)){ 56 57 … … 67 68 } 68 69 69 $link = $model->getPostURL(null, $con['bloglink'], $con['seolink']); 70 $text = strip_tags($con['title']); 71 72 if (strlen($text)>70) { $text = substr($text, 0, 70). '...'; } 73 echo '<tr>'; 74 echo '<td valign="top">'; 75 echo '<a class="mod_blog_userlink" href="'.$model->getBlogURL(null, $con['bloglink']).'">'.$con['blog'].'</a> → '; 76 77 echo '<a class="mod_blog_link" href="'.$link.'">'.$text.'</a> ('.$inCore->dateFormat($con['fpubdate']).')</td>'; 78 echo '</tr>'; 70 $con['href'] = $model->getPostURL(null, $con['bloglink'], $con['seolink']); 71 $con['title'] = strip_tags($con['title']); 72 if (strlen($con['title'])>70) { $con['title'] = substr($con['title'], 0, 70). '...'; } 73 $con['fpubdate'] = $inCore->dateFormat($con['fpubdate']); 74 $con['bloghref'] = $model->getBlogURL(null, $con['bloglink']); 79 75 80 76 $count++; 81 77 82 78 } 83 79 $posts[] = $con; 84 80 } 85 86 echo '</table>'; 87 88 if ($cfg['showrss']){ 89 echo '<table align="right" style="margin-top:5px"><tr>'; 90 echo '<td width="16"><img src="/images/markers/rssfeed.png" /></td>'; 91 echo '<td><a href="/rss/blogs/all/feed.rss" style="text-decoration:underline;color:#333">'.$_LANG['LATESTBLOGS_RSS'].'</a></td>'; 92 echo '</tr></table>'; 93 } 94 } else { echo '<p>'.$_LANG['LATESTBLOGS_NOT_POSTS'].'</p>'; } 81 82 } 83 84 $smarty = $inCore->initSmarty('modules', 'mod_latestblogs.tpl'); 85 $smarty->assign('posts', $posts); 86 $smarty->assign('cfg', $cfg); 87 $smarty->assign('is_blog', $is_blog); 88 $smarty->display('mod_latestblogs.tpl'); 95 89 96 90 return true;
Note: See TracChangeset
for help on using the changeset viewer.
