Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
2586703@qq.com
10 years ago
Commit
2b5609073aeff118a620a748290ca8541420b2ed
2 parents
48ba624b
3c8b3044
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohood
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
website/view/script/news/detailmobile.php
website/view/script/news/detailmobile.php
View file @
2b56090
...
...
@@ -23,19 +23,17 @@
</div>
</div>
<div
class=
"detail-article"
>
<p>
<?php
preg_match_all
(
"@<embed([^>]*)\s*src=
\"
http:\/\/res\.yoho\.cn\/res\/yohood\/swf\/YohoodPlayer\.swf\?url=(.+\.mp4)
\"
@"
,
$this
->
view
->
info
[
'content'
],
$videoMatches
);
if
(
!
empty
(
$videoMatches
[
2
]))
{
$video
=
current
(
$videoMatches
[
2
]);
$videoHtml
=
'<video controls="controls" preload="auto" poster="'
.
Lib_Images
::
getImageUrl
(
$this
->
view
->
info
[
'thumb'
],
'0300x0300'
,
'fragmentimg'
,
'autoCrop'
)
.
'" width="300" height="300"><source src="'
.
$video
.
'" type="video/mp4" /></video>'
;
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(object.*?)>(.*?)<(\/object.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(embed.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
}
echo
$this
->
view
->
info
[
'content'
];
?>
</p>
<?php
preg_match_all
(
"@<embed([^>]*)\s*src=
\"
http:\/\/res\.yoho\.cn\/res\/yohood\/swf\/YohoodPlayer\.swf\?url=(.+\.mp4)
\"
@"
,
$this
->
view
->
info
[
'content'
],
$videoMatches
);
if
(
!
empty
(
$videoMatches
[
2
]))
{
$video
=
current
(
$videoMatches
[
2
]);
$videoHtml
=
'<video controls="controls" preload="auto" poster="'
.
Lib_Images
::
getImageUrl
(
$this
->
view
->
info
[
'thumb'
],
'0300x0300'
,
'fragmentimg'
,
'autoCrop'
)
.
'" width="300" height="300"><source src="'
.
$video
.
'" type="video/mp4" /></video>'
;
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(object.*?)>(.*?)<(\/object.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
$this
->
view
->
info
[
'content'
]
=
preg_replace
(
'@<(embed.*?)>@si'
,
$videoHtml
,
$this
->
view
->
info
[
'content'
]);
}
echo
$this
->
view
->
info
[
'content'
];
?>
</div>
<div
class=
"related-post"
>
<h2>
相关推荐
</h2>
...
...
Please
register
or
login
to post a comment