예제 #1
0
 function SB_Writer_search()
 {
     parent::__construct();
     $this->switches['flat'] = 1;
     $this->tree->sortMode = 'hits';
     $this->search = SB_safeVal($_COOKIE, 'SB3SEARCH');
     if (SB_reqChk('q') != '') {
         $this->search = SB_reqVal('q');
     }
     $this->type = $this->um->getParam('user', 'default_search');
     // Check search pattern
     if (preg_match("/^(url|desc|name|all):(.*)\$/i", $this->search, $matches)) {
         $this->type = $matches[1];
         // If we have pattern then use it
         if ($this->type == 'url' || $this->type == 'desc' || $this->type == 'name' || $this->type == 'all') {
             $this->search = $matches[2];
         }
     }
     $url = $this->um->getParamB64('user', 'search_engine_url');
     $url = str_replace('%SEARCH%', $this->search, $url);
     $url = str_replace('%BASEURL%', urlencode(SB_Page::absBaseUrlShort()), $url);
     $url = str_replace('%LOGO%', urlencode(SB_Page::absBaseUrl() . SB_Skin::imgsrc('logo')), $url);
     $this->engineURL = $url;
     // We would not get here if no engine is specified
     if ($this->um->getParam('user', 'hide_xslt') || SB_reqVal("web") == 1) {
         header('Location: ' . $this->engineURL);
         exit;
     }
 }
예제 #2
0
 function baseurl($override = null)
 {
     return SB_Page::absBaseUrlShort($override);
 }
