WHERE t.forum_id=f.forum_id' . $query_restriction . ' ORDER BY t.topic_last_post_id DESC LIMIT ' . $count); //Check if at least one Topic exists and say if isn't if ($db->sql_numrows($result) < 1) { $content = _ERROR; return trigger_error('There are no forum posts', E_USER_NOTICE); } else { $tracking_topics = isset($CPG_SESS['Forums']['track_topics']) ? $CPG_SESS['Forums']['track_topics'] : array(); $tracking_forums = isset($CPG_SESS['Forums']['track_forums']) ? $CPG_SESS['Forums']['track_forums'] : array(); while ($row = $db->sql_fetchrow($result)) { $topic_id = $row['topic_id']; $forum_id = $row['forum_id']; $post_date = MB::tolower(formatDateTime($row['post_time'], '%d. %b')); $post_time = formatDateTime($row['post_time'], '%T'); $post_time_ago = getTimeAgo($row['post_time'], dfTime()); $new_post = 0; if (is_user() && $row['post_time'] > $userinfo['user_lastvisit'] && (!empty($tracking_topics) || !empty($tracking_forums) || isset($CPG_SESS['Forums']['track_all']))) { $new_post = 1; if (!empty($tracking_topics[$topic_id]) && $tracking_topics[$topic_id] > $row['post_time'] || !empty($tracking_forums[$forum_id]) && $tracking_forums[$forum_id] > $row['post_time'] || isset($CPG_SESS['Forums']['track_all']) && $CPG_SESS['Forums']['track_all'] > $row['post_time']) { $new_post = 0; } } $cpgtpl->assign_block_vars('topic', array('LAST_POST_LINK' => getlink('Forums&file=viewtopic&p=' . $row['topic_last_post_id'] . '#' . $row['topic_last_post_id']), 'TOPIC_TITLE' => $row['topic_title'], 'TOPIC_REPLIES' => $row['topic_replies'], 'LAST_POST_USERNAME' => $row['username'], 'USER_LINK' => getlink('Your_Account&profile=' . $row['user_id']), 'LAST_POST_DATE' => $post_date, 'LAST_POST_TIME' => $post_time, 'LAST_POST_TIME_AGO' => $post_time_ago, 'S_NEW_POST' => $new_post, 'FORUM_NAME' => $row['forum_name'])); } $cpgtpl->assign_var('FORUMS_URL', getlink('Forums')); } //Uncomment this, if you need translated strings: /* $cpgtpl->assign_vars(array( 'S_REPLIES' => $lang['Replies'],
echo $u['avatar']; ?> " /> <div class="info"> <h1><?php echo $u['name']; ?> </h1> <? if (!$u['online']): ?> <span>Offline. Last seen <?php echo getTimeAgo($u['time']); ?> ago</span> <? else: ?> <span class="on">Online for <?php echo getTimeAgo($u['time']); ?> </span> <? endif ?> </div> <div class="ss"> <a href="<?php echo $dropbox_url; ?> /Minecraft/Screenshots/<?php echo $u['name']; ?> /latest.png" target="_blank"><img src="<?php echo $dropbox_url; ?> /Minecraft/Screenshots/<?php
<img src="<?php echo get_gravatar($email, 80); ?> " class='grid-1-8'> <div class='comment grid-7-8'> <header class='comment-header'> <a href ='<?php echo $web; ?> '><h3><?php echo $name; ?> </h3></a> <span>- <?php echo getTimeAgo($timestamp); ?> ago <a href="<?php echo $this->url->create('comment/delete/' . $id); ?> " title='remove comment'>Remove comment</a> <a href="<?php echo $this->url->create('comment/update/' . $id); ?> " title='edit comment'>Edit comment</a> </header> <p><?php echo $comment; ?> </p>
/** * Update user */ function offline($name, $time = false) { $users = Zend_Registry::get('users'); for ($i = 0; $i < count($users); $i++) { if ($users[$i]['name'] == $name) { $users[$i]['online'] = false; if ($time) { $users[$i]['time'] = $time; } // delete users olders than 6 months... if (getTimeAgo($time, true) > 6) { unset($users[$i]); } Zend_Registry::set('users', $users); return true; } } add_user($name, false, $time); }