From 4e0c1576475390faa2f1fb4c4dc2902a953f440e Mon Sep 17 00:00:00 2001
From: Cash Costello
';
+ foreach($not_uploaded as $im_name){
+ $error .= ' [' . $im_name . '] ';
+ }
+ $error .= ' ' . elgg_echo("image:notimage");
+ register_error($error);
+ } //end of upload check
+
+ if (count($uploaded_images)>0) {
+ forward($CONFIG->wwwroot . 'mod/tidypics/edit_multi.php?files=' . implode('-', $uploaded_images)); //forward to multi-image edit page
+ } else {
+ forward(get_input('forward_url', $_SERVER['HTTP_REFERER'])); //upload failed, so forward to previous page
+ }
+
+?>
\ No newline at end of file
diff --git a/contributions.txt b/contributions.txt
new file mode 100644
index 000000000..ff014654c
--- /dev/null
+++ b/contributions.txt
@@ -0,0 +1,170 @@
+Elgg community and users:
+
+ The original author of Tidypics has not been active in the Elgg community lately. Therefore, I took on the task of improving his plug-in and maintaining a log of all changes in this file. If you contribute to this plug-in, please record your changes here and release them under a GPL license.
+
+Best regards,
+
+Gabriel Monge-Franco (gabrielinux)
+http://gabriel.mongefranco.com
+
+
+------------------------------------------------------------------------
+Version 1.08.2 Change List
+Release Date: 02/13/2008
+Contributors:
+ * Gabriel Monge-Franco (http://gabriel.mongefranco.com)
+------------------------------------------------------------------------
+BEGIN VERSION 1.08.2 CHANGES
+------------------------------------------------------------------------
+* Fixed bug introduced in v1.08.1 that broke the picture upload (thanks to Karsten Schulze).
+* Fixed empty variables in several files that were supposed to send the user back to the previous page, but didn't.
+* Cleaned up change log (contributions.txt).
+* Finally fixed the Polish language file!!! Yay!! :)
+
+* TODO: Work around large image (high resolution) limit when creating thumbnails (an Elgg limitation... can probably be fixed by using PHP GD functions directly or ImageMagic if available)
+ - The problem is with get_resized_image_from_existing_file(). Submitted a ticket to the Elgg tracking bug system.
+ - Edit actions/upload.php when done. There is a dirty hack in place for now that needs to be removed once the above bug is fixed.
+* TODO: disable public by default (input/accessRead.php) -- add setting to admin page that lets the site admin decide whether pictures can be public or not.
+* TODO: allow group members to add pictures to group photo albums
+* TODO: implement photo anotations
+* TODO: look into replacing individual image views with lightbox2 or jQuery lightbox album views.
+* TODO: create a new widget to show pictures (in slideshow) in a user's profile.
+* TODO: add settings for group albums so that the group owner can select the number of albums to show.
+* TODO: implement a way to move pictures from one album to another (should be pretty easy).
+* TODO: add an "Add Photos" option to the user widget similar to the one in the group widget.
+* TODO: implement automagic file resizing to meet the admin's maximum resolution and file size.
+
+* OF NOTE: It is currently not possible to allow group members to edit an album created by another group member. This is a bug with group permissions and it will probably not be fixed until [at least] Elgg v1.5 comes out.
+------------------------------------------------------------------------
+END VERSION 1.08.2 CHANGES
+------------------------------------------------------------------------
+
+
+------------------------------------------------------------------------
+Version 1.08.1 Change List
+Release Date: 02/13/2008
+Contributors:
+ * Gabriel Monge-Franco (http://gabriel.mongefranco.com)
+ * LKLaRose (http://community.elgg.org/pg/profile/lauren)
+ * Webgalli (http://community.elgg.org/pg/profile/webgalli)
+ * Karsten Schulze (http://ks.frinx.eu)
+ * Cash (http://community.elgg.org/pg/profile/costelloc)
+------------------------------------------------------------------------
+BEGIN VERSION 1.08.1 CHANGES
+------------------------------------------------------------------------
+* Fixed bug introduced in v1.08 that caused fake files to be created during thumbnail creation (thanks to Karsten Schulze).
+* Reverted to old directory structure that saves pictures to /image/ALBUMGUID/picGUID (v1.08 saved to /image/ALBUMGUID__picGUID, thus keeping everything in one folder).
+* Album directory is now deleted when the album is deleted (along with every picture inside of the album).
+* Reverted thumbnail and small thumbnail to use picture cropping instead of scaling, so that sites that already use Tidypics can keep a consisting look and feel.
+* Completed River integration by moving album and image directories to an "object" sub-directory (thanks to LKLaRose).
+* Added status messages/graphics to give the user some feedback.
+* Fixed bug in profile widget whereby the selected number of albums had no effect (thanks to @Webgalli and @cheltenham).
+* Fixed bug introduced in v1.06 that prevented anonymous users from viewing a user's album (thanks to Karsten Schulze).
+* Fixed more language file bugs (thanks to Karsten Schulze).
+* Administrators can now set a file size limit from the plugin configuration (it has to be in Kilobytes).
+
+* JUST PLAIN WEIRD: Fixed Polish language file (thanks to @Vazco, Ian Medlock and Brett Profitt) and saved as UTF8 without BOM. However, it still doesn't work. Can somebody try saving it on a Polish box for me? :)
+
+* TODO: fix Polish language file -- it seems to break the whole Elgg site! Maybe it needs to use HTML codes in place of international characters?
+* TODO: Work around large image (high resolution) limit when creating thumbnails (an Elgg limitation... can probably be fixed by using PHP GD functions directly or ImageMagic if available)
+ - The problem is with get_resized_image_from_existing_file(). Submitted a ticket to the Elgg tracking bug system.
+ - Edit actions/upload.php when done. There is a dirty hack in place for now that needs to be removed once the above bug is fixed.
+* TODO: disable public by default (input/accessRead.php) -- add setting to admin page that lets the site admin decide whether pictures can be public or not.
+* TODO: allow group members to add pictures to group photo albums
+* TODO: implement photo anotations
+* TODO: look into replacing individual image views with lightbox2 or jQuery lightbox album views.
+* TODO: create a new widget to show pictures (in slideshow) in a user's profile.
+* TODO: add settings for group albums so that the group owner can select the number of albums to show.
+* TODO: implement a way to move pictures from one album to another (should be pretty easy).
+
+* OF NOTE: It is currently not possible to allow group members to edit an album created by another group member. This is a bug with group permissions and it will probably not be fixed until [at least] Elgg v1.5 comes out.
+------------------------------------------------------------------------
+END VERSION 1.08.1 CHANGES
+------------------------------------------------------------------------
+
+
+------------------------------------------------------------------------
+Version 1.08 Change List
+Release Date: 02/08/2008
+Contributors:
+ * Gabriel Monge-Franco (http://gabriel.mongefranco.com)
+------------------------------------------------------------------------
+BEGIN VERSION 1.08 CHANGES
+------------------------------------------------------------------------
+* Merged most (safe) changes made by other contributors in v1.07.
+ - Did not include SWFuploader or JQuery due to the number of bugs reported.
+* Changed ugly "new album" picture into something better looking.
+* Fixed bug whereby image objects were deleted from the database, but they physical files remained on the server.
+ - Since deleting directories was not possible without the use of unsafe file operations, albums no longer create new directories. Instead, all pictures are saved as /image/ALBUMGUID__picturename.
+* Fixed some bugs in the English, Spanish and German language files and added missing error messages.
+* Thumbnails now display the default error image (same as new album) when the requested image cannot be found.
+* Fixed a bug in the multi-edit form that did not allow image titles to be saved.
+* Removed some customizations made to edit.php action in v1.07 since they removed the ability to add titles to images.
+* Fixed bug introduced in v1.07 that prevented images from being set as album covers.
+* Fixed miscellaneous bugs in group albums widget.
+* Removed jQuery for now since it was making the albums too slow. In the future, we should look into replacing individual image views with lightbox2 or jQuery lightbox album views.
+
+
+* TODO: fix Polish language file -- it seems to break the whole Elgg site! Maybe it needs to use HTML codes in place of international characters?
+* TODO: Work around 0.9MB source file size limit when creating thumbnails (an Elgg limitation... can probably be fixed by using PHP GD functions directly)
+ - The problem is with get_resized_image_from_existing_file(). Submitted a ticket to the Elgg tracking bug system.
+ - Edit actions/upload.php when done. There is a dirty hack in place for now that needs to be removed once the above bug is fixed.
+* TODO: disable public by default (input/accessRead.php) -- add setting to admin page that lets the site admin decide whether pictures can be public or not.
+* TODO: allow group members to add pictures to group photo albums
+* TODO: implement photo anotations
+* TODO: look into replacing individual image views with lightbox2 or jQuery lightbox album views.
+
+* OF NOTE: It is currently not possible to allow group members to edit an album created by another group member. This is a bug with group permissions and it will probably not be fixed until [at least] Elgg v1.5 comes out.
+------------------------------------------------------------------------
+END VERSION 1.08 CHANGES
+------------------------------------------------------------------------
+
+
+------------------------------------------------------------------------
+Version 1.07 Change List
+Release Date: 02/03/2008
+Contributors:
+ * vazco (http://community.elgg.org/pg/profile/vazco)
+ * simophin (http://community.elgg.org/pg/profile/simophin)
+------------------------------------------------------------------------
+BEGIN VERSION 1.07 CHANGES
+------------------------------------------------------------------------
+* About 10 missing translations added
+* Translated to polish
+* When no album is present, user can add a new album straight from the widget if he has the required rights
+* Added some missing
+* Changed some to getFilename(), but would it be safe to execute shell commands directly???
+------------------------------------------------------------------------
+END VERSION 1.06 CHANGES
+------------------------------------------------------------------------
+
diff --git a/edit.php b/edit.php
new file mode 100644
index 000000000..2c202e402
--- /dev/null
+++ b/edit.php
@@ -0,0 +1,46 @@
+canEdit())
+ forward();
+
+ $subtype = $file->getSubtype();
+
+ if($subtype == 'album'){
+ if($container = $file->container_guid)
+ set_page_owner($container);
+
+ $area2 .= elgg_view_title($title = elgg_echo('album:edit'));
+ }
+ elseif($subtype == 'image'){
+ if($container = get_entity($file->container_guid)->container_guid)
+ set_page_owner($container);
+
+ $area2 .= elgg_view_title($title = elgg_echo('image:edit'));
+ }
+ else{
+ forward();
+ }
+
+ $area2 .= elgg_view("tidypics/forms/edit",array('entity' => $file, 'subtype' => $subtype));
+ $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
+ page_draw(elgg_echo("edit"), $body);
+
+
+?>
\ No newline at end of file
diff --git a/edit_multi.php b/edit_multi.php
new file mode 100644
index 000000000..2fdc85e42
--- /dev/null
+++ b/edit_multi.php
@@ -0,0 +1,33 @@
+canEdit()){
+ array_push($new_file_array, $file_guid);
+ }
+ if(!$album_guid) $album_guid = $entity->container_guid;
+
+ }
+ }
+
+ $area2 .= elgg_view_title($title = elgg_echo('image:edit'));
+ $area2 .= elgg_view("tidypics/forms/edit_multi", array('file_array' => $new_file_array, 'album_guid' => $album_guid));
+ $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
+ page_draw(elgg_echo("edit"), $body);
+?>
\ No newline at end of file
diff --git a/friends.php b/friends.php
new file mode 100644
index 000000000..61ed52380
--- /dev/null
+++ b/friends.php
@@ -0,0 +1,43 @@
+username);
+ }
+ }
+
+ if (is_null(page_owner_entity()->name) || page_owner_entity()->name == '') {
+ $friendname = get_input('username');
+ } else {
+ $friendname = page_owner_entity()->name;
+ };
+
+ if(isloggedin() && (page_owner() == $_SESSION['guid'])) {
+ $area2 = elgg_view_title($title = elgg_echo('album:yours:friends'));
+ } else {
+ $area2 = elgg_view_title($title = sprintf(elgg_echo('album:friends'), "$friendname"));
+ }
+
+ set_context('search');
+ set_input('search_viewtype', 'gallery');
+ $area2 .= list_user_friends_objects(page_owner(), 'album');
+
+ set_context('photos');
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
+
+ // Finally draw the page
+ page_draw(sprintf(elgg_echo("album:friends"),$_SESSION['user']->name), $body);
+?>
\ No newline at end of file
diff --git a/graphics/Thumbs.db b/graphics/Thumbs.db
new file mode 100644
index 000000000..46eac31d3
Binary files /dev/null and b/graphics/Thumbs.db differ
diff --git a/graphics/arrow_next.gif b/graphics/arrow_next.gif
new file mode 100644
index 000000000..6b3d8f829
Binary files /dev/null and b/graphics/arrow_next.gif differ
diff --git a/graphics/arrow_previous.gif b/graphics/arrow_previous.gif
new file mode 100644
index 000000000..e7ded54eb
Binary files /dev/null and b/graphics/arrow_previous.gif differ
diff --git a/graphics/bl.gif b/graphics/bl.gif
new file mode 100644
index 000000000..735fcb582
Binary files /dev/null and b/graphics/bl.gif differ
diff --git a/graphics/br.gif b/graphics/br.gif
new file mode 100644
index 000000000..90cdccdcb
Binary files /dev/null and b/graphics/br.gif differ
diff --git a/graphics/btnClose.gif b/graphics/btnClose.gif
new file mode 100644
index 000000000..b8ab4638d
Binary files /dev/null and b/graphics/btnClose.gif differ
diff --git a/graphics/btnContract.gif b/graphics/btnContract.gif
new file mode 100644
index 000000000..9be301039
Binary files /dev/null and b/graphics/btnContract.gif differ
diff --git a/graphics/btnExpand.gif b/graphics/btnExpand.gif
new file mode 100644
index 000000000..72a8471b3
Binary files /dev/null and b/graphics/btnExpand.gif differ
diff --git a/graphics/btnNext.gif b/graphics/btnNext.gif
new file mode 100644
index 000000000..467f23246
Binary files /dev/null and b/graphics/btnNext.gif differ
diff --git a/graphics/btnPrevious.gif b/graphics/btnPrevious.gif
new file mode 100644
index 000000000..298c1e99c
Binary files /dev/null and b/graphics/btnPrevious.gif differ
diff --git a/graphics/icons/Thumbs.db b/graphics/icons/Thumbs.db
new file mode 100644
index 000000000..fb5d56ed3
Binary files /dev/null and b/graphics/icons/Thumbs.db differ
diff --git a/graphics/icons/album.gif b/graphics/icons/album.gif
new file mode 100644
index 000000000..73ce91356
Binary files /dev/null and b/graphics/icons/album.gif differ
diff --git a/graphics/icons/general.jpg b/graphics/icons/general.jpg
new file mode 100644
index 000000000..23494eff2
Binary files /dev/null and b/graphics/icons/general.jpg differ
diff --git a/graphics/icons/general.png b/graphics/icons/general.png
new file mode 100644
index 000000000..267ae010c
Binary files /dev/null and b/graphics/icons/general.png differ
diff --git a/graphics/icons/river_icon_album.gif b/graphics/icons/river_icon_album.gif
new file mode 100644
index 000000000..e1bbfedaa
Binary files /dev/null and b/graphics/icons/river_icon_album.gif differ
diff --git a/graphics/icons/river_icon_image.gif b/graphics/icons/river_icon_image.gif
new file mode 100644
index 000000000..6f8bfd6af
Binary files /dev/null and b/graphics/icons/river_icon_image.gif differ
diff --git a/graphics/img_error.jpg b/graphics/img_error.jpg
new file mode 100644
index 000000000..e3aad2aed
Binary files /dev/null and b/graphics/img_error.jpg differ
diff --git a/graphics/loader.gif b/graphics/loader.gif
new file mode 100644
index 000000000..7ac990cf0
Binary files /dev/null and b/graphics/loader.gif differ
diff --git a/graphics/tl.gif b/graphics/tl.gif
new file mode 100644
index 000000000..ff93dadcc
Binary files /dev/null and b/graphics/tl.gif differ
diff --git a/graphics/tr.gif b/graphics/tr.gif
new file mode 100644
index 000000000..8dc197272
Binary files /dev/null and b/graphics/tr.gif differ
diff --git a/graphics/ttl.gif b/graphics/ttl.gif
new file mode 100644
index 000000000..8e44c0374
Binary files /dev/null and b/graphics/ttl.gif differ
diff --git a/graphics/ttp.gif b/graphics/ttp.gif
new file mode 100644
index 000000000..36f7211c4
Binary files /dev/null and b/graphics/ttp.gif differ
diff --git a/graphics/ttr.gif b/graphics/ttr.gif
new file mode 100644
index 000000000..66d06941e
Binary files /dev/null and b/graphics/ttr.gif differ
diff --git a/index.php b/index.php
new file mode 100644
index 000000000..00b09d14b
--- /dev/null
+++ b/index.php
@@ -0,0 +1,45 @@
+username) || empty($owner->username)) {
+ //if not logged in, see world pictures instead
+ if (!isloggedin()) forward('pg/photos/world');
+ forward('pg/photos/owned/' . $_SESSION['user']->username);
+ }
+
+ //set the title
+ $area2 = elgg_view_title($title = sprintf(elgg_echo('album:user'), "$owner->name"));
+
+ //allow new album creation
+ if(can_write_to_container($_SESSION['guid'], page_owner())){
+ $area2 .= 'username.'">'.elgg_echo('album:create').'
';
+ }
+
+ // Get objects
+ set_context('search');
+ set_input('search_viewtype', 'gallery');
+ $area2 .= list_entities("object","album",page_owner(),10);
+
+ set_context('photos');
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
+
+ // Finally draw the page
+ page_draw(sprintf(elgg_echo("album:user"),page_owner_entity()->name), $body);
+?>
\ No newline at end of file
diff --git a/languages/de.php b/languages/de.php
new file mode 100644
index 000000000..2d668f72f
--- /dev/null
+++ b/languages/de.php
@@ -0,0 +1,114 @@
+ "Bild",
+ 'images' => "Bilder",
+ 'caption' => "Untertitel",
+ 'photos' => "Photos",
+ 'images:upload' => "Bilder hochladen",
+ 'album' => "Fotoalbum",
+ 'albums' => "Fotoalben",
+ 'album:yours' => "Deine Fotoalben",
+ 'album:yours:friends' => "Fotoalben von Freunden",
+ 'album:user' => "Fotoalben von %s",
+ 'album:friends' => "Fotoalben von Freunden von %s",
+ 'album:all' => "Alle Fotoalben",
+ 'album:group' => "Alben der Gruppe",
+ 'item:object:image' => "Photos",
+ 'item:object:album' => "Alben",
+ 'tidypics:settings:maxfilesize' => "Maximale Dateigr鲞e in den Kilobytes (KB):",
+
+ //actions
+
+ 'album:create' => "Neues Album",
+ 'album:add' => "Fotoalbum hinzufügen",
+ 'album:addpix' => "Fotos hinzufügen",
+ 'album:edit' => "Album bearbeiten",
+ 'album:delete' => "Album löschen",
+
+ 'image:edit' => "Bild bearbeiten",
+ 'image:delete' => "Bild löschen",
+ 'image:download' => "Download Bild",
+
+ //forms
+
+ 'album:title' => "Titel",
+ 'album:desc' => "Beschreibung",
+ 'album:tags' => "Stichwörter",
+ 'album:cover' => "Albumcover erstellen?",
+ 'album:cover:yes' => "Ja",
+ 'image:access:note' => "(Zugriffsberechtigung wird vom Album übernommen)",
+
+ //views
+
+ 'image:total' => "Bilder im Album:",
+ 'image:by' => "Bild hinzugefügt von",
+ 'album:by' => "Album erstellt von:",
+ 'album:created:on' => "Verursacht",
+ 'image:none' => "Noch keine Bilder hinzugefügt.",
+ 'image:back' => "Zurück",
+ 'image:next' => "Weiter",
+
+ //widgets
+
+ 'album:widget' => "Fotoalben",
+ 'album:more' => "Alle Alben ansehen",
+ 'album:widget:description' => "Zeige Deine neuesten Fotoalben",
+ 'album:display:number' => "Anzahl der Alben, die angezeigt werden sollen",
+ 'album:num_albums' => "Anzahl der anzuzeigenden Alben",
+
+ // river
+
+ //images
+ 'image:river:created' => "%s hat hochgeladen:",
+ 'image:river:item' => "ein Bild",
+ 'image:river:annotate' => "%s kommentierte",
+
+ //albums
+ 'album:river:created' => "%s erstellte",
+ 'album:river:item' => "ein Album",
+ 'album:river:annotate' => "%s kommentierte",
+
+ // Status messages
+
+ 'image:saved' => "Dein Bild wurde gespeichert.",
+ 'images:saved' => "Alle Bilder wurden gespeichert.",
+ 'image:deleted' => "Dein Bild wurde gelöscht.",
+ 'image:delete:confirm' => "Willst Du das Bild wirklich löschen?",
+
+ 'images:edited' => "Dein Bild wurde aktualisiert.",
+ 'album:edited' => "Dein Album wurde aktualisiert.",
+ 'album:saved' => "Dein Album wurde gespeichert.",
+ 'album:deleted' => "Dein Album wurde gelöscht.",
+ 'album:delete:confirm' => "Willst Du das Album wirklich löschen?",
+ 'album:created' => "Ihr neues Album ist hergestellt worden.",
+ 'tidypics:status:processing' => "Warten Sie bitte, w鋒rend wir verarbeiten Ihre Abbildung....",
+
+ //Error messages
+
+ 'image:none' => "Kein Bilder gefunden.",
+ 'image:uploadfailed' => "Dateien konnten nicht hochgeladen werden:",
+ 'image:deletefailed' => "Bild konnte nicht gelöscht werden.",
+ 'image:downloadfailed' => "Dieses Bild ist nicht diesmal vorhanden.",
+
+ 'image:notimage' => 'Wir akzeptieren nur jpeg, gif, und png Dateien der erlaubten Dateigr鲞e an.',
+ 'images:notedited' => 'Nicht alle Bilder konnten hochgeladen werden',
+
+ 'album:none' => "Keine Alben gefunden.",
+ 'album:uploadfailed' => "Sorry; Dein Album konnte nicht gespeichert werden.",
+ 'album:deletefailed' => "Dein Album konnte nicht gelöscht werden.",
+ 'album:blank' => "Geben Sie diesem Album einen Titel und eine Beschreibung bitte."
+ );
+
+ add_translation("de",$german);
+?>
diff --git a/languages/en.php b/languages/en.php
new file mode 100644
index 000000000..2316a9e2f
--- /dev/null
+++ b/languages/en.php
@@ -0,0 +1,115 @@
+ "Image",
+ 'images' => "Images",
+ 'caption' => "Caption",
+ 'photos' => "Photos",
+ 'images:upload' => "Upload Images",
+ 'album' => "Photo Album",
+ 'albums' => "Photo Albums",
+ 'album:yours' => "Your photo albums",
+ 'album:yours:friends' => "Your friends' photo albums",
+ 'album:user' => "%s's photo albums",
+ 'album:friends' => "%s's friends' photo albums",
+ 'album:all' => "All site photo albums",
+ 'album:group' => "Group albums",
+ 'item:object:image' => "Photos",
+ 'item:object:album' => "Albums",
+ 'tidypics:settings:maxfilesize' => "Maximum file size in kilo bytes (KB):",
+
+ //actions
+
+ 'album:create' => "New Album",
+ 'album:add' => "Add Photo Album",
+ 'album:addpix' => "Add photos",
+ 'album:edit' => "Edit album",
+ 'album:delete' => "Delete album",
+
+ 'image:edit' => "Edit image",
+ 'image:delete' => "Delete image",
+ 'image:download' => "Download image",
+
+ //forms
+
+ 'album:title' => "Title",
+ 'album:desc' => "Description",
+ 'album:tags' => "Tags",
+ 'album:cover' => "Make image album cover?",
+ 'album:cover:yes' => "Yes",
+ 'image:access:note' => "(view access is inherited from the album)",
+
+ //views
+
+ 'image:total' => "Images in album:",
+ 'image:by' => "Image added by",
+ 'album:by' => "Album created by",
+ 'album:created:on' => "Created",
+ 'image:none' => "No images have been added yet.",
+ 'image:back' => "Back",
+ 'image:next' => "Next",
+
+ //widgets
+
+ 'album:widget' => "Photo Albums",
+ 'album:more' => "View all albums",
+ 'album:widget:description' => "Showcase your latest photo albums",
+ 'album:display:number' => "Number of albums to display",
+ 'album:num_albums' => "Number of albums to display",
+
+ // river
+
+ //images
+ 'image:river:created' => "%s uploaded",
+ 'image:river:item' => "an image",
+ 'image:river:annotate' => "%s commented on",
+
+ //albums
+ 'album:river:created' => "%s created",
+ 'album:river:item' => "an album",
+ 'album:river:annotate' => "%s commented on",
+
+ // Status messages
+
+ 'image:saved' => "Your image was successfully saved.",
+ 'images:saved' => "All images were successfully saved.",
+ 'image:deleted' => "Your image was successfully deleted.",
+ 'image:delete:confirm' => "Are you sure you want to delete this image?",
+
+ 'images:edited' => "Your images were successfully updated.",
+ 'album:edited' => "Your album was successfully updated.",
+ 'album:saved' => "Your album was successfully saved.",
+ 'album:deleted' => "Your album was successfully deleted.",
+ 'album:delete:confirm' => "Are you sure you want to delete this album?",
+ 'album:created' => "Your new album has been created.",
+ 'tidypics:status:processing' => "Please wait while we process your picture....",
+
+ //Error messages
+
+ 'image:none' => "We could not find any images at the moment.",
+ 'image:uploadfailed' => "Files not uploaded:",
+ 'image:deletefailed' => "Your image could not be deleted at this time.",
+ 'image:downloadfailed' => "Sorry; this image is not available at this time.",
+
+ 'image:notimage' => "We only accept jpeg, gif, or png images of the allowed file size.",
+ 'images:notedited' => "Not all images were successfully updated",
+
+ 'album:none' => "We could not find any albums at the moment.",
+ 'album:uploadfailed' => "Sorry; we could not save your album.",
+ 'album:deletefailed' => "Your album could not be deleted at this time.",
+ 'album:blank' => "Please give this album a title and description."
+ );
+
+ add_translation("en",$english);
+?>
\ No newline at end of file
diff --git a/languages/es.php b/languages/es.php
new file mode 100644
index 000000000..babb87068
--- /dev/null
+++ b/languages/es.php
@@ -0,0 +1,115 @@
+ "Imagen",
+ 'images' => "Imágenes",
+ 'caption' => "Leyenda",
+ 'photos' => "Fotos",
+ 'images:upload' => "Subir Imágenes",
+ 'album' => "Állbum de Fotos",
+ 'albums' => "Álbums de Fotos",
+ 'album:yours' => "Tus álbums de fotos",
+ 'album:yours:friends' => "Álbums de tus amigos",
+ 'album:user' => "Állbums de %s",
+ 'album:friends' => "Albums de los amigos de %s",
+ 'album:all' => "Todos los álbums",
+ 'album:group' => "Állbums del grupo",
+ 'item:object:image' => "Fotos",
+ 'item:object:album' => "Állbums",
+ 'tidypics:settings:maxfilesize' => "Tamaño máximo en kilo bytes (KB):",
+
+ //actions
+
+ 'album:create' => "Nuevo álbum",
+ 'album:add' => "Añadir álbum de fotos",
+ 'album:addpix' => "Añadir fotos",
+ 'album:edit' => "Modificar álbum",
+ 'album:delete' => "Eliminar álbum",
+
+ 'image:edit' => "Modificar imagen",
+ 'image:delete' => "Eliminar imagen",
+ 'image:download' => "Descargar imagen",
+
+ //forms
+
+ 'album:title' => "Título",
+ 'album:desc' => "Descripción",
+ 'album:tags' => "Etiquetas",
+ 'album:cover' => "¿Hacer portada del álbum?",
+ 'album:cover:yes' => "Si",
+ 'image:access:note' => "(los permisos de acceso se heredan del álbum)",
+
+ //views
+
+ 'image:total' => "Imágenes en el álbum:",
+ 'image:by' => "Imagen añadida por",
+ 'album:by' => "Album creado por",
+ 'album:created:on' => "Creado",
+ 'image:none' => "Todavía no se han añadido imágenes.",
+ 'image:back' => "Anterior",
+ 'image:next' => "Siguiente",
+
+ //widgets
+
+ 'album:widget' => "Albums de Fotos",
+ 'album:more' => "Ver todos los albums",
+ 'album:widget:description' => "Muestra tus álbums de fotos más recientes",
+ 'album:display:number' => "Número de albums a mostrar",
+ 'album:num_albums' => "Número de albums a mostrar",
+
+ // river
+
+ //images
+ 'image:river:created' => "%s subió",
+ 'image:river:item' => "una imagen",
+ 'image:river:annotate' => "%s comentó en",
+
+ //albums
+ 'album:river:created' => "%s creó",
+ 'album:river:item' => "un album",
+ 'album:river:annotate' => "%s comentó en",
+
+ // Status messages
+
+ 'image:saved' => "Tu imagen ha sido guardada.",
+ 'images:saved' => "Todas tus imágenes han sido guardadas.",
+ 'image:deleted' => "Tu imagen ha sido borrada.",
+ 'image:delete:confirm' => "¿Deseas borrar esta imagen?",
+
+ 'images:edited' => "Tus imágenes han sido actualizadas.",
+ 'album:edited' => "Tu álbum ha sido actualizado.",
+ 'album:saved' => "Tu álbum ha sido guardado.",
+ 'album:deleted' => "Tu álbum ha sido borrado con éxito.",
+ 'album:delete:confirm' => "¿Deseas borrar este álbum?",
+ 'album:created' => "Tu nuevo álbum ha sido creado.",
+ 'tidypics:status:processing' => "Por favor espera mientras procesamos tu imagen....",
+
+ //Error messages
+
+ 'image:none' => "No ha sido psible encontrar ninguna imagen en este momento.",
+ 'image:uploadfailed' => "Algunos ficheros no se pudieron subir:",
+ 'image:deletefailed' => "Tu imagen no ha podido ser borrada en este momento.",
+ 'image:downloadfailed' => "Esta imagen no se encuentra disponible en este momento.",
+
+ 'image:notimage' => "Sólo se aceptan imágenes jpeg, gif, o png del tamaño permitido.",
+ 'images:notedited' => "No se pudieron actualizar todas las imágenes.",
+
+ 'album:none' => "Actualmente no hay ningún álbum de fotos.",
+ 'album:uploadfailed' => "No se ha podido guardar el álbum.",
+ 'album:deletefailed' => "En este momento no se ha podido borrar el álbum.",
+ 'album:blank' => "Por favor entra un título y descripción para tu nuevo álbum."
+ );
+
+ add_translation("es",$spanish);
+?>
\ No newline at end of file
diff --git a/languages/pl.php b/languages/pl.php
new file mode 100644
index 000000000..047b17220
--- /dev/null
+++ b/languages/pl.php
@@ -0,0 +1,115 @@
+ "Obrazek",
+ 'images' => "Obrazki",
+ 'caption' => "Opis",
+ 'photos' => "Zdj臋cia",
+ 'images:upload' => "Dodaj obrazki",
+ 'album' => "Album zdj臋ciowy",
+ 'albums' => "Albumy zdj臋ciowe",
+ 'album:yours' => "Twoje albumy",
+ 'album:yours:friends' => "Albumy twoich znajomych",
+ 'album:user' => "Albumy u偶ytkownika %s",
+ 'album:friends' => "Albumy przyjaci贸艂 u偶ytkownika %s",
+ 'album:all' => "Wszystkie publiczne albumy",
+ 'album:group' => "Albumy rejsu",
+ 'item:object:image' => "Zdj臋cia",
+ 'item:object:album' => "Albumy",
+ 'tidypics:settings:maxfilesize' => "Maximum file size in kilo bytes (KB):",
+
+ //actions
+
+ 'album:create' => "Nowy album",
+ 'album:add' => "Dodaj album zdj臋ciowy",
+ 'album:addpix' => "Dodaj zdj臋cia",
+ 'album:edit' => "Edytuj album",
+ 'album:delete' => "Skasuj album",
+
+ 'image:edit' => "Edytuj obrazek",
+ 'image:delete' => "Skasuj obrazek",
+ 'image:download' => "Pobierz obrazek",
+
+ //forms
+
+ 'album:title' => "Tytu艂 albumu",
+ 'album:desc' => "Opis (widoczny tylko dla tw贸rcy)",
+ 'album:tags' => "Tagi",
+ 'album:cover' => "Ustaw jako ok艂adk臋 albumu?",
+ 'album:cover:yes' => "Tak",
+ 'image:access:note' => "(prawa dost臋pu pobierane s膮 z ustawie艅 albumu)",
+
+ //views
+
+ 'image:total' => "Obrazki w albumie:",
+ 'image:by' => "Obrazek dodany przez",
+ 'album:by' => "Album stworzony przez",
+ 'album:created:on' => "Stworzono",
+ 'image:none' => "Nie dodano jeszcze 偶adnych obrazk贸w.",
+ 'image:back' => "Poprzednia",
+ 'image:next' => "Kolejna",
+
+ //widgets
+
+ 'album:widget' => "Albumy zdj臋ciowe",
+ 'album:more' => "Poka偶 wszystkie albumy",
+ 'album:widget:description' => "Pokazuje twoje ostatnie albumy zdj臋ciowe",
+ 'album:display:number' => "Liczba wy艣wietlanych album贸w",
+ 'album:num_albums' => "Liczba wy艣wietlanych album贸w",
+
+ // river
+
+ //images
+ 'image:river:created' => "wgrano %s",
+ 'image:river:item' => "obrazek",
+ 'image:river:annotate' => "%s skomentowa艂",
+
+ //albums
+ 'album:river:created' => "Stworzono %s",
+ 'album:river:item' => "album",
+ 'album:river:annotate' => "%s skomentowa艂",
+
+ // Status messages
+
+ 'image:saved' => "Tw贸j obrazek zosta艂 pomy艣lnie zapisany.",
+ 'images:saved' => "Wszystkie obrazki zosta艂y pomy艣lnie zapisane.",
+ 'image:deleted' => "Tw贸j obrazek zosta艂 pomy艣lnie skasowany.",
+ 'image:delete:confirm' => "Czy jeste艣 pewien 偶e chcesz skasowa膰 ten obrazek?",
+
+ 'images:edited' => "Twoje obrazki zosta艂y pomy艣lnie zapisane.",
+ 'album:edited' => "Tw贸j album zosta艂 pomy艣lnie zapisany.",
+ 'album:saved' => "Tw贸j album zosta艂 pomy艣lnie zapisany.",
+ 'album:deleted' => "Tw贸j album zosta艂 skasowany.",
+ 'album:delete:confirm' => "Na pewno chcesz skasowa膰 ten album?",
+ 'album:created' => "Stworzono nowy album.",
+ 'tidypics:status:processing' => "Please wait while we process your picture....",
+
+ //Error messages
+
+ 'image:none' => "Jeszcze nie dodano 偶adnych obrazk贸w.",
+ 'image:uploadfailed' => "Pliki nie zapisane:",
+ 'image:deletefailed' => "Nie uda艂o si臋 skasowa膰 obrazka.",
+ 'image:downloadfailed' => "Nie uda艂o si臋 艣ci膮gn膮膰 albumu.",
+
+ 'image:notimage' => "Akceptowane formaty to tylko: jpeg, gif i png, and the allowed file size.",
+ 'images:notedited' => "Nie wszystkie obrazki zosta艂y zapisane",
+
+ 'album:none' => "Jeszcze nie dodano 偶adnych album贸w.",
+ 'album:uploadfailed' => "Nie uda艂o si臋 zapisa膰 twojego albumu.",
+ 'album:deletefailed' => "Nie uda艂o si臋 usun膮膰 twojego albumu.",
+ 'album:blank' => "Please give this albumu a tytu艂 and opis."
+ );
+
+ add_translation("pl",$polish);
+?>
\ No newline at end of file
diff --git a/manifest.xml b/manifest.xml
new file mode 100644
index 000000000..1dfd9b7a7
--- /dev/null
+++ b/manifest.xml
@@ -0,0 +1,9 @@
+
+'. $album_entity->title. '
';
+
+ $area2 .= elgg_view("tidypics/forms/upload", array('album' => $album ) );
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area2, $area3);
+
+ page_draw($title, $body);
+?>
\ No newline at end of file
diff --git a/view.php b/view.php
new file mode 100644
index 000000000..e0121baae
--- /dev/null
+++ b/view.php
@@ -0,0 +1,62 @@
+container_guid)->container_guid;
+
+ if ($top_container) {
+ set_page_owner($top_container);
+ } else {
+ set_page_owner($entity->owner_guid);
+ }
+
+ // Set the body to be the full view of the entity, and the title to be its title
+ $area2 = elgg_view_entity($entity,true);
+ if ($shell) {
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area1 . $area2);
+ } else {
+ $body = $area2;
+ }
+
+ } else {
+ $body = elgg_echo('notfound');
+ }
+
+ // Display the page
+ if ($shell) {
+ page_draw("", $body);
+ } else {
+ header("Content-type: text/html; charset=UTF-8");
+ echo $body;
+ }
+
+?>
\ No newline at end of file
diff --git a/views/default/input/accessRead.php b/views/default/input/accessRead.php
new file mode 100644
index 000000000..81392b19f
--- /dev/null
+++ b/views/default/input/accessRead.php
@@ -0,0 +1,61 @@
+ 0)
+ {
+
+ /* my hacks (pay no attention please =D )
+ //allow showing of group for write access
+ if($vars['group_write']) $vars['options'] = trigger_plugin_hook('access:collections:write','user',array('user_id' => $_SESSION['guid'], 'site_id' => 0),$vars['options']);
+ */
+
+ //developer check - to check the value being sent initially
+ //echo 'given value: '.$vars['value'].'
';
+
+ //if no value currently set - specify default
+ if (empty($vars['value']) && $vars['value'] != '0')
+ $vars['value'] = 2;
+
+
+ foreach($vars['options'] as $key => $option) {
+ if ($key == $vars['value']) {
+?>
+
+ class="">
+
+
\ No newline at end of file
diff --git a/views/default/input/cover_checkbox.php b/views/default/input/cover_checkbox.php
new file mode 100644
index 000000000..48c7d51cc
--- /dev/null
+++ b/views/default/input/cover_checkbox.php
@@ -0,0 +1,45 @@
+ $option) {
+
+ if ($option != $vars['value']) {
+ $selected = "";
+ } else {
+ $selected = "checked = \"checked\"";
+ }
+
+ $labelint = (int) $label;
+ if ("{$label}" == "{$labelint}") {
+ $label = $option;
+ }
+
+ $disabled = "";
+ if ($vars['disabled']) $disabled = ' disabled="yes" ';
+ echo "
";
+ }
+
+?>
\ No newline at end of file
diff --git a/views/default/input/multi_radio.php b/views/default/input/multi_radio.php
new file mode 100644
index 000000000..11f4c13b8
--- /dev/null
+++ b/views/default/input/multi_radio.php
@@ -0,0 +1,42 @@
+ $option) {
+
+ if ($vars['set'] != $vars['value']) {
+ $selected = "";
+ } else {
+ $selected = "checked = \"checked\"";
+ }
+
+ $labelint = (int) $label;
+ if ("{$label}" == "{$labelint}") {
+ $label = $option;
+ }
+
+ $disabled = "";
+ if ($vars['disabled']) $disabled = ' disabled="yes" ';
+ echo "
";
+ }
+
+?>
\ No newline at end of file
diff --git a/views/default/object/album.php b/views/default/object/album.php
new file mode 100644
index 000000000..b95d55eed
--- /dev/null
+++ b/views/default/object/album.php
@@ -0,0 +1,137 @@
+getGUID();
+ $tags = $file->tags;
+ $title = $file->title;
+ $desc = $file->description;
+ $owner = $vars['entity']->getOwnerEntity();
+ $friendlytime = friendly_time($vars['entity']->time_created);
+ $mime = $file->mimetype;
+
+ if (get_context() == "search") {
+
+ if (get_input('search_viewtype') == "gallery") {
+ //default gallery view for album listing @ /photos/owned/
+
+ //get album cover if one was set
+ if($file->cover)
+ $album_cover = '';
+ else
+ $album_cover = '
';
+
+ ?>
+
+
+ name;?>
+ getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")";
+ ?>
+
+
+ + + 'params[maxfilesize]', 'value' => $maxfilesize)); ?> +
\ No newline at end of file diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php new file mode 100644 index 000000000..f9f5b09e6 --- /dev/null +++ b/views/default/tidypics/css.php @@ -0,0 +1,128 @@ + + /* --- independent view for image/album SHARED --- */ + +#tidypics_title{ + font-size:1.2em; + font-weight:bold; +} +#tidypics_desc{ + padding:0 20px; + font-style:italic; +} +#tidypics_info{ + padding:20px; + line-height:1.5em; +} + +#tidypics_controls{ + text-align:center; + margin-bottom:10px; +} + +#tidypics_controls a{ + margin:10px; +} + + /* independent album view only */ + +.album_images{ + float:left; + width:160px; + height:160px; + margin:4px; + padding:5px; + border:1px solid #ccc; + text-align:center; +} + + /* independent image view only */ + +#image_full{ + text-align:center; + margin:10px; +} +#image_full img{ + padding:5px; + border:1px solid #ccc; + margin:7px 0; +} + +/* --- albums gallery view --- */ + +.album_cover{ + padding:2px; + border:1px solid #ccc; + margin:8px 0; +} + + +/* ------ album WIDGET VIEW ------ */ + +#album_widget_container{ + text-align:center; +} + +.album_widget_single_item{ + +} +.album_widget_title{ + +} +.album_widget_timestamp { + color:#666666; + margin:0; +} +.collapsable_box #album_widget_layout { + margin:0; +} + +/* --------- image upload/edit forms ------------ */ + +#image_upload_list li{ + margin:3px 0; +} +.edit_image_container{ + padding:5px; + margin:5px 0; + overflow:auto; +} +.edit_images{ + float:right; + width:160px; + height:160px; + margin:4px; + padding:5px; + border:1px solid #ccc; + text-align:center; +} +.image_info{ + float:left; + width:60%; +} +.image_info label{ + font-size:1em; +} +.edit_image{ + float:right; + border:1px solid #ccc; + width:153px; + height:153px; +} + +/* --------- tidypics river items ------------ */ + +.river_image_create { + background: url(mod/tidypics/graphics/icons/river_icon_image.gif) no-repeat left -1px; +} +.river_album_create { + background: url(mod/tidypics/graphics/icons/river_icon_album.gif) no-repeat left -1px; +} + +.pagination { + clear:both !important; +} + \ No newline at end of file diff --git a/views/default/tidypics/forms/edit.php b/views/default/tidypics/forms/edit.php new file mode 100644 index 000000000..efe4aa508 --- /dev/null +++ b/views/default/tidypics/forms/edit.php @@ -0,0 +1,115 @@ +title); + $action = "tidypics/editalbum"; + $title = $vars['entity']->title; + $body = $vars['entity']->description; + $tags = $vars['entity']->tags; + $access_id = $vars['entity']->access_id; + $subtype = $vars['subtype']; + + // if nothing is sent, create new, but only new albums are sent here + // new images are sent to upload.php + } else { + $title = elgg_echo("album:add"); + $action = "tidypics/addalbum"; + $tags = ""; + $title = ""; + $description = ""; + } + + // in case we have some cached details + if (isset($vars['albumtitle'])) { + $title = $vars['albumtitle']; + $body = $vars['albumbody']; + $tags = $vars['albumtags']; + } + + $container_guid = get_input('container_guid'); + if (!$container_guid) $container_guid = page_owner(); + +?> + \ No newline at end of file diff --git a/views/default/tidypics/forms/edit_multi.php b/views/default/tidypics/forms/edit_multi.php new file mode 100644 index 000000000..252a660bd --- /dev/null +++ b/views/default/tidypics/forms/edit_multi.php @@ -0,0 +1,44 @@ + + \ No newline at end of file diff --git a/views/default/tidypics/forms/upload.php b/views/default/tidypics/forms/upload.php new file mode 100644 index 000000000..35768f64c --- /dev/null +++ b/views/default/tidypics/forms/upload.php @@ -0,0 +1,79 @@ +access_id; + if (get_plugin_setting('maxfilesize','tidypics')) { + if (((int) get_plugin_setting('maxfilesize','tidypics')) < 1 || ((int) get_plugin_setting('maxfilesize','tidypics')) > 1048576) { + $maxfilesize = 10240; //if file size is less than 1KB or greater than 1GB, default to 10MB + } else { + $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics'); + } + } else { + $maxfilesize = 10240; //if the file size limit is not set, default to 10MB + } + +?> + + \ No newline at end of file diff --git a/views/default/tidypics/groupprofile_albums.php b/views/default/tidypics/groupprofile_albums.php new file mode 100644 index 000000000..ea11006fa --- /dev/null +++ b/views/default/tidypics/groupprofile_albums.php @@ -0,0 +1,60 @@ +num_display; + //if no number has been set, default to 5 + if (!$number) + $number = 5; + + $owner = page_owner_entity(); + $owner_albums = get_entities("object", "album", page_owner(), "", $number, 0, false); + + echo ''.elgg_echo("album:none").'
'; + if ($owner && ($owner->canWriteToContainer($_SESSION['user']))){ + echo 'username.'>'.elgg_echo("album:add").''; + echo '+ : + + num_display == '') $vars['entity']->num_display = 5; + ?> + +
\ No newline at end of file diff --git a/views/default/widgets/album_view/view.php b/views/default/widgets/album_view/view.php new file mode 100644 index 000000000..347332971 --- /dev/null +++ b/views/default/widgets/album_view/view.php @@ -0,0 +1,53 @@ +num_display; + //if no number has been set, default to 5 + if (!$number) + $number = 5; + + $owner = page_owner_entity(); + $owner_albums = get_entities("object", "album", page_owner(), "", $number, 0, false); + + if ($owner_albums) { + echo ''.elgg_echo("album:none").'
'; + + //check if owner has write rights. If so, let him edit the album + $container_guid = get_input('container_guid', $_SESSION['user']->getGUID()); + + if ($owner->username == get_entity($container_guid)->username){ + echo 'username.'>'.elgg_echo("album:create").'
'; + } + + } +?> \ No newline at end of file diff --git a/views/rss/object/file.php b/views/rss/object/file.php new file mode 100644 index 000000000..3bd84d076 --- /dev/null +++ b/views/rss/object/file.php @@ -0,0 +1,30 @@ +title; + if (empty($title)) { + $title = substr($vars['entity']->description,0,32); + if (strlen($vars['entity']->description) > 32) + $title .= " ..."; + } + +?> + +