+ '<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?> ?action=add&address=\'+a+\'&title=\'+t+\'&description=\'+d;void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?> <\/a><\/li>' + '<li>' + '<a class="bookmarklet" href="' + 'javascript:x=document;' + 'a=encodeURIComponent(x.location.href);' + 't=encodeURIComponent(x.title);' + 'd=encodeURIComponent('+selection+');' + 'open(' + '\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?> ?action=add&popup=1&address=\'+a+\'&title=\'+t+\'&description=\'+d,\'<?php echo htmlspecialchars(jsEscTitleDouble($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>' + '</ul>' ); }
} else { $userid = null; } } if ($cat) { $pagetitle .= ": " . str_replace('+', ' + ', $cat); } $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;