Commit 9889a997 authored by Karl's avatar Karl
Browse files

Auswahl der ersten 3 Settings Punkte jetzt über Dropdown

parent 74970e8b
......@@ -45,6 +45,7 @@ class MetaGer
protected $resultCount;
protected $sprueche;
protected $maps;
protected $newtab;
protected $domainsBlacklisted = [];
protected $urlsBlacklisted = [];
protected $url;
......@@ -875,18 +876,24 @@ class MetaGer
$this->agent = new Agent();
$this->mobile = $this->agent->isMobile();
# Sprüche
$this->sprueche = $request->input('sprueche', 'off');
if ($this->sprueche === "off") {
$this->sprueche = $request->input('sprueche', 'on');
if ($this->sprueche === "on") {
$this->sprueche = true;
} else {
$this->sprueche = false;
}
$this->maps = $request->input('maps', 'off');
if ($this->maps === "off") {
$this->maps = $request->input('maps', 'on');
if ($this->maps === "on") {
$this->maps = true;
} else {
$this->maps = false;
}
$this->newtab = $request->input('newtab', 'off');
if ($this->newtab === "on") {
$this->newtab = "_blank";
} else {
$this->newtab = "_self";
}
# Theme
$this->theme = preg_replace("/[^[:alnum:][:space:]]/u", '', $request->input('theme', 'default'));
# Ergebnisse pro Seite:
......@@ -919,15 +926,6 @@ class MetaGer
$this->time = 5000;
$this->cache = "cache";
}
if ($request->has('tab')) {
if ($request->input('tab') === "off") {
$this->tab = "_blank";
} else {
$this->tab = "_self";
}
} else {
$this->tab = "_blank";
}
if ($request->has('password')) {
$this->password = $request->input('password');
}
......@@ -1259,9 +1257,9 @@ class MetaGer
return $this->site;
}
public function getTab()
public function getNewtab()
{
return $this->tab;
return $this->newtab;
}
public function getResults()
......
......@@ -5,9 +5,17 @@ return [
'head.2' => 'Hier können Sie Ihr MetaGer anpassen: Nach Anklicken Ihrer gewünschten Einstellungen müssen Sie <a href="#unten">unten auf dieser Seite</a> wählen, ob Sie die Einstellungen dauerhaft speichern, oder nur einmalig setzen wollen.',
'allgemein.1' => 'Allgemein',
'allgemein.2' => 'Sprüche ausblenden',
'allgemein.3' => 'Maps ausblenden',
'allgemein.4' => 'Links im gleichen Tab öffnen',
'allgemein.2.1' => 'Sprüche',
'allgemein.2.2' => 'anzeigen',
'allgemein.2.3' => 'nicht anzeigen',
'allgemein.3.1' => 'Maps',
'allgemein.3.2' => 'anzeigen',
'allgemein.3.3' => 'nicht anzeigen',
'allgemein.4.1' => 'Ergebnisse öffnen:',
'allgemein.4.2' => 'In einem neuen Tab',
'allgemein.4.3' => 'Im gleichen Tab',
'allgemein.5' => 'Sprache auswählen:',
'allgemein.6' => 'Alle Sprachen',
'allgemein.7' => 'Deutsch',
......
<?php
return [
"head.1" => "Settings",
"head.2" => "Here you can customize your MetaGer: After selecting your desired settings, you have to choose, whether you want to save the settings permanently, or just for once, <a href=\"#unten\">on the bottom of this page.</a>",
"allgemein.1" => "General",
"allgemein.2" => "disable quotes",
"allgemein.3" => "open links in same tab",
"allgemein.4" => "select language:",
"allgemein.5" => "all languages",
"allgemein.6" => "german",
"allgemein.6_1" => "english",
"allgemein.7" => "number of results per page:",
"allgemein.8" => "all",
"zeit.1" => "maximum search time",
"zeit.2" => "1 second (standard)",
"zeit.3" => "2 seconds",
"zeit.4" => "5 seconds",
"zeit.5" => "10 seconds",
"zeit.6" => "20 seconds",
"suchmaschinen.1" => "search engines",
"suchmaschinen.2" => "(deselect all)",
"suchmaschinen.3" => "(select / deselect all)",
"speichern.1" => "Create a startpage for one-time use",
"speichern.2" => "Save settings permanently",
"speichern.3" => "Generate plugin with these settings",
"speichern.4" => "Reset saved settings",
"request" => "Which method should query MetaGer (GET, POST)?"
];
\ No newline at end of file
"head.1" => "Settings",
"head.2" => "Here you can customize your MetaGer: After selecting your desired settings, you have to choose, whether you want to save the settings permanently, or just for once, <a href=\"#unten\">on the bottom of this page.</a>",
"allgemein.1" => "General",
"allgemein.5" => "all languages",
"allgemein.6" => "german",
"allgemein.6_1" => "english",
"allgemein.7" => "number of results per page:",
"allgemein.8" => "all",
"zeit.1" => "maximum search time",
"zeit.2" => "1 second (standard)",
"zeit.3" => "2 seconds",
"zeit.4" => "5 seconds",
"zeit.5" => "10 seconds",
"zeit.6" => "20 seconds",
"suchmaschinen.1" => "search engines",
"suchmaschinen.2" => "(deselect all)",
"suchmaschinen.3" => "(select / deselect all)",
"speichern.1" => "Create a startpage for one-time use",
"speichern.2" => "Save settings permanently",
"speichern.3" => "Generate plugin with these settings",
"speichern.4" => "Reset saved settings",
"request" => "Which method should query MetaGer (GET, POST)?",
];
......@@ -3,12 +3,12 @@
<div class="number col-sm-1"></div>
<div class="resultInformation col-sm-10">
<p class="title">
<a class="title" href="{{ $ad['link'] }}" target="{{ $metager->getTab() }}" data-hoster="{{ $ad['gefVon'] }}" data-count="0">
<a class="title" href="{{ $ad['link'] }}" target="{{ $metager->getNewtab() }}" data-hoster="{{ $ad['gefVon'] }}" data-count="0">
{{ $ad['titel'] }}
</a>
</p>
<p class="link">
<a href="{{ $ad['link'] }}" target="{{ $metager->getTab() }}" data-hoster="{{ $ad['gefVon'] }}" data-count="0">
<a href="{{ $ad['link'] }}" target="{{ $metager->getNewtab() }}" data-hoster="{{ $ad['gefVon'] }}" data-count="0">
{{ $ad['anzeigeLink'] }}
</a>
<span class="hoster">
......
......@@ -5,14 +5,14 @@
<div class="resultInformation col-xs-12 col-sm-11">
<div class="col-xs-10 col-sm-11" style="padding:0; ">
<p class="title">
<a class="title" href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}" rel="noopener">
<a class="title" href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}" rel="noopener">
{{ $result->titel }}
</a>
</p>
<div class="link">
<div>
<div class="link-link">
<a href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}" rel="noopener">
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}" rel="noopener">
{{ $result->anzeigeLink }}
</a>
</div>
......@@ -54,7 +54,7 @@
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/partnershops") }}" target="_blank" rel="noopener">{!! trans('result.options.4') !!}</a>
</span>
@endif
<a class="proxy" onmouseover="$(this).popover('show');" onmouseout="$(this).popover('hide');" data-toggle="popover" data-placement="auto right" data-container="body" data-content="Der Link wird anonymisiert geöffnet. Ihre Daten werden nicht zum Zielserver übetragen. Möglicherweise funktionieren manche Webseiten nicht wie gewohnt." href="{{ $result->proxyLink }}" target="{{ $metager->getTab() }}" rel="noopener">
<a class="proxy" onmouseover="$(this).popover('show');" onmouseout="$(this).popover('hide');" data-toggle="popover" data-placement="auto right" data-container="body" data-content="Der Link wird anonymisiert geöffnet. Ihre Daten werden nicht zum Zielserver übetragen. Möglicherweise funktionieren manche Webseiten nicht wie gewohnt." href="{{ $result->proxyLink }}" target="{{ $metager->getNewtab() }}" rel="noopener">
<img src="/img/proxyicon.png" alt="" />
{!! trans('result.options.5') !!}
</a>
......@@ -62,14 +62,14 @@
</div>
@if( isset($result->logo) )
<div class="col-xs-2 col-sm-1" style="padding: 0;">
<a href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}">
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}">
<img src="{{ $metager->getImageProxyLink($result->logo) }}" alt="" />
</a>
</div>
@endif
@if( $result->image !== "" )
<div class="description">
<a href="{{ $result->link }}" target="{{ $metager->getTab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}" rel="noopener">
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" data-hoster="{{ strip_tags($result->gefVon) }}" data-count="{{ $result->number }}" rel="noopener">
<img src="{{ $metager->getImageProxyLink($result->image) }}" align="left" width="120px" height="60px" alt="" />
</a>
{!! $result->descr !!}
......
......@@ -23,7 +23,7 @@
@foreach($metager->getResults() as $result)
<div class="item">
<div class="img">
<a href="{{ $result->link }}" target="{{ $metager->getTab() }}"><img src="{{ $metager->getImageProxyLink($result->image) }}" width="150px" alt="" rel="noopener"/></a>
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}"><img src="{{ $metager->getImageProxyLink($result->image) }}" width="150px" alt="" rel="noopener"/></a>
<span class="label label-default hostlabel">{!! $result->gefVon !!}</span>
</div>
</div>
......
......@@ -20,7 +20,7 @@
@foreach($metager->getResults() as $result)
<div class="item">
<div class="img">
<a href="{{ $result->link }}" target="{{ $metager->getTab() }}"><img src="{{ $metager->getImageProxyLink($result->image) }}" width="150px" alt="" rel="noopener"/></a>
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}"><img src="{{ $metager->getImageProxyLink($result->image) }}" width="150px" alt="" rel="noopener"/></a>
<span class="label label-default hostlabel">{{ strip_tags($result->gefVon) }}</span>
</div>
</div>
......
......@@ -8,27 +8,33 @@
<p id="lead">{!! trans('settings.head.2') !!}</p>
<h2>{!! trans('settings.allgemein.1') !!}</h2>
<input type="hidden" name="focus" value="angepasst">
<div class="checkbox settings-checkbox">
<label><input type="checkbox" name="param_sprueche">{!! trans('settings.allgemein.2') !!}</label>
</div>
<div class="checkbox settings-checkbox">
<label><input type="checkbox" name="param_maps">{!! trans('settings.allgemein.3') !!}</label>
</div>
<div class="checkbox settings-checkbox">
<label><input type="checkbox" name="param_tab">{!! trans('settings.allgemein.4') !!}</label>
</div>
<label class="select-label">@lang("settings.allgemein.2.1")</label>
<select class="form-control settings-form-control" name="param_sprueche">
<option value="on" selected>@lang("settings.allgemein.2.2")</option>
<option value="off">@lang("settings.allgemein.2.3")</option>
</select><label class="select-label">@lang("settings.allgemein.3.1")</label>
<select class="form-control settings-form-control" name="param_maps">
<option value="on" selected>@lang("settings.allgemein.3.2")</option>
<option value="off">@lang("settings.allgemein.3.3")</option>
</select><label class="select-label">@lang("settings.allgemein.4.1")</label>
<select class="form-control settings-form-control" name="param_newtab">
<option value="on">@lang("settings.allgemein.4.2")</option>
<option value="off" selected>@lang("settings.allgemein.4.3")</option>
</select>
<label class="select-label">{!! trans('settings.allgemein.5') !!}</label>
<select class="form-control settings-form-control" name="param_lang">
<option value="all" @if(App::isLocale('de')) selected @endif >{!! trans('settings.allgemein.6') !!}</option>
<option value="de">{!! trans('settings.allgemein.7') !!}</option>
<option value="en" @if(App::isLocale('en')) selected @endif>{!! trans('settings.allgemein.8') !!}</option></select>
<option value="en" @if(App::isLocale('en')) selected @endif>{!! trans('settings.allgemein.8') !!}</option>
</select>
<label class="select-label">{!! trans('settings.allgemein.9') !!}</label>
<select class="form-control settings-form-control" name="param_resultCount">
<option value="10">10</option>
<option value="20" selected>20</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="0">{!! trans('settings.allgemein.10') !!}</option></select>
<option value="0">{!! trans('settings.allgemein.10') !!}</option>
</select>
<label class="select-label">{!! trans('settings.zeit.1') !!}:</label>
<select class="form-control settings-form-control" name="param_time">
<option value="1000" selected>{!! trans('settings.zeit.2') !!}</option>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment