aboutsummaryrefslogtreecommitdiff
path: root/pages/lists
diff options
context:
space:
mode:
Diffstat (limited to 'pages/lists')
-rw-r--r--pages/lists/flickr.php60
-rw-r--r--pages/lists/highestrated.php65
-rw-r--r--pages/lists/highestvotecount.php50
-rw-r--r--pages/lists/mostcommentedimages.php42
-rw-r--r--pages/lists/mostcommentedimagesthismonth.php50
-rw-r--r--pages/lists/mostcommentedimagestoday.php50
-rw-r--r--pages/lists/mostrecentimages.php58
-rw-r--r--pages/lists/mostviewedimages.php87
-rw-r--r--pages/lists/mostviewedimageslastmonth.php50
-rw-r--r--pages/lists/mostviewedimagesthismonth.php50
-rw-r--r--pages/lists/mostviewedimagesthisyear.php50
-rw-r--r--pages/lists/mostviewedimagestoday.php50
-rw-r--r--pages/lists/recentlycommented.php69
-rw-r--r--pages/lists/recentlyviewed.php68
-rw-r--r--pages/lists/recentvotes.php52
15 files changed, 0 insertions, 851 deletions
diff --git a/pages/lists/flickr.php b/pages/lists/flickr.php
deleted file mode 100644
index b9886042b..000000000
--- a/pages/lists/flickr.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-require_once dirname(dirname(dirname(__FILE__))) . "/lib/phpFlickr/phpFlickr.php";
-$f = new phpFlickr("26b2abba37182aca62fe0eb2c7782050");
-
-// Load Elgg engine
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
-
-$username = get_input('username');
-if( !empty( $username )) {
- $temp_user = get_user_by_username( $username );
-} else {
- $temp_user = get_loggedin_user();
-}
-$flickr_username = get_metadata_byname( $temp_user->guid, "flickr_username" );
-if( empty( $flickr_username )) {
- register_error( "No Flickr username set");
- echo "<pre>No flickr username set: $temp_user->guid"; die;
- forward( "/" );
- die;
-}
-$flickr_user = $f->people_findByUsername( $flickr_username->value );
-
-// Get the friendly URL of the user's photos
-$photos_url = $f->urls_getUserPhotos( $flickr_user["id"] );
-
-if( !empty( $flickr_user )) {
- $recent = $f->people_getPublicPhotos( $flickr_user['id'], NULL, NULL, 5 );
-} else {
- echo "user not found"; die;
-}
-//echo "<pre>"; var_dump( $recent ); echo "</pre>";
-
-//echo "<pre>"; var_dump( $user ); echo "</pre>";
-$body = elgg_view_title( "Flickr photos for $flickr_user[username]" );
-
-$count = 0;
-foreach ($recent['photos']['photo'] as $photo) {
-
- $photo_info = $f->photos_getInfo( $photo["id"], $photo["secret"] );
- $body .= "<div class='tidypics_album_images'>";
- $body .= "$photo_info[title]<br />Views: $photo_info[views]<br />";
- $body .= "<a href=$photos_url$photo[id]>";
- $body .= "<img border='0' alt='$photo[title]' ".
- "src=" . $f->buildPhotoURL($photo, "Square") . ">";
- $body .= "</a>";
-
- $tag_count = 0;
- $body .= "<br /><div style='font-size: 8px;'>Tags:<br />";
- foreach( $photo_info["tags"]["tag"] as $tag ) {
- if( $tag_count ) $body .= ", ";
- $body .= "$tag[_content]";
- $tag_count++;
- }
-
- $body .= "</div></div>";
- $count++;
-}
-page_draw( "Flickr photos for $flickr_user[username]", elgg_view_layout("two_column_left_sidebar", '', $body));
-
-?> \ No newline at end of file
diff --git a/pages/lists/highestrated.php b/pages/lists/highestrated.php
deleted file mode 100644
index e05e7a9ba..000000000
--- a/pages/lists/highestrated.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
- /**
- * Tidypics Friends Albums Listing
- *
- */
-
- include_once dirname(dirname(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')=='') {
- if (!isloggedin()) {
- forward('pg/photos/world');
- } else {
- forward('pg/photos/friends/' . $_SESSION['user']->username);
- }
- }*/
-
-// if (is_null(page_owner_entity()->name) || page_owner_entity()->name == '') {
-// $groupname = get_input('username');
-// } else {
-// $groupname = page_owner_entity()->name;
-// };
-//
- //there has to be a better way to do this
- if(!$groupname) {
- $page = get_input("page");
- list($pagename, $groupname) = split("/", $page);
- }
-
- list($group_holder, $album_id) = split(":", $groupname);
-// echo "<pre>page: $page\ngroup: $groupname\nalbum: $album_id"; die;
-
- $user = get_user_by_username($friendname);
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
- $sql = "SELECT ent.guid, count(1) as mycount, avg(ms2.string) as average
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image' AND ent.container_guid = $album_id
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'generic_rate'
- INNER JOIN " . $prefix . "metastrings ms2 ON ms2.id = ann1.value_id
- INNER JOIN " . $prefix . "users_entity u ON ann1.owner_guid = u.guid
- GROUP BY ent.guid HAVING mycount > 1
- ORDER BY average DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-
- $album = get_entity($album_id);
- $title = $album["title"] . ": " . elgg_echo("tidypics:highestrated");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-
-?> \ No newline at end of file
diff --git a/pages/lists/highestvotecount.php b/pages/lists/highestvotecount.php
deleted file mode 100644
index 26b907144..000000000
--- a/pages/lists/highestvotecount.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
- $sql = "SELECT ent.guid, u.name as owner, count( 1 ) AS mycount, avg( ms2.string ) AS average
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'generic_rate'
- INNER JOIN " . $prefix . "metastrings ms2 ON ms2.id = ann1.value_id
- INNER JOIN " . $prefix . "users_entity u ON ent.owner_guid = u.guid
- GROUP BY ent.guid
- ORDER BY mycount DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $title = "Most voted images";
- $area2 = elgg_view_title($title);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- $full_entity = get_entity($entity->guid);
- $area2 .= " <div class='tidypics_album_images'>
- Owner: $entity->owner<br />
- Votes: $entity->mycount<br />
- Average: $entity->average
- </div>
- ";
- $area2 .= elgg_view_entity($full_entity);
-
- }
-
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/pages/lists/mostcommentedimages.php b/pages/lists/mostcommentedimages.php
deleted file mode 100644
index 0a4eb9622..000000000
--- a/pages/lists/mostcommentedimages.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
-// Load Elgg engine
-include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
-global $CONFIG;
-$prefix = $CONFIG->dbprefix;
-$max = 24;
-
-//this works but is wildly inefficient
-//$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
-$sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'generic_comment'
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
-$result = get_data($sql);
-
-$entities = array();
-foreach ($result as $entity) {
- $entities[] = get_entity($entity->guid);
-}
-
-tidypics_mostviewed_submenus();
-$title = elgg_echo("tidypics:mostcommented");
-$area2 = elgg_view_title($title);
-$area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
-$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-page_draw($title, $body); \ No newline at end of file
diff --git a/pages/lists/mostcommentedimagesthismonth.php b/pages/lists/mostcommentedimagesthismonth.php
deleted file mode 100644
index d95e2aff5..000000000
--- a/pages/lists/mostcommentedimagesthismonth.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
-
- //find timestamps for first and last days of this month
- $time_info = new stdClass();
- $time_info->start = mktime(0,0,0, date("m"), 1, date("Y"));
- $time_info->end = mktime();
-
- //this works but is wildly inefficient
- //$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
- $sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'generic_comment'
- WHERE ann1.time_created BETWEEN $time_info->start AND $time_info->end
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-
- tidypics_mostviewed_submenus();
- $title = elgg_echo("tidypics:mostcommentedthismonth");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/pages/lists/mostcommentedimagestoday.php b/pages/lists/mostcommentedimagestoday.php
deleted file mode 100644
index bd1a0cbec..000000000
--- a/pages/lists/mostcommentedimagestoday.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
-
- //find timestamps for today
- $time_info = new stdClass();
- $time_info->start = mktime(0,0,0, date("m"), date("d"), date("Y"));
- $time_info->end = mktime();
-
- //this works but is wildly inefficient
- //$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
- $sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'generic_comment'
- WHERE ann1.time_created BETWEEN $time_info->start AND $time_info->end
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-
- tidypics_mostviewed_submenus();
- $title = elgg_echo("tidypics:mostcommentedtoday");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/pages/lists/mostrecentimages.php b/pages/lists/mostrecentimages.php
deleted file mode 100644
index 722f1fc32..000000000
--- a/pages/lists/mostrecentimages.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-/**
- * Most recently uploaded images - individual or world
- *
- */
-
-// Load Elgg engine
-include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
-// start with assumption this is for all site photos
-$title = elgg_echo('tidypics:mostrecent');
-$user_id = 0;
-
-// is this all site or an individuals images
-$username = get_input('username');
-if ($username) {
- $user = get_user_by_username($username);
- if ($user) {
- $user_id = $user->guid;
-
- if ($user_id == get_loggedin_userid()) {
- $title = elgg_echo('tidypics:yourmostrecent');
- } else {
- $title = sprintf(elgg_echo("tidypics:friendmostrecent"), $user->name);
- }
- }
-} else {
- // world view - set page owner to logged in user
- if (isloggedin()) {
- set_page_owner(get_loggedin_userid());
- }
-}
-
-// allow other plugins to override the slideshow
-$slideshow_link = trigger_plugin_hook('tp_slideshow', 'album', array(), null);
-if ($slideshow_link) {
- add_submenu_item(elgg_echo('album:slideshow'),
- $slideshow_link,
- 'photos' );
-}
-
-// how many do we display
-$max = 12;
-
-// grab the html to display the images
-$images = tp_list_entities("object", "image", $user_id, null, $max, false, false, true);
-
-
-// this view takes care of the title on the main column and the content wrapper
-$area2 = elgg_view('tidypics/content_wrapper', array('title' => $title, 'content' => $images,));
-if (empty($area2)) {
- $area2 = $images;
-}
-
-$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-
-page_draw($title, $body);
diff --git a/pages/lists/mostviewedimages.php b/pages/lists/mostviewedimages.php
deleted file mode 100644
index eb87bc17c..000000000
--- a/pages/lists/mostviewedimages.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-
-/**
- * Most viewed images - either for a user or all site
- *
- */
-
-// Load Elgg engine
-include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
-global $CONFIG;
-$prefix = $CONFIG->dbprefix;
-$max = 24;
-
-$owner_guid = page_owner();
-
-//$start = microtime(true);
-$photos = tp_get_entities_from_annotations_calculate_x(
- 'count',
- 'object',
- 'image',
- 'tp_view',
- '',
- '',
- $owner_guid,
- $max);
-//error_log("elgg query is " . (float)(microtime(true) - $start));
-
-//this works but is wildly inefficient
-//$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-/*
- $start = microtime(true);
- $sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid AND ann1.owner_guid != ent.owner_guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'tp_view'
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-*/
-//error_log("custom query is " . (float)(microtime(true) - $start));
-
-// allow other plugins to override the slideshow
-$slideshow_link = trigger_plugin_hook('tp_slideshow', 'album', array(), null);
-if ($slideshow_link) {
- add_submenu_item(elgg_echo('album:slideshow'),
- $slideshow_link,
- 'photos' );
-}
-
-if ($owner_guid) {
- if ($owner_guid == get_loggedin_userid()) {
- $title = elgg_echo("tidypics:yourmostviewed");
- } else {
- $title = sprintf(elgg_echo("tidypics:friendmostviewed"), page_owner_entity()->name);
- }
-} else {
- // world view - set page owner to logged in user
- if (isloggedin()) {
- set_page_owner(get_loggedin_userid());
- }
-
- $title = elgg_echo("tidypics:mostviewed");
-}
-$area2 = elgg_view_title($title);
-
-// grab the html to display the images
-$content = tp_view_entity_list($photos, $max, 0, $max, false);
-
-// this view takes care of the title on the main column and the content wrapper
-$area2 = elgg_view('tidypics/content_wrapper', array('title' => $title, 'content' => $content,));
-if (empty($area2)) {
- $area2 = $content;
-}
-
-$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-page_draw($title, $body);
diff --git a/pages/lists/mostviewedimageslastmonth.php b/pages/lists/mostviewedimageslastmonth.php
deleted file mode 100644
index 1ed9161f7..000000000
--- a/pages/lists/mostviewedimageslastmonth.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
-
- //find timestamps for first and last days of last month
- $time_info = new stdClass();
- $time_info->start = strtotime("-1 months", mktime(0,0,0, date("m"), 1, date("Y")));
- $time_info->end = mktime(0,0,0,date("m"), 0, date("Y"));
-
- //this works but is wildly inefficient
- //$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
- $sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid AND ann1.owner_guid != ent.owner_guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'tp_view'
- WHERE ann1.time_created BETWEEN $time_info->start AND $time_info->end
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-
- tidypics_mostviewed_submenus();
- $title = elgg_echo("tidypics:mostviewedlastmonth");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/pages/lists/mostviewedimagesthismonth.php b/pages/lists/mostviewedimagesthismonth.php
deleted file mode 100644
index bfe08e1da..000000000
--- a/pages/lists/mostviewedimagesthismonth.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
-
- //find timestamps for first and last days of this month
- $time_info = new stdClass();
- $time_info->start = mktime(0,0,0, date("m"), 1, date("Y"));
- $time_info->end = mktime();
-
- //this works but is wildly inefficient
- //$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
- $sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid AND ann1.owner_guid != ent.owner_guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'tp_view'
- WHERE ann1.time_created BETWEEN $time_info->start AND $time_info->end
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-
- tidypics_mostviewed_submenus();
- $title = elgg_echo("tidypics:mostviewedthismonth");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/pages/lists/mostviewedimagesthisyear.php b/pages/lists/mostviewedimagesthisyear.php
deleted file mode 100644
index fe1a63d38..000000000
--- a/pages/lists/mostviewedimagesthisyear.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
-
- //find timestamps for first day of the year and current date
- $time_info = new stdClass();
- $time_info->start = mktime(0,0,0, 1, 1, date("Y"));
- $time_info->end = mktime();
-
- //this works but is wildly inefficient
- //$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
- $sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid AND ann1.owner_guid != ent.owner_guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'tp_view'
- WHERE ann1.time_created BETWEEN $time_info->start AND $time_info->end
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-
- tidypics_mostviewed_submenus();
- $title = elgg_echo("tidypics:mostviewedthisyear");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/pages/lists/mostviewedimagestoday.php b/pages/lists/mostviewedimagestoday.php
deleted file mode 100644
index f8e844753..000000000
--- a/pages/lists/mostviewedimagestoday.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
-
- //find timestamps for today
- $time_info = new stdClass();
- $time_info->start = mktime(0,0,0, date("m"), date("d"), date("Y"));
- $time_info->end = mktime();
-
- //this works but is wildly inefficient
- //$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
- $sql = "SELECT ent.guid, count( * ) AS views
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid AND ann1.owner_guid != ent.owner_guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'tp_view'
- WHERE ann1.time_created BETWEEN $time_info->start AND $time_info->end
- GROUP BY ent.guid
- ORDER BY views DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- }
-
- tidypics_mostviewed_submenus();
- $title = elgg_echo("tidypics:mostviewedtoday");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view_entity_list($entities, $max, 0, $max, false);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/pages/lists/recentlycommented.php b/pages/lists/recentlycommented.php
deleted file mode 100644
index f070e8563..000000000
--- a/pages/lists/recentlycommented.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-/**
- * Images recently commented on - world view only
- *
- */
-
-// Load Elgg engine
-include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
-// world view - set page owner to logged in user
-if (isloggedin()) {
- set_page_owner(get_loggedin_userid());
-}
-
-// allow other plugins to override the slideshow
-$slideshow_link = trigger_plugin_hook('tp_slideshow', 'album', array(), null);
-if ($slideshow_link) {
- add_submenu_item(elgg_echo('album:slideshow'),
- $slideshow_link,
- 'photos' );
-}
-
-
-global $CONFIG;
-$prefix = $CONFIG->dbprefix;
-$max_limit = 200; //get extra because you'll have multiple views per image in the result set
-$max = 16; //controls how many actually show on screen
-
-//this works but is wildly inefficient
-//$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
-$sql = "SELECT distinct (ent.guid), ann1.time_created
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'generic_comment'
- ORDER BY ann1.time_created DESC
- LIMIT $max_limit";
-
-$result = get_data($sql);
-
-$entities = array();
-foreach ($result as $entity) {
- if (!$entities[$entity->guid]) {
- $entities[$entity->guid] = get_entity($entity->guid);
- }
- if (count($entities) >= $max) {
- break;
- }
-}
-
-$user = get_loggedin_user();
-$title = elgg_echo("tidypics:recentlycommented");
-$area2 = elgg_view_title($title);
-
-// grab the html to display the images
-$images = tp_view_entity_list($entities, $max, 0, $max, false);
-
-// this view takes care of the title on the main column and the content wrapper
-$area2 = elgg_view('tidypics/content_wrapper', array('title' => $title, 'content' => $images,));
-if (empty($area2)) {
- $area2 = $images;
-}
-
-$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-page_draw($title, $body);
diff --git a/pages/lists/recentlyviewed.php b/pages/lists/recentlyviewed.php
deleted file mode 100644
index 419576d8e..000000000
--- a/pages/lists/recentlyviewed.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/**
- * Most recently viewed images - world view only right now
- *
- */
-
-// Load Elgg engine
-include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
-// world view - set page owner to logged in user
-if (isloggedin()) {
- set_page_owner(get_loggedin_userid());
-}
-
-// allow other plugins to override the slideshow
-$slideshow_link = trigger_plugin_hook('tp_slideshow', 'album', array(), null);
-if ($slideshow_link) {
- add_submenu_item(elgg_echo('album:slideshow'),
- $slideshow_link,
- 'photos' );
-}
-
-
-global $CONFIG;
-$prefix = $CONFIG->dbprefix;
-$max_limit = 200; //get extra because you'll have multiple views per image in the result set
-$max = 16; //controls how many actually show on screen
-
-//this works but is wildly inefficient
-//$annotations = get_annotations(0, "object", "image", "tp_view", "", "", 5000);
-
-$sql = "SELECT distinct ent.guid, ann1.time_created
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'tp_view'
- ORDER BY ann1.id DESC
- LIMIT $max_limit";
-
-$result = get_data($sql);
-
-$entities = array();
-foreach ($result as $entity) {
- if (!$entities[$entity->guid]) {
- $entities[$entity->guid] = get_entity($entity->guid);
- }
- if (count($entities) >= $max) {
- break;
- }
-}
-
-$title = elgg_echo("tidypics:recentlyviewed");
-$area2 = elgg_view_title($title);
-
-// grab the html to display the images
-$images = tp_view_entity_list($entities, $max, 0, $max, false);
-
-// this view takes care of the title on the main column and the content wrapper
-$area2 = elgg_view('tidypics/content_wrapper', array('title' => $title, 'content' => $images,));
-if (empty($area2)) {
- $area2 = $images;
-}
-
-$body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-page_draw($title, $body);
diff --git a/pages/lists/recentvotes.php b/pages/lists/recentvotes.php
deleted file mode 100644
index 3d8eac97e..000000000
--- a/pages/lists/recentvotes.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
- /**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
- *
- */
-
- // Load Elgg engine
- include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
-
- global $CONFIG;
- $prefix = $CONFIG->dbprefix;
- $max = 24;
-
- $sql = "SELECT ent.guid, u2.name AS owner, u.name AS voter, ms2.string as vote
- FROM " . $prefix . "entities ent
- INNER JOIN " . $prefix . "entity_subtypes sub ON ent.subtype = sub.id
- AND sub.subtype = 'image'
- INNER JOIN " . $prefix . "annotations ann1 ON ann1.entity_guid = ent.guid
- INNER JOIN " . $prefix . "metastrings ms ON ms.id = ann1.name_id
- AND ms.string = 'generic_rate'
- INNER JOIN " . $prefix . "metastrings ms2 ON ms2.id = ann1.value_id
- INNER JOIN " . $prefix . "users_entity u ON ann1.owner_guid = u.guid
- INNER JOIN " . $prefix . "users_entity u2 ON ent.owner_guid = u2.guid
- ORDER BY ann1.time_created DESC
- LIMIT $max";
-
- $result = get_data($sql);
-
- $title = "Recently rated images";
- $area2 = elgg_view_title($title);
-
- $entities = array();
- foreach($result as $entity) {
- $entities[] = get_entity($entity->guid);
- $full_entity = get_entity($entity->guid);
- $area2 .= " <div class='tidypics_album_images'>
- Owner: $entity->owner<br />
- Voter: $entity->voter<br />
- Rating: $entity->vote
- </div>
- ";
- $area2 .= elgg_view_entity($full_entity);
-
- }
-
-
-// $area2 .= elgg_view_entity_list($entities, $max, 0, $max);
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
- page_draw($title, $body);
-?> \ No newline at end of file