Commit 0a086bf0 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Der Schalter um die Sprüche abzuschalten funktioniert jetzt

parent 8ae0b2ba
...@@ -43,10 +43,13 @@ class MetaGerSearch extends Controller ...@@ -43,10 +43,13 @@ class MetaGerSearch extends Controller
# Zunächst den Spruch # Zunächst den Spruch
$spruecheFile = storage_path() . "/app/public/sprueche.txt"; $spruecheFile = storage_path() . "/app/public/sprueche.txt";
if( file_exists($spruecheFile) ) if( file_exists($spruecheFile) && $_GET['sprueche'])
{ {
$sprueche = file($spruecheFile); $sprueche = file($spruecheFile);
$spruch = $sprueche[array_rand($sprueche)]; $spruch = $sprueche[array_rand($sprueche)];
}else
{
$spruch = "";
} }
# Die manuellen Quicktips: # Die manuellen Quicktips:
......
...@@ -402,7 +402,11 @@ class MetaGer ...@@ -402,7 +402,11 @@ class MetaGer
$this->agent = new Agent(); $this->agent = new Agent();
$this->mobile = $this->agent->isMobile(); $this->mobile = $this->agent->isMobile();
#Sprüche #Sprüche
$this->sprueche = $request->input('sprueche', 'on'); $this->sprueche = $request->input('sprueche', 'off');
if($this->sprueche === "off" )
$this->sprueche = true;
else
$this->sprueche = false;
# Ergebnisse pro Seite: # Ergebnisse pro Seite:
$this->resultCount = $request->input('resultCount', '20'); $this->resultCount = $request->input('resultCount', '20');
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</nav> </nav>
</div> </div>
<div class="col-md-4" id="quicktips"> <div class="col-md-4" id="quicktips">
<iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}"></iframe> <iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}&sprueche={{ $metager->getSprueche() }}"></iframe>
</div> </div>
@endsection @endsection
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
</nav> </nav>
</div> </div>
<div class="col-md-4" id="quicktips"> <div class="col-md-4" id="quicktips">
<iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}"></iframe> <iframe class="col-mod-4 hidden-xs hidden-sm" src="/qt?q={{ $metager->getQ() }}&sprueche={{ $metager->getSprueche() }}"></iframe>
</div> </div>
...@@ -49,7 +49,9 @@ ...@@ -49,7 +49,9 @@
</style> </style>
</head> </head>
<body> <body>
@if( $spruch !== "" )
<blockquote id="spruch">{!! $spruch !!}</blockquote> <blockquote id="spruch">{!! $spruch !!}</blockquote>
@endif
@foreach( $mqs as $mq) @foreach( $mqs as $mq)
<div class="quicktip"> <div class="quicktip">
......
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