From 15a30340e8867dfac3f88460fbd93b581e56f10f Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 11 Jun 2024 00:58:31 -0700 Subject: Initial steps towards a pico.css-based theme --- data/templates/pico/about.tpl.php | 34 ++ data/templates/pico/admin.tpl.php | 35 ++ .../pico/bookmarkcommondescriptionedit.tpl.php | 63 +++ data/templates/pico/bookmarklet.inc.php | 152 +++++++ .../templates/pico/bookmarks-thumbnail.inc.tpl.php | 18 + .../pico/bookmarks-vote-horizontal.inc.tpl.php | 50 +++ data/templates/pico/bookmarks-vote.inc.tpl.php | 44 ++ data/templates/pico/bookmarks.tpl.php | 444 +++++++++++++++++++++ data/templates/pico/bottom.inc.php | 30 ++ data/templates/pico/dynamictags.inc.php | 148 +++++++ data/templates/pico/editbookmark.tpl.php | 221 ++++++++++ .../pico/editprofile-sslclientcerts.tpl.php | 60 +++ data/templates/pico/editprofile.tpl.php | 81 ++++ data/templates/pico/error.404.tpl.php | 9 + data/templates/pico/error.500.tpl.php | 9 + data/templates/pico/importDelicious.tpl.php | 42 ++ data/templates/pico/importNetscape.tpl.php | 50 +++ data/templates/pico/importStructure.tpl.php | 42 ++ data/templates/pico/login.tpl.php | 41 ++ data/templates/pico/password.tpl.php | 26 ++ data/templates/pico/profile.tpl.php | 74 ++++ data/templates/pico/register.tpl.php | 54 +++ data/templates/pico/rss.tpl.php | 30 ++ data/templates/pico/search.menu.php | 50 +++ data/templates/pico/sidebar.block.common.php | 28 ++ data/templates/pico/sidebar.block.linked.php | 66 +++ data/templates/pico/sidebar.block.menu.php | 80 ++++ data/templates/pico/sidebar.block.menu2.php | 71 ++++ data/templates/pico/sidebar.block.popular.php | 44 ++ data/templates/pico/sidebar.block.recent.php | 39 ++ data/templates/pico/sidebar.block.related.php | 40 ++ data/templates/pico/sidebar.block.search.php | 51 +++ data/templates/pico/sidebar.block.tagactions.php | 35 ++ data/templates/pico/sidebar.block.users.php | 34 ++ data/templates/pico/sidebar.block.watchlist.php | 60 +++ data/templates/pico/sidebar.block.watchstatus.php | 28 ++ data/templates/pico/sidebar.linkedtags.inc.php | 84 ++++ data/templates/pico/sidebar.tpl.php | 23 ++ data/templates/pico/tag2tagadd.tpl.php | 57 +++ data/templates/pico/tag2tagdelete.tpl.php | 49 +++ data/templates/pico/tag2tagedit.tpl.php | 73 ++++ .../pico/tagcommondescriptionedit.tpl.php | 53 +++ data/templates/pico/tagdelete.tpl.php | 20 + data/templates/pico/tagedit.tpl.php | 33 ++ data/templates/pico/tagrename.tpl.php | 40 ++ data/templates/pico/tags.tpl.php | 31 ++ data/templates/pico/toolbar.inc.php | 30 ++ data/templates/pico/top.inc.php | 87 ++++ data/templates/pico/users.tpl.php | 33 ++ 49 files changed, 2996 insertions(+) create mode 100644 data/templates/pico/about.tpl.php create mode 100644 data/templates/pico/admin.tpl.php create mode 100644 data/templates/pico/bookmarkcommondescriptionedit.tpl.php create mode 100644 data/templates/pico/bookmarklet.inc.php create mode 100644 data/templates/pico/bookmarks-thumbnail.inc.tpl.php create mode 100644 data/templates/pico/bookmarks-vote-horizontal.inc.tpl.php create mode 100644 data/templates/pico/bookmarks-vote.inc.tpl.php create mode 100644 data/templates/pico/bookmarks.tpl.php create mode 100644 data/templates/pico/bottom.inc.php create mode 100644 data/templates/pico/dynamictags.inc.php create mode 100644 data/templates/pico/editbookmark.tpl.php create mode 100644 data/templates/pico/editprofile-sslclientcerts.tpl.php create mode 100644 data/templates/pico/editprofile.tpl.php create mode 100644 data/templates/pico/error.404.tpl.php create mode 100644 data/templates/pico/error.500.tpl.php create mode 100644 data/templates/pico/importDelicious.tpl.php create mode 100644 data/templates/pico/importNetscape.tpl.php create mode 100644 data/templates/pico/importStructure.tpl.php create mode 100644 data/templates/pico/login.tpl.php create mode 100644 data/templates/pico/password.tpl.php create mode 100644 data/templates/pico/profile.tpl.php create mode 100644 data/templates/pico/register.tpl.php create mode 100644 data/templates/pico/rss.tpl.php create mode 100644 data/templates/pico/search.menu.php create mode 100644 data/templates/pico/sidebar.block.common.php create mode 100644 data/templates/pico/sidebar.block.linked.php create mode 100644 data/templates/pico/sidebar.block.menu.php create mode 100644 data/templates/pico/sidebar.block.menu2.php create mode 100644 data/templates/pico/sidebar.block.popular.php create mode 100644 data/templates/pico/sidebar.block.recent.php create mode 100644 data/templates/pico/sidebar.block.related.php create mode 100644 data/templates/pico/sidebar.block.search.php create mode 100644 data/templates/pico/sidebar.block.tagactions.php create mode 100644 data/templates/pico/sidebar.block.users.php create mode 100644 data/templates/pico/sidebar.block.watchlist.php create mode 100644 data/templates/pico/sidebar.block.watchstatus.php create mode 100644 data/templates/pico/sidebar.linkedtags.inc.php create mode 100644 data/templates/pico/sidebar.tpl.php create mode 100644 data/templates/pico/tag2tagadd.tpl.php create mode 100644 data/templates/pico/tag2tagdelete.tpl.php create mode 100644 data/templates/pico/tag2tagedit.tpl.php create mode 100644 data/templates/pico/tagcommondescriptionedit.tpl.php create mode 100644 data/templates/pico/tagdelete.tpl.php create mode 100644 data/templates/pico/tagedit.tpl.php create mode 100644 data/templates/pico/tagrename.tpl.php create mode 100644 data/templates/pico/tags.tpl.php create mode 100644 data/templates/pico/toolbar.inc.php create mode 100644 data/templates/pico/top.inc.php create mode 100644 data/templates/pico/users.tpl.php (limited to 'data') diff --git a/data/templates/pico/about.tpl.php b/data/templates/pico/about.tpl.php new file mode 100644 index 0000000..843a31f --- /dev/null +++ b/data/templates/pico/about.tpl.php @@ -0,0 +1,34 @@ +includeTemplate($GLOBALS['top_include']); +?> + +
+ +
diff --git a/data/templates/pico/bookmarks-thumbnail.inc.tpl.php b/data/templates/pico/bookmarks-thumbnail.inc.tpl.php new file mode 100644 index 0000000..b8770dc --- /dev/null +++ b/data/templates/pico/bookmarks-thumbnail.inc.tpl.php @@ -0,0 +1,18 @@ +getThumbnailer(); +$imgUrl = $thumbnailer->getThumbnailUrl($address, 120, 90); +if ($imgUrl !== false) { + echo '' + . '' + . ''; +} +?> \ No newline at end of file diff --git a/data/templates/pico/bookmarks-vote-horizontal.inc.tpl.php b/data/templates/pico/bookmarks-vote-horizontal.inc.tpl.php new file mode 100644 index 0000000..c4a9f8e --- /dev/null +++ b/data/templates/pico/bookmarks-vote-horizontal.inc.tpl.php @@ -0,0 +1,50 @@ +'; +echo sprintf( + T_('Voting %d'), $row['bVoting'] +) . ' '; + +if (isset($row['hasVoted'])) { + if ($row['vote'] != 1) { + echo '' . T_('Vote for') . ' '; + } else { + echo '' + . T_('Vote for') . ' '; + } + + + if ($row['vote'] != -1) { + echo '' . T_('Vote against') . ''; + } else { + echo '' + . T_('Vote against') . ''; + } +} +echo ''; +?> \ No newline at end of file diff --git a/data/templates/pico/bookmarks-vote.inc.tpl.php b/data/templates/pico/bookmarks-vote.inc.tpl.php new file mode 100644 index 0000000..41572d5 --- /dev/null +++ b/data/templates/pico/bookmarks-vote.inc.tpl.php @@ -0,0 +1,44 @@ +'; + +if (isset($row['hasVoted']) && $row['vote'] != 1) { + echo '+'; +} else { + echo '+'; +} + +echo '' . $row['bVoting'] . ''; + +if (isset($row['hasVoted']) && $row['vote'] != -1) { + echo '-'; +} else { + echo '-'; +} +echo ''; +?> \ No newline at end of file diff --git a/data/templates/pico/bookmarks.tpl.php b/data/templates/pico/bookmarks.tpl.php new file mode 100644 index 0000000..0ef8a6b --- /dev/null +++ b/data/templates/pico/bookmarks.tpl.php @@ -0,0 +1,444 @@ + + * @author Christian WeiskegetLastTagDescription($currenttag)) {
+ $cDescription = $cdservice->getLastTagDescription($currenttag);
+ echo nl2br(filter($cDescription['cdDescription']));
+} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
+ $cDescription = $cdservice->getLastBookmarkDescription($hash);
+ echo nl2br(filter($cDescription['cdTitle'])). "
";
+ echo nl2br(filter($cDescription['cdDescription'])). "
";
+}
+
+//common tag description edit
+if ($userservice->isLoggedOn()) {
+ if ($currenttag != ''
+ && ($GLOBALS['enableCommonTagDescriptionEditedByAll']
+ || $currentUser->isAdmin()
+ )
+ ) {
+ echo ' ';
+ echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
+ echo ' ';
+ } else if (isset($hash)) {
+ echo ' (';
+ echo T_('Edit the common description of this bookmark').')';
+ }
+}
+?>
getDescription($currenttag, $userObject['uId']); +echo nl2br(filter($pDescription['tDescription'])); + +//personal tag description edit +if($userservice->isLoggedOn()) { + if($currenttag!= '') { + echo ' '; + echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):''; + echo ' '; + } +} +?>
+ + + + 0) { ?> + + +- + + + / + + / + + + / + + +'; + echo T_('Bookmarks from other users for this tag').''; + //echo T_(' for these tags'); + } else if ($userservice->isLoggedOn()){ + echo ' - '; + echo ''; + echo T_('Only your bookmarks for this tag').''; + //echo T_(' for these tags'); + } +} +?>
+ +'. T_('First') .''; + $bprev = ''. T_('Previous') .''; + } else { + $prev = $page - 1; + $prev = 'page='. $prev; + $start = ($page - 1) * $perpage; + $bfirst= ''. T_('First') .''; + $bprev = ''. T_('Previous') .''; + } + + // Next + $next = $page + 1; + $totalpages = ceil($total / $perpage); + if (count($bookmarks) < $perpage || $perpage * $page == $total) { + $bnext = ''. T_('Next') .''; + $blast = ''. T_('Last') ."\n"; + } else { + $bnext = ''. T_('Next') .''; + $blast = ''. T_('Last') ."\n"; + } + + // RSS + $brss = ''; + $size = count($rsschannels); + for ($i = 0; $i < $size; $i++) { + $brss = '' + . '' + . ''; + } + + $pagesBanner = ''. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."
\n"; + + if (getPerPageCount($currentUser) > 10) { + echo $pagesBanner; // display a page banner if too many bookmarks to manage + } + + +?> + + &$row) { + $addresses[$row['bId']] = $row['bAddress']; + } + $otherCounts = $bookmarkservice->countOthers($addresses); + if ($userservice->isLoggedOn()) { + $existence = $bookmarkservice->bookmarksExist( + $addresses, $currentUser->getId() + ); + } + + if ($userservice->isLoggedOn()) { + $watchedNames = $userservice->getWatchNames( + $currentUser->getId(), true + ); + } else { + $watchedNames = null; + } + + foreach ($bookmarks as $key => &$row) { + switch ($row['bStatus']) { + case 0: + $access = ''; + break; + case 1: + $access = ' shared'; + break; + case 2: + $access = ' private'; + break; + } + + $cats = ''; + $tagsForCopy = ''; + $tags = $row['tags']; + foreach ($tags as $tkey => &$tag) { + $tagcaturl = sprintf( + $cat_url, + filter($row['username'], 'url'), + filter($tag, 'url') + ); + $cats .= sprintf( + '%s, ', + $tagcaturl, filter($tag) + ); + $tagsForCopy .= $tag . ','; + } + $cats = substr($cats, 0, -2); + if ($cats != '') { + $cats = T_('Tags:') . ' ' . $cats; + } + + // Edit and delete links + $edit = ''; + if ($bookmarkservice->editAllowed($row)) { + $edit = ' - ' + . T_('Edit') + . '' + . ' ' + . T_('Delete') + .''; + } + + // Last update + $update = ' ('. date($GLOBALS['shortdate'], strtotime($row['bModified'])). ') '; + + // User attribution + $copy = ' ' . T_('by') . ' '; + if ($userservice->isLoggedOn() + && $currentUser->getUsername() == $row['username'] + ) { + $copy .= T_('you'); + } else { + $copy .= '' + . SemanticScuttle_Model_UserArray::getName($row) + . ''; + } + + // others + if (!isset($hash)) { + $others = $otherCounts[$row['bAddress']]; + $ostart = ''; + $oend = ''; + 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() + && ($currentUser->getId() != $row['uId']) + && !$existence[$row['bAddress']] + ) { + $copy .= ' - ' + . T_('Copy') + . ''; + } + + // Nofollow option + $rel = ''; + if ($GLOBALS['nofollow']) { + $rel = ' rel="nofollow"'; + } + + $address = $row['bAddress']; + $oaddress = $address; + // Redirection option + if ($GLOBALS['useredir']) { + $address = $GLOBALS['url_redir'] . $address; + } + + // Admin specific design + if ($userservice->isAdmin($row['username']) + && $GLOBALS['enableAdminColors'] + ) { + $adminStar = ' '; + } else { + $adminStar = ''; + } + + // Private Note (just visible by the owner and his/her contacts) + if ($watchedNames !== null + && ($currentUser->getId() == $row['uId'] + || in_array($row['username'], $watchedNames) + ) + ) { + $privateNoteField = $row['bPrivateNote']; + } else { + $privateNoteField = ''; + } + + if ($GLOBALS['enableVoting'] && $GLOBALS['hideBelowVoting'] !== null + && $row['bVoting'] < $GLOBALS['hideBelowVoting'] + ) { + $access .= ' below-threshold'; + } + + // Output + echo ''.T_('No bookmarks available').'
'; +} +$this->includeTemplate('sidebar.tpl'); +$this->includeTemplate($GLOBALS['bottom_include']); +?> diff --git a/data/templates/pico/bottom.inc.php b/data/templates/pico/bottom.inc.php new file mode 100644 index 0000000..44e0dbc --- /dev/null +++ b/data/templates/pico/bottom.inc.php @@ -0,0 +1,30 @@ + +