summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2007-12-12 16:29:16 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2007-12-12 16:29:16 +0000
commitd582054c77b22daeb08d2bff17794b9a69a20dd4 (patch)
treed6e7cef8639da6f573cd0b21a5316abf5af24fac /templates
downloadsemanticscuttle-d582054c77b22daeb08d2bff17794b9a69a20dd4.tar.gz
semanticscuttle-d582054c77b22daeb08d2bff17794b9a69a20dd4.tar.bz2
import of scuttle 0.7.2
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@1 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'templates')
-rw-r--r--templates/about.tpl.php20
-rw-r--r--templates/bookmarks.tpl.php166
-rw-r--r--templates/bottom.inc.php2
-rw-r--r--templates/dynamictags.inc.php120
-rw-r--r--templates/editbookmark.tpl.php120
-rw-r--r--templates/editprofile.tpl.php56
-rw-r--r--templates/error.404.tpl.php9
-rw-r--r--templates/error.500.tpl.php9
-rw-r--r--templates/importDelicious.tpl.php42
-rw-r--r--templates/importNetscape.tpl.php50
-rw-r--r--templates/login.tpl.php35
-rw-r--r--templates/password.tpl.php26
-rw-r--r--templates/profile.tpl.php67
-rw-r--r--templates/register.tpl.php40
-rw-r--r--templates/rss.tpl.php28
-rw-r--r--templates/sidebar.block.common.php25
-rw-r--r--templates/sidebar.block.popular.php31
-rw-r--r--templates/sidebar.block.profile.php16
-rw-r--r--templates/sidebar.block.recent.php30
-rw-r--r--templates/sidebar.block.related.php29
-rw-r--r--templates/sidebar.block.tagactions.php27
-rw-r--r--templates/sidebar.block.watchlist.php19
-rw-r--r--templates/sidebar.block.watchstatus.php27
-rw-r--r--templates/sidebar.tpl.php13
-rw-r--r--templates/tagdelete.tpl.php20
-rw-r--r--templates/tagrename.tpl.php41
-rw-r--r--templates/tags.tpl.php27
-rw-r--r--templates/toolbar.inc.php27
-rw-r--r--templates/top.inc.php47
29 files changed, 1169 insertions, 0 deletions
diff --git a/templates/about.tpl.php b/templates/about.tpl.php
new file mode 100644
index 0000000..494a2e3
--- /dev/null
+++ b/templates/about.tpl.php
@@ -0,0 +1,20 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<ul>
+<li><?php echo T_('<strong>Store</strong> all your favourite links in one place, accessible from anywhere.'); ?></li>
+<li><?php echo T_('<strong>Share</strong> your bookmarks with everyone, with friends on your watchlist or just keep them private.') ;?></li>
+<li><?php echo T_('<strong>Tag</strong> your bookmarks with as many labels as you want, instead of wrestling with folders.'); ?></li>
+<li><?php echo sprintf(T_('<strong><a href="register.php">Register now</a></strong> to start using %s!'), $GLOBALS['sitename']); ?></li>
+</ul>
+
+<h3><?php echo T_('Geek Stuff'); ?></h3>
+<ul>
+<li><?php echo sprintf(T_('%s is based on <a href="http://sourceforge.net/projects/scuttle/">an open-source project</a> licensed under the <a href="http://www.gnu.org/copyleft/gpl.html"><acronym title="GNU\'s Not Unix">GNU</acronym> General Public License</a>. This means you can host it on your own web server for free, whether it is on the Internet, a private network or just your own computer.'), $GLOBALS['sitename']); ?></li>
+<li><?php echo sprintf(T_('%1$s supports most of the <a href="http://del.icio.us/doc/api">del.icio.us <abbr title="Application Programming Interface">API</abbr></a>. Almost all of the neat tools made for that system can be modified to work with %1$s instead. If you find a tool that won\'t let you change the API address, ask the creator to add this setting. You never know, they might just do it.'), $GLOBALS['sitename']); ?></li>
+</ul>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
new file mode 100644
index 0000000..368ec8b
--- /dev/null
+++ b/templates/bookmarks.tpl.php
@@ -0,0 +1,166 @@
+<?php
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+
+$logged_on_userid = $userservice->getCurrentUserId();
+$this->includeTemplate($GLOBALS['top_include']);
+
+include('search.inc.php');
+if (count($bookmarks) > 0) {
+?>
+
+<script type="text/javascript">
+window.onload = playerLoad;
+</script>
+
+<p id="sort">
+ <?php echo T_("Sort by:"); ?>
+ <a href="?sort=date_desc"><?php echo T_("Date"); ?></a><span> / </span>
+ <a href="?sort=title_asc"><?php echo T_("Title"); ?></a><span> / </span>
+ <?php
+ if (!isset($hash)) {
+ ?>
+ <a href="?sort=url_asc"><?php echo T_("URL"); ?></a>
+ <?php
+ }
+ ?>
+</p>
+
+<ol<?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks">
+
+ <?php
+ foreach(array_keys($bookmarks) as $key) {
+ $row =& $bookmarks[$key];
+ switch ($row['bStatus']) {
+ case 0:
+ $access = '';
+ break;
+ case 1:
+ $access = ' shared';
+ break;
+ case 2:
+ $access = ' private';
+ break;
+ }
+
+ $cats = '';
+ $tags = $row['tags'];
+ foreach(array_keys($tags) as $key) {
+ $tag =& $tags[$key];
+ $cats .= '<a href="'. sprintf($cat_url, filter($user, 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>, ';
+ }
+ $cats = substr($cats, 0, -2);
+ if ($cats != '') {
+ $cats = ' to '. $cats;
+ }
+
+ // Edit and delete links
+ $edit = '';
+ if ($bookmarkservice->editAllowed($row['bId'])) {
+ $edit = ' - <a href="'. createURL('edit', $row['bId']) .'">'. T_('Edit') .'</a><script type="text/javascript">document.write(" - <a href=\"#\" onclick=\"deleteBookmark(this, '. $row['bId'] .'); return false;\">'. T_('Delete') .'<\/a>");</script>';
+ }
+
+ // User attribution
+ $copy = '';
+ if (!isset($user) || isset($watched)) {
+ $copy = ' '. T_('by') .' <a href="'. createURL('bookmarks', $row['username']) .'">'. $row['username'] .'</a>';
+ }
+
+ // Udders!
+ if (!isset($hash)) {
+ $others = $bookmarkservice->countOthers($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);
+ }
+ }
+
+ // Copy link
+ if ($userservice->isLoggedOn() && ($logged_on_userid != $row['uId'])) {
+ // Get the username of the current user
+ $currentUser = $userservice->getCurrentUser();
+ $currentUsername = $currentUser[$userservice->getFieldName('username')];
+ $copy .= ' - <a href="'. createURL('bookmarks', $currentUsername .'?action=add&amp;address='. urlencode($row['bAddress']) .'&amp;title='. urlencode($row['bTitle'])) .'">'. T_('Copy') .'</a>';
+ }
+
+ // Nofollow option
+ $rel = '';
+ if ($GLOBALS['nofollow']) {
+ $rel = ' rel="nofollow"';
+ }
+
+ $address = filter($row['bAddress']);
+
+ // Redirection option
+ if ($GLOBALS['useredir']) {
+ $address = $GLOBALS['url_redir'] . $address;
+ }
+
+ // Output
+ echo '<li class="xfolkentry'. $access .'">'."\n";
+ echo '<div class="link"><a href="'. $address .'"'. $rel .' class="taggedlink">'. filter($row['bTitle']) ."</a></div>\n";
+ if ($row['bDescription'] != '') {
+ echo '<div class="description">'. filter($row['bDescription']) ."</div>\n";
+ }
+ echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+ echo "</li>\n";
+ }
+ ?>
+
+</ol>
+
+ <?php
+ // PAGINATION
+
+ // Ordering
+ $sortOrder = '';
+ if (isset($_GET['sort'])) {
+ $sortOrder = 'sort='. $_GET['sort'];
+ }
+
+ $sortAmp = (($sortOrder) ? '&amp;'. $sortOrder : '');
+ $sortQue = (($sortOrder) ? '?'. $sortOrder : '');
+
+ // Previous
+ $perpage = getPerPageCount();
+ if (!$page || $page < 2) {
+ $page = 1;
+ $start = 0;
+ $bfirst = '<span class="disable">'. T_('First') .'</span>';
+ $bprev = '<span class="disable">'. T_('Previous') .'</span>';
+ } else {
+ $prev = $page - 1;
+ $prev = 'page='. $prev;
+ $start = ($page - 1) * $perpage;
+ $bfirst= '<a href="'. sprintf($nav_url, $user, $currenttag, '') . $sortQue .'">'. T_('First') .'</a>';
+ $bprev = '<a href="'. sprintf($nav_url, $user, $currenttag, '?') . $prev . $sortAmp .'">'. T_('Previous') .'</a>';
+ }
+
+ // Next
+ $next = $page + 1;
+ $totalpages = ceil($total / $perpage);
+ if (count($bookmarks) < $perpage || $perpage * $page == $total) {
+ $bnext = '<span class="disable">'. T_('Next') .'</span>';
+ $blast = '<span class="disable">'. T_('Last') .'</span>';
+ } else {
+ $bnext = '<a href="'. sprintf($nav_url, $user, $currenttag, '?page=') . $next . $sortAmp .'">'. T_('Next') .'</a>';
+ $blast = '<a href="'. sprintf($nav_url, $user, $currenttag, '?page=') . $totalpages . $sortAmp .'">'. T_('Last') .'</a>';
+ }
+ echo '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) .'</p>';
+} else {
+?>
+
+ <p class="error"><?php echo T_('No bookmarks available'); ?>.</p>
+
+<?php
+}
+$this->includeTemplate('sidebar.tpl');
+$this->includeTemplate($GLOBALS['bottom_include']);
+?>
diff --git a/templates/bottom.inc.php b/templates/bottom.inc.php
new file mode 100644
index 0000000..691287b
--- /dev/null
+++ b/templates/bottom.inc.php
@@ -0,0 +1,2 @@
+</body>
+</html> \ No newline at end of file
diff --git a/templates/dynamictags.inc.php b/templates/dynamictags.inc.php
new file mode 100644
index 0000000..5a85143
--- /dev/null
+++ b/templates/dynamictags.inc.php
@@ -0,0 +1,120 @@
+<?php
+/***************************************************************************
+Copyright (C) 2005 - 2006 Scuttle project
+http://sourceforge.net/projects/scuttle/
+http://scuttle.org/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+***************************************************************************/
+
+$tagservice = & ServiceFactory :: getServiceInstance('TagService');
+$userservice = & ServiceFactory :: getServiceInstance('UserService');
+
+$logged_on_userid = $userservice->getCurrentUserId();
+
+$userPopularTags =& $tagservice->getPopularTags($logged_on_userid, 25, $logged_on_userid);
+$userPopularTagsCloud =& $tagservice->tagCloud($userPopularTags, 5, 90, 175);
+$userPopularTagsCount = count($userPopularTags);
+
+if ($userPopularTagsCount > 0) {
+?>
+
+<script type="text/javascript">
+Array.prototype.contains = function (ele) {
+ for (var i = 0; i < this.length; i++) {
+ if (this[i] == ele) {
+ return true;
+ }
+ }
+ return false;
+};
+
+Array.prototype.remove = function (ele) {
+ var arr = new Array();
+ var count = 0;
+ for (var i = 0; i < this.length; i++) {
+ if (this[i] != ele) {
+ arr[count] = this[i];
+ count++;
+ }
+ }
+ return arr;
+};
+
+function addonload(addition) {
+ var existing = window.onload;
+ window.onload = function () {
+ existing();
+ addition();
+ }
+}
+
+addonload(
+ function () {
+ var taglist = document.getElementById('tags');
+ var tags = taglist.value.split(', ');
+
+ var populartags = document.getElementById('popularTags').getElementsByTagName('span');
+
+ for (var i = 0; i < populartags.length; i++) {
+ if (tags.contains(populartags[i].innerHTML)) {
+ populartags[i].className = 'selected';
+ }
+ }
+ }
+);
+
+function addTag(ele) {
+ var thisTag = ele.innerHTML;
+ var taglist = document.getElementById('tags');
+ var tags = taglist.value.split(', ');
+
+ // If tag is already listed, remove it
+ if (tags.contains(thisTag)) {
+ tags = tags.remove(thisTag);
+ ele.className = 'unselected';
+
+ // Otherwise add it
+ } else {
+ tags.splice(0, 0, thisTag);
+ ele.className = 'selected';
+ }
+
+ taglist.value = tags.join(', ');
+
+ document.getElementById('tags').focus();
+}
+
+document.write('<div class="collapsible">');
+document.write('<h3><?php echo T_('Popular Tags'); ?><\/h3>');
+document.write('<p id="popularTags" class="tags">');
+
+<?php
+$taglist = '';
+foreach(array_keys($userPopularTagsCloud) as $key) {
+ $row =& $userPopularTagsCloud[$key];
+ $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
+ $taglist .= '<span title="'. $row['bCount'] .' '. $entries .'" style="font-size:'. $row['size'] .'" onclick="addTag(this)">'. filter($row['tag']) .'<\/span> ';
+}
+?>
+
+document.write('<?php echo $taglist ?>');
+document.write('<\/p>');
+document.write('<\/div>');
+</script>
+
+<?php
+}
+?> \ No newline at end of file
diff --git a/templates/editbookmark.tpl.php b/templates/editbookmark.tpl.php
new file mode 100644
index 0000000..a590d81
--- /dev/null
+++ b/templates/editbookmark.tpl.php
@@ -0,0 +1,120 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+
+$accessPublic = '';
+$accessShared = '';
+$accessPrivate = '';
+switch ($row['bStatus']) {
+ case 0 :
+ $accessPublic = ' selected="selected"';
+ break;
+ case 1 :
+ $accessShared = ' selected="selected"';
+ break;
+ case 2 :
+ $accessPrivate = ' selected="selected"';
+ break;
+}
+?>
+
+<script type="text/javascript">
+window.onload = function() {
+ document.getElementById("address").focus();
+}
+</script>
+
+<form action="<?php echo $formaction; ?>" method="post">
+<table>
+<tr>
+ <th align="left"><?php echo T_('Address'); ?></th>
+ <td><input type="text" id="address" name="address" size="75" maxlength="65535" value="<?php echo filter($row['bAddress'], 'xml'); ?>" onblur="useAddress(this)" /></td>
+ <td>&larr; <?php echo T_('Required'); ?></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('Title'); ?></th>
+ <td><input type="text" id="titleField" name="title" size="75" maxlength="255" value="<?php echo filter($row['bTitle'], 'xml'); ?>" onkeypress="this.style.backgroundImage = 'none';" /></td>
+ <td>&larr; <?php echo T_('Required'); ?></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('Description'); ?></th>
+ <td><input type="text" name="description" size="75" maxlength="255" value="<?php echo filter($row['bDescription'], 'xml'); ?>" /></td>
+ <td></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('Tags'); ?></th>
+ <td><input type="text" id="tags" name="tags" size="75" value="<?php echo filter(implode(', ', $row['tags']), 'xml'); ?>" /></td>
+ <td>&larr; <?php echo T_('Comma-separated'); ?></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('Privacy'); ?></th>
+ <td>
+ <select name="status">
+ <option value="0"<?php echo $accessPublic ?>><?php echo T_('Public'); ?></option>
+ <option value="1"<?php echo $accessShared ?>><?php echo T_('Shared with Watch List'); ?></option>
+ <option value="2"<?php echo $accessPrivate ?>><?php echo T_('Private'); ?></option>
+ </select>
+ </td>
+ <td></td>
+</tr>
+<tr>
+ <td></td>
+ <td>
+ <input type="submit" name="submitted" value="<?php echo $btnsubmit; ?>" />
+ <?php
+ if ($showdelete) {
+ ?>
+ <input type="submit" name="delete" value="<?php echo T_('Delete Bookmark'); ?>" />
+ <?php
+ }
+ if ($popup) {
+ ?>
+ <input type="hidden" name="popup" value="1" />
+ <?php
+ } elseif ($referrer) {
+ ?>
+ <input type="hidden" name="referrer" value="<?php echo $referrer; ?>" />
+ <?php
+ }
+ ?>
+ </td>
+ <td></td>
+</tr>
+</table>
+</form>
+
+<?php
+// Dynamic tag selection
+$this->includeTemplate('dynamictags.inc');
+
+// Bookmarklets and import links
+if (empty($_REQUEST['popup']) && !$showdelete) {
+?>
+
+<h3><?php echo T_('Bookmarklet'); ?></h3>
+<p><?php echo sprintf(T_("Drag one of the following bookmarklets to your browser's bookmarks and click it whenever you want to add the page you are on to %s"), $GLOBALS['sitename']); ?>:</p>
+
+<script type="text/javascript">
+var selection = '';
+if (window.getSelection) {
+ selection = 'window.getSelection()';
+} else if (document.getSelection) {
+ selection = 'document.getSelection()';
+} else if (document.selection) {
+ selection = 'document.selection.createRange().text';
+}
+document.write('<ul>');
+document.write('<li><a href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d;void 0;"><?php echo sprintf(T_('Post to %s'), $GLOBALS['sitename']); ?><\/a><\/li>');
+document.write('<li><a href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');open(\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;popup=1&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d,\'<?php echo $GLOBALS['sitename']; ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=730,height=465,left=\'+(screen.width-730)/2+\',top=\'+(screen.height-425)/2);void 0;"><?php echo sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename']); ?><\/a><\/li>');
+document.write('<\/ul>');
+</script>
+
+<h3><?php echo T_('Import'); ?></h3>
+<ul>
+ <li><a href="<?php echo createURL('importNetscape'); ?>"><?php echo T_('Import bookmarks from bookmark file'); ?></a> (<?php echo T_('Internet Explorer, Mozilla Firefox and Netscape'); ?>)</li>
+ <li><a href="<?php echo createURL('import'); ?>"><?php echo T_('Import bookmarks from del.icio.us'); ?></a></li>
+</ul>
+
+<?php
+}
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/editprofile.tpl.php b/templates/editprofile.tpl.php
new file mode 100644
index 0000000..ebfc972
--- /dev/null
+++ b/templates/editprofile.tpl.php
@@ -0,0 +1,56 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<form action="<?php echo $formaction; ?>" method="post">
+
+<h3><?php echo T_('Account Details'); ?></h3>
+
+<table class="profile">
+<tr>
+ <th align="left"><?php echo T_('Username'); ?></th>
+ <td><?php echo $user; ?></td>
+ <td></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('New Password'); ?></th>
+ <td><input type="password" name="pPass" size="20" /></td>
+ <td></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('Confirm Password'); ?></th>
+ <td><input type="password" name="pPassConf" size="20" /></td>
+ <td></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('E-mail'); ?></th>
+ <td><input type="text" name="pMail" size="75" value="<?php echo filter($row['email'], 'xml'); ?>" /></td>
+ <td>&larr; <?php echo T_('Required'); ?></td>
+</tr>
+</table>
+
+<h3><?php echo T_('Personal Details'); ?></h3>
+
+<table class="profile">
+<tr>
+ <th align="left"><?php echo T_('Name'); ?></th>
+ <td><input type="text" name="pName" size="75" value="<?php echo filter($row['name'], 'xml'); ?>" /></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('Homepage'); ?></th>
+ <td><input type="text" name="pPage" size="75" value="<?php echo filter($row['homepage'], 'xml'); ?>" /></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('Description'); ?></th>
+ <td><textarea name="pDesc" cols="75" rows="10"><?php echo $row['uContent']; ?></textarea></td>
+</tr>
+<tr>
+ <th></th>
+ <td><input type="submit" name="submitted" value="<?php echo T_('Save Changes'); ?>" /></td>
+</tr>
+</table>
+</form>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/error.404.tpl.php b/templates/error.404.tpl.php
new file mode 100644
index 0000000..fe9401d
--- /dev/null
+++ b/templates/error.404.tpl.php
@@ -0,0 +1,9 @@
+<?php
+header('HTTP/1.x 404 Not Found');
+$this->includeTemplate($GLOBALS['top_include']);
+if (!$error) {
+ echo '<h1>'. T_('Not Found') .'</h1>';
+ echo '<p>'. T_('The requested URL was not found on this server') .'</p>';
+}
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/error.500.tpl.php b/templates/error.500.tpl.php
new file mode 100644
index 0000000..1d7f7ae
--- /dev/null
+++ b/templates/error.500.tpl.php
@@ -0,0 +1,9 @@
+<?php
+header('HTTP/1.x 500 Server error');
+$this->includeTemplate($GLOBALS['top_include']);
+if (!$error) {
+ echo '<h1>'. T_('General server error') .'</h1>';
+ echo '<p>'. T_('The requested URL could not be processed') .'</p>';
+}
+$this->includeTemplate($GLOBALS['bottom_include']);
+?>
diff --git a/templates/importDelicious.tpl.php b/templates/importDelicious.tpl.php
new file mode 100644
index 0000000..bc4d892
--- /dev/null
+++ b/templates/importDelicious.tpl.php
@@ -0,0 +1,42 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<form id="import" enctype="multipart/form-data" action="<?php echo $formaction; ?>" method="post">
+<table>
+<tr valign="top">
+ <th align="left"><?php echo T_('File'); ?></th>
+ <td>
+ <input type="hidden" name="MAX_FILE_SIZE" value="1024000" />
+ <input type="file" name="userfile" size="50" />
+ </td>
+</tr>
+<tr valign="top">
+ <th align="left"><?php echo T_('Privacy'); ?></th>
+ <td>
+ <select name="status">
+ <option value="0"><?php echo T_('Public'); ?></option>
+ <option value="1"><?php echo T_('Shared with Watchlist'); ?></option>
+ <option value="2"><?php echo T_('Private'); ?></option>
+ </select>
+ </td>
+</tr>
+<tr>
+ <td />
+ <td><input type="submit" value="<?php echo T_('Import'); ?>" /></td>
+</tr>
+</table>
+</form>
+
+<h3><?php echo T_('Instructions'); ?></h3>
+<ol>
+ <li><?php echo T_('Log in to the <a href="http://del.icio.us/api/posts/all">export page at del.icio.us</a>'); ?>.</li>
+ <li><?php echo T_('Save the resulting <abbr title="Extensible Markup Language">XML</abbr> file to your computer'); ?>.</li>
+ <li><?php echo T_('Click <kbd>Browse...</kbd> to find this file on your computer. The maximum size the file can be is 1MB'); ?>.</li>
+ <li><?php echo T_('Select the default privacy setting for your imported bookmarks'); ?>.</li>
+ <li><?php echo T_('Click <kbd>Import</kbd> to start importing the bookmarks; it may take a minute'); ?>.</li>
+</ol>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/importNetscape.tpl.php b/templates/importNetscape.tpl.php
new file mode 100644
index 0000000..627a5af
--- /dev/null
+++ b/templates/importNetscape.tpl.php
@@ -0,0 +1,50 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<div id="bookmarks">
+ <form id="import" enctype="multipart/form-data" action="<?php echo $formaction; ?>" method="post">
+ <table>
+ <tr valign="top">
+ <th align="left"><?php echo T_('File'); ?></th>
+ <td>
+ <input type="hidden" name="MAX_FILE_SIZE" value="1024000" />
+ <input type="file" name="userfile" size="50" />
+ </td>
+ </tr>
+ <tr valign="top">
+ <th align="left"><?php echo T_('Privacy'); ?></th>
+ <td>
+ <select name="status">
+ <option value="0"><?php echo T_('Public'); ?></option>
+ <option value="1"><?php echo T_('Shared with Watchlist'); ?></option>
+ <option value="2"><?php echo T_('Private'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td />
+ <td><input type="submit" value="<?php echo T_('Import'); ?>" /></td>
+ </tr>
+ </table>
+ </form>
+
+ <h3><?php echo T_('Instructions'); ?></h3>
+ <ol>
+ <li>
+ <p><?php echo T_('Export your bookmarks from your browser to a file'); ?>:</p>
+ <ul>
+ <li><?php echo T_('Internet Explorer: <kbd>File &gt; Import and Export... &gt; Export Favorites'); ?></kbd></li>
+ <li><?php echo T_('Mozilla Firefox: <kbd>Bookmarks &gt; Manage Bookmarks... &gt; File &gt; Export...'); ?></kbd></li>
+ <li><?php echo T_('Netscape: <kbd>Bookmarks &gt; Manage Bookmarks... &gt; Tools &gt; Export...'); ?></kbd></li>
+ </ul>
+ </li>
+ <li><?php echo T_('Click <kbd>Browse...</kbd> to find the saved bookmark file on your computer. The maximum size the file can be is 1MB'); ?>.</li>
+ <li><?php echo T_('Select the default privacy setting for your imported bookmarks'); ?>.</li>
+ <li><?php echo T_('Click <kbd>Import</kbd> to start importing the bookmarks; it may take a minute'); ?>.</li>
+ </ol>
+</div>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/login.tpl.php b/templates/login.tpl.php
new file mode 100644
index 0000000..6137dc0
--- /dev/null
+++ b/templates/login.tpl.php
@@ -0,0 +1,35 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<script type="text/javascript">
+window.onload = function() {
+ document.getElementById("username").focus();
+}
+</script>
+
+<form action="<?php echo $formaction; ?>" method="post">
+ <div><input type="hidden" name="query" value="<?php echo $querystring; ?>" /></div>
+ <table>
+ <tr>
+ <th align="left"><label for="username"><?php echo T_('Username'); ?></label></th>
+ <td><input type="text" id="username" name="username" size="20" /></td>
+ <td></td>
+ </tr>
+ <tr>
+ <th align="left"><label for="password"><?php echo T_('Password'); ?></label></th>
+ <td><input type="password" id="password" name="password" size="20" /></td>
+ <td><input type="checkbox" name="keeppass" value="yes" /> <?php echo T_("Don't ask for my password for 2 weeks"); ?>.</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><input type="submit" name="submitted" value="<?php echo T_('Log In'); ?>" /></td>
+ <td></td>
+ </tr>
+ </table>
+ <p>&raquo; <a href="<?php echo $GLOBALS['root'] ?>password.php"><?php echo T_('Forgotten your password?') ?></p>
+</form>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/password.tpl.php b/templates/password.tpl.php
new file mode 100644
index 0000000..55dbed6
--- /dev/null
+++ b/templates/password.tpl.php
@@ -0,0 +1,26 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<p><?php echo sprintf(T_('If you have forgotten your password, %s can generate a new one. Enter the username and e-mail address of your account into the form below and we will e-mail your new password to you.'), $GLOBALS['sitename']); ?></p>
+
+<form action="<?php echo $formaction; ?>" method="post">
+ <table>
+ <tr>
+ <th align="left"><label for="username"><?php echo T_('Username'); ?></label></th>
+ <td><input type="text" id="username" name="username" size="20" class="required" /></td>
+ </tr>
+ <tr>
+ <th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th>
+ <td><input type="text" id="email" name="email" size="40" class="required" /></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><input type="submit" name="submitted" value="<?php echo T_('Generate Password'); ?>" /></td>
+ </tr>
+ </table>
+</form>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/profile.tpl.php b/templates/profile.tpl.php
new file mode 100644
index 0000000..e9ff91b
--- /dev/null
+++ b/templates/profile.tpl.php
@@ -0,0 +1,67 @@
+<?php
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<dl id="profile">
+<dt><?php echo T_('Username'); ?></dt>
+ <dd><?php echo $user; ?></dd>
+<?php
+if ($row['name'] != "") {
+?>
+<dt><?php echo T_('Name'); ?></dt>
+ <dd><?php echo $row['name']; ?></dd>
+<?php
+}
+if ($row['homepage'] != "") {
+?>
+<dt><?php echo T_('Homepage'); ?></dt>
+ <dd><a href="<?php echo $row['homepage']; ?>"><?php echo $row['homepage']; ?></a></dd>
+<?php
+}
+?>
+<dt><?php echo T_('Member Since'); ?></dt>
+ <dd><?php echo date($GLOBALS['longdate'], strtotime($row['uDatetime'])); ?></dd>
+<?php
+if ($row['uContent'] != "") {
+?>
+<dt><?php echo T_('Description'); ?></dt>
+ <dd><?php echo $row['uContent']; ?></dd>
+<?php
+}
+$watching = $userservice->getWatchNames($userid);
+if ($watching) {
+?>
+ <dt><?php echo T_('Watching'); ?></dt>
+ <dd>
+ <?php
+ $list = '';
+ foreach($watching as $watchuser) {
+ $list .= '<a href="'. createURL('bookmarks', $watchuser) .'">'. $watchuser .'</a>, ';
+ }
+ echo substr($list, 0, -2);
+ ?>
+ </dd>
+<?php
+}
+$watchnames = $userservice->getWatchNames($userid, true);
+if ($watchnames) {
+?>
+ <dt><?php echo T_('Watched By'); ?></dt>
+ <dd>
+ <?php
+ $list = '';
+ foreach($watchnames as $watchuser) {
+ $list .= '<a href="'. createURL('bookmarks', $watchuser) .'">'. $watchuser .'</a>, ';
+ }
+ echo substr($list, 0, -2);
+ ?>
+ </dd>
+<?php
+}
+?>
+</dl>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/register.tpl.php b/templates/register.tpl.php
new file mode 100644
index 0000000..7160535
--- /dev/null
+++ b/templates/register.tpl.php
@@ -0,0 +1,40 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<script type="text/javascript">
+window.onload = function() {
+ document.getElementById("username").focus();
+}
+</script>
+
+<p><?php echo sprintf(T_('Sign up here to create a free %s account. All the information requested below is required'), $GLOBALS['sitename']); ?>.</p>
+
+<form action="<?php echo $formaction; ?>" method="post">
+<table>
+<tr>
+ <th align="left"><label for="username"><?php echo T_('Username'); ?></label></th>
+ <td><input type="text" id="username" name="username" size="20" class="required" onkeyup="isAvailable(this, '')" /></td>
+ <td id="availability"></td>
+</tr>
+<tr>
+ <th align="left"><label for="password"><?php echo T_('Password'); ?></label></th>
+ <td><input type="password" id="password" name="password" size="20" class="required" /></td>
+ <td></td>
+</tr>
+<tr>
+ <th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th>
+ <td><input type="text" id="email" name="email" size="40" class="required" /></td>
+ <td></td>
+</tr>
+<tr>
+ <td></td>
+ <td><input type="submit" name="submitted" value="<?php echo T_('Register'); ?>" /></td>
+ <td></td>
+</tr>
+</table>
+</form>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/rss.tpl.php b/templates/rss.tpl.php
new file mode 100644
index 0000000..0f03c06
--- /dev/null
+++ b/templates/rss.tpl.php
@@ -0,0 +1,28 @@
+<?php
+echo '<?xml version="1.0" encoding="UTF-8" ?'.">\n";
+?>
+
+<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
+<channel>
+ <title><?php echo $feedtitle; ?></title>
+ <link><?php echo $feedlink; ?></link>
+ <description><?php echo $feeddescription; ?></description>
+ <ttl>60</ttl>
+
+<?php foreach($bookmarks as $bookmark): ?>
+ <item>
+ <title><?php echo $bookmark['title']; ?></title>
+ <link><?php echo $bookmark['link']; ?></link>
+ <description><?php echo $bookmark['description']; ?></description>
+ <dc:creator><?php echo $bookmark['creator']; ?></dc:creator>
+ <pubDate><?php echo $bookmark['pubdate']; ?></pubDate>
+
+ <?php foreach($bookmark['tags'] as $tag): ?>
+ <category><?php echo $tag; ?></category>
+ <?php endforeach; ?>
+
+ </item>
+<?php endforeach; ?>
+
+</channel>
+</rss> \ No newline at end of file
diff --git a/templates/sidebar.block.common.php b/templates/sidebar.block.common.php
new file mode 100644
index 0000000..205ca1e
--- /dev/null
+++ b/templates/sidebar.block.common.php
@@ -0,0 +1,25 @@
+<?php
+$tagservice =& ServiceFactory::getServiceInstance('TagService');
+$commonTags =& $tagservice->getRelatedTagsByHash($hash);
+$commonTags =& $tagservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
+
+if ($commonTags && count($commonTags) > 0) {
+?>
+
+<h2><?php echo T_('Popular Tags'); ?></h2>
+<div id="common">
+ <p class="tags">
+ <?php
+ $contents = '';
+ foreach ($commonTags as $row) {
+ $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
+ $contents .= '<a href="'. sprintf($cat_url, $user, filter($row['tag'], 'url')) .'" title="'. $row['bCount'] .' '. $entries .'" rel="tag" style="font-size:'. $row['size'] .'">'. filter($row['tag']) .'</a> ';
+ }
+ echo $contents ."\n";
+ ?>
+ </p>
+</div>
+
+<?php
+}
+?> \ No newline at end of file
diff --git a/templates/sidebar.block.popular.php b/templates/sidebar.block.popular.php
new file mode 100644
index 0000000..fc9703d
--- /dev/null
+++ b/templates/sidebar.block.popular.php
@@ -0,0 +1,31 @@
+<?php
+$tagservice =& ServiceFactory::getServiceInstance('TagService');
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+
+$logged_on_userid = $userservice->getCurrentUserId();
+if ($logged_on_userid === false) {
+ $logged_on_userid = NULL;
+}
+$popularTags =& $tagservice->getPopularTags($userid, $popCount, $logged_on_userid);
+$popularTags =& $tagservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc');
+
+if ($popularTags && count($popularTags) > 0) {
+?>
+
+<h2><?php echo T_('Popular Tags'); ?></h2>
+<div id="popular">
+ <p class="tags">
+ <?php
+ $contents = '';
+ foreach ($popularTags as $row) {
+ $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
+ $contents .= '<a href="'. sprintf($cat_url, $user, filter($row['tag'], 'url')) .'" title="'. $row['bCount'] .' '. $entries .'" rel="tag" style="font-size:'. $row['size'] .'">'. filter($row['tag']) .'</a> ';
+ }
+ echo $contents ."\n";
+ ?>
+ </p>
+</div>
+
+<?php
+}
+?> \ No newline at end of file
diff --git a/templates/sidebar.block.profile.php b/templates/sidebar.block.profile.php
new file mode 100644
index 0000000..1b8e915
--- /dev/null
+++ b/templates/sidebar.block.profile.php
@@ -0,0 +1,16 @@
+<?php
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+if (utf8_strlen($userinfo['name']) > 0) {
+ $name = $userinfo['name'];
+} else {
+ $name = $userinfo['username'];
+}
+?>
+<h2><?php echo $name; ?></h2>
+<div id="profile">
+ <ul>
+ <li><a href="<?php echo $userservice->getProfileUrl($userid, $user); ?>"><?php echo T_('Profile'); ?></a> &rarr;</li>
+ <li><a href="<?php echo createURL('alltags', $user); ?>"><?php echo T_('Tags'); ?></a> &rarr;</li>
+ <li><a href="<?php echo createURL('watchlist', $user); ?>"><?php echo T_('Watchlist'); ?></a> &rarr;</li>
+ </ul>
+</div>
diff --git a/templates/sidebar.block.recent.php b/templates/sidebar.block.recent.php
new file mode 100644
index 0000000..f489e49
--- /dev/null
+++ b/templates/sidebar.block.recent.php
@@ -0,0 +1,30 @@
+<?php
+$tagservice =& ServiceFactory::getServiceInstance('TagService');
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+
+$logged_on_userid = $userservice->getCurrentUserId();
+if ($logged_on_userid === false) {
+ $logged_on_userid = NULL;
+}
+$recentTags = $tagservice->getPopularTags($userid, $popCount, $logged_on_userid, $GLOBALS['defaultRecentDays']);
+$recentTags =& $tagservice->tagCloud($recentTags, 5, 90, 225, 'alphabet_asc');
+
+if ($recentTags && count($recentTags) > 0) {
+?>
+
+<h2><?php echo T_('Recent Tags'); ?></h2>
+<div id="recent">
+ <?php
+ $contents = '<p class="tags">';
+ foreach ($recentTags as $row) {
+ $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
+ $contents .= '<a href="'. sprintf($cat_url, $user, filter($row['tag'], 'url')) .'" title="'. $row['bCount'] .' '. $entries .'" rel="tag" style="font-size:'. $row['size'] .'">'. filter($row['tag']) .'</a> ';
+ }
+ echo $contents ."</p>\n";
+ ?>
+ <p><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a> &rarr;</p>
+</div>
+
+<?php
+}
+?> \ No newline at end of file
diff --git a/templates/sidebar.block.related.php b/templates/sidebar.block.related.php
new file mode 100644
index 0000000..3a37718
--- /dev/null
+++ b/templates/sidebar.block.related.php
@@ -0,0 +1,29 @@
+<?php
+$tagservice =& ServiceFactory::getServiceInstance('TagService');
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+
+$logged_on_userid = $userservice->getCurrentUserId();
+if ($logged_on_userid === false) {
+ $logged_on_userid = NULL;
+}
+if ($currenttag) {
+ $relatedTags = $tagservice->getRelatedTags($currenttag, $userid, $logged_on_userid);
+ if (sizeof($relatedTags) > 0) {
+?>
+
+<h2><?php echo T_('Related Tags'); ?></h2>
+<div id="related">
+ <table>
+ <?php foreach($relatedTags as $row): ?>
+ <tr>
+ <td><a href="<?php echo sprintf($cat_url, filter($user, 'url'), filter($currenttag, 'url') .'+'. filter($row['tag'], 'url')); ?>">+</a></td>
+ <td><a href="<?php echo sprintf($cat_url, filter($user, 'url'), filter($row['tag'], 'url')); ?>" rel="tag"><?php echo filter($row['tag']); ?></a></td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+</div>
+
+<?php
+ }
+}
+?> \ No newline at end of file
diff --git a/templates/sidebar.block.tagactions.php b/templates/sidebar.block.tagactions.php
new file mode 100644
index 0000000..836c40c
--- /dev/null
+++ b/templates/sidebar.block.tagactions.php
@@ -0,0 +1,27 @@
+<?php
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+if ($userservice->isLoggedOn()) {
+ $currentUser = $userservice->getCurrentUser();
+ $currentUsername = $currentUser[$userservice->getFieldName('username')];
+
+ if ($currentUsername == $user) {
+ $tags = explode('+', $currenttag);
+ $renametext = T_ngettext('Rename Tag', 'Rename Tags', count($tags));
+ $renamelink = createURL('tagrename', $currenttag);
+ $deletelink = createURL('tagdelete', $currenttag);
+?>
+
+<h2><?php echo T_('Actions'); ?></h2>
+<div id="tagactions">
+ <ul>
+ <li><a href="<?php echo $renamelink; ?>"><?php echo $renametext ?></a></li>
+ <?php if (count($tags) == 1): ?>
+ <li><a href="<?php echo $deletelink; ?>"><?php echo T_('Delete Tag') ?></a></li>
+ <?php endif; ?>
+ </ul>
+</div>
+
+<?php
+ }
+}
+?> \ No newline at end of file
diff --git a/templates/sidebar.block.watchlist.php b/templates/sidebar.block.watchlist.php
new file mode 100644
index 0000000..e35fa76
--- /dev/null
+++ b/templates/sidebar.block.watchlist.php
@@ -0,0 +1,19 @@
+<?php
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+
+$watching = $userservice->getWatchNames($userid);
+if ($watching) {
+?>
+
+<h2><?php echo T_('Watching'); ?></h2>
+<div id="watching">
+ <ul>
+ <?php foreach($watching as $watchuser): ?>
+ <li><a href="<?php echo createURL('bookmarks', $watchuser); ?>"><?php echo $watchuser; ?></a> &rarr;</li>
+ <?php endforeach; ?>
+ </ul>
+</div>
+
+<?php
+}
+?> \ No newline at end of file
diff --git a/templates/sidebar.block.watchstatus.php b/templates/sidebar.block.watchstatus.php
new file mode 100644
index 0000000..d912846
--- /dev/null
+++ b/templates/sidebar.block.watchstatus.php
@@ -0,0 +1,27 @@
+<?php
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+if ($userservice->isLoggedOn()) {
+ $currentUser = $userservice->getCurrentUser();
+ $currentUsername = $currentUser[$userservice->getFieldName('username')];
+
+ if ($currentUsername != $user) {
+ $result = $userservice->getWatchStatus($userid, $userservice->getCurrentUserId());
+ if ($result) {
+ $linkText = T_('Remove from Watchlist');
+ } else {
+ $linkText = T_('Add to Watchlist');
+ }
+ $linkAddress = createURL('watch', $user);
+?>
+
+<h2><?php echo T_('Actions'); ?></h2>
+<div id="watchlist">
+ <ul>
+ <li><a href="<?php echo $linkAddress ?>"><?php echo $linkText ?></a></li>
+ </ul>
+</div>
+
+<?php
+ }
+}
+?> \ No newline at end of file
diff --git a/templates/sidebar.tpl.php b/templates/sidebar.tpl.php
new file mode 100644
index 0000000..5f399b5
--- /dev/null
+++ b/templates/sidebar.tpl.php
@@ -0,0 +1,13 @@
+<div id="sidebar">
+ <?php
+ $size = count($sidebar_blocks);
+ for ($i = 0; $i < $size; $i++) {
+ $this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]);
+ }
+
+ $size = count($rsschannels);
+ for ($i = 0; $i < $size; $i++) {
+ echo '<p><a href="'. $rsschannels[$i][1] .'" title="'. $rsschannels[$i][0] .'"><img src="'. $GLOBALS['root'] .'rss.gif" width="16" height="16" alt="'. $rsschannels[$i][0] .'" /></a></p>';
+ }
+ ?>
+</div>
diff --git a/templates/tagdelete.tpl.php b/templates/tagdelete.tpl.php
new file mode 100644
index 0000000..3e9744a
--- /dev/null
+++ b/templates/tagdelete.tpl.php
@@ -0,0 +1,20 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+
+<form action="<?= $formaction ?>" method="post">
+<p><?php echo T_('Are you sure?'); ?></p>
+<p>
+ <input type="submit" name="confirm" value="<?php echo T_('Yes'); ?>" />
+ <input type="submit" name="cancel" value="<?php echo T_('No'); ?>" />
+</p>
+
+<?php if (isset($referrer)): ?>
+<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
+<?php endif; ?>
+
+</form>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/tagrename.tpl.php b/templates/tagrename.tpl.php
new file mode 100644
index 0000000..ea8b516
--- /dev/null
+++ b/templates/tagrename.tpl.php
@@ -0,0 +1,41 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+?>
+<script type="text/javascript">
+window.onload = function() {
+ document.getElementById("new").focus();
+}
+</script>
+<form action="<?php echo $formaction; ?>" method="post">
+<table>
+<tr>
+ <th align="left"><?php echo T_('Old'); ?></th>
+ <td><input type="text" name="old" id="old" value="<?php echo $old; ?>" /></td>
+ <td>&larr; <?php echo T_('Required'); ?></td>
+</tr>
+<tr>
+ <th align="left"><?php echo T_('New'); ?></th>
+ <td><input type="text" name="new" id="new" value="" /></td>
+ <td>&larr; <?php echo T_('Required'); ?></td>
+</tr>
+<tr>
+ <td></td>
+ <td>
+ <input type="submit" name="confirm" value="<?php echo T_('Rename'); ?>" />
+ <input type="submit" name="cancel" value="<?php echo T_('Cancel'); ?>" />
+ </td>
+ <td></td>
+</tr>
+
+</table>
+</p>
+
+<?php if (isset($referrer)): ?>
+<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
+<?php endif; ?>
+
+</form>
+
+<?php
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/tags.tpl.php b/templates/tags.tpl.php
new file mode 100644
index 0000000..7266170
--- /dev/null
+++ b/templates/tags.tpl.php
@@ -0,0 +1,27 @@
+<?php
+$this->includeTemplate($GLOBALS['top_include']);
+if ($tags && count($tags) > 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="tags">
+
+<?php
+$contents = '';
+foreach ($tags as $row) {
+ $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
+ $contents .= '<a href="'. sprintf($cat_url, $user, filter($row['tag'], 'url')) .'" title="'. $row['bCount'] .' '. $entries .'" rel="tag" style="font-size:'. $row['size'] .'">'. filter($row['tag']) .'</a> ';
+}
+echo $contents ."\n";
+?>
+
+</p>
+
+<?php
+}
+$this->includeTemplate($GLOBALS['bottom_include']);
+?> \ No newline at end of file
diff --git a/templates/toolbar.inc.php b/templates/toolbar.inc.php
new file mode 100644
index 0000000..2eb56ac
--- /dev/null
+++ b/templates/toolbar.inc.php
@@ -0,0 +1,27 @@
+<?php
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+if ($userservice->isLoggedOn()) {
+ $cUser = $userservice->getCurrentUser();
+ $cUsername = $cUser[$userservice->getFieldName('username')];
+?>
+
+ <ul id="navigation">
+ <li><a href="<?php echo createURL('bookmarks', $cUsername); ?>"><?php echo T_('Bookmarks'); ?></a></li>
+ <li><a href="<?php echo createURL('watchlist', $cUsername); ?>"><?php echo T_('Watchlist'); ?></a></li>
+ <li><a href="<?php echo createURL('bookmarks', $cUsername . '?action=add'); ?>"><?php echo T_('Add a Bookmark'); ?></a></li>
+ <li class="access"><a href="<?php echo $GLOBALS['root']; ?>?action=logout"><?php echo T_('Log Out'); ?></a></li>
+ </ul>
+
+<?php
+} else {
+?>
+
+ <ul id="navigation">
+ <li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
+ <li class="access"><a href="<?php echo createURL('login'); ?>"><?php echo T_('Log In'); ?></a></li>
+ <li class="access"><a href="<?php echo createURL('register'); ?>"><?php echo T_('Register'); ?></a></li>
+ </ul>
+
+<?php
+}
+?>
diff --git a/templates/top.inc.php b/templates/top.inc.php
new file mode 100644
index 0000000..64213fd
--- /dev/null
+++ b/templates/top.inc.php
@@ -0,0 +1,47 @@
+<?php header('Content-Type: text/html; charset=utf-8'); ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title><?php echo filter($GLOBALS['sitename'] . (isset($pagetitle) ? ': ' . $pagetitle : '')); ?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="icon" type="image/png" href="<?php echo $GLOBALS['root']; ?>icon.png" />
+ <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['root']; ?>scuttle.css" />
+ <?php
+ $size = count($rsschannels);
+ for ($i = 0; $i < $size; $i++) {
+ echo '<link rel="alternate" type="application/rss+xml" title="'. $rsschannels[$i][0] .'" href="'. $rsschannels[$i][1] .'" />';
+ }
+ if ($loadjs) {
+ echo '<script type="text/javascript" src="'. $GLOBALS['root'] .'jsScuttle.php"></script>';
+ }
+ ?>
+</head>
+<body>
+
+<?php
+$headerstyle = '';
+if(isset($_GET['popup'])) {
+ $headerstyle = ' class="popup"';
+}
+?>
+
+<div id="header"<?php echo $headerstyle; ?>>
+ <h1><a href="<?php echo $GLOBALS['root']; ?>"><?php echo $GLOBALS['sitename']; ?></a></h1>
+ <?php
+ if(!isset($_GET['popup'])) {
+ $this->includeTemplate('toolbar.inc');
+ }
+ ?>
+</div>
+
+<?php
+if (isset($subtitle)) {
+ echo '<h2>'. $subtitle ."</h2>\n";
+}
+if (isset($error)) {
+ echo '<p class="error">'. $error ."</p>\n";
+}
+if (isset($msg)) {
+ echo '<p class="success">'. $msg ."</p>\n";
+}
+?>