Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
soundcloudfield
Commits
086c3215
Commit
086c3215
authored
Mar 12, 2014
by
attila.fekete
Browse files
Issue
#1766184
by Chappo, attila.fekete: support artist pages
parent
bccd23af
Changes
1
Hide whitespace changes
Inline
Side-by-side
soundcloudfield.module
View file @
086c3215
...
@@ -361,22 +361,22 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in
...
@@ -361,22 +361,22 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in
$splitted_url
=
explode
(
"/"
,
$parsed_url
[
'path'
]);
$splitted_url
=
explode
(
"/"
,
$parsed_url
[
'path'
]);
// If this is a
track.
.
// If this is a
n artist page, or a set
.
if
(
$splitted_url
[
2
]
!
=
'sets'
)
{
if
(
!
isset
(
$splitted_url
[
2
]
)
||
$splitted_url
[
2
]
=
=
'sets'
)
{
$height
=
$settings
[
'flash_player'
][
'height'
];
$height
=
$settings
[
'flash_player'
][
'height
_sets
'
];
$params
=
'url='
.
$encoded_url
.
$params
=
'url='
.
$encoded_url
.
'&show_comments='
.
$showcomments
.
'&show_comments='
.
$showcomments
.
'&auto_play='
.
$autoplay
.
'&auto_play='
.
$autoplay
.
'&show_playcount='
.
$showplaycount
.
'&show_artwork='
.
$showartwork
.
'&color='
.
$color
;
'&color='
.
$color
;
}
}
// Otherwise it's a
set
.
// Otherwise it's a
track
.
else
{
else
{
$height
=
$settings
[
'flash_player'
][
'height
_sets
'
];
$height
=
$settings
[
'flash_player'
][
'height'
];
$params
=
'url='
.
$encoded_url
.
$params
=
'url='
.
$encoded_url
.
'&show_comments='
.
$showcomments
.
'&show_comments='
.
$showcomments
.
'&auto_play='
.
$autoplay
.
'&auto_play='
.
$autoplay
.
'&show_playcount='
.
$showplaycount
.
'&show_artwork='
.
$showartwork
.
'&color='
.
$color
;
'&color='
.
$color
;
}
}
...
@@ -408,8 +408,8 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in
...
@@ -408,8 +408,8 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in
else
{
else
{
$parsed_url
=
parse_url
(
$item
[
'url'
]);
$parsed_url
=
parse_url
(
$item
[
'url'
]);
$splitted_url
=
explode
(
"/"
,
$parsed_url
[
'path'
]);
$splitted_url
=
explode
(
"/"
,
$parsed_url
[
'path'
]);
//
Track
or set?
//
An artist page
or
a
set
or a track
?
$iframe_height
=
(
$splitted_url
[
2
]
!
=
'sets'
)
?
$html5_player_height
:
$html5_player_height
_sets
;
$iframe_height
=
(
!
isset
(
$splitted_url
[
2
]
)
||
$splitted_url
[
2
]
=
=
'sets'
)
?
$html5_player_height
_sets
:
$html5_player_height
;
}
}
// Create the URL
// Create the URL
...
...
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