Fix for flowplayer embed code and support for videos module.
This commit is contained in:
parent
1715468d7d
commit
f010aad441
|
@ -50,8 +50,33 @@ class EmbedLinks_Controller extends Controller {
|
|||
if (access::can("view_full", $item)) {
|
||||
$linkArray[2] = array("Text:", "<a href="" . $item->file_url(true) . "">Click Here</a>");
|
||||
$linkArray[3] = array("Thumbnail:", "<a href="" . $item->file_url(true) . ""><img src="" . $item->thumb_url(true) . ""></a>");
|
||||
$linkArray[4] = array("Embed:", "<object width="" . $item->width . "" height="" . $item->height . "" data="" . url::abs_file("lib/flowplayer.swf") . "" type="application/x-shockwave-flash"><param name="movie" value="" . url::abs_file("lib/flowplayer.swf") . "" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value='config={"plugins":{"pseudo":{"url":"flowplayer.h264streaming.swf"},"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}},"clip":{"provider":"pseudo","url":"" . $item->file_url(true) . ""},"playlist":[{"provider":"pseudo","url":"" . $item->file_url(true) . ""}]}' /></object>");
|
||||
$linkTitles[1] = array("Link To The Video File:", 3);
|
||||
|
||||
// Figure out what the path of the .flv file is.
|
||||
$str_movie_path = $item->file_url(true);
|
||||
if (module::is_active("videos")) {
|
||||
$items_video = ORM::factory("items_video")
|
||||
->where("item_id", "=", $item->id)
|
||||
->find();
|
||||
if ($items_video->loaded()) {
|
||||
if (file_exists($item->resize_path() . ".flv")) {
|
||||
$str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true));
|
||||
} else {
|
||||
$str_movie_path = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($str_movie_path != "") {
|
||||
$linkArray[4] = array("Embed:", "<object id="flowplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" .
|
||||
"width="" . $item->width . "" height="" . $item->height . ""><param name="movie" value="" .
|
||||
url::abs_file("lib/flowplayer.swf") . "" /><param name="flashvars" value='config={"clip":"" .
|
||||
$str_movie_path . ""}' /><embed type="application/x-shockwave-flash" width="" . $item->width .
|
||||
"" height="" . $item->height . "" src="" . url::abs_file("lib/flowplayer.swf") . "" flashvars=" .
|
||||
"'config={"clip":"" . $str_movie_path . ""}'/></object>");
|
||||
$linkTitles[1] = array("Link To The Video File:", 3);
|
||||
} else {
|
||||
$linkTitles[1] = array("Link To The Video File:", 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Or else assume the item is a photo.
|
||||
|
|
|
@ -57,10 +57,27 @@ input[type="text"] {
|
|||
<? } ?>
|
||||
|
||||
<? if ($item->is_movie()) { ?>
|
||||
<tr>
|
||||
<th><?= t("Embed:") ?></th>
|
||||
<td><input type="text" value="<object width="<?= $item->width ?>" height="<?= $item->height ?>" data="<?= url::abs_file("lib/flowplayer.swf") ?>" type="application/x-shockwave-flash"><param name="movie" value="<?= url::abs_file("lib/flowplayer.swf") ?>" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value='config={"plugins":{"pseudo":{"url":"flowplayer.h264streaming.swf"},"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}},"clip":{"provider":"pseudo","url":"<?= $item->file_url(true) ?>"},"playlist":[{"provider":"pseudo","url":"<?= $item->file_url(true) ?>"}]}' /></object>" onclick="this.focus(); this.select();" readonly></td>
|
||||
</tr>
|
||||
<?
|
||||
$str_movie_path = $item->file_url(true);
|
||||
if (module::is_active("videos")) {
|
||||
$items_video = ORM::factory("items_video")
|
||||
->where("item_id", "=", $item->id)
|
||||
->find();
|
||||
if ($items_video->loaded()) {
|
||||
if (file_exists($item->resize_path() . ".flv")) {
|
||||
$str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true));
|
||||
} else {
|
||||
$str_movie_path = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<? if ($str_movie_path != "") { ?>
|
||||
<tr>
|
||||
<th><?= t("Embed:") ?></th>
|
||||
<td><input type="text" value="<object id="flowplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?= $item->width ?>" height="<?= $item->height ?>"> <param name="movie" value="<?= url::abs_file("lib/flowplayer.swf") ?>" /><param name="flashvars" value='config={"clip":"<?= $str_movie_path ?>"}' /><embed type="application/x-shockwave-flash" width="<?= $item->width ?>" height="<?= $item->height ?>" src="<?= url::abs_file("lib/flowplayer.swf") ?>" flashvars='config={"clip":"<?= $str_movie_path ?>"}'/></object>" onclick="this.focus(); this.select();" readonly></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
||||
|
|
|
@ -50,8 +50,33 @@ class EmbedLinks_Controller extends Controller {
|
|||
if (access::can("view_full", $item)) {
|
||||
$linkArray[2] = array("Text:", "<a href="" . $item->file_url(true) . "">Click Here</a>");
|
||||
$linkArray[3] = array("Thumbnail:", "<a href="" . $item->file_url(true) . ""><img src="" . $item->thumb_url(true) . ""></a>");
|
||||
$linkArray[4] = array("Embed:", "<object width="" . $item->width . "" height="" . $item->height . "" data="" . url::abs_file("lib/flowplayer.swf") . "" type="application/x-shockwave-flash"><param name="movie" value="" . url::abs_file("lib/flowplayer.swf") . "" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value='config={"plugins":{"pseudo":{"url":"flowplayer.h264streaming.swf"},"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}},"clip":{"provider":"pseudo","url":"" . $item->file_url(true) . ""},"playlist":[{"provider":"pseudo","url":"" . $item->file_url(true) . ""}]}' /></object>");
|
||||
$linkTitles[1] = array("Link To The Video File:", 3);
|
||||
|
||||
// Figure out what the path of the .flv file is.
|
||||
$str_movie_path = $item->file_url(true);
|
||||
if (module::is_active("videos")) {
|
||||
$items_video = ORM::factory("items_video")
|
||||
->where("item_id", "=", $item->id)
|
||||
->find();
|
||||
if ($items_video->loaded()) {
|
||||
if (file_exists($item->resize_path() . ".flv")) {
|
||||
$str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true));
|
||||
} else {
|
||||
$str_movie_path = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($str_movie_path != "") {
|
||||
$linkArray[4] = array("Embed:", "<object id="flowplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" .
|
||||
"width="" . $item->width . "" height="" . $item->height . ""><param name="movie" value="" .
|
||||
url::abs_file("lib/flowplayer.swf") . "" /><param name="flashvars" value='config={"clip":"" .
|
||||
$str_movie_path . ""}' /><embed type="application/x-shockwave-flash" width="" . $item->width .
|
||||
"" height="" . $item->height . "" src="" . url::abs_file("lib/flowplayer.swf") . "" flashvars=" .
|
||||
"'config={"clip":"" . $str_movie_path . ""}'/></object>");
|
||||
$linkTitles[1] = array("Link To The Video File:", 3);
|
||||
} else {
|
||||
$linkTitles[1] = array("Link To The Video File:", 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Or else assume the item is a photo.
|
||||
|
|
|
@ -57,10 +57,27 @@ input[type="text"] {
|
|||
<? } ?>
|
||||
|
||||
<? if ($item->is_movie()) { ?>
|
||||
<tr>
|
||||
<th><?= t("Embed:") ?></th>
|
||||
<td><input type="text" value="<object width="<?= $item->width ?>" height="<?= $item->height ?>" data="<?= url::abs_file("lib/flowplayer.swf") ?>" type="application/x-shockwave-flash"><param name="movie" value="<?= url::abs_file("lib/flowplayer.swf") ?>" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value='config={"plugins":{"pseudo":{"url":"flowplayer.h264streaming.swf"},"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}},"clip":{"provider":"pseudo","url":"<?= $item->file_url(true) ?>"},"playlist":[{"provider":"pseudo","url":"<?= $item->file_url(true) ?>"}]}' /></object>" onclick="this.focus(); this.select();" readonly></td>
|
||||
</tr>
|
||||
<?
|
||||
$str_movie_path = $item->file_url(true);
|
||||
if (module::is_active("videos")) {
|
||||
$items_video = ORM::factory("items_video")
|
||||
->where("item_id", "=", $item->id)
|
||||
->find();
|
||||
if ($items_video->loaded()) {
|
||||
if (file_exists($item->resize_path() . ".flv")) {
|
||||
$str_movie_path = str_replace("?m=", ".flv?m=", $item->resize_url(true));
|
||||
} else {
|
||||
$str_movie_path = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<? if ($str_movie_path != "") { ?>
|
||||
<tr>
|
||||
<th><?= t("Embed:") ?></th>
|
||||
<td><input type="text" value="<object id="flowplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?= $item->width ?>" height="<?= $item->height ?>"> <param name="movie" value="<?= url::abs_file("lib/flowplayer.swf") ?>" /><param name="flashvars" value='config={"clip":"<?= $str_movie_path ?>"}' /><embed type="application/x-shockwave-flash" width="<?= $item->width ?>" height="<?= $item->height ?>" src="<?= url::abs_file("lib/flowplayer.swf") ?>" flashvars='config={"clip":"<?= $str_movie_path ?>"}'/></object>" onclick="this.focus(); this.select();" readonly></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
||||
|
|
Reference in New Issue
Block a user