aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/forms/photos/admin/settings/main.php2
-rw-r--r--views/default/forms/photos/image/tag.php33
-rw-r--r--views/default/js/photos/tagging.php159
-rw-r--r--views/default/object/image.php20
-rw-r--r--views/default/object/image/full.php3
-rw-r--r--views/default/photos/css.php99
-rw-r--r--views/default/photos/tagging/help.php19
-rw-r--r--views/default/photos/tagging/select.php16
-rw-r--r--views/default/photos/tagging/tag.php50
-rw-r--r--views/default/photos/tagging/tags.php14
-rw-r--r--views/default/river/object/image/tag.php26
11 files changed, 1 insertions, 440 deletions
diff --git a/views/default/forms/photos/admin/settings/main.php b/views/default/forms/photos/admin/settings/main.php
index 8791742f1..5bdd8f586 100644
--- a/views/default/forms/photos/admin/settings/main.php
+++ b/views/default/forms/photos/admin/settings/main.php
@@ -5,7 +5,7 @@
$plugin = $vars['plugin'];
-$checkboxes = array('tagging', 'view_count', 'exif', 'download_link');
+$checkboxes = array('view_count', 'exif', 'download_link');
foreach ($checkboxes as $checkbox) {
echo '<div>';
echo elgg_view('input/checkbox', array(
diff --git a/views/default/forms/photos/image/tag.php b/views/default/forms/photos/image/tag.php
deleted file mode 100644
index 31869be9e..000000000
--- a/views/default/forms/photos/image/tag.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * Tag select form body
- *
- * @uses $vars['entity']
- *
- * @author Cash Costello
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
- */
-
-echo '<div class="elgg-col elgg-col-4of5">';
-
-echo elgg_view('input/autocomplete', array(
- 'name' => 'username',
- 'match_on' => 'friends',
-));
-
-echo elgg_view('input/hidden', array(
- 'name' => 'guid',
- 'value' => $vars['entity']->getGUID(),
-));
-
-echo elgg_view('input/hidden', array(
- 'name' => 'coordinates',
-));
-
-echo '</div>';
-
-echo '<div class="elgg-col elgg-col-1of5 center">';
-echo elgg_view('input/submit', array(
- 'value' => elgg_echo('tidypics:actiontag'),
-));
-echo '</div>';
diff --git a/views/default/js/photos/tagging.php b/views/default/js/photos/tagging.php
deleted file mode 100644
index f444aa44c..000000000
--- a/views/default/js/photos/tagging.php
+++ /dev/null
@@ -1,159 +0,0 @@
-<?php
-/**
- * Photo tagging JavaScript
- *
- * @author Cash Costello
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
- */
-
-?>
-//<script>
-elgg.provide('elgg.tidypics.tagging');
-
-elgg.tidypics.tagging.init = function() {
- elgg.tidypics.tagging.active = false;
- $('[rel=photo-tagging]').click(elgg.tidypics.tagging.start);
-
- $('#tidypics-tagging-quit').click(elgg.tidypics.tagging.stop);
-
- $('.tidypics-tag').each(elgg.tidypics.tagging.position);
-
- elgg.tidypics.tagging.tag_hover = false;
- elgg.tidypics.tagging.toggleTagHover();
-};
-
-/**
- * Start a tagging session
- */
-elgg.tidypics.tagging.start = function(event) {
-
- if (elgg.tidypics.tagging.active) {
- elgg.tidypics.tagging.stop(event);
- return;
- }
-
- $('.tidypics-photo').imgAreaSelect({
- disable : false,
- hide : false,
- classPrefix : 'tidypics-tagging',
- onSelectEnd : elgg.tidypics.tagging.startSelect,
- onSelectStart: function() {
- $('#tidypics-tagging-select').hide();
- }
- });
-
- elgg.tidypics.tagging.toggleTagHover();
-
- $('.tidypics-photo').css({"cursor" : "crosshair"});
-
- $('#tidypics-tagging-help').toggle();
-
- elgg.tidypics.tagging.active = true;
-
- event.preventDefault();
-};
-
-/**
- * Stop tagging
- *
- * A tagging session could be completed or the user could have quit.
- */
-elgg.tidypics.tagging.stop = function(event) {
- $('#tidypics-tagging-help').toggle();
- $('#tidypics-tagging-select').hide();
-
- $('.tidypics-photo').imgAreaSelect({hide: true, disable: true});
- $('.tidypics-photo').css({"cursor" : "pointer"});
-
- elgg.tidypics.tagging.active = false;
- elgg.tidypics.tagging.toggleTagHover();
-
- event.preventDefault();
-};
-
-/**
- * Start the selection stage of tagging
- */
-elgg.tidypics.tagging.startSelect = function(img, selection) {
-
- var coords = '"x1":"' + selection.x1 + '",';
- coords += '"y1":"' + selection.y1 + '",';
- coords += '"width":"' + selection.width + '",';
- coords += '"height":"' + selection.height + '"';
- $("input[name=coordinates]").val(coords);
-
- $('#tidypics-tagging-select').show()
- .css({
- 'top' : selection.y2 + 10,
- 'left' : selection.x2
- })
- .find('input[type=text]').focus();
-
-};
-
-/**
- * Position the tags over the image
- */
-elgg.tidypics.tagging.position = function() {
- var tag_left = parseInt($(this).data('x1'));
- var tag_top = parseInt($(this).data('y1'));
- var tag_width = parseInt($(this).data('width'));
- var tag_height = parseInt($(this).data('height'));
-
- // add image offset
- var image_pos = $('.tidypics-photo').position();
- tag_left += image_pos.left;
- tag_top += image_pos.top;
-
- $(this).parent().css({
- left: tag_left + 'px',
- top: tag_top + 'px' /*
- width: tag_width + 'px',
- height: tag_height + 'px' */
- });
-
- $(this).css({
- width: tag_width + 'px',
- height: tag_height + 'px'
- });
-};
-
-/**
- * Toggle whether tags are shown on hover over the image
- */
-elgg.tidypics.tagging.toggleTagHover = function() {
- if (elgg.tidypics.tagging.tag_hover == false) {
- $('.tidypics-photo').hover(
- function() {
- $('.tidypics-tag-wrapper').show();
- },
- function(event) {
- // this check handles the tags appearing over the image
- var mouseX = event.pageX;
- var mouseY = event.pageY;
- var offset = $('.tidypics-photo').offset();
- var width = $('.tidypics-photo').outerWidth() - 1;
- var height = $('.tidypics-photo').outerHeight() - 1;
-
- mouseX -= offset.left;
- mouseY -= offset.top;
-
- if (mouseX < 0 || mouseX > width || mouseY < 0 || mouseY > height) {
- $('.tidypics-tag-wrapper').hide();
- }
- }
- );
- } else {
- $('.tidypics-photo').hover(
- function() {
- $('.tidypics-tag-wrapper').hide();
- },
- function() {
- $('.tidypics-tag-wrapper').hide();
- }
- );
- }
- elgg.tidypics.tagging.tag_hover = !elgg.tidypics.tagging.tag_hover;
-};
-
-elgg.register_hook_handler('init', 'system', elgg.tidypics.tagging.init);
diff --git a/views/default/object/image.php b/views/default/object/image.php
index 2aa76d48f..fc8ea827e 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -175,26 +175,6 @@ if (get_context() == "search") {
<div class="clearfloat"></div>
</div>
<?php
- // image menu (start tagging, download, etc.)
-
- echo '<div id="tidypics_controls"><ul>';
- echo elgg_view('tidypics/image_menu', array(
- 'image_guid' => $image_guid,
- 'viewer' => $viewer,
- 'owner' => $owner,
- 'anytags' => $image->isPhotoTagged(),
- 'album' => $album, ) );
- echo '</ul></div>';
-
- // tagging code - photo tags on images, photo tag listing and hidden divs used in tagging
- if (get_plugin_setting('tagging', 'tidypics') != "disabled") {
- echo elgg_view('tidypics/tagging', array(
- 'image' => $image,
- 'viewer' => $viewer,
- 'owner' => $owner, ) );
- }
-
-
if (get_plugin_setting('exif', 'tidypics') == "enabled") {
echo elgg_view('tidypics/exif', array('guid'=> $image_guid));
}
diff --git a/views/default/object/image/full.php b/views/default/object/image/full.php
index 175519c16..4e2c02a9a 100644
--- a/views/default/object/image/full.php
+++ b/views/default/object/image/full.php
@@ -51,10 +51,7 @@ echo $summary;
echo '<div class="tidypics-photo-wrapper center">';
echo elgg_view('object/image/navigation', $vars);
-echo elgg_view('photos/tagging/help', $vars);
-echo elgg_view('photos/tagging/select', $vars);
echo $img;
-echo elgg_view('photos/tagging/tags', $vars);
echo '</div>';
if ($photo->description) {
diff --git a/views/default/photos/css.php b/views/default/photos/css.php
index 3f0218fdc..a92c35b3e 100644
--- a/views/default/photos/css.php
+++ b/views/default/photos/css.php
@@ -70,105 +70,6 @@
vertical-align: top;
}
-/* ***************************************
- Tagging
-*************************************** */
-.tidypics-tagging-border1 {
- border: solid 2px white;
-}
-
-.tidypics-tagging-border1, .tidypics-tagging-border2,
-.tidypics-tagging-border3, .tidypics-tagging-border4 {
- filter: alpha(opacity=50);
- opacity: 0.5;
-}
-
-.tidypics-tagging-handle {
- background-color: #fff;
- border: solid 1px #000;
- filter: alpha(opacity=50);
- opacity: 0.5;
-}
-
-.tidypics-tagging-outer {
- background-color: #000;
- filter: alpha(opacity=50);
- opacity: 0.5;
-}
-
-.tidypics-tagging-help {
- position: absolute;
- left: 50%;
- top: -25px;
- width: 250px;
- margin-left: -125px;
- text-align: center;
-}
-
-.tidypics-tagging-select {
- position: absolute;
- max-width: 300px;
-}
-
-.tidypics-tag-wrapper {
- display: none;
- position: absolute;
-}
-
-.tidypics-tag {
- border: 2px solid white;
- clear: both;
-}
-
-.tidypics-tag-label {
- float: left;
- margin-top: 5px;
- color: #666;
-}
-
-/* ***************************************
- Tagging
-*************************************** */
-#tidypics_uploader {
- position:relative;
- width:400px;
- min-height:20px;
-}
-
-#tidypics_choose_button {
- position:absolute;
- top:0;
- left:0;
- z-index:0;
- display:block;
- float:left;
-}
-
-/* ***************************************
- AJAX UPLOADER
-*************************************** */
-#tidypics-uploader-steps {
- list-style: none;
-}
-
-#tidypics-uploader-steps li a {
- font-weight:bold;
-}
-
-.tidypics-choose-button-hover {
- color:#0054a7;
- text-decoration:underline;
-}
-
-.tidypics-disable {
- color:#cccccc;
-}
-
-.tidypics-disable:hover {
-color:#cccccc;
-text-decoration:none;
-}
-
<?php
return true;
?>
diff --git a/views/default/photos/tagging/help.php b/views/default/photos/tagging/help.php
deleted file mode 100644
index a7f437e51..000000000
--- a/views/default/photos/tagging/help.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Instructions on how to peform photo tagging
- *
- * @author Cash Costello
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
- */
-
-$button = elgg_view('output/url', array(
- 'text' => elgg_echo('quit'),
- 'href' => '#',
- 'id' => 'tidypics-tagging-quit',
-));
-
-$instructions = elgg_echo('tidypics:taginstruct', array($button));
-?>
-<div id="tidypics-tagging-help" class="elgg-module elgg-module-popup tidypics-tagging-help pam hidden">
- <?php echo $instructions; ?>
-</div>
diff --git a/views/default/photos/tagging/select.php b/views/default/photos/tagging/select.php
deleted file mode 100644
index 8894af63a..000000000
--- a/views/default/photos/tagging/select.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-/**
- * Tag select view
- *
- * @uses $vars['entity']
- *
- * @author Cash Costello
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
- */
-
-$body = elgg_view_form('photos/image/tag', array(), $vars);
-
-echo elgg_view_module('popup', elgg_echo('tidypics:tagthisphoto'), $body, array(
- 'class' => 'tidypics-tagging-select pam hidden',
- 'id' => 'tidypics-tagging-select',
-));
diff --git a/views/default/photos/tagging/tag.php b/views/default/photos/tagging/tag.php
deleted file mode 100644
index 6bdc0db02..000000000
--- a/views/default/photos/tagging/tag.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Photo tag view
- *
- * @uses $vars['tag'] Tag object
- *
- * @author Cash Costello
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
- */
-
-$coords = json_decode('{' . $vars['tag']->coords . '}');
-
-$attributes = elgg_format_attributes(array(
- 'class' => 'tidypics-tag',
- 'data-x1' => $coords->x1,
- 'data-y1' => $coords->y1,
- 'data-width' => $coords->width,
- 'data-height' => $coords->height,
-));
-
-if ($vars['tag']->type == 'user') {
- $user = get_entity($vars['tag']->value);
- $label = elgg_view('output/url', array(
- 'text' => $user->name,
- 'href' => $user->getURL(),
- ));
-} else {
- $label = $vars['tag']->value;
-}
-
-$delete = '';
-$annotation = elgg_get_annotation_from_id($vars['tag']->annotation_id);
-
-if ($annotation->canEdit()) {
- $url = elgg_http_add_url_query_elements('action/photos/image/untag', array(
- 'annotation_id' => $vars['tag']->annotation_id
- ));
- $delete = elgg_view('output/confirmlink', array(
- 'href' => $url,
- 'text' => elgg_view_icon('delete', 'float mas'),
- 'confirm' => elgg_echo('tidypics:phototagging:delete:confirm')
- ));
-}
-
-echo <<<HTML
-<div class="tidypics-tag-wrapper">
- <div $attributes>$delete</div>
- <div class="elgg-module-popup tidypics-tag-label">$label</div>
-</div>
-HTML;
diff --git a/views/default/photos/tagging/tags.php b/views/default/photos/tagging/tags.php
deleted file mode 100644
index 29c9d0efb..000000000
--- a/views/default/photos/tagging/tags.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-/**
- * View the tags for this image
- *
- * @uses $vars['entity']
- *
- * @author Cash Costello
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
- */
-
-$tags = $vars['entity']->getPhotoTags();
-foreach ($tags as $tag) {
- echo elgg_view('photos/tagging/tag', array('tag' => $tag));
-}
diff --git a/views/default/river/object/image/tag.php b/views/default/river/object/image/tag.php
deleted file mode 100644
index 7e6f0313d..000000000
--- a/views/default/river/object/image/tag.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-$tagger = get_entity($vars['item']->subject_guid);
-$tagged = get_entity($vars['item']->object_guid);
-$annotation = get_annotation($vars['item']->annotation_id);
-if ($annotation) {
- $image = get_entity($annotation->entity_guid);
-
- // viewer may not have permission to view image
- if (!$image) {
- return;
- }
-
- $image_title = $image->getTitle();
-}
-
-$tagger_link = "<a href=\"{$tagger->getURL()}\">$tagger->name</a>";
-$tagged_link = "<a href=\"{$tagged->getURL()}\">$tagged->name</a>";
-if (!empty($image_title)) {
- $image_link = "<a href=\"{$image->getURL()}\">$image_title</a>";
- $string = sprintf(elgg_echo('image:river:tagged'), $tagger_link, $tagged_link, $image_link);
-} else {
- $string = sprintf(elgg_echo('image:river:tagged:unknown'), $tagger_link, $tagged_link);
-}
-
-echo $string;