1
0

Initial commit

Signed-off-by: Bharat Mediratta <bharat@menalto.com>
This commit is contained in:
rWatcher 2009-06-13 03:58:54 +08:00 committed by Bharat Mediratta
parent 1f2257cd3a
commit 71dbb2cf67
5 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 embedlinks_installer {
static function install() {
$version = module::get_version("embedlinks");
if ($version == 0) {
module::set_version("embedlinks", 1);
}
}
}

View File

@ -0,0 +1,38 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 embedlinks_theme_Core {
static function sidebar_blocks($theme) {
if ($theme->item()->is_album()) {
$block = new Block();
$block->css_id = "gMetadata";
$block->title = t("Links");
$block->content = new View("embedlinks_album_block.html");
return $block;
}
}
static function photo_bottom($theme) {
$block = new Block();
$block->css_id = "gMetadata";
$block->title = t("Links");
$block->content = new View("embedlinks_photo_block.html");
return $block;
}
}

View File

@ -0,0 +1,3 @@
name = EmbedLinks
description = Display HTML code to embed links to albums/images into other web pages.
version = 1

View File

@ -0,0 +1,18 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<table class="gMetadata">
<tbody>
<tr>
<th colspan="2"><?= t("Link To This Page:") ?></th>
</tr>
<tr>
<th><?= t("Text:") ?></th>
<td><textarea rows="2" cols="6" height="5" readonly><a href="<?= url::abs_site("{$item->type}s/{$item->id}") ?>">Click Here</a></textarea></td>
</tr>
<tr>
<th><?= t("Thumbnail:") ?></th>
<td><textarea rows="2" cols="6" height="5" readonly><a href="<?= url::abs_site("{$item->type}s/{$item->id}") ?>"><img src="<?= $item->thumb_url(true) ?>"></a></textarea></td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,63 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<table class="gMetadata">
<tbody>
<tr>
<th colspan="2"><?= t("Link To This Page:") ?></th>
</tr>
<tr>
<th><?= t("Text:") ?></th>
<td><input type="text" value="<a href=&quot;<?= url::abs_site("{$item->type}s/{$item->id}") ?>&quot;>Click Here</a>" readonly></td>
</tr>
<tr>
<th><?= t("Thumbnail:") ?></th>
<td><input type="text" value="<a href=&quot;<?= url::abs_site("{$item->type}s/{$item->id}") ?>&quot;><img src=&quot;<?= $item->thumb_url(true) ?>&quot;></a>" readonly></td>
</tr>
<tr>
<th><?= t("Resized:") ?></th>
<td><input type="text" value="<a href=&quot;<?= url::abs_site("{$item->type}s/{$item->id}") ?>&quot;><img src=&quot;<?= $item->resize_url(true) ?>&quot;></a>" readonly></td>
</tr>
<tr>
<th colspan="2"><br/><?= t("Link To Fullsize Image:") ?></th>
</tr>
<tr>
<th><?= t("Text:") ?></th>
<td><input type="text" value="<a href=&quot;<?= $item->file_url(true) ?>&quot;>Click Here</a>" readonly></td>
</tr>
<tr>
<th><?= t("Thumbnail:") ?></th>
<td><input type="text" value="<a href=&quot;<?= $item->file_url(true) ?>&quot;><img src=&quot;<?= $item->thumb_url(true) ?>&quot;></a>" readonly></td>
</tr>
<tr>
<th><?= t("Resized:") ?></th>
<td><input type="text" value="<a href=&quot;<?= $item->file_url(true) ?>&quot;><img src=&quot;<?= $item->resize_url(true) ?>&quot;></a>" readonly></td>
</tr>
<tr>
<th colspan="2"><br/><?= t("Link To Resized Image:") ?></th>
</tr>
<tr>
<th><?= t("Text:") ?></th>
<td><input type="text" value="<a href=&quot;<?= $item->resize_url(true) ?>&quot;>Click Here</a>" readonly></td>
</tr>
<tr>
<th><?= t("Thumbnail:") ?></th>
<td><input type="text" value="<a href=&quot;<?= $item->resize_url(true) ?>&quot;><img src=&quot;<?= $item->thumb_url(true) ?>&quot;></a>" readonly></td>
</tr>
<tr>
<th><?= t("Image:") ?></th>
<td><input type="text" value="<img src=&quot;<?= $item->resize_url(true) ?>&quot;>" readonly></td>
</tr>
</tbody>
</table>