Skip to content
GitLab
Menu
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
59349022
Commit
59349022
authored
Oct 04, 2016
by
Phil Höfer
Browse files
Radiobrowser und Plugin-Übersetzung wieder eingefügt
parent
48c74ad2
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Radiobrowser.php
0 → 100644
View file @
59349022
<?php
namespace
app\Models\parserSkripte
;
use
App\Models\Searchengine
;
class
Radiobrowser
extends
Searchengine
{
public
$results
=
[];
public
function
__construct
(
\
SimpleXMLElement
$engine
,
\
App\MetaGer
$metager
)
{
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
$result
)
{
$result
=
preg_replace
(
"/
\r\n
/si"
,
""
,
$result
);
try
{
$content
=
json_decode
(
$result
);
}
catch
(
\
Exception
$e
)
{
abort
(
500
,
"
$result
is not a valid json string"
);
}
if
(
!
$content
)
{
return
;
}
foreach
(
$content
as
$result
)
{
$title
=
$result
->
name
;
$link
=
$result
->
homepage
;
$anzeigeLink
=
$link
;
$descr
=
""
;
if
(
$result
->
tags
!=
""
)
{
$descr
.
=
"Tags: "
.
$result
->
tags
;
}
if
(
$result
->
tags
!=
""
)
{
if
(
$descr
!=
""
)
{
$descr
.
=
" - "
;
}
$descr
.
=
"Country: "
.
$result
->
country
;
}
if
(
$result
->
tags
!=
""
)
{
if
(
$descr
!=
""
)
{
$descr
.
=
" - "
;
}
$descr
.
=
"Language: "
.
$result
->
language
;
}
$this
->
counter
++
;
$this
->
results
[]
=
new
\
App\Models\Result
(
$this
->
engine
,
$title
,
$link
,
$anzeigeLink
,
$descr
,
$this
->
gefVon
,
$this
->
counter
,
false
);
}
}
}
resources/lang/de/plugin.php
0 → 100644
View file @
59349022
<?php
return
[
'description'
=>
'MetaGer: Sicher suchen & finden, Privatsphäre schützen'
,
];
resources/views/plugin.blade.php
View file @
59349022
<?
xmlversion
=
"1.0"
encoding
=
"UTF-8"
?>
<OpenSearchDescription
xmlns=
"http://a9.com/-/spec/opensearch/1.1/"
>
<ShortName>
MetaGer
</ShortName>
<Description>
MetaGer: Sicher suchen
&
f
inde
n, Privatsphäre schützen
</Description>
<Description>
{! trans('plug
in
.
de
scription') !}
</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 }}&eingabe={searchTerms}"
method=
"{{$request}}"
></Url>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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