Initial commit
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
This commit is contained in:
parent
1f2257cd3a
commit
71dbb2cf67
27
modules/embedlinks/helpers/embedlinks_installer.php
Normal file
27
modules/embedlinks/helpers/embedlinks_installer.php
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
38
modules/embedlinks/helpers/embedlinks_theme.php
Normal file
38
modules/embedlinks/helpers/embedlinks_theme.php
Normal 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;
|
||||
}
|
||||
|
||||
}
|
3
modules/embedlinks/module.info
Normal file
3
modules/embedlinks/module.info
Normal file
@ -0,0 +1,3 @@
|
||||
name = EmbedLinks
|
||||
description = Display HTML code to embed links to albums/images into other web pages.
|
||||
version = 1
|
18
modules/embedlinks/views/embedlinks_album_block.html.php
Normal file
18
modules/embedlinks/views/embedlinks_album_block.html.php
Normal 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>
|
63
modules/embedlinks/views/embedlinks_photo_block.html.php
Normal file
63
modules/embedlinks/views/embedlinks_photo_block.html.php
Normal 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="<?= url::abs_site("{$item->type}s/{$item->id}") ?>">Click Here</a>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= t("Thumbnail:") ?></th>
|
||||
<td><input type="text" value="<a href="<?= url::abs_site("{$item->type}s/{$item->id}") ?>"><img src="<?= $item->thumb_url(true) ?>"></a>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= t("Resized:") ?></th>
|
||||
<td><input type="text" value="<a href="<?= url::abs_site("{$item->type}s/{$item->id}") ?>"><img src="<?= $item->resize_url(true) ?>"></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="<?= $item->file_url(true) ?>">Click Here</a>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= t("Thumbnail:") ?></th>
|
||||
<td><input type="text" value="<a href="<?= $item->file_url(true) ?>"><img src="<?= $item->thumb_url(true) ?>"></a>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= t("Resized:") ?></th>
|
||||
<td><input type="text" value="<a href="<?= $item->file_url(true) ?>"><img src="<?= $item->resize_url(true) ?>"></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="<?= $item->resize_url(true) ?>">Click Here</a>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= t("Thumbnail:") ?></th>
|
||||
<td><input type="text" value="<a href="<?= $item->resize_url(true) ?>"><img src="<?= $item->thumb_url(true) ?>"></a>" readonly></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= t("Image:") ?></th>
|
||||
<td><input type="text" value="<img src="<?= $item->resize_url(true) ?>">" readonly></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
Reference in New Issue
Block a user