aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/tidypics/gallery.php71
-rw-r--r--views/default/tidypics/image_menu.php50
-rw-r--r--views/default/tidypics/js/slideshow.php2
-rw-r--r--views/default/tidypics/js/tagging.php304
-rw-r--r--views/default/tidypics/tagging.php88
5 files changed, 0 insertions, 515 deletions
diff --git a/views/default/tidypics/gallery.php b/views/default/tidypics/gallery.php
deleted file mode 100644
index ba6f7b11d..000000000
--- a/views/default/tidypics/gallery.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * view a gallery of photos or albums
- *
- */
-
-if ($vars['context'] == 'widget') {
- $num_wide = 3;
-} else {
- // four albums across
- $num_wide = 4;
-}
-
-$context = $vars['context'];
-$offset = $vars['offset'];
-$entities = $vars['entities'];
-$limit = $vars['limit'];
-$count = $vars['count'];
-$baseurl = $vars['baseurl'];
-$context = $vars['context'];
-$viewtype = $vars['viewtype'];
-$pagination = $vars['pagination'];
-$fullview = $vars['fullview'];
-
-$html = "";
-$nav = "";
-
-if (isset($vars['viewtypetoggle'])) {
- $viewtypetoggle = $vars['viewtypetoggle'];
-} else {
- $viewtypetoggle = true;
-}
-
-if ($context == "search" && $count > 0 && $viewtypetoggle) {
- $nav .= elgg_view('navigation/viewtype', array(
- 'baseurl' => $baseurl,
- 'offset' => $offset,
- 'count' => $count,
- 'viewtype' => $viewtype,
- ));
-}
-
-if ($pagination) {
- $nav .= elgg_view('navigation/pagination',array(
- 'baseurl' => $baseurl,
- 'offset' => $offset,
- 'count' => $count,
- 'limit' => $limit,
- ));
-}
-
-$html .= $nav;
-
-if (is_array($entities) && sizeof($entities) > 0) {
- $counter = 0;
- foreach($entities as $entity) {
- if ($counter % $num_wide == 0) {
- $html .= "<div class=\"tidypics_line_break\"></div>";
- }
- $html .= elgg_view_entity($entity, $fullview);
- $counter++;
- }
-}
-
-$html .= '<div class="clearfloat"></div>';
-
-if ($count) {
- $html .= $nav;
-}
-
-echo $html; \ No newline at end of file
diff --git a/views/default/tidypics/image_menu.php b/views/default/tidypics/image_menu.php
deleted file mode 100644
index 50ada2193..000000000
--- a/views/default/tidypics/image_menu.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**************************************************************************
- *
- * Tidypics Image Menu
- *
- * This is the menu that appears below an image. Admins can override the
- * menu with a different view to provide a look and feel that matches
- * their themes. The view can be extended to provide additional controls.
- *
- **************************************************************************/
-
-$image_guid = $vars['image_guid'];
-$viewer = $vars['viewer'];
-$owner = $vars['owner'];
-$anytags = $vars['anytags'];
-$album = $vars['album'];
-
-if (get_plugin_setting('tagging', 'tidypics') != "disabled") {
-
- $can_tag = false;
-
- $container = get_entity($album->container_guid);
- if ($container instanceof ElggGroup) {
- $can_tag = $viewer && $container->isMember($viewer);
- } else {
- $can_tag = $viewer && $viewer->guid == $owner->guid || user_is_friend($owner->guid, $viewer->guid);
- }
-
- // only owner and friends of owner can tag
- if ($can_tag) {
-?>
-<li id="start_tagging"><a id="tidypics_tag_control" href="javascript:void(0)" onclick="startTagging()"><?php echo elgg_echo('tidypics:tagthisphoto'); ?></a></li>
-<?php
- }
-
- // only owner can delete tags
- if ($anytags && $viewer && $viewer->guid == $owner->guid) {
-?>
-<li id="delete_tags"><a href="javascript:void(0)" onclick="deleteTags()"><?php echo elgg_echo('tidypics:deletetag'); ?></a></li>
-<?php
- }
-}
-
-if (get_plugin_setting('download_link', 'tidypics') != "disabled") {
- $download_url = $vars['url'] . "pg/photos/download/{$image_guid}/";
-?>
-<li id="download_image"><a href="<?php echo $download_url; ?>"><?php echo elgg_echo("image:download"); ?></a></li>
-<?php
-}
diff --git a/views/default/tidypics/js/slideshow.php b/views/default/tidypics/js/slideshow.php
deleted file mode 100644
index d134ca809..000000000
--- a/views/default/tidypics/js/slideshow.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/tidypics/vendors/PicLensLite/piclens_optimized.js"></script>
diff --git a/views/default/tidypics/js/tagging.php b/views/default/tidypics/js/tagging.php
deleted file mode 100644
index 3ffa20cfb..000000000
--- a/views/default/tidypics/js/tagging.php
+++ /dev/null
@@ -1,304 +0,0 @@
-<?php
- $photo_tags_json = $vars['photo_tags_json'];
-?>
-
-<script type="text/javascript" src="<?php echo $vars['url'] ?>mod/tidypics/vendors/jquery.imgareaselect-0.7.js"></script>
-<script type="text/javascript" src="<?php echo $vars['url'] ?>mod/tidypics/vendors/jquery.quicksearch.js"></script>
-
-<script type="text/javascript">
-
- var coordinates = "";
- var user_id = 0;
- var tagging = 0;
-
- // add to DOM as soon as ready
- $(document).ready(function () {
- $('ul#tidypics_phototag_list li').quicksearch({
- position: 'before',
- attached: 'ul#tidypics_phototag_list',
- loaderText: '',
- inputClass: 'input-filter',
- delay: 100
- });
-
- $('#quicksearch').submit( function () { addTag() } );
- }
- );
-
- // images are loaded so process tags
- $(window).load(function () {
- $('#tidypics_image').setupTags();
- }
- );
-
- // get tags over image ready for mouseover
- // based on code by Tarique Sani tarique at sanisoft.com - MIT and GPL licenses
- $.fn.setupTags = function()
- {
-
- image = this;
-
- imgOffset = $(image).offset();
- imgOffset.left = parseInt(imgOffset.left) + parseInt($(image).css("border-left-width")) + parseInt($(image).css("padding-left"));
- imgOffset.top = parseInt(imgOffset.top) + parseInt($(image).css("border-top-width")) + parseInt($(image).css("padding-top"));
-
- tags = <?php echo $photo_tags_json; ?>;
-
- $(tags).each(function(){
- appendTag(imgOffset, this);
- });
-
- $(image).hover(
- function(){
- $('.tidypics_tag').show();
- },
- function(){
- $('.tidypics_tag').hide();
- }
- );
-
- addTagEvents();
-
- $('.tidypics_phototag_links').hover(
- function(){
- code = this.id.substr(7); // cut off taglink to get unique id
- $('#tag'+code).show();
- },
- function(){
- code = this.id.substr(7);
- $('#tag'+code).hide();
- }
- );
-
- // make sure we catch and handle when the browser is resized
- $(window).resize(function () {
- $('.tidypics_tag').remove();
-
- imgOffset = $(image).offset();
-
- $(tags).each(function(){
- appendTag(imgOffset, this);
- });
-
- addTagEvents();
- });
- }
-
- function appendTag(offset, tag)
- {
- // catch for IE when no tags available
- if (tag.id == undefined)
- return;
-
- tag_top = parseInt(imgOffset.top) + parseInt(tag.y1);
- tag_left = parseInt(imgOffset.left) + parseInt(tag.x1);
-
- tag_div = $('<div class="tidypics_tag" id="tag'+tag.id+'"></div>').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' });
-
- text_top = parseInt(tag_top) + parseInt(tag.height) + 5;
-
- tag_text_div = $('<div class="tidypics_tag_text">'+tag.text+'</div>').css({ left: tag_left + 'px', top: text_top + 'px', width: '120px'});
-
- $('body').append(tag_div);
- $('body').append(tag_text_div);
- }
-
- function addTagEvents()
- {
- $('.tidypics_tag').hover(
- function(){
- $('.tidypics_tag').show();
- $(this).next('.tidypics_tag_text').show();
- $(this).next('.tidypics_tag_text').css("z-index", 10000);
- },
- function(){
- $('.tidypics_tag').show();
- $(this).next('.tidypics_tag_text').hide();
- $(this).next('.tidypics_tag_text').css("z-index", 0);
- }
- );
- }
-
-
- function selectUser(id, name)
- {
- user_id = id;
- $("input.input-filter").val(name);
- }
-
- function startTagging()
- {
- if (tagging != 0)
- {
- stopTagging();
- return;
- }
-
- tagging = 1;
-
- $('#tidypics_tag_control').text("<?php echo elgg_echo('tidypics:finish_tagging'); ?>");
-
- showTagInstruct();
- $('#tidypics_delete_tag_menu').hide();
-
- $('#tidypics_image').hover(
- function(){
- $('.tidypics_tag').hide();
- },
- function(){
- $('.tidypics_tag').hide();
- }
- );
-
- $('img#tidypics_image').imgAreaSelect( {
- borderWidth: 2,
- borderColor1: 'white',
- borderColor2: 'white',
- disable: false,
- hide: false,
- onSelectEnd: showTagMenu,
- onSelectStart: hideTagMenu
- }
- );
-
- $('img#tidypics_image').css({"cursor" : "crosshair"});
- }
-
- function stopTagging()
- {
- tagging = 0;
-
- hideTagInstruct();
- hideTagMenu();
-
- $('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} );
-
- $('#tidypics_tag_control').text("<?php echo elgg_echo('tidypics:tagthisphoto'); ?>");
-
- // restart tag hovering
- $('#tidypics_image').hover(
- function(){
- $('.tidypics_tag').show();
- },
- function(){
- $('.tidypics_tag').hide();
- }
- );
-
- $('img#tidypics_image').css({"cursor" : "pointer"});
- }
-
- function showTagMenu(oObject, oCoordenates)
- {
- offsetX = 6;
- offsetY = 10;
-
- imgOffset = $('#tidypics_image').offset();
-
- // show the list of friends
- if (oCoordenates.width != 0 && oCoordenates.height != 0) {
- coordinates = oCoordenates;
-
- _top = imgOffset.top + oCoordenates.y2 + offsetY;
- _left = imgOffset.left + oCoordenates.x1 + offsetX;
-
- $('#tidypics_tag_menu').show().css({
- "top": _top + "px",
- "left": _left + "px"
- });
-
- $(".input-filter").focus();
- }
- }
-
-
- function hideTagMenu()
- {
- $('#tidypics_tag_menu').hide();
- }
-
- function showTagInstruct()
- {
- offsetY = -60;
-
- divWidth = $('#tidypics_tag_instructions').width();
- imgOffset = $('#tidypics_image').offset();
- imgWidth = $('#tidypics_image').width();
- offsetX = parseInt((imgWidth - divWidth)/2);
-
- _top = imgOffset.top + offsetY;
- _left = imgOffset.left + offsetX;
-
- $('#tidypics_tag_instructions').show().css({
- "top": _top + "px",
- "left": _left + "px"
- });
- }
-
- function hideTagInstruct()
- {
- $('#tidypics_tag_instructions').hide();
- }
-
- function addTag()
- {
- // do I need a catch for no tag?
-
- $("input#user_id").val(user_id);
- $("input#word").val( $("input.input-filter").val() );
-
- coord_string = '"x1":"' + coordinates.x1 + '",';
- coord_string += '"y1":"' + coordinates.y1 + '",';
- coord_string += '"width":"' + coordinates.width + '",';
- coord_string += '"height":"' + coordinates.height + '"';
-
- $("input#coordinates").val(coord_string);
-
- //Show loading
- //$("#tag_menu").replaceWith('<div align="center" class="ajax_loader"></div>');
- }
-
- function deleteTags()
- {
- offsetY = 60;
-
- stopTagging();
-
- divWidth = $('#delete_tag_menu').width();
- imgOffset = $('#tidypics_image').offset();
- imgWidth = $('#tidypics_image').width();
- offsetX = parseInt((imgWidth - divWidth)/2);
-
- _top = imgOffset.top + offsetY;
- _left = imgOffset.left + offsetX;
-
- $('#tidypics_delete_tag_menu').show().css({
- "top": _top + "px",
- "left": _left + "px"
- });
-
- $('#tidypics_image').hover(
- function(){
- $('.tidypics_tag').hide();
- },
- function(){
- $('.tidypics_tag').hide();
- }
- );
- }
-
- function hideDeleteMenu()
- {
- $('#tidypics_delete_tag_menu').hide();
-
- // restart tag hovering
- $('#tidypics_image').hover(
- function(){
- $('.tidypics_tag').show();
- },
- function(){
- $('.tidypics_tag').hide();
- }
- );
- }
-</script>
diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php
deleted file mode 100644
index 2993fe71b..000000000
--- a/views/default/tidypics/tagging.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-$image = $vars['image'];
-$viewer = $vars['viewer'];
-$owner = $vars['owner'];
-
-// get photo tags
-$tag_info = $image->getPhotoTags();
-
-// defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags
-$photo_tags_json = "\"\"";
-if ($tag_info) {
- $photo_tags_json = $tag_info['json'];
-}
-
-if ($tag_info) {
-?>
-<div id="tidypics_phototags_list">
- <h3><?php echo elgg_echo('tidypics:inthisphoto') ?></h3>
- <ul>
-<?php
- foreach ($tag_info['links'] as $id=>$link) {
- echo "<li><a class='tidypics_phototag_links' id='taglink{$id}' href='{$link['url']}'>{$link['text']}</a></li>";
- }
-?>
- </ul>
-</div>
-<?php
-}
-?>
-<div id='tidypics_tag_instructions'>
- <div id='tidypics_tag_instruct_text'><?php echo elgg_echo('tidypics:taginstruct'); ?></div>
- <div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'><?php echo elgg_echo('tidypics:finish_tagging'); ?></button></div>
-</div>
-<div id="tidypics_tag_menu" class="tidypics_popup">
- <div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:tagthisphoto'); ?></h3></div>
- <?php
-
- if ($viewer) {
-
- $people_list = tp_get_tag_list($viewer);
-
- $content = "<div id='tidypics_tagmenu_left'>";
- $content .= "<input type='hidden' name='image_guid' value='{$image->guid}' />";
- $content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
- $content .= "<input type='hidden' name='user_id' id='user_id' value='' />";
- $content .= "<input type='hidden' name='word' id='word' value='' />";
-
- $content .= "<ul id='tidypics_phototag_list'>";
- $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
-
- if ($people_list) {
- foreach($people_list as $friend_guid => $friend_name) {
- $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$friend_guid}, \"{$friend_name}\")'>{$friend_name}</a></li>";
- }
- }
-
- $content .= "</ul></div>";
-
- $content .= "<div id='tidypics_tagmenu_right'><input type='submit' value='" . elgg_echo('tidypics:actiontag') . "' class='submit_button' /></div>";
-
- echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'tidypics_phototag_form', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'method' => 'post', 'body' => $content));
- }
-
- ?>
- <div class="clearfloat"></div>
-</div>
-<div id="tidypics_delete_tag_menu" class="tidypics_popup">
- <div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:deltag_title'); ?></h3></div>
-
- <?php
- if ($tag_info) {
- $content = "<input type='hidden' name='image_guid' value='{$image->guid}' />";
- foreach ($tag_info['links'] as $id => $link) {
- $text = htmlentities($link['text'], ENT_QUOTES, 'UTF-8');
- $content .= "<label><input type=\"checkbox\" class=\"input-checkboxes\" name=\"tags[{$id}]\" value=\"{$text}\" />{$text}</label><br />";
- }
-
- $content .= "<input type='submit' value='" . elgg_echo('tidypics:actiondelete') . "' class='submit_button' />";
- $content .= "<input type='button' value='" . elgg_echo('cancel') . "' class='cancel_button' onclick='hideDeleteMenu();' />";
-
- echo elgg_view('input/form', array('internalname' => 'phototag_deletetag_form', 'action' => "{$vars['url']}action/tidypics/deletetag", 'method' => 'post', 'body' => $content));
-
- }
-?>
-</div>
-<?php
-echo elgg_view('tidypics/js/tagging', array('photo_tags_json' => $photo_tags_json,) );