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
b525d07c
Commit
b525d07c
authored
Oct 04, 2017
by
Karl Hasselbring
Browse files
Merge branch 'development' into 589-umsetzung-erstes-neudesign-fur-ergebnisseite
parents
41af10a6
9ac895e8
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
b525d07c
...
...
@@ -237,9 +237,6 @@ class MetaGer
#Adgoal Implementation
$this
->
results
=
$this
->
parseAdgoal
(
$this
->
results
);
#Amazon Affiliate (MetaGers tag ist: metager04-21)
$this
->
results
=
$this
->
parseAmazon
(
$this
->
results
);
$counter
=
0
;
$firstRank
=
0
;
...
...
@@ -438,34 +435,6 @@ class MetaGer
return
$results
;
}
public
function
parseAmazon
(
$results
)
{
$amazonTag
=
"metager04-21"
;
foreach
(
$results
as
$result
)
{
$link
=
$result
->
anzeigeLink
;
if
(
strpos
(
$link
,
"http"
)
!==
0
)
{
$link
=
"http://"
.
$link
;
}
$info
=
parse_url
(
$link
);
if
(
isset
(
$info
[
"host"
])){
$host
=
$info
[
'host'
];
$newurl
=
$link
;
if
(
strpos
(
$host
,
"amazon"
)
!==
FALSE
){
# This is Probably an Amazon Link. We'll add our tag as get parameter
if
(
isset
(
$info
[
"query"
])){
$newurl
.
=
"&tag=metager04-21"
;
}
else
{
$newurl
.
=
"?tag=metager04-21"
;
}
$result
->
link
=
$newurl
;
$result
->
partnershop
=
true
;
}
}
}
return
$results
;
}
public
function
authorize
(
$key
)
{
...
...
resources/assets/js/scriptResultPage.js
View file @
b525d07c
...
...
@@ -10,23 +10,30 @@ $(document).ready(function () {
$
(
$
(
'
#foki > li#savedFokiTabSelector
'
).
get
(
0
)).
find
(
'
>a
'
).
tab
(
'
show
'
);
}
var
sprueche
=
getURLParameter
(
'
sprueche
'
)
===
'
on
'
;
// load the sprueche url parameter
if
(
localStorage
.
hasOwnProperty
(
'
param_sprueche
'
))
{
sprueche
=
localStorage
.
getItem
(
'
param_sprueche
'
)
===
'
on
'
;
// check for sprueche local storage parameter
var
sprueche
=
localStorage
.
getItem
(
'
param_sprueche
'
)
===
'
on
'
;
// check for sprueche local storage parameter
}
else
{
var
sprueche
=
getURLParameter
(
'
sprueche
'
)
===
'
on
'
;
// load the sprueche url parameter
}
var
search
=
get
URLParameter
(
'
eingabe
'
);
var
locale
=
readLocaleFromUrl
(
'
de
'
);
var
search
=
get
MetaTag
(
'
q
'
);
var
locale
=
getMetaTag
(
'
l
'
);
loadQuicktips
(
search
,
locale
,
sprueche
);
// load the quicktips
});
/*
function readLocaleFromUrl(defaultLocale) {
return location.pathname.substr(1, location.pathname.indexOf('/meta', 0) - 1) || 'de';
}
*/
function
getURLParameter
(
name
)
{
return
decodeURIComponent
((
new
RegExp
(
'
[?|&]
'
+
name
+
'
=
'
+
'
([^&;]+?)(&|#|;|$)
'
).
exec
(
location
.
search
)
||
[
null
,
''
])[
1
].
replace
(
/
\+
/g
,
'
%20
'
))
||
null
;
}
function
getMetaTag
(
name
)
{
return
$
(
'
meta[name="
'
+
name
+
'
"
'
)[
0
].
content
;
}
function
activateJSOnlyContent
()
{
$
(
'
#searchplugin
'
).
removeClass
(
'
hide
'
);
$
(
'
.js-only
'
).
removeClass
(
'
js-only
'
);
...
...
resources/assets/less/metager/result-page.less
View file @
b525d07c
...
...
@@ -648,12 +648,18 @@ a {
margin: 10px 0px;
padding-left: 10px;
border-left: 3px solid #fb0;
details:not([open=""]) {
.quicktip-summary p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.quicktip-summary {
h1 {
font-size: 16px;
font-weight: bold;
}
p {}
}
.quicktip-detail {
border-top: 1px solid #ddd;
...
...
resources/views/layouts/resultPage.blade.php
View file @
b525d07c
...
...
@@ -5,8 +5,9 @@
<link
href=
"/favicon.ico"
rel=
"icon"
type=
"image/x-icon"
/>
<link
href=
"/favicon.ico"
rel=
"shortcut icon"
type=
"image/x-icon"
/>
<meta
content=
"width=device-width, initial-scale=1.0, user-scalable=no"
name=
"viewport"
/>
<meta
content=
"{{ getmypid() }}"
name=
"p"
/>
<meta
content=
"{{ $eingabe }}"
name=
"q"
/>
<meta
name=
"p"
content=
"{{ getmypid() }}"
/>
<meta
name=
"q"
content=
"{{ $eingabe }}"
/>
<meta
name=
"l"
content=
"{{ LaravelLocalization::getCurrentLocale() }}"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<META
HTTP-EQUIV=
"CACHE-CONTROL"
CONTENT=
"NO-CACHE"
/>
<meta
http-equiv=
"language"
content=
"{!! trans('staticPages.meta.language') !!}"
/>
...
...
Write
Preview
Markdown
is supported
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