diff --git a/app/Http/Controllers/LogController.php b/app/Http/Controllers/LogController.php index 8a2302ed08898e6b8328393b30fb90f54c79b458..be4b0e7bcbf232f841773735e693ead65362ebfc 100644 --- a/app/Http/Controllers/LogController.php +++ b/app/Http/Controllers/LogController.php @@ -26,4 +26,22 @@ class LogController extends Controller return ''; } + function pluginClose() + { + $redis = Redis::connection('redisLogs'); + if( $redis ) + { + $redis->incr('logs.plugin.close'); + } + } + + function pluginInstall() + { + $redis = Redis::connection('redisLogs'); + if( $redis ) + { + $redis->incr('logs.plugin.install'); + } + } + } \ No newline at end of file diff --git a/app/Http/Controllers/MetaGerSearch.php b/app/Http/Controllers/MetaGerSearch.php index d1b179e30ee8b9040ea413a9ff117767eb76903a..b659fe161aef9e5303eec84dac9221337b42f29c 100644 --- a/app/Http/Controllers/MetaGerSearch.php +++ b/app/Http/Controllers/MetaGerSearch.php @@ -4,9 +4,6 @@ namespace App\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Http\Request; -#use App\MetaGer\Forwarder; -#use App\MetaGer\Results; -#use App\MetaGer\Search; use App; use App\MetaGer; diff --git a/app/Http/Controllers/StartpageController.php b/app/Http/Controllers/StartpageController.php index 6a22e7a6f3e4aa3c13279bedcbd179a3efcb7863..0725cc28990486194103244cfa25c3eb43da83e0 100644 --- a/app/Http/Controllers/StartpageController.php +++ b/app/Http/Controllers/StartpageController.php @@ -75,9 +75,10 @@ class StartpageController extends Controller return loadPage($subpage); } - public function loadPlugin(Request $request, $locale = "de") + public function loadPlugin($params, $locale = "de") { - $requests = $request->all(); + $params = unserialize(base64_decode($params)); + $requests = $params; $params = []; foreach($requests as $key => $value) { @@ -94,9 +95,9 @@ class StartpageController extends Controller $params['encoding'] = 'utf8'; if(!isset($params['lang'])) $params['lang'] = 'all'; - $params["eingabe"] = ""; - - + array_forget($params, 'eingabe'); + array_forget($params, 'out'); + array_forget($params, 'page'); $link = action('MetaGerSearch@search', $params); $response = Response::make( diff --git a/app/Http/routes.php b/app/Http/routes.php index f5f64f44097be4c70e74f11dd1479abf8e402450..0943ace43682c62e00d9c1a0818947fcd69b1d67 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -151,10 +151,12 @@ Route::get('meta/meta.ger3', 'MetaGerSearch@search'); Route::get('meta/picture', 'Pictureproxy@get'); Route::get('clickstats', 'LogController@clicklog'); + Route::get('pluginClose', 'LogController@pluginClose'); + Route::get('pluginInstall', 'LogController@pluginInstall'); Route::get('qt', 'MetaGerSearch@quicktips'); Route::get('tips', 'MetaGerSearch@tips'); - Route::get('opensearch.xml', 'StartpageController@loadPlugin'); + Route::get('/plugins/{params}/opensearch.xml', 'StartpageController@loadPlugin'); Route::get('owi', function() { return redirect('https://metager.de/klassik/en/owi/'); diff --git a/app/MetaGer.php b/app/MetaGer.php index 786718f1348fd70d47e3601f36e62a375fb87edc..f347e00cb95e6bbba1fb667456f1f098f9e42d4a 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -107,7 +107,8 @@ class MetaGer ->with('mobile', $this->mobile) ->with('warnings', $this->warnings) ->with('errors', $this->errors) - ->with('metager', $this); + ->with('metager', $this) + ->with('browser', (new Agent())->browser()); default: return view('metager3bilder') ->with('results', $viewResults) @@ -115,7 +116,8 @@ class MetaGer ->with('mobile', $this->mobile) ->with('warnings', $this->warnings) ->with('errors', $this->errors) - ->with('metager', $this); + ->with('metager', $this) + ->with('browser', (new Agent())->browser()); } } @@ -127,7 +129,8 @@ class MetaGer ->with('mobile', $this->mobile) ->with('warnings', $this->warnings) ->with('errors', $this->errors) - ->with('metager', $this); + ->with('metager', $this) + ->with('browser', (new Agent())->browser()); break; case 'results-with-style': return view('metager3') @@ -137,7 +140,8 @@ class MetaGer ->with('warnings', $this->warnings) ->with('errors', $this->errors) ->with('metager', $this) - ->with('suspendheader', "yes"); + ->with('suspendheader', "yes") + ->with('browser', (new Agent())->browser()); break; default: return view('metager3') @@ -145,7 +149,8 @@ class MetaGer ->with('mobile', $this->mobile) ->with('warnings', $this->warnings) ->with('errors', $this->errors) - ->with('metager', $this); + ->with('metager', $this) + ->with('browser', (new Agent())->browser()); break; } } @@ -157,25 +162,13 @@ class MetaGer { $logEntry = ""; $logEntry .= "[" . date(DATE_RFC822, mktime(date("H"),date("i"), date("s"), date("m"), date("d"), date("Y"))) . "]"; - $logEntry .= " From=" . $this->ip; $logEntry .= " pid=" . getmypid(); - $anonId= md5("MySeCrEtSeEdFoRmd5" - .$this->request->header('Accept') - .$this->request->header('Accept-Charset') - .$this->request->header('Accept-Encoding') - .$this->request->header('HTTP_LANGUAGE') - .$this->request->header('User-Agent') - .$this->request->header('Keep-Alive') - .$this->request->header('X-Forwarded-For') - .date("H")); # Wichtig!! Den Parameter um die aktuelle Stunde erweitern. Ansonsten wäre die anonId dauerhaft einem Nutzer zuzuordnen. - $logEntry .= " anonId=$anonId"; $logEntry .= " ref=" . $this->request->header('Referer'); $useragent = $this->request->header('User-Agent'); $useragent = str_replace("(", " ", $useragent); $useragent = str_replace(")", " ", $useragent); $useragent = str_replace(" ", "", $useragent); - $logEntry .= " ua=" . $useragent; - $logEntry .= " iter= mm= time=" . round((microtime(true)-$this->starttime), 2) . " serv=" . $this->fokus . " which= hits= stringSearch= QuickTips= SSS= check="; + $logEntry .= " time=" . round((microtime(true)-$this->starttime), 2) . " serv=" . $this->fokus; $logEntry .= " search=" . $this->eingabe; $redis->rpush('logs.search', $logEntry); }catch( \Exception $e) @@ -259,7 +252,10 @@ class MetaGer //Slice the collection to get the items to display in current page $currentPageSearchResults = $collection->slice($offset * $perPage, $perPage)->all(); - # Für diese 20 Links folgt nun unsere Adgoal Implementation. + # Für diese 20 Links folgt nun unsere Boost-Implementation. + $currentPageSearchResults = $this->parseBoost($currentPageSearchResults); + + # Für diese 20 Links folgt nun unsere Adgoal- Implementation. $currentPageSearchResults = $this->parseAdgoal($currentPageSearchResults); //Create our paginator and pass it to the view @@ -290,6 +286,25 @@ class MetaGer } } + public function parseBoost($results) + { + foreach($results as $result) + { + if(preg_match('/^(http[s]?\:\/\/)?(www.)?amazon\.de/',$result->anzeigeLink)) + { + if(preg_match('/\?/',$result->anzeigeLink)) + { + $result->link .= '&tag=boostmg01-21'; + } else + { + $result->link .= '?tag=boostmg01-21'; + } + $result->partnershop = true; + + } + } + return $results; + } public function parseAdgoal($results) { $publicKey = getenv('adgoal_public'); @@ -340,8 +355,8 @@ class MetaGer $targetUrl = $result->anzeigeLink; if(strpos($targetUrl, "http") !== 0) $targetUrl = "http://" . $targetUrl; - $hash = md5($targetUrl . $privateKey); - $newLink = "https://api.smartredirect.de/api_v2/ClickGate.php?p=" . $publicKey . "&k=" . $hash . "&url=" . urlencode($targetUrl) . "&q=" . $query; + $gateHash = md5($targetUrl . $privateKey); + $newLink = "https://api.smartredirect.de/api_v2/ClickGate.php?p=" . $publicKey . "&k=" . $gateHash . "&url=" . urlencode($targetUrl) . "&q=" . $query; $result->link = $newLink; $result->partnershop = true; } @@ -569,18 +584,28 @@ class MetaGer # aber natürlich nicht ewig. # Die Verbindung steht zu diesem Zeitpunkt und auch unsere Request wurde schon gesendet. # Wir geben der Suchmaschine nun bis zu 500ms Zeit zu antworten. - $enginesToLoad = count($engines); + + # Wir zählen die Suchmaschinen, die durch den Cache beantwortet wurden: + $enginesToLoad = 0; + $canBreak = false; + foreach($engines as $engine) + { + if( $engine->cached ) + { + $enginesToLoad--; + if( $overtureEnabled && ( $engine->name === "overture" || $engine->name === "overtureAds" ) ) + $canBreak = true; + } + } + $enginesToLoad += count($engines); $loadedEngines = 0; $timeStart = microtime(true); - while( true ) { $time = (microtime(true) - $timeStart) * 1000; $loadedEngines = intval(Redis::hlen('search.' . $this->getHashCode())); - $canBreak = true; - if( $overtureEnabled && !Redis::hexists('search.' . $this->getHashCode(), 'overture') && !Redis::hexists('search.' . $this->getHashCode(), 'overtureAds')) - $canBreak = false; - + if( $overtureEnabled && (Redis::hexists('search.' . $this->getHashCode(), 'overture') || Redis::hexists('search.' . $this->getHashCode(), 'overtureAds'))) + $canBreak = true; # Abbruchbedingung if($time < 500) @@ -598,7 +623,7 @@ class MetaGer usleep(50000); } - + #exit; foreach($engines as $engine) { if(!$engine->loaded) @@ -1053,4 +1078,4 @@ class MetaGer { return $this->quicktips; } -} \ No newline at end of file +} diff --git a/app/Models/Searchengine.php b/app/Models/Searchengine.php index 8f0deb05772110d47676444ef3c8667f13a53bd3..3cf770a1b5f3516cd5cbea8448fd88630f622b74 100644 --- a/app/Models/Searchengine.php +++ b/app/Models/Searchengine.php @@ -6,6 +6,7 @@ use Log; use Redis; use App\Jobs\Search; use Illuminate\Foundation\Bus\DispatchesJobs; +use Cache; abstract class Searchengine @@ -24,6 +25,7 @@ abstract class Searchengine public $write_time = 0; public $connection_time = 0; public $loaded = false; + public $cached = false; function __construct(\SimpleXMLElement $engine, MetaGer $metager) { @@ -34,6 +36,9 @@ abstract class Searchengine $this->homepage = "https://metager.de"; $this->engine = $engine; + if( !isset($this->cacheDuration) ) + $this->cacheDuration = 60; + # Wir registrieren die Benutzung dieser Suchmaschine $this->uses = intval(Redis::hget($this->name, "uses")) + 1; Redis::hset($this->name, "uses", $this->uses); @@ -50,13 +55,7 @@ abstract class Searchengine } # User-Agent definieren: - if( isset($_SERVER['HTTP_USER_AGENT'])) - { - $this->useragent = $_SERVER['HTTP_USER_AGENT']; - }else - { - $this->useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"; - } + $this->useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"; $this->ip = $metager->getIp(); $this->gefVon = "<a href=\"" . $this->homepage . "\" target=\"_blank\">" . $this->displayName . "</a>"; $this->startTime = microtime(); @@ -73,14 +72,21 @@ abstract class Searchengine $q = $metager->getQ(); } $this->getString = $this->generateGetString($q, $metager->getUrl(), $metager->getLanguage(), $metager->getCategory()); - $this->hash = $metager->getHashCode(); - - # Die Anfragen an die Suchmaschinen werden nun von der Laravel-Queue bearbeitet: - # Hinweis: solange in der .env der QUEUE_DRIVER auf "sync" gestellt ist, werden die Abfragen - # nacheinander abgeschickt. - # Sollen diese Parallel verarbeitet werden, muss ein anderer QUEUE_DRIVER verwendet werden. - # siehe auch: https://laravel.com/docs/5.2/queues - $this->dispatch(new Search($this->hash, $this->host, $this->port, $this->name, $this->getString, $this->useragent, $metager->getSumaFile())); + $this->hash = md5($this->host . $this->getString . $this->port . $this->name); + $this->resultHash = $metager->getHashCode(); + if( Cache::has($this->hash) ) + { + $this->cached = true; + $this->retrieveResults(); + }else + { + # Die Anfragen an die Suchmaschinen werden nun von der Laravel-Queue bearbeitet: + # Hinweis: solange in der .env der QUEUE_DRIVER auf "sync" gestellt ist, werden die Abfragen + # nacheinander abgeschickt. + # Sollen diese Parallel verarbeitet werden, muss ein anderer QUEUE_DRIVER verwendet werden. + # siehe auch: https://laravel.com/docs/5.2/queues + $this->dispatch(new Search($this->resultHash, $this->host, $this->port, $this->name, $this->getString, $this->useragent, $metager->getSumaFile())); + } } public abstract function loadResults($result); @@ -136,16 +142,28 @@ abstract class Searchengine public function retrieveResults() { - if( Redis::hexists('search.' . $this->hash, $this->name)) + if( $this->loaded ) + return true; + $body = ""; + if( $this->cacheDuration > 0 && Cache::has($this->hash) ) + { + $body = Cache::get($this->hash); + }elseif ( Redis::hexists('search.' . $this->resultHash, $this->name) ) { + $body = Redis::hget('search.' . $this->resultHash, $this->name); + if( $this->cacheDuration > 0 ) + Cache::put($this->hash, $body, $this->cacheDuration); + } + + if( $body !== "" ) { - $body = Redis::hget('search.' . $this->hash, $this->name); $this->loadResults($body); $this->loaded = true; Redis::hdel('search.' . $this->hash, $this->name); return true; - } - return false; - + }else + { + return false; + } } public function shutdown() diff --git a/app/Models/parserSkripte/Exalead.php b/app/Models/parserSkripte/Exalead.php index c558e8e49046cfbe42ef24560f57b6b409caf250..38be504f20b08e61e52178e841047d925a9114a5 100644 --- a/app/Models/parserSkripte/Exalead.php +++ b/app/Models/parserSkripte/Exalead.php @@ -15,6 +15,7 @@ class Exalead extends Searchengine public function loadResults ($result) { +# die($result); $result = preg_replace("/\r\n/si", "", $result); try { $content = simplexml_load_string($result); @@ -50,9 +51,15 @@ class Exalead extends Searchengine $title = $result->xpath("a:metas/a:Meta[@name='title']/a:MetaString[@name='value']")[0]->__toString(); $link = $result->xpath("a:metas/a:Meta[@name='url']/a:MetaString[@name='value']")[0]->__toString(); $anzeigeLink = $link; - if(sizeOf($result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")) === 0) - $descr = ""; - else + $descr = ""; + if(sizeOf($result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")) === 0 && sizeOf($result->xpath("a:metas/a:Meta[@name='summary']/a:MetaText[@name='value']")) !== 0) + { + $tmp = $result->xpath("a:metas/a:Meta[@name='summary']/a:MetaText[@name='value']"); + foreach($tmp as $el) + { + $descr .= strip_tags($el->asXML()); + } + }else $descr = $result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")[0]->__toString(); $this->counter++; $this->results[] = new \App\Models\Result( diff --git a/config/cache.php b/config/cache.php index 3ffa840b0ba9d28be165370bc1f3b5ceb2ff89cf..08547755f21cbfbb8b5e1feab55ba6087d49b377 100755 --- a/config/cache.php +++ b/config/cache.php @@ -13,7 +13,7 @@ return [ | */ - 'default' => env('CACHE_DRIVER', 'file'), + 'default' => env('CACHE_DRIVER', 'redis'), /* |-------------------------------------------------------------------------- diff --git a/public/css/styleResultPage.css b/public/css/styleResultPage.css index 75f040e5d29716d453bacb02414641700883c3da..08d711ccc158c0842d0f74cc00523485c9ccd328 100644 --- a/public/css/styleResultPage.css +++ b/public/css/styleResultPage.css @@ -36,7 +36,7 @@ nav-tabs > li.active { { } - .alert{ + .tab-pane .alert{ margin: 10px 0; padding: 5px 15px; @@ -330,6 +330,11 @@ a:hover .result .description img { margin:5px; margin-left:0; + margin-right:15px; + height:auto; + width:auto; + max-width: 120px; + max-height:200px } .result.ad .description { @@ -461,4 +466,27 @@ footer a{ .pager{ text-align:center; +} + +#searchplugin{ + display:none; + position: fixed; + top: 50px; + right: 10px; + z-index: 501; + width: 25%; +} + +#searchplugin > div{ + text-align: center; + padding-top: 5px; +} +#searchplugin > div > a{ + color: white; +} + +@media(min-width: 768px){ + #searchplugin{ + display: initial; + } } \ No newline at end of file diff --git a/public/img/aufruf.png b/public/img/aufruf.png index fc0443ff91146f0368ba0265bf40e7a9d60e3649..517baa75cad477b4d17b397a10d0730190af4269 100644 Binary files a/public/img/aufruf.png and b/public/img/aufruf.png differ diff --git a/public/img/boosticon.png b/public/img/boosticon.png index 80673ae096cc1b2a321eab8dcfbfd82df12ebf50..c24b10d11a336be1ba435612887eca0e4253ead0 100644 Binary files a/public/img/boosticon.png and b/public/img/boosticon.png differ diff --git a/public/img/proxyicon.png b/public/img/proxyicon.png index 79eedcebc3fa2a67d46d2c4cf5352a0974823258..cabaeb43d0eab94efe3d9e93dcf3f0ee564563a1 100644 Binary files a/public/img/proxyicon.png and b/public/img/proxyicon.png differ diff --git a/public/js/scriptResultPage.js b/public/js/scriptResultPage.js index bae64e8e5cedae5ab68f5bd28072716fe61d8ddf..aea1f8f11ef6625042aa70985f8bd3f70b16a360 100644 --- a/public/js/scriptResultPage.js +++ b/public/js/scriptResultPage.js @@ -33,6 +33,23 @@ function getDocumentReadyForUse(){ tabs(); theme(); fokiChanger(); + pluginInfo(); +} + +function pluginInfo() +{ + if(localStorage) + { + if(localStorage.getItem('pluginInfo') == "off") + $("#searchplugin").css("display", "none"); + $("#searchplugin").on('close.bs.alert', function() { + $.get('/pluginClose'); + localStorage.setItem('pluginInfo', 'off'); + }); + $("#searchplugin a.btn").click( function() { + $.get('/pluginInstall'); + }); + } } function theme(){ diff --git a/resources/lang/de/index.php b/resources/lang/de/index.php index a2d6b3834c08a13bf5dc3bcbc8e06e6c3cfb6227..0fc9a1d713dced5490fa83f1a0029342f3a6f936 100644 --- a/resources/lang/de/index.php +++ b/resources/lang/de/index.php @@ -33,6 +33,7 @@ return [ 'plugin.head.3' => 'MetaGer zum Opera hinzufügen', 'plugin.head.4' => 'MetaGer zum Internet Explorer hinzufügen', 'plugin.head.5' => 'MetaGer zum Microsoft Edge hinzufügen', + 'plugin.head.info' => '(aktuelle Sucheinstellungen werden übernommen)', 'plugin.firefox.1' => 'Klicken Sie ', 'plugin.firefox.2' => 'hier', @@ -40,15 +41,9 @@ return [ 'plugin.firefox.4' => 'Setzen Sie einen Haken bei "Diese als aktuelle Suchmaschine setzen"', 'plugin.firefox.5' => 'Klicken Sie auf "Hinzufügen"', - 'plugin.chrome.1' => 'Klicken Sie ', - 'plugin.chrome.2' => 'hier', - 'plugin.chrome.3' => ', um MetaGer als Suchmaschine hinzuzufügen', - 'plugin.chrome.4' => 'Klicken Sie im Popup auf OK', - 'plugin.chrome.5' => '(Sollte der OK-Knopf deaktiviert sein, ist MetaGer bereits in Ihren Suchmaschinen. Klicken Sie dann auf Abbrechen und fahren mit Schritt 2 fort.)', - 'plugin.chrome.6' => 'Klicken in Ihrem Browser oben rechts auf ', - 'plugin.chrome.7' => 'Wählen Sie "Einstellungen"', - 'plugin.chrome.8' => 'Im Bereich Suchen, klicken Sie auf "Suchmaschinen verwalten"', - 'plugin.chrome.9' => 'In der nun angezeigten Liste, finden Sie MetaGer. Fahren Sie mit der Maus über den Eintrag und klicken auf "Als Standard festlegen"', + 'plugin.chrome.1' => 'Klicken Sie in Ihrem Chrome oben rechts auf <span class="glyphicon glyphicon-option-vertical"></span> und im folgenden Menü auf "Einstellungen", um die Einstellungen Ihres Chromes zu öffnen.', + 'plugin.chrome.2' => 'Im Bereich "Suchen" klicken Sie auf Suchmaschinen verwalten...', + 'plugin.chrome.3' => 'In der nun angezeigten Liste, finden Sie den Eintrag "MetaGer". Fahren Sie mit der Maus über den Eintrag und klicken auf "Als Standard festlegen"', 'plugin.opera.1' => 'Klicken Sie ', 'plugin.opera.2' => 'hier', diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 3877443023a4355a6b2f5efe6b27556c6ed73b1f..5300840ccee8ee19b7f08f66776a221dc50cb403 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -30,6 +30,7 @@ $(".seperator").addClass("hidden"); @endif </h4> + <p class="text-muted">{{ trans('index.plugin.head.info') }}</p> </div> <div class="modal-body"> @if ($browser === 'Firefox' || $browser === 'Mozilla') @@ -38,41 +39,74 @@ <li>{{ trans('index.plugin.firefox.4') }}</li> <li>{{ trans('index.plugin.firefox.5') }}</li> </ol> + <h4>MetaGer als Startseite im {{ $browser }} einrichten</h4> + <hr /> + <ol> + <li>Klicken Sie oben rechts im Browser auf <span class="glyphicon glyphicon-menu-hamburger"></span> und öffnen Sie die "Einstellungen"</li> + <li>Tragen Sie im Feld "Startseite" "https://metager.de" ein.</li> + </ol> @elseif ($browser === 'Chrome') <ol> - <li>{{ trans('index.plugin.chrome.1') }}<a href="javascript:window.external.AddSearchProvider($('link[rel=search]').attr('href'))" onclick="$('#more').removeClass('hidden');">{{ trans('index.plugin.chrome.2') }}</a>{{ trans('index.plugin.chrome.3') }} - <ul id=\"more\" class=\"hidden list-unstyled\"> - <li>{{ trans('index.plugin.chrome.4') }}</li> - <li><small>{{ trans('index.plugin.chrome.5') }}</small></li> - </ul></li> - <li>{{ trans('index.plugin.chrome.6') }}<span class=\"glyphicon glyphicon-menu-hamburger\"></span></li> - <li>{{ trans('index.plugin.chrome.7') }}</li> - <li>{{ trans('index.plugin.chrome.8') }}</li> - <li>{{ trans('index.plugin.chrome.9') }}</li> + <li>{!! trans('index.plugin.chrome.1') !!}</li> + <li>{!! trans('index.plugin.chrome.2') !!}</li> + <li>{{ trans('index.plugin.chrome.3') }}</li> + </ol> + <h4>MetaGer als Startseite im {{ $browser }} einrichten</h4> + <hr /> + <ol> + <li>Klicken Sie oben rechts im Browser auf <span class="glyphicon glyphicon-option-vertical"></span> und öffnen Sie die "Einstellungen"</li> + <li>Im Bereich "Beim Start" wählen Sie "Bestimmte Seite oder Seiten öffnen und klicken anschließend auf "Seiten festlegen"</li> + <li>Tragen Sie "https://metager.de" als URL bei "Neue Seite hinzufügen ein"</li> + <li>Hinweis: Alle hier sichtbaren Webseiten werden nun beim Start des Browsers geöffnet. Sie können Einträge entfernen, indem Sie mit der Maus drüber fahren und rechts auf das "x" klicken.</li> </ol> @elseif ($browser === 'Opera') <ol> - <li>{{ trans('index.plugin.opera.1') }}<a href=\"/\" target=\"_blank\">{{ trans('index.plugin.opera.2') }}</a>{{ trans('index.plugin.opera.3') }}</li> + <li>{{ trans('index.plugin.opera.1') }}<a href="/" target="_blank">{{ trans('index.plugin.opera.2') }}</a>{{ trans('index.plugin.opera.3') }}</li> <li>{{ trans('index.plugin.opera.4') }}</li> <li>{{ trans('index.plugin.opera.5') }}</li> <li>{{ trans('index.plugin.opera.6') }}</li> - <li><small>{{ trans('index.plugin.opera.7') }}<a href=\"https://www.mozilla.org/de/firefox/new/\" target=\"_blank\">{{ trans('index.plugin.opera.8') }}</a>{{ trans('index.plugin.opera.9') }}</small> + <li><small>{{ trans('index.plugin.opera.7') }}<a href="https://www.mozilla.org/de/firefox/new/" target="_blank">{{ trans('index.plugin.opera.8') }}</a>{{ trans('index.plugin.opera.9') }}</small> + </ol> + <h4>MetaGer als Startseite im {{ $browser }} einrichten</h4> + <hr /> + <ol> + <li>Klicken Sie im Browser-Menü auf "Bearbeiten"->"Einstellungen"</li> + <li>Im Bereich "Beim Starten" wählen Sie "Eine bestimmte Seite, oder bestimmte Seiten öffnen +" und anschließend "Seiten festlegen"</li> + <li>Tragen Sie bei "Adresse eingeben" "https://metager.de" ein und bestätigen mit Enter</li> + <li>Klicken Sie auf "OK"</li> </ol> @elseif ($browser === 'IE') <ol> - <li>{{ trans('index.plugin.IE.1') }}<a href=\"javascript:window.external.addSearchProvider($('link[rel=search]').attr('href'));\">{{ trans('index.plugin.IE.2') }}</a>{{ trans('index.plugin.IE.3') }} - <li>{{ trans('index.plugin.IE.4') }}<span class=\"glyphicon glyphicon-cog\"></span>)</li> + <li>{{ trans('index.plugin.IE.1') }}<a href="javascript:window.external.addSearchProvider($('link[rel=search]').attr('href'));">{{ trans('index.plugin.IE.2') }}</a>{{ trans('index.plugin.IE.3') }} + <li>{{ trans('index.plugin.IE.4') }}<span class="glyphicon glyphicon-cog"></span>)</li> <li>{{ trans('index.plugin.IE.5') }}</li> <li>{{ trans('index.plugin.IE.6') }}</li> <li>{{ trans('index.plugin.IE.7') }}</li> </ol> + <h4>MetaGer als Startseite im {{ $browser }} einrichten</h4> + <hr /> + <ol> + <li>Klicken Sie oben rechts im Browser auf <span class="glyphicon glyphicon-cog"></span> und öffnen Sie die "Internetoptionen"</li> + <li>Falls MetaGer die einzige Startseite sein soll, markieren Sie im Textfeld den kompletten Text und ersetzen Ihn durch "https://metager.de"</li> + <li>Klicken Sie auf "OK"</li> + </ol> @elseif ($browser === 'Edge') <ol> - <li>{{ trans('index.plugin.edge.1') }}<span class=\"glyphicon glyphicon-option-horizontal\"></span>{{ trans('index.plugin.edge.2') }}</li> + <li>{{ trans('index.plugin.edge.1') }}<span class="glyphicon glyphicon-option-horizontal"></span>{{ trans('index.plugin.edge.2') }}</li> <li>{{ trans('index.plugin.edge.3') }}</li> <li>{{ trans('index.plugin.edge.4') }}</li> <li>{{ trans('index.plugin.edge.5') }}</li> </ol> + <h4>MetaGer als Startseite im {{ $browser }} einrichten</h4> + <hr /> + <ol> + <li>Klicken Sie oben rechts im Browser auf <span class="glyphicon glyphicon-option-horizontal"></span> und öffnen Sie die "Einstellungen"</li> + <li>Wählen Sie im Bereich "Öffnen mit" den Punkt "Bestimmte Seite(n)" aus</li> + <li>Im Dropdown-Menü darunter wählen Sie "Benutzerdefiniert" aus</li> + <li>Im Bereich darunter tragen Sie "https://metager.de" in das Feld "Webadresse eingeben" ein und klicken auf das "+" Symbol</li> + <li>Entfernen Sie alle Einträge, die beim Start nicht geöffnet werden sollen (z.B. about:start), indem Sie rechts auf das kleine "x" klicken.</li> + </ol> @endif </div> </div> diff --git a/resources/views/layouts/researchandtabs.blade.php b/resources/views/layouts/researchandtabs.blade.php index d1955939fca08c7b1e06300e22c8726d41634680..5518dc5b96011d386d85655910c043fe5baf80fb 100644 --- a/resources/views/layouts/researchandtabs.blade.php +++ b/resources/views/layouts/researchandtabs.blade.php @@ -31,7 +31,16 @@ </ul> </nav> </header> - + @if( strpos(rtrim(Request::header('REFERER'), '/'), LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") ) === 0 && ( $browser === 'Firefox' || $browser === 'Mozilla' || $browser === 'Chrome' || $browser === 'IE' || $browser === 'Edge') ) + <div id="searchplugin" class="alert alert-warning alert-dismissible" role="alert" style=""> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> + Wussten Sie, dass Ihr {{ $browser }} MetaGer als Standardsuchmaschine verwenden kann? + <br /> + <div style=""> + <a href="{{ action('StartpageController@loadStartPage', Request::all()) }}#plugin-modal" target="_blank" type="button" class="btn btn-info" style="">Zeig mir wie</a> + </div> + </div> + @endif <ul class="nav nav-tabs" id="foki" role="tablist"> @if( $metager->getFokus() === "web" ) <li id="webTabSelector" role="presentation" data-loaded="1" class="active"> diff --git a/resources/views/layouts/resultPage.blade.php b/resources/views/layouts/resultPage.blade.php index 11979c10b694127bb65d56d407a561ba15798498..e4a1b2571922fc4501e4e0848da1fa4f95460ee8 100644 --- a/resources/views/layouts/resultPage.blade.php +++ b/resources/views/layouts/resultPage.blade.php @@ -16,6 +16,8 @@ <meta content="{{ $eingabe }}" name="q" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="referrer" content="no-referrer" /> + <link rel="search" type="application/opensearchdescription+xml" title="MetaGer: Sicher suchen & finden, Privatsphäre schützen" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}"> + </head> <body id="resultBody"> @if( !isset($suspendheader) ) diff --git a/resources/views/layouts/staticPages.blade.php b/resources/views/layouts/staticPages.blade.php index 35f58fbc98cb364afbe3ccdddb2a7455325be5d6..8691d7a71097aa464d20c76902dc46c3e68d6d65 100644 --- a/resources/views/layouts/staticPages.blade.php +++ b/resources/views/layouts/staticPages.blade.php @@ -14,7 +14,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta rel="icon" type="image/x-icon" href="/favicon.ico" /> <meta rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> - <link rel="search" type="application/opensearchdescription+xml" title="MetaGer: Sicher suchen & finden, Privatsphäre schützen" href="{{ action('StartpageController@loadPlugin', Request::all()) }}"> + <link rel="search" type="application/opensearchdescription+xml" title="MetaGer: Sicher suchen & finden, Privatsphäre schützen" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}"> <link href="/css/bootstrap.css" rel="stylesheet" /> <link href="/css/style.css" rel="stylesheet" /> @if (isset($css)) @@ -22,6 +22,7 @@ @endif <link id="theme" href="/css/theme.css.php" rel="stylesheet" /> </head> + <body> <header> <nav class="navbar navbar-default"> diff --git a/resources/views/metager3bilder.blade.php b/resources/views/metager3bilder.blade.php index 1dca860f0aab71572cc73d4502117bc43768b430..a066e2fc9aa887179dc937d56b0e9095fcb303ef 100644 --- a/resources/views/metager3bilder.blade.php +++ b/resources/views/metager3bilder.blade.php @@ -30,7 +30,7 @@ @foreach($metager->getResults()->items() as $result) <div class="item"> <div class="img"> - <a href="{{ $result->link }}" target="{{ $metager->getTab() }}"><img src="{{ $metager->getImageProxyLink($result->image) }}" width="150px" alt="Bild nicht gefunden"/></a> + <a href="{{ $result->link }}" target="{{ $metager->getTab() }}"><img src="{{ $metager->getImageProxyLink($result->image) }}" width="150px" alt=""/></a> <span class="label label-default">{{ strip_tags($result->gefVon) }}</span> </div> </div> diff --git a/resources/views/plugin.blade.php b/resources/views/plugin.blade.php index 197e4f232aa27ad5091b13a8ae7ac030de4bb1c5..f4095e76d31713daed9c0a7d43d21f736692afc3 100644 --- a/resources/views/plugin.blade.php +++ b/resources/views/plugin.blade.php @@ -4,6 +4,6 @@ <Description>MetaGer: Sicher suchen & finden, Privatsphäre schützen</Description> <Contact>office@suma-ev.de</Contact> <Image width="16" height="16" type="image/x-icon">{{ url('/favicon.ico') }}</Image> - <Url type="text/html" template="{{ $link }}{searchTerms}" method="get"></Url> + <Url type="text/html" template="{{ $link }}&eingabe={searchTerms}" method="get"></Url> <InputEncoding>UTF-8</InputEncoding> </OpenSearchDescription> \ No newline at end of file