aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/photos/image/tag.php109
-rw-r--r--actions/photos/image/untag.php24
-rw-r--r--languages/da.php19
-rw-r--r--languages/de.php26
-rw-r--r--languages/en.php26
-rw-r--r--languages/es.php18
-rw-r--r--languages/fr.php15
-rw-r--r--languages/he.php11
-rw-r--r--languages/it.php2
-rw-r--r--lib/tidypics.php45
-rw-r--r--pages/photos/image/view.php5
-rw-r--r--pages/tagged.php48
-rw-r--r--start.php24
-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
24 files changed, 1 insertions, 812 deletions
diff --git a/actions/photos/image/tag.php b/actions/photos/image/tag.php
deleted file mode 100644
index e623bd546..000000000
--- a/actions/photos/image/tag.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/**
- * Add photo tag action
- *
- * @author Cash Costello
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
- */
-
-$coordinates_str = get_input('coordinates');
-$username = get_input('username');
-$image_guid = get_input('guid');
-
-if ($image_guid == 0) {
- register_error(elgg_echo("tidypics:phototagging:error"));
- forward(REFERER);
-}
-
-$image = get_entity($image_guid);
-if (!$image) {
- register_error(elgg_echo("tidypics:phototagging:error"));
- forward(REFERER);
-}
-
-if (empty($username)) {
- register_error(elgg_echo("tidypics:phototagging:error"));
- forward(REFERER);
-}
-
-$user = get_user_by_username($username);
-if (!$user) {
- // plain tag
- $relationships_type = 'word';
- $value = $username;
-} else {
- $relationships_type = 'user';
- $value = $user->guid;
-}
-
-/* // not adding as plain tag yet
-$new_word_tag = false;
-if ($user_id != 0) {
- $relationships_type = 'user';
- $value = $user_id;
-} else {
- $relationships_type = 'word';
- $value = $word;
-
- // check to see if the photo has this tag and add if not
- if (!is_array($image->tags)) {
- if ($image->tags != $word) {
- $new_word_tag = true;
- $tagarray = $image->tags . ',' . $word;
- $tagarray = string_to_tag_array($tagarray);
- }
- } else {
- if (!in_array($word, $image->tags)) {
- $new_word_tag = true;
- $tagarray = $image->tags;
- $tagarray[] = $word;
- }
- }
-}
-
-// add new tag now so it is available in search
-if ($new_word_tag) {
- $image->clearMetadata('tags');
- $image->tags = $tagarray;
-}
-*/
-
-$tag = new stdClass();
-$tag->coords = $coordinates_str;
-$tag->type = $relationships_type;
-$tag->value = $value;
-$access_id = $image->getAccessID();
-
-$annotation_id = $image->annotate('phototag', serialize($tag), $access_id);
-if ($annotation_id) {
- // if tag is a user id, add relationship for searching (find all images with user x)
- if ($tag->type === 'user') {
- if (!check_entity_relationship($tag->value, 'phototag', $image_guid)) {
- add_entity_relationship($tag->value, 'phototag', $image_guid);
-/*
- // also add this to the river - subject is image, object is the tagged user
- add_to_river('river/object/image/tag', 'tag', $tagger->guid, $user_id, $access_id, 0, $annotation_id);
-
- // notify user of tagging as long as not self
- if ($owner_id != $user_id) {
- notify_user(
- $user_id,
- $owner_id,
- elgg_echo('tidypics:tag:subject'),
- sprintf(
- elgg_echo('tidypics:tag:body'),
- $image->getTitle(),
- $tagger->name,
- $image->getURL()
- )
- );
- }
- *
- */
- }
- }
-
- system_message(elgg_echo("tidypics:phototagging:success"));
-}
-
-forward(REFERER);
diff --git a/actions/photos/image/untag.php b/actions/photos/image/untag.php
deleted file mode 100644
index 11c433a61..000000000
--- a/actions/photos/image/untag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * Remove photo tag action
- */
-
-$annotation = elgg_get_annotation_from_id(get_input('annotation_id'));
-
-if (!$annotation instanceof ElggAnnotation || $annotation->name != 'phototag') {
- register_error(elgg_echo("tidypics:phototagging:delete:error"));
- forward(REFERER);
-}
-
-if (!$annotation->canEdit()) {
- register_error(elgg_echo("tidypics:phototagging:delete:error"));
- forward(REFERER);
-}
-
-if ($annotation->delete()) {
- system_message(elgg_echo("tidypics:phototagging:delete:success"));
-} else {
- system_message(elgg_echo("tidypics:phototagging:delete:error"));
-}
-
-forward(REFERER);
diff --git a/languages/da.php b/languages/da.php
index c90e8f55d..e2ccd8b2e 100644
--- a/languages/da.php
+++ b/languages/da.php
@@ -56,7 +56,6 @@ $danish = array(
'tidypics:admin:instructions' => 'Dette er de centrale Tidypics indstillinger. Tilpas dem til din opsætning og klik derefter på Gem.',
'tidypics:settings:image_lib' => "Foto arkiv: ",
'tidypics:settings:download_link' => "Vis download-link",
- 'tidypics:settings:tagging' => "Tillad fotolinks",
'tidypics:settings:photo_ratings' => "Tillad karakterergivning af foto (kræver plugin af Miguel Montes eller andet kompatibelt plugin)",
'tidypics:settings:exif' => "Vis EXIF data",
'tidypics:settings:view_count' => "Vis tæller",
@@ -104,22 +103,6 @@ $danish = array(
'image:back' => "Forrige",
'image:next' => "Næste",
- // tagging
- 'tidypics:taginstruct' => 'Vælg et område på billedet, som du ønsker at linke',
- 'tidypics:deltag_title' => 'Vælg at slette links',
- 'tidypics:finish_tagging' => 'Annuller',
- 'tidypics:tagthisphoto' => 'Tilføj link til foto',
- 'tidypics:deletetag' => 'Slet foto link',
- 'tidypics:actiontag' => 'Link',
- 'tidypics:actiondelete' => 'Slet',
- 'tidypics:actioncancel' => 'Annuller',
- 'tidypics:inthisphoto' => 'Links i billedet',
- 'tidypics:usertag' => "Foto links til medlem %s",
- 'tidypics:phototagging:success' => 'Foto link tilføjet',
- 'tidypics:phototagging:error' => 'Uventet fejl ved linket',
- 'tidypics:deletetag:success' => 'Udvalgte links er blevet fjernet',
-
-
//rss
'tidypics:posted' => 'Billedet indstilles individuelt:',
@@ -137,8 +120,6 @@ $danish = array(
'image:river:created:multiple' => "%s added %u photos to album %s",
'image:river:item' => "et billede",
'image:river:annotate' => "en kommentar til billedet",
- 'image:river:tagged' => "%s tagged %s in the photo %s",
- 'image:river:tagged:unknown' => "%s tagged %s in a photo",
'album:river:created' => "%s har tilføjet et nyt album",
'album:river:group' => "i gruppen",
'album:river:item' => "et album",
diff --git a/languages/de.php b/languages/de.php
index b6817c589..f4b24e10a 100644
--- a/languages/de.php
+++ b/languages/de.php
@@ -64,7 +64,6 @@ $german = array(
'tidypics:settings:thumbnail' => "Erzeugung von Vorschaubildern",
'tidypics:settings:help' => "Hilfe",
'tidypics:settings:download_link' => "Zeige Download-Link",
- 'tidypics:settings:tagging' => "Tagging von Bildern erlauben",
'tidypics:settings:photo_ratings' => "Bewerten von Bildern erlauben (benötigt das Elggx Fivestar-Plugin oder ein vergleichbares)",
'tidypics:settings:exif' => "EXIF-Daten anzeigen",
'tidypics:settings:view_count' => "Zugriffszähler anzeigen",
@@ -167,29 +166,6 @@ $german = array(
'image:next' => "Nächstes",
'image:index' => "%u von %u",
- // tagging
- 'tidypics:taginstruct' => 'Wähle den Bereich auf dem Bild, für das Du ein Tag setzen willst, oder %s.',
- 'tidypics:finish_tagging' => 'Taggen beenden',
- 'tidypics:deltag_title' => 'Wähle die Tags, die gelöscht werden sollen',
- 'tidypics:finish_tagging' => 'Tagging abbrechen',
- 'tidypics:tagthisphoto' => 'Bild taggen',
- 'tidypics:actiontag' => 'Tag setzen',
- 'tidypics:actioncancel' => 'Abbrechen',
- 'tidypics:inthisphoto' => 'Tags in diesem Bild',
- 'tidypics:usertag' => "Bilder mit Tags, die sich auf %s beziehen",
- 'tidypics:phototagging:success' => 'Das Bild wurde getaggt.',
- 'tidypics:phototagging:error' => 'Beim Hinzufügen des Tags ist ein Fehler aufgetreten.',
-
- 'tidypics:phototagging:delete:success' => 'Das Tag wurde entfernt.',
- 'tidypics:phototagging:delete:error' => 'Beim Entfernen des Tags ist ein Fehler aufgetreten.',
- 'tidypics:phototagging:delete:confirm' => 'Dieses Tag entfernen?',
-
- 'tidypics:tag:subject' => "Du wurdest in einem Bild getaggt",
- 'tidypics:tag:body' => "Du wurdest im Bild %s von %s getaggt.
-
-Um das Bild zu sehen, folge diesem Link: %s",
-
-
//rss
'tidypics:posted' => 'hat ein Bild hinzugefügt:',
@@ -208,8 +184,6 @@ Um das Bild zu sehen, folge diesem Link: %s",
'image:river:created:multiple' => "%s hat %u Bilder zum Album %s hinzugefügt.",
'image:river:item' => "ein Bild",
'image:river:annotate' => "einen Kommentar zum Bild",
- 'image:river:tagged' => "%s hat %s im Bild %s getaggt.",
- 'image:river:tagged:unknown' => "%s hat %s in einem Bild getaggt.",
'river:create:object:album' => "%s hat das neue Bilderalbum %s hinzugefügt.",
'album:river:group' => "in der Gruppe",
'album:river:item' => "ein Album",
diff --git a/languages/en.php b/languages/en.php
index 1c40e5e0a..7042d4d98 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -64,7 +64,6 @@ $english = array(
'tidypics:settings:thumbnail' => "Thumbnail Creation",
'tidypics:settings:help' => "Help",
'tidypics:settings:download_link' => "Show download link",
- 'tidypics:settings:tagging' => "Enable photo tagging",
'tidypics:settings:photo_ratings' => "Enable photo ratings (requires rate plugin of Miguel Montes or compatible)",
'tidypics:settings:exif' => "Display EXIF data",
'tidypics:settings:view_count' => "Display view count",
@@ -175,29 +174,6 @@ $english = array(
'image:next' => "Next",
'image:index' => "%u of %u",
- // tagging
- 'tidypics:taginstruct' => 'Select the area that you want to tag or %s',
- 'tidypics:finish_tagging' => 'Stop tagging',
- 'tidypics:tagthisphoto' => 'Tag this photo',
- 'tidypics:actiontag' => 'Tag',
- 'tidypics:actioncancel' => 'Cancel',
- 'tidypics:inthisphoto' => 'In this photo',
- 'tidypics:usertag' => "Photos tagged with user %s",
- 'tidypics:phototagging:success' => 'Photo tag was successfully added',
- 'tidypics:phototagging:error' => 'Unexpected error occurred during tagging',
-
- 'tidypics:phototagging:delete:success' => 'Photo tag was removed.',
- 'tidypics:phototagging:delete:error' => 'Unexpceted error occurred when removing photo tag.',
- 'tidypics:phototagging:delete:confirm' => 'Remove this tag?',
-
-
-
- 'tidypics:tag:subject' => "You have been tagged in a photo",
- 'tidypics:tag:body' => "You have been tagged in the photo %s by %s.
-
-The photo can be viewed here: %s",
-
-
//rss
'tidypics:posted' => 'posted a photo:',
@@ -216,8 +192,6 @@ The photo can be viewed here: %s",
'image:river:created:multiple' => "%s added %u photos to the album %s",
'image:river:item' => "a photo",
'image:river:annotate' => "a comment on the photo",
- 'image:river:tagged' => "%s tagged %s in the photo %s",
- 'image:river:tagged:unknown' => "%s tagged %s in a photo",
'river:create:object:album' => "%s created a new photo album %s",
'album:river:group' => "in the group",
'album:river:item' => "an album",
diff --git a/languages/es.php b/languages/es.php
index 3dacebee8..27bf66786 100644
--- a/languages/es.php
+++ b/languages/es.php
@@ -51,7 +51,6 @@ $spanish = array(
'tidypics:admin:instructions' => 'Este es el coraz&oacute;n de las preferencias de Tidypics. Cambialas y luego guardalas.',
'tidypics:settings:image_lib' => "Libreria de Imagenes: ",
'tidypics:settings:download_link' => "Mostrar vinculo de descarga",
- 'tidypics:settings:tagging' => "Habilitar etiquetas en las fotos",
'tidypics:settings:photo_ratings' => "Habilitar ratings de fotos(requiere instalar el e plugin de Miguel Montes o compatible)",
'tidypics:settings:exif' => "Mostrar data de EXIF",
'tidypics:settings:view_count' => "Ver contador",
@@ -92,22 +91,6 @@ $spanish = array(
'image:back' => "Anterior",
'image:next' => "Siguiente",
- // tagging
- 'tidypics:taginstruct' => 'Seleccciona el &aacute;rea que deseas etiquetar',
- 'tidypics:deltag_title' => 'Seleccionas las etiquetas a borrar',
- 'tidypics:finish_tagging' => 'Detener etiquetado',
- 'tidypics:tagthisphoto' => 'Etiquetar esta foto',
- 'tidypics:deletetag' => 'Borrar etiqueta de la foto',
- 'tidypics:actiontag' => 'Etiqueta',
- 'tidypics:actiondelete' => 'Borrar',
- 'tidypics:actioncancel' => 'Cancelar',
- 'tidypics:inthisphoto' => 'En esta foto',
- 'tidypics:usertag' => "Fotos etiquetadas con %s",
- 'tidypics:phototagging:success' => 'La etiqueta de la foto fue a&ntilde;adida exitosamente',
- 'tidypics:phototagging:error' => 'Ocurri&oacute; un error inesperado durante el etiquetado',
- 'tidypics:deletetag:success' => 'Las etiquetas seleccionadas fueron borradas exitosamente',
-
-
//rss
'tidypics:posted' => 'publicar una foto:',
@@ -124,7 +107,6 @@ $spanish = array(
'image:river:created' => "%s a&ntilde;adio la foto %s al &aacute;lbum %s",
'image:river:item' => "una foto",
'image:river:annotate' => "un comentario en la foto",
- 'image:river:tagged' => "fue etiquetada en la foto",
'album:river:created' => "%s creo un nuevo &aacute;lbum de fotos",
'album:river:group' => "en el grupo",
'album:river:item' => "un &aacute;lbum",
diff --git a/languages/fr.php b/languages/fr.php
index 1c653daa1..1190e8ef0 100644
--- a/languages/fr.php
+++ b/languages/fr.php
@@ -51,7 +51,6 @@ $french = array(
'tidypics:settings:image_lib' => "Librairie graphique" ,
'tidypics:settings:thumbnail' => "Création des vignettes" ,
'tidypics:settings:download_link' => "Voir le lien de download" ,
- 'tidypics:settings:tagging' => "Activer les tags sur les photos" ,
'tidypics:settings:photo_ratings' => "Activer les notations des photos (nécessite le rate plugin de Miguel Montes ou compatible)" ,
'tidypics:settings:exif' => "Voir les données EXIF" ,
'tidypics:settings:view_count' => "Voir le compteur" ,
@@ -86,22 +85,9 @@ $french = array(
'image:none' => "Aucune image n'a encore été ajoutée" ,
'image:back' => "Précédent" ,
'image:next' => "Suivant" ,
- 'tidypics:taginstruct' => "Sélectionnez la zone que vous souhaitez tagger" ,
- 'tidypics:deltag_title' => "Sélectionnez le tag à supprimer" ,
- 'tidypics:finish_tagging' => "Arrêter de tagger" ,
- 'tidypics:tagthisphoto' => "Tagger cette photo" ,
- 'tidypics:deletetag' => "Supprimer le tag d'une photo" ,
- 'tidypics:actiontag' => "Tag" ,
'tidypics:actiondelete' => "Supprimer" ,
'tidypics:actioncancel' => "Annuler" ,
'tidypics:inthisphoto' => "Dans cette photo" ,
- 'tidypics:usertag' => "Photo taggée par %s" ,
- 'tidypics:phototagging:success' => "La photo a été correctement taggée." ,
- 'tidypics:phototagging:error' => "Erreur innatendue durant le taggage" ,
- 'tidypics:deletetag:success' => "Les tags sélectionnés ont correctement été supprimés" ,
- 'tidypics:tag:subject' => "Vous avez été taggé dans une photo !!!" ,
- 'tidypics:tag:body' => "Vous avez été taggé dans la photo %s par %s !!!
-La photo peut être consultée ici: %s" ,
'tidypics:posted' => "a posté une photo" ,
'tidypics:widget:albums' => "Albums photo" ,
'tidypics:widget:album_descr' => "Échantillon de vos albums photo" ,
@@ -113,7 +99,6 @@ La photo peut être consultée ici: %s" ,
'image:river:created' => "%s a ajouté la photo %s à l'album %s" ,
'image:river:item' => "une photo" ,
'image:river:annotate' => "commentaire sur la photo" ,
- 'image:river:tagged' => "a été taggé sur la photo" ,
'album:river:created' => "%s a créé un nouvel album photo" ,
'album:river:group' => "dans le groupe" ,
'album:river:item' => "un album" ,
diff --git a/languages/he.php b/languages/he.php
index 5f232daf6..af425ec49 100644
--- a/languages/he.php
+++ b/languages/he.php
@@ -47,7 +47,6 @@ $hebrew = array(
'tidypics:admin:instructions' => "אלה הגדרות הליבה של Tidypics. שנה אותן לפי הצורך ולחץ על שמור" ,
'tidypics:settings:image_lib' => "ספריית תמונות:" ,
'tidypics:settings:download_link' => "הצג לינק להורדה" ,
- 'tidypics:settings:tagging' => "אפשר תיוג תמונות" ,
'tidypics:settings:photo_ratings' => "אפשר דירוג תמונות, דורש תוסף דירוג של Miguel Montes או דומה" ,
'tidypics:settings:exif' => "הצג נתוני EXIF" ,
'tidypics:settings:view_count' => "מונה צפיה" ,
@@ -81,19 +80,9 @@ $hebrew = array(
'image:none' => "טרם נוספו תמונות" ,
'image:back' => "הקודם" ,
'image:next' => "הבא" ,
- 'tidypics:taginstruct' => "בחר אזור להוספת תג" ,
- 'tidypics:deltag_title' => "בחר תגים למחיקה" ,
- 'tidypics:finish_tagging' => "הפסק לתייג" ,
- 'tidypics:tagthisphoto' => "תייג תמונה זו" ,
- 'tidypics:deletetag' => "מחק תג תמונה" ,
- 'tidypics:actiontag' => "תג" ,
'tidypics:actiondelete' => "מחיקה" ,
'tidypics:actioncancel' => "ביטול" ,
'tidypics:inthisphoto' => "בתמונה זו" ,
- 'tidypics:usertag' => "תמונות המתוייגות במשתמש %s" ,
- 'tidypics:phototagging:success' => "התג נוסף בהצלחה" ,
- 'tidypics:phototagging:error' => "אירע שגיאה בתהליך התיוג" ,
- 'tidypics:deletetag:success' => "התגים נמחקו בהצלחה" ,
'tidypics:posted' => "הוסיף/ה תמונה" ,
'tidypics:widget:albums' => "אלבומי תמונות" ,
'tidypics:widget:album_descr' => "הצג את האלבומים החדשים שלך" ,
diff --git a/languages/it.php b/languages/it.php
index 27a9654a6..6b42fe655 100644
--- a/languages/it.php
+++ b/languages/it.php
@@ -75,8 +75,6 @@ $italian = array(
'image:river:created:multiple' => "%s added %u photos to album %s",
'image:river:item' => "una immagine",
'image:river:annotate' => "a comment on the image",
- 'image:river:tagged' => "%s tagged %s in the photo %s",
- 'image:river:tagged:unknown' => "%s tagged %s in a photo",
'album:river:created' => "%s created a new photo album: ",
'album:river:item' => "an album",
'album:river:annotate' => "un commento nel foto album",
diff --git a/lib/tidypics.php b/lib/tidypics.php
index 9439bed39..953c68b76 100644
--- a/lib/tidypics.php
+++ b/lib/tidypics.php
@@ -352,51 +352,6 @@ function tp_is_person() {
}
/**
- * get a list of people that can be tagged in an image
- *
- * @param $viewer entity
- * @return array of guid->name for tagging
- */
-function tp_get_tag_list($viewer) {
- $friends = get_user_friends($viewer->getGUID(), '', 999, 0);
- $friend_list = array();
- if ($friends) {
- foreach($friends as $friend) {
- //error_log("friend $friend->name");
- $friend_list[$friend->guid] = $friend->name;
- }
- }
-
- // is this a group
- $is_group = tp_is_group_page();
- if ($is_group) {
- $group_guid = page_owner();
- $viewer_guid = $viewer->guid;
- $members = get_group_members($group_guid, 999);
- if (is_array($members)) {
- foreach ($members as $member) {
- if ($viewer_guid != $member->guid) {
- $group_list[$member->guid] = $member->name;
- //error_log("group $member->name");
- }
- }
-
- // combine group and friends list
- $intersect = array_intersect_key($friend_list, $group_list);
- $unique_friends = array_diff_key($friend_list, $group_list);
- $unique_members = array_diff_key($group_list, $friend_list);
- //$friend_list = array_merge($friend_list, $group_list);
- //$friend_list = array_unique($friend_list);
- $friend_list = $intersect + $unique_friends + $unique_members;
- }
- }
-
- asort($friend_list);
-
- return $friend_list;
-}
-
-/**
* Convenience function for listing recent images
*
* @param int $max
diff --git a/pages/photos/image/view.php b/pages/photos/image/view.php
index fc4a01320..e30bed70a 100644
--- a/pages/photos/image/view.php
+++ b/pages/photos/image/view.php
@@ -19,11 +19,6 @@ if (!$photo) {
$photo->addView();
-if (elgg_get_plugin_setting('tagging', 'tidypics')) {
- elgg_load_js('tidypics:tagging');
- elgg_load_js('jquery.imgareaselect');
-}
-
// set page owner based on owner of photo album
$album = $photo->getContainerEntity();
if ($album) {
diff --git a/pages/tagged.php b/pages/tagged.php
deleted file mode 100644
index 34ea8a709..000000000
--- a/pages/tagged.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * Tidypics Tagged Listing
- *
- * List all photos tagged with a user
- */
-
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
-
-
-// Get user guid
-$guid = get_input('guid');
-
-$user = get_entity($guid);
-
-if ($user) {
- $title = sprintf(elgg_echo('tidypics:usertag'), $user->name);
-} else {
- $title = "User does not exist";
-}
-
-
-// create main column
-$body = elgg_view_title($title);
-
-set_context('search');
-set_input('search_viewtype', 'gallery'); // need to force gallery view
-$body .= list_entities_from_relationship('phototag', $guid, false, 'object', 'image', 0, 10, false);
-
-// Set up submenus
-if (isloggedin()) {
- add_submenu_item( elgg_echo("album:yours"),
- $CONFIG->wwwroot . "pg/photos/owned/" . $_SESSION['user']->username,
- 'tidypics-b' );
-}
-add_submenu_item( elgg_echo('album:all'),
- $CONFIG->wwwroot . "pg/photos/world/",
- 'tidypics-z');
-add_submenu_item( elgg_echo('tidypics:mostrecent'),
- $CONFIG->wwwroot . 'pg/photos/mostrecent',
- 'tidypics-z');
-
-
-
-$body = elgg_view_layout('two_column_left_sidebar', '', $body);
-
-
-page_draw($title, $body);
diff --git a/start.php b/start.php
index 45e9257f5..fc3311d42 100644
--- a/start.php
+++ b/start.php
@@ -38,9 +38,6 @@ function tidypics_init() {
$js = elgg_get_simplecache_url('js', 'photos/tidypics');
elgg_register_simplecache_view('js/photos/tidypics');
elgg_register_js('tidypics', $js, 'footer');
- $js = elgg_get_simplecache_url('js', 'photos/tagging');
- elgg_register_simplecache_view('js/photos/tagging');
- elgg_register_js('tidypics:tagging', $js, 'footer');
elgg_register_js('tidypics:slideshow', 'mod/tidypics/vendors/PicLensLite/piclens_optimized.js', 'footer');
@@ -88,8 +85,6 @@ function tidypics_init() {
elgg_register_action("photos/image/save", "$base_dir/image/save.php");
elgg_register_action("photos/image/ajax_upload", "$base_dir/image/ajax_upload.php", 'logged_in');
elgg_register_action("photos/image/ajax_upload_complete", "$base_dir/image/ajax_upload_complete.php", 'logged_in');
- elgg_register_action("photos/image/tag", "$base_dir/image/tag.php");
- elgg_register_action("photos/image/untag", "$base_dir/image/untag.php");
elgg_register_action("photos/batch/edit", "$base_dir/batch/edit.php");
@@ -205,13 +200,6 @@ function tidypics_page_handler($page) {
include "$base/image/download.php";
break;
- case "tagged": // all photos tagged with user
- if (isset($page[1])) {
- set_input('guid', $page[1]);
- }
- include($CONFIG->pluginspath . "tidypics/pages/tagged.php");
- break;
-
case "mostviewed": // images with the most views
if (isset($page[1])) {
set_input('username', $page[1]);
@@ -318,18 +306,6 @@ function tidypics_entity_menu_setup($hook, $type, $return, $params) {
);
$return[] = ElggMenuItem::factory($options);
}
-
- if (elgg_get_plugin_setting('tagging', 'tidypics')) {
- $options = array(
- 'name' => 'tagging',
- 'text' => elgg_echo('tidypics:actiontag'),
- 'href' => '#',
- 'title' => elgg_echo('tidypics:tagthisphoto'),
- 'rel' => 'photo-tagging',
- 'priority' => 80,
- );
- $return[] = ElggMenuItem::factory($options);
- }
}
// only show these options if there are images
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;