예제 #3
0
// Include skin hook file
include_once SB_Skin::path() . '/hook.inc.php';
$hook = new SB_Hook();
$sponsor = new SB_SponsorInterface($hook);
$file = './inc/sponsor.inc.php';
if (is_file($file)) {
    include_once $file;
    $sponsor = new SB_Sponsor($hook);
}
$browser = SB_reqVal('browser');
$browsers = array('firefox' => array('label' => 'Mozilla Firefox', 'homepage' => 'http://www.mozilla.org/products/firefox/', 'platforms' => '9.0/All', 'usage' => '', 'exclude' => array(), 'extra' => array('sitebar_client', 'sitebar', 'sidebar', 'livebookmarks', 'search_engine', 'iframe', 'google')), 'konqueror' => array('label' => 'Konqueror', 'homepage' => 'http://www.konqueror.org/', 'platforms' => '3.x/Linux', 'usage' => '', 'exclude' => array(), 'extra' => array('sidebar_konqueror', 'iframe', 'google')), 'opera' => array('label' => 'Opera Web Browser', 'homepage' => 'http://www.opera.com/', 'platforms' => '9.5/WinXP', 'usage' => SB_P('integrator::usage_opera'), 'exclude' => array('dir'), 'extra' => array('hotlist', 'iframe', 'google')), 'msie' => array('label' => 'Microsoft Internet Explorer', 'homepage' => 'http://www.microsoft.com/windows/ie/default.mspx', 'platforms' => '8.0/Windows', 'usage' => '', 'exclude' => array(), 'extra' => array('install', 'uninstall', 'searchbar', 'iframe', 'google')), 'maxthon' => array('label' => 'Maxthon Tabbed Browser', 'homepage' => 'http://www.maxthon.com/', 'platforms' => '1.1.120/WinXP', 'usage' => '', 'exclude' => array(), 'extra' => array('maxthon_sidebar', 'maxthon_toolbar', 'iframe', 'google')), 'other' => array('label' => 'Linux Distro/Other Tools', 'homepage' => '', 'platforms' => 'Gentoo,Debian/PHP Layers Menu', 'usage' => '', 'exclude' => array('dir', 'window', 'popup', 'addpage'), 'extra' => array('gentoo', 'debian', 'phplm')));
$bookmarklet = "javascript:var w=window;var d=w.document;var cp=d.characterSet?d.characterSet:d.charset;" . "w.open('" . SB_Page::absBaseUrl() . "command.php?command=Add%20Bookmark" . "&url='+escape(w.location.href)+'" . "&name='+escape(d.title)+" . "(cp?'&cp='+cp:''),'sbBmkWin','" . $um->getParamB64('user', 'popup_params') . "');void(0)";
$popup = "javascript:window.open('" . SB_Page::absBaseUrl() . "index.php" . "?target=_blank','sbPopWin'," . "'directories=no,width=220,height=600,left=0,top=0,scrollbars=yes,location=no,menubar=no, status=no, toolbar=no');void(0)";
$urlParts = parse_url(SB_Page::absBaseUrl());
$uniqName = preg_replace("/[^\\w]*/", "", $urlParts['host']);
$extra = array('sitebar_client' => array('label' => 'SiteBar Client', 'url' => 'https://addons.mozilla.org/firefox/3605/', 'desc' => SB_P('integrator::hint_sitebar')), 'livebookmarks' => array('label' => 'Live Bookmarks', 'url' => sprintf('%sindex.php?w=firefox&mode=download', SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_livebookmarks')), 'sidebar' => array('label' => 'Sidebar', 'url' => sprintf("javascript:sidebar.addPanel('SiteBar','%sindex.php','')", SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_sidebar')), 'search_engine' => array('label' => 'Add Search Engine', 'url' => sprintf("javascript:void(window.sidebar.addSearchEngine('%s', '%s', '%s', '%s'))", SB_Page::absBaseUrl() . 'integrator.php?lang=' . SB_GetLanguage() . '&search_engine=/sitebar' . $uniqName . '.src', SB_Page::absBaseUrl() . '' . SB_Skin::imgsrc('root_transparent') . '?rename=/sitebar' . $uniqName . '.png', strlen($um->getParamB64('config', 'feed_root_name')) ? $um->getParamB64('config', 'feed_root_name') : 'SiteBar', SB_T("Bookmarks")), 'desc' => SB_P('integrator::hint_search_engine')), 'sidebar_mozilla' => array('label' => 'Sidebar', 'url' => sprintf("javascript:sidebar.addPanel('SiteBar','%sindex.php','')", SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_sidebar_mozilla')), 'sidebar_konqueror' => array('label' => 'Sidebar', 'url' => null, 'desc' => SB_P('integrator::hint_sidebar_konqueror', SB_Page::absBaseUrl())), 'hotlist' => array('label' => 'Add to Panel', 'url' => SB_Page::absBaseUrl() . 'index.php', 'params' => array('title' => 'SiteBar', 'rel' => 'sidebar'), 'desc' => SB_P('integrator::hint_hotlist')), 'install' => array('label' => 'Install', 'url' => 'integrator.php?lang=' . SB_GetLanguage() . '&install=1', 'desc' => SB_P('integrator::hint_install')), 'uninstall' => array('label' => 'Uninstall', 'url' => 'integrator.php?lang=' . SB_GetLanguage() . '&install=0', 'desc' => SB_P('integrator::hint_uninstall')), 'searchbar' => array('label' => 'Show in Search Bar', 'url' => sprintf("javascript:void(_search=open('%sindex.php','_search'))", SB_Page::absBaseUrl()), 'desc' => SB_P('integrator::hint_searchbar')), 'maxthon_sidebar' => array('label' => 'Sidebar Plugin', 'url' => sprintf("http://sitebar.org/plugin/maxthon/?sidebar=%s", SB_Page::absBaseUrlShort()), 'desc' => SB_P('integrator::hint_maxthon_sidebar')), 'maxthon_toolbar' => array('label' => 'Toolbar Plugin', 'url' => sprintf("http://sitebar.org/plugin/maxthon/?toolbar=%s", SB_Page::absBaseUrlShort()), 'desc' => SB_P('integrator::hint_maxthon_toolbar')), 'gentoo' => array('label' => 'Gentoo Ebuild', 'url' => 'http://www.gentoo-portage.com/www-apps/sitebar', 'desc' => SB_P('integrator::hint_gentoo')), 'debian' => array('label' => 'Debian', 'url' => 'http://packages.debian.org/unstable/web/sitebar', 'desc' => SB_P('integrator::hint_debian')), 'phplm' => array('label' => 'PHP Layers Menu', 'url' => 'http://phplayersmenu.sourceforge.net/', 'desc' => SB_P('integrator::hint_phplm', sprintf('%sindex.php?w=phplm', SB_Page::absBaseUrl()))));
$general = array('addpage' => array('label' => 'Add Page to SiteBar', 'url' => $bookmarklet, 'desc' => SB_P('integrator::hint_addpage')), 'window' => array('label' => 'SiteBar', 'url' => SB_Page::absBaseUrl() . 'index.php', 'desc' => SB_P('integrator::hint_window')), 'dir' => array('label' => 'SiteBar Directory', 'url' => SB_Page::absBaseUrl() . 'index.php?w=dir', 'desc' => SB_P('integrator::hint_dir')), 'popup' => array('label' => 'SiteBar Pop-up', 'url' => $popup, 'desc' => SB_P('integrator::hint_popup')), 'iframe' => array('label' => 'SiteBar iframe', 'url' => SB_Page::absBaseUrl() . 'iframe.php', 'desc' => str_replace('<IFRAME>', '&lt;IFRAME&gt;', SB_P('integrator::hint_iframe', array(SB_Page::absBaseUrl() . 'iframe.php')))), 'google' => array('label' => 'Google Widget', 'url' => SB_Page::absBaseUrl() . 'google.php', 'desc' => SB_P('integrator::hint_google', array(SB_Page::absBaseUrl() . 'google.php'))));
?>

<div id="main">
<div id="launcher">

  <div>
    <div id="home">
      <a href="http://sitebar.org/"><img alt="" title="<?php 
echo SB_T('SiteBar Homepage');
?>
" src="<?php 
echo SB_Skin::imgsrc('logo');
?>
"></a>