diff options
| author | Tristan Zur <tzur@webserver.ccwn.org> | 2015-06-20 23:56:17 +0200 |
|---|---|---|
| committer | Tristan Zur <tzur@webserver.ccwn.org> | 2015-06-20 23:56:17 +0200 |
| commit | 18a1d682ff18ee69d5c252b013a6a6935cd9b5fe (patch) | |
| tree | b1da62c8b7d03341a7b74b3fbb533e6391950be0 /modules/latestupdates/helpers | |
| parent | b69c03794f80aa811f0613cf4b802619e7ecdbdd (diff) | |
New modules added
Diffstat (limited to 'modules/latestupdates/helpers')
| -rw-r--r-- | modules/latestupdates/helpers/latestupdates_block.php | 52 | ||||
| -rw-r--r-- | modules/latestupdates/helpers/latestupdates_event.php | 29 | ||||
| -rw-r--r-- | modules/latestupdates/helpers/latestupdates_theme.php | 27 |
3 files changed, 108 insertions, 0 deletions
diff --git a/modules/latestupdates/helpers/latestupdates_block.php b/modules/latestupdates/helpers/latestupdates_block.php new file mode 100644 index 0000000..b15b90f --- /dev/null +++ b/modules/latestupdates/helpers/latestupdates_block.php @@ -0,0 +1,52 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2013 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 latestupdates_block_Core { + static function get_site_list() { + return array("latestupdates" => t("Latest Updates")); + } + + static function get($block_id, $theme) { + $block = ""; + + switch ($block_id) { + case "latestupdates": + + // Make a new sidebar block. + $block = new Block(); + $block->css_id = "g-latest-updates"; + $block->title = t("Latest Updates"); + $block->content = new View("latestupdates_block.html"); + + if (!$theme->item()) { + $block->content->update_links = array( + "Entire Gallery" => url::site("latestupdates/updates")); + } else { + // Determine the ID# of the current album. + $albumID = $theme->item->is_album() ? $theme->item->id : $theme->item->parent_id; + $block->content->update_links = array( + "Entire Gallery" => url::site("latestupdates/updates"), + "This Album" => url::site("latestupdates/albums/$albumID") + ); + } + break; + } + return $block; + } +} diff --git a/modules/latestupdates/helpers/latestupdates_event.php b/modules/latestupdates/helpers/latestupdates_event.php new file mode 100644 index 0000000..3809933 --- /dev/null +++ b/modules/latestupdates/helpers/latestupdates_event.php @@ -0,0 +1,29 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2013 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 latestupdates_event_Core { + static function show_user_profile($data) { + // Display links on the user profile pages for recent photos/albums + // and most popular photos from the specified user. + $v = new View("latestupdates_user_profile_info.html"); + $v->user_id = $data->user->id; + $data->content[] = (object) array("title" => t("Latest Updates"), "view" => $v); + } +} diff --git a/modules/latestupdates/helpers/latestupdates_theme.php b/modules/latestupdates/helpers/latestupdates_theme.php new file mode 100644 index 0000000..e6423a8 --- /dev/null +++ b/modules/latestupdates/helpers/latestupdates_theme.php @@ -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-2013 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 latestupdates_theme_Core { + static function head($theme) { + // Load CSS and JS for jCarouselLite. + return $theme->script("jcarousellite_1.0.1.js") . + $theme->css("latestupdates_jcarousel.css"); + } +} |
