summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/admin.tpl.php2
-rw-r--r--data/templates/bookmarks.tpl.php31
-rw-r--r--data/templates/editbookmark.tpl.php75
-rw-r--r--data/templates/editprofile.tpl.php6
-rw-r--r--data/templates/sidebar.block.linked.php133
-rw-r--r--data/templates/sidebar.block.menu.php6
-rw-r--r--data/templates/sidebar.block.menu2.php71
-rw-r--r--data/templates/sidebar.block.recent.php2
-rw-r--r--data/templates/sidebar.block.search.php2
-rw-r--r--data/templates/sidebar.block.users.php2
-rw-r--r--data/templates/sidebar.block.watchlist.php8
-rw-r--r--data/templates/tag2tagadd.tpl.php2
-rw-r--r--data/templates/tagrename.tpl.php4
-rw-r--r--data/templates/top.inc.php17
14 files changed, 174 insertions, 187 deletions
diff --git a/data/templates/admin.tpl.php b/data/templates/admin.tpl.php
index c8d47e8..50680f6 100644
--- a/data/templates/admin.tpl.php
+++ b/data/templates/admin.tpl.php
@@ -11,7 +11,7 @@ foreach($users as $user) {
echo '<div class="link">';
echo '<a href="'.createURL('profile', $user->getUsername()).'">'.$user->getUsername().'</a>';
- echo ' - <span title='. T_('Public/Shared/Private') .'>'. $user->getNbBookmarks('public') .' / '. $user->getNbBookmarks('shared') .' / '. $user->getNbBookmarks('private') .' '. T_('bookmark(s)') .'</span>';
+ echo ' - <span title="'. T_('Public/Shared/Private') .'">'. $user->getNbBookmarks('public') .' / '. $user->getNbBookmarks('shared') .' / '. $user->getNbBookmarks('private') .' '. T_('bookmark(s)') .'</span>';
echo '</div>';
if($user->getUsername() != $currentUser->getUsername()) {
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php
index c404358..55d6a0f 100644
--- a/data/templates/bookmarks.tpl.php
+++ b/data/templates/bookmarks.tpl.php
@@ -62,12 +62,16 @@ if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
}
//common tag description edit
-if($userservice->isLoggedOn()) {
- if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
+if ($userservice->isLoggedOn()) {
+ if ($currenttag != ''
+ && ($GLOBALS['enableCommonTagDescriptionEditedByAll']
+ || $currentUser->isAdmin()
+ )
+ ) {
echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'" title="'.T_('Edit the common description of this tag').'">';
echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
- } elseif(isset($hash)) {
+ } else if (isset($hash)) {
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'" title="'.T_('Edit the common description of this bookmark').'">';
echo T_('Edit the common description of this bookmark').'</a>)';
}
@@ -117,33 +121,33 @@ $votingSort = 'voting_desc';
switch(getSortOrder()) {
case 'date_asc':
- $dateArrow = ' &uarr;';
+ $dateArrow = ' ↑';
$dateSort = 'date_desc';
break;
case 'title_asc':
- $titleArrow = ' &uarr;';
+ $titleArrow = ' ↑';
$titleSort = 'title_desc';
break;
case 'title_desc':
- $titleArrow = ' &darr;';
+ $titleArrow = ' ↓';
$titleSort = 'title_asc';
break;
case 'voting_asc':
- $votingArrow = ' &uarr;';
+ $votingArrow = ' ↑';
$votingSort = 'voting_desc';
break;
case 'voting_desc':
- $votingArrow = ' &darr;';
+ $votingArrow = ' ↓';
$votingSort = 'voting_asc';
break;
case 'date_desc':
default:
- $dateArrow = ' &darr;';
+ $dateArrow = ' ↓';
$dateSort = 'date_asc';
break;
}
@@ -292,10 +296,9 @@ if ($currenttag!= '') {
$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;\">'
+ . ' <a href="#" onclick="deleteBookmark(this, '. $row['bId'] .'); return false;">'
. T_('Delete')
- .'<\/a>");</script>';
+ .'</a>';
}
// Last update
@@ -313,7 +316,7 @@ if ($currenttag!= '') {
. '</a>';
}
- // Udders!
+ // others
if (!isset($hash)) {
$others = $otherCounts[$row['bAddress']];
$ostart = '<a href="' . createURL('history', $row['bHash']) . '">';
@@ -391,7 +394,7 @@ if ($currenttag!= '') {
echo ' <div' . $adminBgClass . '>' . "\n";
echo ' <div class="link">'
- . '<a href="'. $address .'"'. $rel .' class="taggedlink" target="_blank">'
+ . '<a href="'. htmlspecialchars($address) .'"'. $rel .' class="taggedlink">'
. filter($row['bTitle'])
. '</a>' . $adminStar . "</div>\n";
if ($row['bDescription'] == '') {
diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php
index dd6b100..504249b 100644
--- a/data/templates/editbookmark.tpl.php
+++ b/data/templates/editbookmark.tpl.php
@@ -16,33 +16,22 @@ switch ($row['bStatus']) {
break;
}
-$this->includeTemplate("dojo.inc");
-
function jsEscTitle($title)
{
return addcslashes($title, "'");
}
?>
-
-
-
-<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>
+ <td>← <?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>
+ <td>← <?php echo T_('Required'); ?></td>
</tr>
<tr>
<th align="left">
@@ -50,7 +39,7 @@ function jsEscTitle($title)
<a onclick="var nz = document.getElementById('privateNoteZone'); nz.style.display='';this.style.display='none';"><?php echo T_("Add Note"); ?></a>
</th>
<td><textarea name="description" id="description" rows="5" cols="63" ><?php echo filter($row['bDescription'], 'xml'); ?></textarea></td>
- <td>&larr; <?php echo T_('You can use anchors to delimite attributes. for example: [publisher]blah[/publisher] '); ?>
+ <td>← <?php echo T_('You can use anchors to delimite attributes. for example: [publisher]blah[/publisher] '); ?>
<?php if(count($GLOBALS['descriptionAnchors'])>0): ?>
<br /><br />
<?php echo T_('Suggested anchors: '); ?>
@@ -67,23 +56,23 @@ function jsEscTitle($title)
<tr id="privateNoteZone" <?php if(strlen($row['bPrivateNote'])==0):?>style="display:none"<?php endif; ?>>
<th align="left"><?php echo T_('Private Note'); ?></th>
<td><textarea name="privateNote" id="privateNote" rows="1" cols="63" ><?php echo filter($row['bPrivateNote'], 'xml'); ?></textarea></td>
- <td>&larr; <?php echo T_('Just visible by you and your contacts.'); ?>
+ <td>← <?php echo T_('Just visible by you and your contacts.'); ?>
</td>
</tr>
<tr>
<th align="left"><?php echo T_('Tags'); ?></th>
<td class="scuttletheme">
- <span dojoType="dojo.data.ItemFileReadStore" jsId="memberTagStore" url="<?php echo ROOT?>ajax/<?php echo ($GLOBALS['adminsAreAdvisedTagsFromOtherAdmins'] && $currentUser->isAdmin())?'getadmintags':'getcontacttags'?>.php"></span>
- <input type="text" dojoType="js.MultiComboBox" id="tags" name="tags" size="75" value="<?php echo filter(implode(', ', $row['tags']), 'xml'); ?>" store="memberTagStore" delimiter="," searchAttr="tag" hasDownArrow="false" queryExpr="*${0}*" autoComplete="false" highlightMatch="all"/></td>
- <td>&larr; <?php echo T_('Comma-separated'); ?></td>
+ <input type="text" id="tags" name="tags" size="75" value="<?php echo filter(implode(', ', $row['tags']), 'xml'); ?>"/>
+ </td>
+ <td>← <?php echo T_('Comma-separated'); ?></td>
</tr>
<tr>
<th></th>
- <td align="right"><small><?php echo T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris')?><small></td>
+ <td align="right"><small><?php echo htmlspecialchars(T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris'))?></small></td>
</tr>
<tr>
<th></th>
- <td align="right"><small><?php echo T_('Note: use "=" to make synonym two tags. e.g.: france=frenchcountry')?><small></td>
+ <td align="right"><small><?php echo T_('Note: use "=" to make synonym two tags. e.g.: france=frenchcountry')?></small></td>
</tr>
<tr>
<th align="left"><?php echo T_('Privacy'); ?></th>
@@ -111,7 +100,7 @@ function jsEscTitle($title)
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $row['bHash']).'">';
echo T_('edit common description').'</a>)';
}
-
+
if ($popup) {
?>
<input type="hidden" name="popup" value="1" />
@@ -124,13 +113,27 @@ function jsEscTitle($title)
?>
</td>
<td></td>
-</tr>
-</table>
+ </tr>
+ </table>
</form>
+<link href="<?php echo ROOT ?>js/jqueryui-1.8.5/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css"/>
+
+<script type="text/javascript" src="<?php echo ROOT ?>js/jqueryui-1.8.5/jquery.ui.core.js"></script>
+<script type="text/javascript" src="<?php echo ROOT ?>js/jqueryui-1.8.5/jquery.ui.widget.js"></script>
+<script type="text/javascript" src="<?php echo ROOT ?>js/jqueryui-1.8.5/jquery.ui.position.js"></script>
+<script type="text/javascript" src="<?php echo ROOT ?>js/jqueryui-1.8.5/jquery.ui.autocomplete.js"></script>
+<script type="text/javascript">
+jQuery(document).ready(function() {
+ jQuery("input#tags").autocomplete({
+ source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]
+ });
+});
+</script>
+
<?php
// Dynamic tag selection
-$this->includeTemplate('dynamictags.inc');
+ //FIXME$this->includeTemplate('dynamictags.inc');
// Bookmarklets and import links
if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) {
@@ -139,17 +142,18 @@ if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) {
<h3><?php echo T_('Bookmarklet'); ?></h3>
<p>
<script type="text/javascript">
+//<![CDATA[
var browser=navigator.appName;
-if (browser == "Opera") {
+if (false && browser == "Opera") {
document.write(
<?php echo json_encode(
sprintf(
T_("Click one of the following bookmarklets to add a button you can click whenever you want to add the page you are on to %s"),
$GLOBALS['sitename']
)
- ); ?> + ':</p>'
+ ); ?>
);
-} else {
+} else if (false) {
document.write(
<?php echo json_encode(
sprintf(
@@ -157,9 +161,14 @@ if (browser == "Opera") {
$GLOBALS['sitename']
)
);
- ?> + ':</p>'
+ ?>
);
}
+//]]>
+</script>
+:</p>
+<script type="text/javascript">
+//<![CDATA[
var selection = '';
if (window.getSelection) {
selection = 'window.getSelection()';
@@ -168,18 +177,18 @@ if (window.getSelection) {
} else if (document.selection) {
selection = 'document.selection.createRange().text';
}
-document.write('<ul>');
-if (browser == "Opera")
+if (false && browser == "Opera")
{
document.write('<li><a class="bookmarklet" href="opera:/button/Go%20to%20page,%20%22javascript: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%22;,,%22Post%20to%20<?php echo jsEscTitle($GLOBALS['sitename']); ?>%22,%22Scuttle%22"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>');
document.write('<li><a class="bookmarklet" href="opera:/button/Go%20to%20page,%20%22javascript: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 jsEscTitle($GLOBALS['sitename']); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2);void 0;%22,,%22Post%20to%20<?php echo urlencode($GLOBALS['sitename']); ?>%20(Pop-up)%22,%22Scuttle%22"><?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?><\/a><\/li>');
}
-else
+else if (false)
{
document.write('<li><a class="bookmarklet" 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 jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>');
document.write('<li><a class="bookmarklet" 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 jsEscTitle($GLOBALS['sitename']); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2);void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?><\/a><\/li>');
}
-document.write('<\/ul>');
+//document.write('<\/ul>');
+//]]>
</script>
<h3><?php echo T_('Import'); ?></h3>
@@ -190,5 +199,5 @@ document.write('<\/ul>');
<?php
}
-$this->includeTemplate($GLOBALS['bottom_include']);
+$this->includeTemplate($GLOBALS['bottom_include']);
?>
diff --git a/data/templates/editprofile.tpl.php b/data/templates/editprofile.tpl.php
index 232b1d3..2a3c3b8 100644
--- a/data/templates/editprofile.tpl.php
+++ b/data/templates/editprofile.tpl.php
@@ -3,9 +3,7 @@ $this->includeTemplate($GLOBALS['top_include']);
?>
<form action="<?php echo $formaction; ?>" method="post">
-<input type="hidden" name="token" value="<?php echo $token; ?>">
-
-</table>
+<input type="hidden" name="token" value="<?php echo $token; ?>"/>
<h3><?php echo T_('Account Details'); ?></h3>
@@ -28,7 +26,7 @@ $this->includeTemplate($GLOBALS['top_include']);
<tr>
<th align="left"><?php echo T_('E-mail'); ?></th>
<td><input type="text" name="pMail" size="75" value="<?php echo filter($objectUser->getEmail(), 'xml'); ?>" /></td>
- <td>&larr; <?php echo T_('Required'); ?></td>
+ <td>← <?php echo T_('Required'); ?></td>
</tr>
</table>
diff --git a/data/templates/sidebar.block.linked.php b/data/templates/sidebar.block.linked.php
index 9e91f93..9aa3cc0 100644
--- a/data/templates/sidebar.block.linked.php
+++ b/data/templates/sidebar.block.linked.php
@@ -1,4 +1,11 @@
<?php
+/*
+ * Used in:
+ * - populartags.php
+ * - bookmarks.php
+ * - alltags.php
+ * - tags.php
+ */
/* Service creation: only useful services are created */
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
@@ -8,98 +15,52 @@ require_once('sidebar.linkedtags.inc.php');
$user = isset($user)?$user:'';
$userid = isset($userid)?$userid:0;
$currenttag = isset($currenttag)?$currenttag:'';
-$summarizeLinkedTags = isset($summarizeLinkedTags)?$summarizeLinkedTags:false;
-
+//$summarizeLinkedTags = isset($summarizeLinkedTags)?$summarizeLinkedTags:false;
$logged_on_userid = $userservice->getCurrentUserId();
-if ($logged_on_userid === false) {
- $logged_on_userid = NULL;
-}
-
-$explodedTags = array();
-if (strlen($currenttag)>0) {
- $explodedTags = explode('+', $currenttag);
-} else {
- if($summarizeLinkedTags == true) {
- $orphewTags = $tag2tagservice->getOrphewTags('>', $userid, 4, "nb");
- } else {
- $orphewTags = $tag2tagservice->getOrphewTags('>', $userid);
- }
-
- foreach($orphewTags as $orphewTag) {
- $explodedTags[] = $orphewTag['tag'];
- }
-}
-
+$editingMode = $logged_on_userid !== false;
?>
-
+<h2><?php echo T_('Linked Tags'); ?></h2>
+<div id="related">
<?php
-if(($logged_on_userid != null) && ($userid === $logged_on_userid)) {
- $editingMode = true;
-} else {
- $editingMode = false;
-}
-
-$this->includeTemplate("dojo.inc");
-?>
-
-<?php if(count($explodedTags)>0 || $editingMode):?>
-
-<h2><?php
-
-
-echo T_('Linked Tags').' ';
-//if($userid != null) {
-$cUser = $userservice->getUser($userid);
-//echo '<small><a href="'.createURL('alltags', $cUser['username']).'">('.T_('all tags').')</a></small>';
-//}
-?></h2>
-<?php //endif?>
-
-<div id="related"> <?php
-if($editingMode) {
+if ($editingMode) {
echo '<p style="margin-bottom: 13px;text-align:center;">';
echo ' (<a href="'. createURL('tag2tagadd','') .'" rel="tag">'.T_('Add new link').'</a>) ';
echo ' (<a href="'. createURL('tag2tagdelete','') .'" rel="tag">'.T_('Delete link').'</a>)';
echo '</p>';
}
-
-if(strlen($user)==0) {
- $cat_url = createURL('tags', '%2$s');
-}
-
-$stopList = array();
-foreach($explodedTags as $explodedTag) {
- if(!in_array($explodedTag, $stopList)) {
-
-
-
- // fathers tag
- $fatherTags = $tag2tagservice->getLinkedTags($explodedTag, '>', $userid, true);
- if(count($fatherTags)>0) {
- foreach($fatherTags as $fatherTag) {
- echo '<a href="'. sprintf($cat_url, filter($user, 'url'), filter($fatherTag, 'url')) .'" rel="tag">('. filter($fatherTag) .')</a> ';
- }
- }
- /*
- $displayLinkedTags = displayLinkedTags($explodedTag, '>', $userid, $cat_url, $user, $editingMode, null, 1);
- echo $displayLinkedTags['output'];
- if(is_array($displayLinkedTags['stopList'])) {
- $stopList = array_merge($stopList, $displayLinkedTags['stopList']);
- }*/
- echo '<div dojoType="dojo.data.ItemFileReadStore" url="'.ROOT.'ajax/getlinkedtags.php?tag='.filter($explodedTag, 'url').'&amp;uId='.$userid.'" jsid="linkedTagStore" ></div>';
- echo '<div dojoType="dijit.Tree" store="linkedTagStore" labelAttr="name" >';
- echo '<script type="dojo/method" event="onClick" args="item">';
- $returnUrl = sprintf($cat_url, filter($user, 'url'), filter('', 'url'));
- echo 'window.location = "'.$returnUrl.'"+item.name';
- echo '</script>';
- echo '<script type="dojo/method" event="getLabelClass" args="item">';
- echo 'return \'treeTag\';';
- echo '</script>';
- echo '</div>';
- }
-
-}
-?> </div>
-
-<?php endif?>
+?>
+ <div id="related-content"></div>
+ <script type="text/javascript">//<![CDATA[
+jQuery("#related-content")
+.jstree({
+ "themes" : {
+ "theme": "default",
+ "dots": false,
+ "icons": true,
+ "url": '<?php echo ROOT_JS ?>themes/default/style.css'
+ },
+ "json_data" : {
+ "ajax" : {
+ "url": function(node) {
+ //-1 is root
+ parentparam = "";
+ if (node == -1 ) {
+ node = <?php echo json_encode($currenttag); ?>;
+ parentparam = "&parent=true";
+ } else if (node.attr('rel')) {
+ node = node.attr('rel');
+ } else {
+ return;
+ }
+
+ return "<?php echo ROOT ?>ajax/getlinkedtags.php?tag=" + node
+ + parentparam;
+ }
+ }
+ },
+ plugins : [ "themes", "json_data"]
+});
+//]]>
+ </script>
+</div> \ No newline at end of file
diff --git a/data/templates/sidebar.block.menu.php b/data/templates/sidebar.block.menu.php
index ee82997..94a9fa2 100644
--- a/data/templates/sidebar.block.menu.php
+++ b/data/templates/sidebar.block.menu.php
@@ -65,13 +65,13 @@ if (sizeof($menuTags) > 0 || ($userid != 0 && $userid === $logged_on_userid)) {
<?php $cUser = $userservice->getUser($userid); ?>
<?php if($userid>0): ?>
<?php if($userid==$logged_on_userid): ?>
-<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all your tags')?>"><?php echo T_('all your tags'); ?></a> &rarr;</p>
+<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all your tags')?>"><?php echo T_('all your tags'); ?></a> →</p>
<?php else: ?>
-<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all tags from this user')?>"><?php echo T_('all tags from this user'); ?></a> &rarr;</p>
+<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all tags from this user')?>"><?php echo T_('all tags from this user'); ?></a> →</p>
<?php endif; ?>
<?php else : ?>
-<p style="text-align:right"><a href="<?php echo createURL('populartags', $cUser['username']); ?>" title="<?php echo T_('See popular tags')?>"><?php echo T_('Popular Tags'); ?></a> &rarr;</p>
+<p style="text-align:right"><a href="<?php echo createURL('populartags', $cUser['username']); ?>" title="<?php echo T_('See popular tags')?>"><?php echo T_('Popular Tags'); ?></a> →</p>
<?php endif; ?>
</div>
diff --git a/data/templates/sidebar.block.menu2.php b/data/templates/sidebar.block.menu2.php
index 5f06b40..1c177a5 100644
--- a/data/templates/sidebar.block.menu2.php
+++ b/data/templates/sidebar.block.menu2.php
@@ -1,7 +1,4 @@
<?php
-/* Service creation: only useful services are created */
-$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
-
require_once('sidebar.linkedtags.inc.php');
/* Manage input */
@@ -15,44 +12,60 @@ if ($logged_on_userid === false) {
}
-$cat_url = createURL('tags', '%2$s');
+$cat_url = createURL('tags', '%s');
$menu2Tags = $GLOBALS['menu2Tags'];
-if (sizeOf($menu2Tags) > 0) {
- $this->includeTemplate("dojo.inc");
- ?>
+if (count($menu2Tags) > 0) {
+?>
<h2><?php echo T_('Featured Menu Tags');?></h2>
<div id="maintagsmenu"
<?php echo 'title="'.T_('This menu is composed of keywords (tags) organized by admins.').'"'?>>
-
+ <ul>
<?php
-foreach($menu2Tags as $menu2Tag) {
-
- echo '<div dojoType="dojo.data.ItemFileReadStore" url="'.ROOT.'ajax/getadminlinkedtags.php?tag='.filter($menu2Tag, 'url').'" jsid="linkedTagStore" ></div>';
- echo '<div dojoType="dijit.Tree" store="linkedTagStore" labelAttr="name" >';
- echo '<script type="dojo/method" event="onClick" args="item">';
- $returnUrl = sprintf($cat_url, filter($user, 'url'), filter('', 'url'));
- echo 'window.location = "'.$returnUrl.'"+item.name';
- echo '</script>';
- //echo '<script type="dojo/method" event="getLabel" args="item">';
- //echo 'return item.name + "...";';
- //echo '</script>';
- //echo '<script type="dojo/method" event="onMouseOver" args="item">';
- //echo 'i = item.relatedTarget;';
- //echo 'if(i.innerHTML.charAt(i.innerHTML)=="a") alert(i.innerHTML)';
- //echo '</script>';
- //echo '<script type="dojo/method" event="getLabelClass" args="item">';
- //echo 'return \'treeTag\';';
- //echo '</script>';
- echo '</div>';
+//this is unneeded and replaced by the ajax tree anyway. we keep it for
+// non-js browsers
+foreach ($menu2Tags as $menu2Tag) {
+ echo ' <li>'
+ . sprintf(
+ '<a href="%s">%s</a>',
+ sprintf($cat_url, $menu2Tag),
+ $menu2Tag
+ )
+ . '</li>' . "\n";
}
?>
+ </ul>
</div>
-
-
+<script type="text/javascript">
+jQuery("#maintagsmenu")
+.jstree({
+ "themes" : {
+ "theme": "default",
+ "dots": false,
+ "icons": true,
+ "url": '<?php echo ROOT_JS ?>themes/default/style.css'
+ },
+ "json_data" : {
+ "ajax" : {
+ "url": function(node) {
+ //-1 is root
+ if (node == -1 ) {
+ node = "";
+ } else if (node.attr('rel')) {
+ node = node.attr('rel');
+ } else {
+ return;
+ }
+ return "<?php echo ROOT ?>ajax/getadminlinkedtags.php?tag=" + node;
+ }
+ }
+ },
+ plugins : [ "themes", "json_data"]
+});
+</script>
<?php
}
?>
diff --git a/data/templates/sidebar.block.recent.php b/data/templates/sidebar.block.recent.php
index e34f820..1ffeb4d 100644
--- a/data/templates/sidebar.block.recent.php
+++ b/data/templates/sidebar.block.recent.php
@@ -31,7 +31,7 @@ if ($recentTags && count($recentTags) > 0) {
}
echo $contents ."</p>\n";
?>
- <p style="text-align:right"><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a> &rarr;</p>
+ <p style="text-align:right"><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a> →</p>
</div>
<?php
diff --git a/data/templates/sidebar.block.search.php b/data/templates/sidebar.block.search.php
index f4e6b42..d3cd8a5 100644
--- a/data/templates/sidebar.block.search.php
+++ b/data/templates/sidebar.block.search.php
@@ -34,7 +34,7 @@ foreach ($lastSearches as $row) {
echo '<a href="'
. htmlspecialchars(createURL('search', $range.'/'.$row['shTerms']))
. '">';
- echo $row['shTerms'];
+ echo htmlspecialchars($row['shTerms']);
echo '</a>';
echo ' <span title="'
. T_('Number of bookmarks for this query')
diff --git a/data/templates/sidebar.block.users.php b/data/templates/sidebar.block.users.php
index 826871e..58fdfb7 100644
--- a/data/templates/sidebar.block.users.php
+++ b/data/templates/sidebar.block.users.php
@@ -27,7 +27,7 @@ foreach ($lastUsers as $row) {
?>
</table>
-<p style="text-align:right"><a href="<?php echo createURL('users'); ?>" title="<?php echo T_('See all users')?>"><?php echo T_('All users'); ?></a> &rarr;</p>
+<p style="text-align:right"><a href="<?php echo createURL('users'); ?>" title="<?php echo T_('See all users')?>"><?php echo T_('All users'); ?></a> →</p>
</div>
<?php
}
diff --git a/data/templates/sidebar.block.watchlist.php b/data/templates/sidebar.block.watchlist.php
index 07b7f15..3af9c5a 100644
--- a/data/templates/sidebar.block.watchlist.php
+++ b/data/templates/sidebar.block.watchlist.php
@@ -16,7 +16,7 @@ foreach($watching as $watchuser) {
?>
<?php if(count($closeContacts)>0):?>
-<h2 title="<?php echo T_('Close contacts are mutual contacts');?>"><?php echo ' &harr; '. T_('Close contacts'); ?></h2>
+<h2 title="<?php echo T_('Close contacts are mutual contacts');?>"><?php echo ' ↔ '. T_('Close contacts'); ?></h2>
<div id="watching">
<ul>
<?php foreach($closeContacts as $watchuser): ?>
@@ -27,7 +27,7 @@ foreach($watching as $watchuser) {
<?php endif; ?>
-<h2><?php echo ' &rarr; '. T_('Watching'); ?></h2>
+<h2><?php echo ' → '. T_('Watching'); ?></h2>
<div id="watching">
<ul>
<?php if($userservice->isLoggedOn() && $currentUser->getUsername() == $user): ?>
@@ -41,7 +41,7 @@ foreach($watching as $watchuser) {
<?php foreach($watching as $watchuser): ?>
<li><a href="<?php echo createURL('bookmarks', $watchuser); ?>"><?php echo $watchuser; ?></a>
<?php if($userservice->isLoggedOn() && $currentUser->getUsername() == $user): ?>
- - <a href="<?php echo createUrl('watch','?contact='.$watchuser); ?>" title="<?php echo T_('Remove this contact'); ?>">x<a/>
+ - <a href="<?php echo createUrl('watch','?contact='.$watchuser); ?>" title="<?php echo T_('Remove this contact'); ?>">x</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
@@ -49,7 +49,7 @@ foreach($watching as $watchuser) {
</ul>
</div>
-<h2><?php echo ' &larr; '. T_('Watched By'); ?></h2>
+<h2><?php echo ' ← '. T_('Watched By'); ?></h2>
<div id="watching">
<ul>
<?php foreach($watchedBy as $watchuser): ?>
diff --git a/data/templates/tag2tagadd.tpl.php b/data/templates/tag2tagadd.tpl.php
index fcbd372..9482007 100644
--- a/data/templates/tag2tagadd.tpl.php
+++ b/data/templates/tag2tagadd.tpl.php
@@ -4,7 +4,7 @@ $this->includeTemplate($GLOBALS['top_include']);
<form action="<?php echo $formaction; ?>" method="post">
-<p align=right" style="float:right">
+<p align="right" style="float:right">
<small style="text-align:right"><?php echo T_('Note: use "=" to make synonym two tags. e.g.: france=frenchcountry')?></small><br/>
<small style="text-align:right"><?php echo T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris')?></small><br/>
</p>
diff --git a/data/templates/tagrename.tpl.php b/data/templates/tagrename.tpl.php
index ea8b516..894b964 100644
--- a/data/templates/tagrename.tpl.php
+++ b/data/templates/tagrename.tpl.php
@@ -11,12 +11,12 @@ window.onload = function() {
<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>
+ <td>← <?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>
+ <td>← <?php echo T_('Required'); ?></td>
</tr>
<tr>
<td></td>
diff --git a/data/templates/top.inc.php b/data/templates/top.inc.php
index b1ffa14..bdd4b1a 100644
--- a/data/templates/top.inc.php
+++ b/data/templates/top.inc.php
@@ -1,7 +1,8 @@
+<?xml version="1.0" encoding="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>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title><?php echo filter($GLOBALS['sitename'] .(isset($pagetitle) ? ' » ' . $pagetitle : '')); ?></title>
<link rel="icon" type="image/png" href="<?php echo ROOT ?>icon.png" />
<link rel="stylesheet" type="text/css" href="<?php echo ROOT ?>scuttle.css" />
@@ -17,17 +18,19 @@ if (isset($rsschannels)) {
}
?>
- <link rel="stylesheet" type="text/css"
- href="http://ajax.googleapis.com/ajax/libs/dojo/1.2/dijit/themes/nihilo/nihilo.css" />
-
<?php if (isset($loadjs)) :?>
+<?php if (DEBUG_MODE) : ?>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery.jstree.js"></script>
+<?php else: ?>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery-1.4.2.min.js"></script>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery.jstree.min.js"></script>
+<?php endif ?>
<script type="text/javascript" src="<?php echo ROOT ?>jsScuttle.php"></script>
<?php endif ?>
</head>
-
- <body class="nihilo">
-<!-- the class is used by Dojo widgets -->
+ <body>
<?php
$headerstyle = '';