if ($cats != '') { $cats = T_('Tags:') . ' ' . $cats; } // Edit and delete links $edit = ''; if ($bookmarkservice->editAllowed($row)) { $edit = ' - <a href="' . createURL('edit', $row['bId']) . '">' . T_('Edit') . '</a>' . ' <a href="#" onclick="deleteBookmark(this, ' . $row['bId'] . '); return false;">' . T_('Delete') . '</a>'; } // Last update $update = ' <small title="' . T_('Last update') . '">(' . date($GLOBALS['shortdate'], strtotime($row['bModified'])) . ') </small>'; // User attribution $copy = ' ' . T_('by') . ' '; if ($userservice->isLoggedOn() && $currentUser->getUsername() == $row['username']) { $copy .= T_('you'); } else { $copy .= '<a href="' . createURL('bookmarks', $row['username']) . '">' . SemanticScuttle_Model_UserArray::getName($row) . '</a>'; } // others if (!isset($hash)) { $others = $otherCounts[$row['bAddress']]; $ostart = '<a href="' . createURL('history', $row['bHash']) . '">'; $oend = '</a>'; switch ($others) { case 0: break; case 1: $copy .= sprintf(T_(' and %s1 other%s'), $ostart, $oend); break; default: $copy .= sprintf(T_(' and %2$s%1$s others%3$s'), $others, $ostart, $oend); }
} $tplVars['feedtitle'] = filter($GLOBALS['sitename'] . (isset($pagetitle) ? $pagetitle : '')); $tplVars['pagelink'] = addProtocolToUrl(ROOT); $tplVars['feedlink'] = addProtocolToUrl(ROOT) . 'rss?sort=' . getSortOrder(); $tplVars['feeddescription'] = sprintf(T_('Recent bookmarks posted to %s'), $GLOBALS['sitename']); $bookmarks = $bookmarkservice->getBookmarks(0, $rssEntries, $userid, $cat, null, getSortOrder(), $watchlist, null, null, null); $bookmarks_tmp = filter($bookmarks['bookmarks']); $bookmarks_tpl = array(); $latestdate = null; $guidBaseUrl = addProtocolToUrl(ROOT) . '#'; foreach ($bookmarks_tmp as $key => $row) { $_link = $row['bAddress']; // Redirection option if ($GLOBALS['useredir']) { $_link = $GLOBALS['url_redir'] . $_link; } if ($row['bDatetime'] > $latestdate) { $latestdate = $row['bDatetime']; } $_pubdate = gmdate('r', strtotime($row['bDatetime'])); $bookmarks_tpl[] = array('title' => $row['bTitle'], 'link' => $_link, 'description' => $row['bDescription'], 'creator' => SemanticScuttle_Model_UserArray::getName($row), 'pubdate' => $_pubdate, 'tags' => $row['tags'], 'guid' => $guidBaseUrl . $row['bId']); } unset($bookmarks_tmp); unset($bookmarks); $tplVars['bookmarks'] = $bookmarks_tpl; $tplVars['feedlastupdate'] = date('r', strtotime($latestdate)); $templateservice->loadTemplate('rss.tpl', $tplVars); if ($usecache) { // Cache output if existing copy has expired $cacheservice->End($hash); }
} $lastUsers = $userservice->getUsers(3); if ($lastUsers && count($lastUsers) > 0) { ?> <h2><?php echo T_('New Users'); ?> </h2> <div id="users"> <table> <?php foreach ($lastUsers as $row) { echo '<tr><td>'; echo '<a href="' . createURL('profile', $row['username']) . '">'; echo SemanticScuttle_Model_UserArray::getName($row); echo '</a>'; echo ' (<a href="' . createURL('bookmarks', $row['username']) . '">' . T_('bookmarks') . '</a>)'; echo '</td></tr>'; } //echo '<tr><td><a href="'.createURL('users').'">...</a></td></tr>'; ?> </table> <p style="text-align:right"><a href="<?php echo createURL('users'); ?> " title="<?php echo T_('See all users'); ?> "><?php
public function testGetNameUsernameIfNameIsNotSet() { $this->assertEquals('jdoe', SemanticScuttle_Model_UserArray::getName(array('username' => 'jdoe'))); }
echo T_('Description'); ?> </th> <td><textarea name="description" cols="75" rows="10"><?php echo $description['cdDescription']; ?> </textarea></td> </tr> <tr> <td></td> <td> <?php if (strlen($description['cdDatetime']) > 0) { echo T_('Last modification:') . ' ' . $description['cdDatetime'] . ', '; $lastUser = $userservice->getUser($description['uId']); echo '<a href="' . createURL('profile', $lastUser['username']) . '">' . SemanticScuttle_Model_UserArray::getName($lastUser) . '</a>'; } ?> </td> <td></td> </tr> <tr> <td></td> <td> <input type="submit" name="confirm" value="<?php echo T_('Update'); ?> " /> <input type="submit" name="cancel" value="<?php echo T_('Cancel'); ?>
$this->includeTemplate($GLOBALS['top_include']); if ($users && count($users) > 0) { ?> <!--p id="sort"> <?php echo T_("Sort by:"); ?> <a href="?sort=alphabet_asc"><?php echo T_("Alphabet"); ?> </a><span> / </span> <a href="?sort=popularity_asc"><?php echo T_("Popularity"); ?> </a> </p--> <p class="users"> <ul> <?php $contents = '<'; foreach ($users as $row) { echo '<li><strong>' . SemanticScuttle_Model_UserArray::getName($row) . '</strong>' . ' (<a href="' . createURL('profile', $row['username']) . '">' . T_('profile') . '</a> ' . T_('created in') . ' ' . date('M Y', strtotime($row['uDatetime'])) . ')' . ' : <a href="' . createURL('bookmarks', $row['username']) . '">' . T_('bookmarks') . '</a></li>'; } ?> </ul> </p> <?php } $this->includeTemplate($GLOBALS['bottom_include']);