Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
0a086bf0
Commit
0a086bf0
authored
Jun 08, 2016
by
Dominik Hebeler
Browse files
Der Schalter um die Sprüche abzuschalten funktioniert jetzt
parent
8ae0b2ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/MetaGerSearch.php
View file @
0a086bf0
...
...
@@ -43,10 +43,13 @@ class MetaGerSearch extends Controller
# Zunächst den Spruch
$spruecheFile
=
storage_path
()
.
"/app/public/sprueche.txt"
;
if
(
file_exists
(
$spruecheFile
)
)
if
(
file_exists
(
$spruecheFile
)
&&
$_GET
[
'sprueche'
]
)
{
$sprueche
=
file
(
$spruecheFile
);
$spruch
=
$sprueche
[
array_rand
(
$sprueche
)];
}
else
{
$spruch
=
""
;
}
# Die manuellen Quicktips:
...
...
app/MetaGer.php
View file @
0a086bf0
...
...
@@ -402,7 +402,11 @@ class MetaGer
$this
->
agent
=
new
Agent
();
$this
->
mobile
=
$this
->
agent
->
isMobile
();
#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:
$this
->
resultCount
=
$request
->
input
(
'resultCount'
,
'20'
);
...
...
resources/views/metager3.blade.php
View file @
0a086bf0
...
...
@@ -19,7 +19,7 @@
</
nav
>
</
div
>
<
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
>
@
endsection
...
...
resources/views/metager3results.blade.php
View file @
0a086bf0
...
...
@@ -15,6 +15,6 @@
</nav>
</div>
<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>
resources/views/quicktip.blade.php
View file @
0a086bf0
...
...
@@ -49,7 +49,9 @@
</style>
</head>
<body>
@if( $spruch !== "" )
<blockquote
id=
"spruch"
>
{!! $spruch !!}
</blockquote>
@endif
@foreach( $mqs as $mq)
<div
class=
"quicktip"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment