Merge branch 'master' of github.com:bowlesjd/gallery3-contrib
Conflicts: modules/embed_videos/controllers/embedded_videos.php
This commit is contained in:
commit
a58601f640
@ -89,6 +89,7 @@ class Embedded_videos_Controller extends Controller {
|
||||
print json_encode(array("result" => "error", "form" => (string)$form));
|
||||
}
|
||||
}
|
||||
|
||||
public function create($id) {
|
||||
$album = ORM::factory("item", $id);
|
||||
access::required("view", $album);
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is the API for handling photos.
|
||||
* This is the API for handling embedded videos.
|
||||
*
|
||||
* Note: by design, this class does not do any permission checking.
|
||||
*/
|
||||
|
@ -1,5 +1,22 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class embed_videos_event_Core {
|
||||
|
||||
@ -23,12 +40,12 @@ class embed_videos_event_Core {
|
||||
}
|
||||
}
|
||||
}
|
||||
static function item_deleted($item) {
|
||||
static function item_deleted($item) {
|
||||
ORM::factory("embedded_video")
|
||||
->where("item_id", "=", $item->id)
|
||||
->find()
|
||||
->delete();
|
||||
}
|
||||
}
|
||||
static function site_menu($menu, $theme) {
|
||||
$item = $theme->item();
|
||||
|
||||
|
@ -1,4 +1,22 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class embed_videos_installer {
|
||||
static function install() {
|
||||
|
@ -1,4 +1,22 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
/**
|
||||
* Gallery - a web based photo album viewer and editor
|
||||
* Copyright (C) 2000-2010 Bharat Mediratta
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class Embedded_video_Model extends ORM {
|
||||
public function __construct($id=null) {
|
||||
|
@ -1,3 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/<?= substr($item->name, 0, strrpos($item->name, '.')); ?>" frameborder="0">
|
||||
</iframe>
|
@ -1,25 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<? $embedded_video = ORM::factory('embedded_video')->where('item_id', $item->id)->find();
|
||||
if ($embedded_video->loaded()) {
|
||||
?>
|
||||
<div id="g-item">
|
||||
<?= $theme->photo_top() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
||||
|
||||
<div id="g-movie" class="ui-helper-clearfix">
|
||||
<?= $theme->resize_top($item) ?>
|
||||
<?= $embedded_video->embed_code ?>
|
||||
<?= $theme->resize_bottom($item) ?>
|
||||
</div>
|
||||
|
||||
<div id="g-info">
|
||||
<h1><?= html::purify($item->title) ?></h1>
|
||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
||||
</div>
|
||||
|
||||
<?= $theme->photo_bottom() ?>
|
||||
</div>
|
||||
<? } else {
|
||||
require('themes/' . $theme->name . 'views/photo.html.php');
|
||||
} ?>
|
Reference in New Issue
Block a user