]> projects.mako.cc - scuttle/blob - templates/sidebar.block.related.php
Added ability to set default ordering of bookmarks to modified date
[scuttle] / templates / sidebar.block.related.php
1 <?php
2 $tagservice =& ServiceFactory::getServiceInstance('TagService');
3 $userservice =& ServiceFactory::getServiceInstance('UserService');
4
5 $logged_on_userid = $userservice->getCurrentUserId();
6 if ($logged_on_userid === false) {
7     $logged_on_userid = NULL;
8 }
9 if ($currenttag) {
10     $relatedTags = $tagservice->getRelatedTags($currenttag, $userid, $logged_on_userid);
11     if (sizeof($relatedTags) > 0) {
12 ?>
13
14 <h2><?php echo T_('Related Tags'); ?></h2>
15 <div id="related">
16     <table>
17     <?php foreach($relatedTags as $row): ?>
18     <tr>
19         <td><a href="<?php echo sprintf($cat_url, filter($user, 'url'), filter($currenttag, 'url') .'+'. filter($row['tag'], 'url')); ?>">+</a></td>
20         <td><a href="<?php echo sprintf($cat_url, filter($user, 'url'), filter($row['tag'], 'url')); ?>" rel="tag"><?php echo filter($row['tag']); ?></a></td>
21     </tr>
22     <?php endforeach; ?>
23     </table>
24 </div>
25
26 <?php
27     }
28 }
29 ?>

Benjamin Mako Hill || Want to submit a patch?