aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--edit.php8
-rw-r--r--edit_multi.php8
-rw-r--r--friends.php8
-rw-r--r--index.php2
-rw-r--r--newalbum.php34
-rw-r--r--thumbnail.php60
-rw-r--r--upload.php9
-rw-r--r--view.php76
-rw-r--r--world.php18
9 files changed, 93 insertions, 130 deletions
diff --git a/edit.php b/edit.php
index 2c202e402..4e6d0d2ec 100644
--- a/edit.php
+++ b/edit.php
@@ -1,14 +1,10 @@
<?php
/**
- * Elgg file saver
+ * Tidypics Edit Single Photo Properties
*
- * @package ElggFile
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
*/
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
gatekeeper();
set_context('photos');
diff --git a/edit_multi.php b/edit_multi.php
index 2fdc85e42..c6eb7de88 100644
--- a/edit_multi.php
+++ b/edit_multi.php
@@ -1,14 +1,10 @@
<?php
/**
- * Elgg image multi edit
+ * Tidypics: Edit the properties of multiple images
*
- * @package ElggFile
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
*/
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
gatekeeper();
set_context('photos');
diff --git a/friends.php b/friends.php
index 61ed52380..50e4aabc3 100644
--- a/friends.php
+++ b/friends.php
@@ -1,14 +1,10 @@
<?php
/**
- * Elgg file browser
+ * Tidypics Friends Albums Listing
*
- * @package ElggFile
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
*/
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
//if no friends were requested, see world pictures instead, or redirect to user's friends
if (is_null(get_input('username')) || get_input('username')=='') {
diff --git a/index.php b/index.php
index 32c389e2e..8839cd95d 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
<?php
/**
- * Elgg tidypics photo gallery main page
+ * tidypics photo gallery main page
*
*
*/
diff --git a/newalbum.php b/newalbum.php
index 8df0ec019..95cdb7860 100644
--- a/newalbum.php
+++ b/newalbum.php
@@ -1,31 +1,25 @@
<?php
/**
- * Elgg blog add entry page
+ * Tidypics Create New Album Page
*
- * @package ElggBlog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
*/
// Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
-
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ gatekeeper();
+
// Get the current page's owner
- $page_owner = page_owner_entity();
- if ($page_owner === false || is_null($page_owner)) {
- $page_owner = $_SESSION['user'];
- set_page_owner($_SESSION['guid']);
- }
-
- $area2 = elgg_view_title(elgg_echo('album:add'));
- $area2 .= elgg_view("tidypics/forms/edit");
-
+ $page_owner = page_owner_entity();
+ if ($page_owner === false || is_null($page_owner)) {
+ $page_owner = $_SESSION['user'];
+ set_page_owner($_SESSION['guid']);
+ }
+
+ $area2 = elgg_view_title(elgg_echo('album:add'));
+ $area2 .= elgg_view("tidypics/forms/edit");
+
// Display page
- page_draw(elgg_echo('album:add'),elgg_view_layout("two_column_left_sidebar", $area1, $area2, $area3 ));
+ page_draw(elgg_echo('album:add'),elgg_view_layout("two_column_left_sidebar", $area1, $area2, $area3 ));
-
?> \ No newline at end of file
diff --git a/thumbnail.php b/thumbnail.php
index 0e6142cbb..b4c745ae2 100644
--- a/thumbnail.php
+++ b/thumbnail.php
@@ -1,46 +1,42 @@
<?php
/**
- * Elgg file thumbnail
+ * Tidypics Thumbnail
*
- * @package ElggFile
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
*/
// Get engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
// Get file GUID
- $file_guid = (int) get_input('file_guid',0);
+ $file_guid = (int) get_input('file_guid',0);
// Get file thumbnail size
- $size = get_input('size','small');
- if ($size != 'small') {
- $size = 'large';
- }
+ $size = get_input('size','small');
+ if ($size != 'small') {
+ $size = 'large';
+ }
// Get file entity
- if ($file = get_entity($file_guid)) {
- if ($file->getSubtype() == "image") {
- // Get file thumbnail
- if ($size == "small") {
- $thumbfile = $file->smallthumb;
- } else {
- $thumbfile = $file->largethumb;
- }
+ if ($file = get_entity($file_guid)) {
+ if ($file->getSubtype() == "image") {
+ // Get file thumbnail
+ if ($size == "small") {
+ $thumbfile = $file->smallthumb;
+ } else {
+ $thumbfile = $file->largethumb;
+ }
- // Grab the file
- if ($thumbfile && !empty($thumbfile)) {
- $readfile = new ElggFile();
- $readfile->owner_guid = $file->owner_guid;
- $readfile->setFilename($thumbfile);
- //$mime = $file->getMimeType();
- $contents = $readfile->grabFile();
- }
- } //end subtype comparison
- } //end get_entity
+ // Grab the file
+ if ($thumbfile && !empty($thumbfile)) {
+ $readfile = new ElggFile();
+ $readfile->owner_guid = $file->owner_guid;
+ $readfile->setFilename($thumbfile);
+ //$mime = $file->getMimeType();
+ $contents = $readfile->grabFile();
+ }
+ } //end subtype comparison
+ } //end get_entity
// Open error image if file was not found
if (!isset($contents) || is_null($contents) || $file->getSubtype()!='image') {
@@ -49,7 +45,7 @@
} //end of default error image
// Return the thumbnail and exit
- header("Content-type: image");
- echo $contents;
- exit;
+ header("Content-type: image");
+ echo $contents;
+ exit;
?> \ No newline at end of file
diff --git a/upload.php b/upload.php
index 4fcf27695..062fec325 100644
--- a/upload.php
+++ b/upload.php
@@ -1,15 +1,10 @@
<?php
/**
- * Elgg Photos
+ * Tidypics Upload Images Page
*
- * @package ElggPages
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
*/
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
gatekeeper();
global $CONFIG;
diff --git a/view.php b/view.php
index e0121baae..60fb47864 100644
--- a/view.php
+++ b/view.php
@@ -1,62 +1,56 @@
<?php
/**
- * full view of an image
+ * Tidypics full view of an image
* Given a GUID, this page will try and display any entity
*
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
*/
// Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
// Get the GUID of the entity we want to view
- $guid = (int) get_input('guid');
- $shell = get_input('shell');
- if ($shell == "no") {
- $shell = false;
- } else {
- $shell = true;
- }
+ $guid = (int) get_input('guid');
+ $shell = get_input('shell');
+ if ($shell == "no") {
+ $shell = false;
+ } else {
+ $shell = true;
+ }
- $context = get_input('context');
- if ($context) set_context($context);
+ $context = get_input('context');
+ if ($context) set_context($context);
// Get the entity, if possible
- if ($entity = get_entity($guid)) {
+ if ($entity = get_entity($guid)) {
- //set "real" container - image container is the album , group/user is the album container
- $top_container = get_entity($entity->container_guid)->container_guid;
-
- if ($top_container) {
- set_page_owner($top_container);
- } else {
- set_page_owner($entity->owner_guid);
- }
+ //set "real" container - image container is the album , group/user is the album container
+ $top_container = get_entity($entity->container_guid)->container_guid;
+
+ if ($top_container) {
+ set_page_owner($top_container);
+ } else {
+ set_page_owner($entity->owner_guid);
+ }
// Set the body to be the full view of the entity, and the title to be its title
- $area2 = elgg_view_entity($entity,true);
- if ($shell) {
- $body = elgg_view_layout('two_column_left_sidebar', '', $area1 . $area2);
- } else {
- $body = $area2;
- }
-
- } else {
- $body = elgg_echo('notfound');
- }
-
- // Display the page
+ $area2 = elgg_view_entity($entity,true);
if ($shell) {
- page_draw("", $body);
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area1 . $area2);
} else {
- header("Content-type: text/html; charset=UTF-8");
- echo $body;
+ $body = $area2;
}
+ } else {
+ $body = elgg_echo('notfound');
+ }
+
+ // Display the page
+ if ($shell) {
+ page_draw("", $body);
+ } else {
+ header("Content-type: text/html; charset=UTF-8");
+ echo $body;
+ }
+
?> \ No newline at end of file
diff --git a/world.php b/world.php
index 2e80f5393..d5dbf1f2a 100644
--- a/world.php
+++ b/world.php
@@ -1,25 +1,21 @@
<?php
/**
- * Elgg file browser
+ * Tidypics View All Albums on Site
*
- * @package ElggFile
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
*/
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
$limit = get_input("limit", 10);
$offset = get_input("offset", 0);
$tag = get_input("tag");
// Get the current page's owner
- $page_owner = page_owner_entity();
- if ($page_owner === false || is_null($page_owner)) {
- $page_owner = $_SESSION['user'];
- set_page_owner($_SESSION['guid']);
- }
+ $page_owner = page_owner_entity();
+ if ($page_owner === false || is_null($page_owner)) {
+ $page_owner = $_SESSION['user'];
+ set_page_owner($_SESSION['guid']);
+ }
// Get objects
$area2 = elgg_view_title($title = elgg_echo('album:all'));