1
0

Merge branch 'master' of github.com:bowlesjd/gallery3-contrib

Conflicts:
	modules/embed_videos/controllers/embedded_videos.php
This commit is contained in:
John Bowles 2010-08-26 20:51:58 -07:00
commit a58601f640
7 changed files with 190 additions and 164 deletions

View File

@ -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);

View File

@ -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.
*/

View File

@ -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 {

View File

@ -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() {

View File

@ -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) {

View File

@ -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>

View File

@ -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');
} ?>