From 621177abc2bc60e9edb3ca723a4afaa9d9e713ef Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 12 Dec 2009 19:51:49 +0000 Subject: convert line endings to Unix --- views/default/annotation/annotate.php | 40 +- views/default/js/tagging.php | 604 ++++++++++++------------- views/default/river/object/album/create.php | 84 ++-- views/default/river/object/image/create.php | 56 +-- views/default/river/object/image/tag.php | 44 +- views/default/tidypics/admin/help.php | 48 +- views/default/tidypics/admin/imagelib.php | 122 ++--- views/default/tidypics/admin/settings.php | 48 +- views/default/tidypics/admin/stats.php | 68 +-- views/default/tidypics/admin/thumbnails.php | 64 +-- views/default/tidypics/albums.php | 100 ++-- views/default/tidypics/breadcrumbs.php | 44 +- views/default/tidypics/exif.php | 26 +- views/default/tidypics/forms/edit.php | 234 +++++----- views/default/tidypics/forms/edit_multi.php | 114 ++--- views/default/tidypics/forms/settings.php | 288 ++++++------ views/default/tidypics/gallery.php | 126 +++--- views/default/tidypics/groupprofile_albums.php | 28 +- views/default/tidypics/hover_menu.php | 22 +- views/default/tidypics/image_menu.php | 100 ++-- views/default/tidypics/tagging.php | 172 +++---- views/default/widgets/album_view/edit.php | 46 +- views/default/widgets/latest_photos/edit.php | 28 +- 23 files changed, 1253 insertions(+), 1253 deletions(-) (limited to 'views/default') diff --git a/views/default/annotation/annotate.php b/views/default/annotation/annotate.php index c0fb05d3a..8156a4bb4 100644 --- a/views/default/annotation/annotate.php +++ b/views/default/annotation/annotate.php @@ -1,21 +1,21 @@ -subject_guid); - $object = get_entity($vars['item']->object_guid); - $url = $object->getURL(); - $subtype = get_subtype_from_id($object->subtype); - $title = $object->title; - if (!$title) - $title = elgg_echo('untitled'); - - $url = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("river:posted:generic"),$url) . " "; - $string .= elgg_echo("{$subtype}:river:annotate") . " getURL() . "\">" . $title . ""; - -?> - +subject_guid); + $object = get_entity($vars['item']->object_guid); + $url = $object->getURL(); + $subtype = get_subtype_from_id($object->subtype); + $title = $object->title; + if (!$title) + $title = elgg_echo('untitled'); + + $url = "getURL()}\">{$performed_by->name}"; + $string = sprintf(elgg_echo("river:posted:generic"),$url) . " "; + $string .= elgg_echo("{$subtype}:river:annotate") . " getURL() . "\">" . $title . ""; + +?> + \ No newline at end of file diff --git a/views/default/js/tagging.php b/views/default/js/tagging.php index bd6890502..d8abda24c 100644 --- a/views/default/js/tagging.php +++ b/views/default/js/tagging.php @@ -1,303 +1,303 @@ - - - - - + + + \ No newline at end of file diff --git a/views/default/river/object/album/create.php b/views/default/river/object/album/create.php index a9b261566..20f9293d7 100644 --- a/views/default/river/object/album/create.php +++ b/views/default/river/object/album/create.php @@ -1,42 +1,42 @@ -subject_guid); - $album = get_entity($vars['item']->object_guid); - - $group_album = ($album->owner_guid != $album->container_guid); - if ($group_album) { - $group = get_entity($album->container_guid); - $group_name = $group->name; - $group_link = $group->getURL(); - } - - $url = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("album:river:created"),$url) . " "; - $string .= "getURL() . "\">" . $album->title . ""; - if ($group_album) - $string .= ' ' . elgg_echo('album:river:group') . ' ' . "{$group_name}"; - - $album_river_view = get_plugin_setting('album_river_view', 'tidypics'); - - if ($album_river_view == "cover") { - if ($album->cover) { - $string .= "
wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/>' . "
"; - } - } else { - - $string .= "
"; - - $images = get_entities("object", "image", $album->guid, 'time_created desc', 7); - - if (count($images)) { - foreach($images as $image){ - $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/> '; - } - } - - $string .= "
"; - } - -echo $string; - -?> +subject_guid); + $album = get_entity($vars['item']->object_guid); + + $group_album = ($album->owner_guid != $album->container_guid); + if ($group_album) { + $group = get_entity($album->container_guid); + $group_name = $group->name; + $group_link = $group->getURL(); + } + + $url = "getURL()}\">{$performed_by->name}"; + $string = sprintf(elgg_echo("album:river:created"),$url) . " "; + $string .= "getURL() . "\">" . $album->title . ""; + if ($group_album) + $string .= ' ' . elgg_echo('album:river:group') . ' ' . "{$group_name}"; + + $album_river_view = get_plugin_setting('album_river_view', 'tidypics'); + + if ($album_river_view == "cover") { + if ($album->cover) { + $string .= "
wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/>' . "
"; + } + } else { + + $string .= "
"; + + $images = get_entities("object", "image", $album->guid, 'time_created desc', 7); + + if (count($images)) { + foreach($images as $image){ + $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/> '; + } + } + + $string .= "
"; + } + +echo $string; + +?> diff --git a/views/default/river/object/image/create.php b/views/default/river/object/image/create.php index 5229e109a..2f1777f64 100644 --- a/views/default/river/object/image/create.php +++ b/views/default/river/object/image/create.php @@ -1,29 +1,29 @@ -subject_guid); - $image = get_entity($vars['item']->object_guid); - if($image->title) { - $title = $image->title; - } else { - $title = "untitled"; - } - - $url = "getURL()}\">{$performed_by->name}"; - $album = get_entity($image->container_guid); - - $album_link = "" . $album->title . ""; - $image_link = "getURL() . "\">" . $title . ""; - - $string = sprintf(elgg_echo("image:river:created"),$performed_by->name, $image_link, $album_link); - - $string .= "
"; - -/* // this adds the album cover to the river display - $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/> '; -*/ - $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/> '; - $string .= "
"; - - echo $string; - +subject_guid); + $image = get_entity($vars['item']->object_guid); + if($image->title) { + $title = $image->title; + } else { + $title = "untitled"; + } + + $url = "getURL()}\">{$performed_by->name}"; + $album = get_entity($image->container_guid); + + $album_link = "" . $album->title . ""; + $image_link = "getURL() . "\">" . $title . ""; + + $string = sprintf(elgg_echo("image:river:created"),$performed_by->name, $image_link, $album_link); + + $string .= "
"; + +/* // this adds the album cover to the river display + $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/> '; +*/ + $string .= "getURL() . "\"> wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" class="tidypics_album_cover" alt="thumbnail"/> '; + $string .= "
"; + + echo $string; + ?> \ No newline at end of file diff --git a/views/default/river/object/image/tag.php b/views/default/river/object/image/tag.php index 6e60d5af3..1b3589afb 100644 --- a/views/default/river/object/image/tag.php +++ b/views/default/river/object/image/tag.php @@ -1,23 +1,23 @@ -subject_guid); - $person_tagged = get_entity($vars['item']->object_guid); - if($image->title) { - $title = $image->title; - } else { - $title = "untitled"; - } - - // viewer may not have permission to view image - if (!$image) - return; - - - $image_url = "getURL()}\">{$title}"; - $person_url = "getURL()}\">{$person_tagged->name}"; - - $string = $person_url . ' ' . elgg_echo('image:river:tagged') . ' ' . $image_url; - - echo $string; - +subject_guid); + $person_tagged = get_entity($vars['item']->object_guid); + if($image->title) { + $title = $image->title; + } else { + $title = "untitled"; + } + + // viewer may not have permission to view image + if (!$image) + return; + + + $image_url = "getURL()}\">{$title}"; + $person_url = "getURL()}\">{$person_tagged->name}"; + + $string = $person_url . ' ' . elgg_echo('image:river:tagged') . ' ' . $image_url; + + echo $string; + ?> \ No newline at end of file diff --git a/views/default/tidypics/admin/help.php b/views/default/tidypics/admin/help.php index 4014be9ce..7f871598c 100644 --- a/views/default/tidypics/admin/help.php +++ b/views/default/tidypics/admin/help.php @@ -1,25 +1,25 @@ -
-

White screen when uploading images

-

-Tidypics tries to calculate the maximum size of an image that your server will support. If it -guesses incorrectly and someone uploads a photo that is too large, the script may crash when -resizing the image if you are using GD. The easiest way to test this is to set display_errors -to 1 in your .htaccess file and upload large images. If this causes a problem, a php memory error -should display on the screen. You can increased your php memory limit (see the docs directory). -A better option is to use ImageMagick if your server supports it (again see the docs directory). -

-If it is not a memory issue, you should see some other error appear. Once you have fixed the error, -change display_error back to 0. -

-

Question mark images appear

-

-If you see question mark images when you look at your albums, this means the resizing of the images -failed. This could be due to the memory limits as described above. There are other causes. Tidypics -tries to detect these problems and write the cause to the error log. You should check your server -error log right after an upload that results in a question mark for these error messages. The messages -will begin with "Tidypics warning:". It is possible if you have turned off php warnings that you will -not see these warnings. -

-Another possible cause is using ImageMagick when your server does not support it or specifying -the wrong path to the ImageMagick executables. +
+

White screen when uploading images

+

+Tidypics tries to calculate the maximum size of an image that your server will support. If it +guesses incorrectly and someone uploads a photo that is too large, the script may crash when +resizing the image if you are using GD. The easiest way to test this is to set display_errors +to 1 in your .htaccess file and upload large images. If this causes a problem, a php memory error +should display on the screen. You can increased your php memory limit (see the docs directory). +A better option is to use ImageMagick if your server supports it (again see the docs directory). +

+If it is not a memory issue, you should see some other error appear. Once you have fixed the error, +change display_error back to 0. +

+

Question mark images appear

+

+If you see question mark images when you look at your albums, this means the resizing of the images +failed. This could be due to the memory limits as described above. There are other causes. Tidypics +tries to detect these problems and write the cause to the error log. You should check your server +error log right after an upload that results in a question mark for these error messages. The messages +will begin with "Tidypics warning:". It is possible if you have turned off php warnings that you will +not see these warnings. +

+Another possible cause is using ImageMagick when your server does not support it or specifying +the wrong path to the ImageMagick executables.

\ No newline at end of file diff --git a/views/default/tidypics/admin/imagelib.php b/views/default/tidypics/admin/imagelib.php index deb32d0f3..b4656afe1 100644 --- a/views/default/tidypics/admin/imagelib.php +++ b/views/default/tidypics/admin/imagelib.php @@ -1,62 +1,62 @@ -dbprefix}entities where subtype={$img_type}"; - $total = get_data_row($query); - $num_images = $total->total; - - $img_type = get_subtype_id('object', 'album'); - $query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}"; - $total = get_data_row($query); - $num_albums = $total->total; - - $num_comments_photos = count_annotations(0, 'object', 'image', 'generic_comment'); - $num_comments_albums = count_annotations(0, 'object', 'album', 'generic_comment'); - - $num_views = count_annotations(0, 'object', 'image', 'tp_view'); - - if (get_plugin_setting('tagging', 'tidypics') != "disabled") - $num_tags = count_annotations(0, 'object', 'image', 'phototag'); -?> -
-

Overview

-

-An image library is required by Tidypics to perform various manipulations: resizing on upload, watermarking, rotation, and cropping. -There are three image library options with Tidypics: PHP extension GD, -ImageMagick called via a system call, and the PHP extension -imagick. GD is the most common of the three on hosted servers but suffers -from serious memory usage problems when resizing photos. If you have access to ImageMagick (whether through system calls or the -PHP extension), we recommend that you use that. -

-

Testing ImageMagick Commandline

-

-To use the ImageMagick executables, PHP must be configured to allow calls to exec(). You can check our -server analysis page to find out the -configuration of your server. Next, you need to determine the path to ImageMagick on your server. Your hosting service should -be able to provide this to you. You can test if the location is correct below. If successful, it should display the version of -ImageMagick installed on your server. -

-
-

-
- - -

-
- - \ No newline at end of file diff --git a/views/default/tidypics/admin/settings.php b/views/default/tidypics/admin/settings.php index 1b449cfc7..ff7d330e2 100644 --- a/views/default/tidypics/admin/settings.php +++ b/views/default/tidypics/admin/settings.php @@ -1,25 +1,25 @@ - elgg_echo("tidypics:admin:instructions"))); - - global $CONFIG; - $system_url = $CONFIG->wwwroot . 'mod/tidypics/pages/server_analysis.php'; - $upgrade_url = $CONFIG->wwwroot . 'mod/tidypics/actions/upgrade.php'; - - $upgrade = false; - if (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album')) - $upgrade = true; -?> -

- -Upgrade
- -Run Server Analysis -

- elgg_echo("tidypics:admin:instructions"))); + + global $CONFIG; + $system_url = $CONFIG->wwwroot . 'mod/tidypics/pages/server_analysis.php'; + $upgrade_url = $CONFIG->wwwroot . 'mod/tidypics/actions/upgrade.php'; + + $upgrade = false; + if (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album')) + $upgrade = true; +?> +

+ +Upgrade
+ +Run Server Analysis +

+ \ No newline at end of file diff --git a/views/default/tidypics/admin/stats.php b/views/default/tidypics/admin/stats.php index 8de3415a1..aea5e75ba 100644 --- a/views/default/tidypics/admin/stats.php +++ b/views/default/tidypics/admin/stats.php @@ -1,35 +1,35 @@ -dbprefix}entities where subtype={$img_type}"; - $total = get_data_row($query); - $num_images = $total->total; - - $img_type = get_subtype_id('object', 'album'); - $query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}"; - $total = get_data_row($query); - $num_albums = $total->total; - - $num_comments_photos = count_annotations(0, 'object', 'image', 'generic_comment'); - $num_comments_albums = count_annotations(0, 'object', 'album', 'generic_comment'); - - $num_views = count_annotations(0, 'object', 'image', 'tp_view'); - - if (get_plugin_setting('tagging', 'tidypics') != "disabled") - $num_tags = count_annotations(0, 'object', 'image', 'phototag'); -?> -

-
-Photos:
-Albums:
-Comments on photos:
-Comments on albums:
-Total views:
- -Photo tags:
- +dbprefix}entities where subtype={$img_type}"; + $total = get_data_row($query); + $num_images = $total->total; + + $img_type = get_subtype_id('object', 'album'); + $query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}"; + $total = get_data_row($query); + $num_albums = $total->total; + + $num_comments_photos = count_annotations(0, 'object', 'image', 'generic_comment'); + $num_comments_albums = count_annotations(0, 'object', 'album', 'generic_comment'); + + $num_views = count_annotations(0, 'object', 'image', 'tp_view'); + + if (get_plugin_setting('tagging', 'tidypics') != "disabled") + $num_tags = count_annotations(0, 'object', 'image', 'phototag'); +?> +

+
+Photos:
+Albums:
+Comments on photos:
+Comments on albums:
+Total views:
+ +Photo tags:
+

\ No newline at end of file diff --git a/views/default/tidypics/admin/thumbnails.php b/views/default/tidypics/admin/thumbnails.php index 0af59090e..ccd884005 100644 --- a/views/default/tidypics/admin/thumbnails.php +++ b/views/default/tidypics/admin/thumbnails.php @@ -1,33 +1,33 @@ -
-

Overview

-

-This page allows you to create thumbnails for images when the thumbnail creation failed during upload. -You may experience problems with thumbnail creation if your image library in not configured properly or -if there is not enough memory for the GD library to load and resize an image. If your users have -experienced problems with thumbnail creation and you have modified your setup, you can try to redo the -thumbnails. Find the unique identifier of the photo (it is the number near the end of the url when viewing -a photo) and enter it below. -

-

Thumbnail Creation

-

-: - - -

-
- \ No newline at end of file diff --git a/views/default/tidypics/albums.php b/views/default/tidypics/albums.php index 9c75bf024..42ac15afe 100644 --- a/views/default/tidypics/albums.php +++ b/views/default/tidypics/albums.php @@ -1,51 +1,51 @@ -'; - - if ($owner_albums) { - foreach($owner_albums as $album) { - - if($album->cover) - $album_cover = '' . $album->title . ''; - else - $album_cover = '' . $album->title . ''; -?> -
- -
time_created);?>
-getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")
"; -?> - -
-username) || empty($owner->username)) { - echo '

' . elgg_echo('album:all') . '

'; - } else { - echo '

' . elgg_echo('album:more') . '

'; - } - - } - - if (can_write_to_container(0, $owner->guid)) { - echo '

username . '>' . elgg_echo("album:create") . '

'; - } - - - //close album_widget_container div - echo ""; +'; + + if ($owner_albums) { + foreach($owner_albums as $album) { + + if($album->cover) + $album_cover = '' . $album->title . ''; + else + $album_cover = '' . $album->title . ''; +?> +
+ +
time_created);?>
+getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")
"; +?> + +
+username) || empty($owner->username)) { + echo '

' . elgg_echo('album:all') . '

'; + } else { + echo '

' . elgg_echo('album:more') . '

'; + } + + } + + if (can_write_to_container(0, $owner->guid)) { + echo '

username . '>' . elgg_echo("album:create") . '

'; + } + + + //close album_widget_container div + echo ""; ?> \ No newline at end of file diff --git a/views/default/tidypics/breadcrumbs.php b/views/default/tidypics/breadcrumbs.php index 1a96e921c..c4d347e6e 100644 --- a/views/default/tidypics/breadcrumbs.php +++ b/views/default/tidypics/breadcrumbs.php @@ -1,22 +1,22 @@ -wwwroot . "pg/photos/owned/" . $page_owner->username; - if (get_loggedin_userid() == $page_owner->guid) - $first_level_text = elgg_echo('album:yours'); - else - $first_level_text = sprintf(elgg_echo('album:user'), $page_owner->name); -?> - -title; - $second_level_link = $vars['album']->getURL(); -?> ->> - +wwwroot . "pg/photos/owned/" . $page_owner->username; + if (get_loggedin_userid() == $page_owner->guid) + $first_level_text = elgg_echo('album:yours'); + else + $first_level_text = sprintf(elgg_echo('album:user'), $page_owner->name); +?> + +title; + $second_level_link = $vars['album']->getURL(); +?> +>> + diff --git a/views/default/tidypics/exif.php b/views/default/tidypics/exif.php index 525665754..0100ac575 100644 --- a/views/default/tidypics/exif.php +++ b/views/default/tidypics/exif.php @@ -1,14 +1,14 @@ -'; - foreach ($exif as $name => $value) { - echo $name . ': ' . $value . '
'; - } - echo ''; - } - +'; + foreach ($exif as $name => $value) { + echo $name . ': ' . $value . '
'; + } + echo ''; + } + ?> \ No newline at end of file diff --git a/views/default/tidypics/forms/edit.php b/views/default/tidypics/forms/edit.php index cec1945f0..342ac8822 100644 --- a/views/default/tidypics/forms/edit.php +++ b/views/default/tidypics/forms/edit.php @@ -1,118 +1,118 @@ -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 { - $action = "tidypics/addalbum"; - $tags = ""; - $title = ""; - $body = ""; - if (defined('ACCESS_DEFAULT')) - $access_id = ACCESS_DEFAULT; - else - $access_id = 1; // logged_in by default - $subtype = 'album'; - - $title = $_SESSION['tidypicstitle']; - $body = $_SESSION['tidypicsbody']; - $tags = $_SESSION['tidypicstags']; - - unset($_SESSION['tidypicstitle']); - unset($_SESSION['tidypicsbody']); - unset($_SESSION['tidypicstags']); - } - - // group or individual - $container_guid = page_owner(); - -?> -
-
-

- - "tidypicstitle", "value" => $title,)); ?> -

- -

- - "tidypicsbody","value" => $body,)); ?> -

- -

- - "tidypicsbody","value" => $body,"class" => 'tidypics_caption_input')); ?> -

- -

- - "tidypicstags","value" => $tags,)); ?> -

- -container_guid; - - // should this image be the cover for the album - only ask for non-cover photos - // determine if it is already the cover - $img_guid = $vars['entity']->guid; - $album = get_entity($container_guid); - $cover_guid = $album->cover; - - if ($cover_guid != $img_guid) { - -?> -

- "cover", - 'options' => array(elgg_echo("album:cover")), - )); -?> -

- -

- - 'access_id','value' => $access_id)); ?> -

- - - - - - -

-
+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 { + $action = "tidypics/addalbum"; + $tags = ""; + $title = ""; + $body = ""; + if (defined('ACCESS_DEFAULT')) + $access_id = ACCESS_DEFAULT; + else + $access_id = 1; // logged_in by default + $subtype = 'album'; + + $title = $_SESSION['tidypicstitle']; + $body = $_SESSION['tidypicsbody']; + $tags = $_SESSION['tidypicstags']; + + unset($_SESSION['tidypicstitle']); + unset($_SESSION['tidypicsbody']); + unset($_SESSION['tidypicstags']); + } + + // group or individual + $container_guid = page_owner(); + +?> +
+
+

+ + "tidypicstitle", "value" => $title,)); ?> +

+ +

+ + "tidypicsbody","value" => $body,)); ?> +

+ +

+ + "tidypicsbody","value" => $body,"class" => 'tidypics_caption_input')); ?> +

+ +

+ + "tidypicstags","value" => $tags,)); ?> +

+ +container_guid; + + // should this image be the cover for the album - only ask for non-cover photos + // determine if it is already the cover + $img_guid = $vars['entity']->guid; + $album = get_entity($container_guid); + $cover_guid = $album->cover; + + if ($cover_guid != $img_guid) { + +?> +

+ "cover", + 'options' => array(elgg_echo("album:cover")), + )); +?> +

+ +

+ + 'access_id','value' => $access_id)); ?> +

+ + + + + + +

+
\ No newline at end of file diff --git a/views/default/tidypics/forms/edit_multi.php b/views/default/tidypics/forms/edit_multi.php index 4c4a111f5..4031b7968 100644 --- a/views/default/tidypics/forms/edit_multi.php +++ b/views/default/tidypics/forms/edit_multi.php @@ -1,58 +1,58 @@ - -
-
-cover) $no_cover = true; - - foreach ($file_array as $key => $file_guid){ - $entity = get_entity($file_guid); - $guid = $entity->guid; - $body = $entity->description; - $title = $entity->title; - $tags = $entity->tags; - $container_guid = $entity->container_guid; - - // first one is default cover if there isn't one already - if ($no_cover) { - $val = $guid; - $no_cover = false; - } - - echo '
'; - echo '' . $title . ''; - echo '
'; - echo '

'; - echo elgg_view("input/text", array("internalname" => "title[$key]", "value" => $title,)) . "\n"; - echo '

'; - echo '

"; - echo elgg_view("input/longtext",array("internalname" => "caption[$key]", "value" => $body, "class" => 'tidypics_caption_input',)) . "\n"; - echo "

"; - echo '

\n"; - echo elgg_view("input/tags", array( "internalname" => "tags[$key]","value" => $tags)) . "\n"; - echo '

'; - echo '' . "\n"; - echo elgg_view('input/securitytoken'); - - echo elgg_view("input/radio", array("internalname" => "cover", - "value" => $val, - 'options' => array( elgg_echo('album:cover') => $guid, - ), - )); - echo '
'; - echo '
'; - } - -?> - -

-
+ +
+
+cover) $no_cover = true; + + foreach ($file_array as $key => $file_guid){ + $entity = get_entity($file_guid); + $guid = $entity->guid; + $body = $entity->description; + $title = $entity->title; + $tags = $entity->tags; + $container_guid = $entity->container_guid; + + // first one is default cover if there isn't one already + if ($no_cover) { + $val = $guid; + $no_cover = false; + } + + echo '
'; + echo '' . $title . ''; + echo '
'; + echo '

'; + echo elgg_view("input/text", array("internalname" => "title[$key]", "value" => $title,)) . "\n"; + echo '

'; + echo '

"; + echo elgg_view("input/longtext",array("internalname" => "caption[$key]", "value" => $body, "class" => 'tidypics_caption_input',)) . "\n"; + echo "

"; + echo '

\n"; + echo elgg_view("input/tags", array( "internalname" => "tags[$key]","value" => $tags)) . "\n"; + echo '

'; + echo '' . "\n"; + echo elgg_view('input/securitytoken'); + + echo elgg_view("input/radio", array("internalname" => "cover", + "value" => $val, + 'options' => array( elgg_echo('album:cover') => $guid, + ), + )); + echo '
'; + echo '
'; + } + +?> + +

+
\ No newline at end of file diff --git a/views/default/tidypics/forms/settings.php b/views/default/tidypics/forms/settings.php index 6ab9dfcc9..6cfed661f 100644 --- a/views/default/tidypics/forms/settings.php +++ b/views/default/tidypics/forms/settings.php @@ -1,145 +1,145 @@ -version) { - set_plugin_setting('version', 1.62, 'tidypics'); - } - - if (extension_loaded('imagick')) - $img_lib_options['ImageMagickPHP'] = 'imagick PHP extension'; - - $disablefunc = explode(',', ini_get('disable_functions')); - if (is_callable('exec') && !in_array('exec',$disablefunc)) - $img_lib_options['ImageMagick'] = 'ImageMagick Cmdline'; - - $img_lib_options['GD'] = 'GD'; - - - // Image Library - $image_lib = $plugin->image_lib; - if (!$image_lib) $image_lib = 'GD'; - $form_body = '

' . elgg_echo('tidypics:settings:image_lib') . ': '; - $form_body .= elgg_view('input/pulldown', array( - 'internalname' => 'params[image_lib]', - 'options_values' => $img_lib_options, - 'value' => $image_lib - )); - $form_body .= '
Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.

'; - - if (is_callable('exec') && !in_array('exec',$disablefunc)) { - // Image Magick Path - $im_path = $plugin->im_path; - if(!$im_path) $im_path = "/usr/bin/"; - $form_body .= "

" . elgg_echo('tidypics:settings:im_path') . "
"; - $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "

"; - } - - // Tagging - $tagging = $plugin->tagging; - if(!$tagging) $tagging = "enabled"; - $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "

"; - - // Download Link - $download_link = $plugin->download_link; - if(!$download_link) $download_link = "enabled"; - $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "

"; - - // Ratings - $photo_ratings = $plugin->photo_ratings; - if(!$photo_ratings) $photo_ratings = "disabled"; - $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "

"; - - // Show EXIF - $exif = $plugin->exif; - if(!$exif) $exif = "disabled"; - $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "

"; - - // Show View count - $view_count = $plugin->view_count; - if(!$view_count) $view_count = "enabled"; - $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "

"; - - // Watermark Text - $form_body .= "

" . elgg_echo('tidypics:settings:watermark') . "
"; - $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "

"; - - // Max Image Size - $maxfilesize = $plugin->maxfilesize; - if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB - $form_body .= "

" . elgg_echo('tidypics:settings:maxfilesize') . "
"; - $form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "

"; - - // Quota Size - $quota = $plugin->quota; - if (!$quota) $quota = 0; - $form_body .= "

" . elgg_echo('tidypics:settings:quota') . "
"; - $form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "

"; - - // River Image options - $img_river_view = $plugin->img_river_view; - if (!$img_river_view) $img_river_view = '1'; - $form_body .= '

' . elgg_echo('tidypics:settings:img_river_view'); - $form_body .= elgg_view('input/pulldown', array( - 'internalname' => 'params[img_river_view]', - 'options_values' => array( - 'all' => 'all', - '1' => '1', - 'none' => 'none', - ), - 'value' => $img_river_view - )); - $form_body .= '

'; - - // River Album options - $album_river_view = $plugin->album_river_view; - if (!$album_river_view) $album_river_view = 'set'; - $form_body .= '

' . elgg_echo('tidypics:settings:album_river_view'); - $form_body .= elgg_view('input/pulldown', array( - 'internalname' => 'params[album_river_view]', - 'options_values' => array( - 'cover' => 'cover', - 'set' => 'set', - ), - 'value' => $album_river_view - )); - $form_body .= '

'; - - // Thumbnail sizes - $image_sizes = $plugin->image_sizes; - if(!$image_sizes) { - $image_sizes = array(); // set default values - $image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600; - $image_sizes['small_image_width'] = $image_sizes['small_image_height'] = 153; - $image_sizes['thumb_image_width'] = $image_sizes['thumb_image_height'] = 60; - } else { - $image_sizes = unserialize($image_sizes); - } - $form_body .= "

" . elgg_echo('tidypics:settings:largesize') . "
"; - $form_body .= 'width:    '; - $form_body .= 'height:

'; - $form_body .= "

" . elgg_echo('tidypics:settings:smallsize') . "
"; - $form_body .= 'width:    '; - $form_body .= 'height:

'; - $form_body .= "

" . elgg_echo('tidypics:settings:thumbsize') . "
"; - $form_body .= 'width:    '; - $form_body .= 'height:

'; - - - // Group permission override - $grp_perm_override = $plugin->grp_perm_override; - if(!$grp_perm_override) $grp_perm_override = "enabled"; - $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "

"; - - $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); - +version) { + set_plugin_setting('version', 1.62, 'tidypics'); + } + + if (extension_loaded('imagick')) + $img_lib_options['ImageMagickPHP'] = 'imagick PHP extension'; + + $disablefunc = explode(',', ini_get('disable_functions')); + if (is_callable('exec') && !in_array('exec',$disablefunc)) + $img_lib_options['ImageMagick'] = 'ImageMagick Cmdline'; + + $img_lib_options['GD'] = 'GD'; + + + // Image Library + $image_lib = $plugin->image_lib; + if (!$image_lib) $image_lib = 'GD'; + $form_body = '

' . elgg_echo('tidypics:settings:image_lib') . ': '; + $form_body .= elgg_view('input/pulldown', array( + 'internalname' => 'params[image_lib]', + 'options_values' => $img_lib_options, + 'value' => $image_lib + )); + $form_body .= '
Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.

'; + + if (is_callable('exec') && !in_array('exec',$disablefunc)) { + // Image Magick Path + $im_path = $plugin->im_path; + if(!$im_path) $im_path = "/usr/bin/"; + $form_body .= "

" . elgg_echo('tidypics:settings:im_path') . "
"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "

"; + } + + // Tagging + $tagging = $plugin->tagging; + if(!$tagging) $tagging = "enabled"; + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "

"; + + // Download Link + $download_link = $plugin->download_link; + if(!$download_link) $download_link = "enabled"; + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "

"; + + // Ratings + $photo_ratings = $plugin->photo_ratings; + if(!$photo_ratings) $photo_ratings = "disabled"; + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "

"; + + // Show EXIF + $exif = $plugin->exif; + if(!$exif) $exif = "disabled"; + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "

"; + + // Show View count + $view_count = $plugin->view_count; + if(!$view_count) $view_count = "enabled"; + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "

"; + + // Watermark Text + $form_body .= "

" . elgg_echo('tidypics:settings:watermark') . "
"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "

"; + + // Max Image Size + $maxfilesize = $plugin->maxfilesize; + if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB + $form_body .= "

" . elgg_echo('tidypics:settings:maxfilesize') . "
"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "

"; + + // Quota Size + $quota = $plugin->quota; + if (!$quota) $quota = 0; + $form_body .= "

" . elgg_echo('tidypics:settings:quota') . "
"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "

"; + + // River Image options + $img_river_view = $plugin->img_river_view; + if (!$img_river_view) $img_river_view = '1'; + $form_body .= '

' . elgg_echo('tidypics:settings:img_river_view'); + $form_body .= elgg_view('input/pulldown', array( + 'internalname' => 'params[img_river_view]', + 'options_values' => array( + 'all' => 'all', + '1' => '1', + 'none' => 'none', + ), + 'value' => $img_river_view + )); + $form_body .= '

'; + + // River Album options + $album_river_view = $plugin->album_river_view; + if (!$album_river_view) $album_river_view = 'set'; + $form_body .= '

' . elgg_echo('tidypics:settings:album_river_view'); + $form_body .= elgg_view('input/pulldown', array( + 'internalname' => 'params[album_river_view]', + 'options_values' => array( + 'cover' => 'cover', + 'set' => 'set', + ), + 'value' => $album_river_view + )); + $form_body .= '

'; + + // Thumbnail sizes + $image_sizes = $plugin->image_sizes; + if(!$image_sizes) { + $image_sizes = array(); // set default values + $image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600; + $image_sizes['small_image_width'] = $image_sizes['small_image_height'] = 153; + $image_sizes['thumb_image_width'] = $image_sizes['thumb_image_height'] = 60; + } else { + $image_sizes = unserialize($image_sizes); + } + $form_body .= "

" . elgg_echo('tidypics:settings:largesize') . "
"; + $form_body .= 'width:    '; + $form_body .= 'height:

'; + $form_body .= "

" . elgg_echo('tidypics:settings:smallsize') . "
"; + $form_body .= 'width:    '; + $form_body .= 'height:

'; + $form_body .= "

" . elgg_echo('tidypics:settings:thumbsize') . "
"; + $form_body .= 'width:    '; + $form_body .= 'height:

'; + + + // Group permission override + $grp_perm_override = $plugin->grp_perm_override; + if(!$grp_perm_override) $grp_perm_override = "enabled"; + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "

"; + + $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); + echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); diff --git a/views/default/tidypics/gallery.php b/views/default/tidypics/gallery.php index 29c706bb1..dd7c1cdcf 100644 --- a/views/default/tidypics/gallery.php +++ b/views/default/tidypics/gallery.php @@ -1,64 +1,64 @@ - 0 && $viewtypetoggle) { - $nav .= elgg_view('navigation/viewtype', array( - 'baseurl' => $baseurl, - 'offset' => $offset, - 'count' => $count, - 'viewtype' => $viewtype, - )); -} - -if ($pagination) { - $nav .= elgg_view('navigation/pagination',array( - 'baseurl' => $baseurl, - 'offset' => $offset, - 'count' => $count, - 'limit' => $limit, - )); -} - -$html .= $nav; -if ($viewtype == 'list') { - if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) { - $html .= elgg_view_entity($entity, $fullview); - } - } -} else { - if (is_array($entities) && sizeof($entities) > 0) { - $html .= elgg_view('entities/gallery', array('entities' => $entities)); - } -} - -$html .= '
'; - -if ($count) { - $html .= $nav; -} - + 0 && $viewtypetoggle) { + $nav .= elgg_view('navigation/viewtype', array( + 'baseurl' => $baseurl, + 'offset' => $offset, + 'count' => $count, + 'viewtype' => $viewtype, + )); +} + +if ($pagination) { + $nav .= elgg_view('navigation/pagination',array( + 'baseurl' => $baseurl, + 'offset' => $offset, + 'count' => $count, + 'limit' => $limit, + )); +} + +$html .= $nav; +if ($viewtype == 'list') { + if (is_array($entities) && sizeof($entities) > 0) { + foreach($entities as $entity) { + $html .= elgg_view_entity($entity, $fullview); + } + } +} else { + if (is_array($entities) && sizeof($entities) > 0) { + $html .= elgg_view('entities/gallery', array('entities' => $entities)); + } +} + +$html .= '
'; + +if ($count) { + $html .= $nav; +} + echo $html; \ No newline at end of file diff --git a/views/default/tidypics/groupprofile_albums.php b/views/default/tidypics/groupprofile_albums.php index 7f28705c7..a7e143ae9 100644 --- a/views/default/tidypics/groupprofile_albums.php +++ b/views/default/tidypics/groupprofile_albums.php @@ -1,15 +1,15 @@ -photos_enable != 'no') { - echo '
'; - echo '

' . elgg_echo('album:group') . '

'; - echo elgg_view('tidypics/albums', array('num_albums' => 5)); - echo '
'; -} +photos_enable != 'no') { + echo '
'; + echo '

' . elgg_echo('album:group') . '

'; + echo elgg_view('tidypics/albums', array('num_albums' => 5)); + echo '
'; +} ?> \ No newline at end of file diff --git a/views/default/tidypics/hover_menu.php b/views/default/tidypics/hover_menu.php index a36c4be17..240891f51 100644 --- a/views/default/tidypics/hover_menu.php +++ b/views/default/tidypics/hover_menu.php @@ -1,12 +1,12 @@ - - -

- + + +

+

\ No newline at end of file diff --git a/views/default/tidypics/image_menu.php b/views/default/tidypics/image_menu.php index 9e7a53969..983f900b4 100644 --- a/views/default/tidypics/image_menu.php +++ b/views/default/tidypics/image_menu.php @@ -1,51 +1,51 @@ -container_guid); - if ($container instanceof ElggGroup) { - $can_tag = $viewer && $container->isMember($viewer); - } else { - $can_tag = $viewer && $viewer->guid == $owner->guid || user_is_friend($owner->guid, $viewer->guid); - } - - // only owner and friends of owner can tag - if ($can_tag) { -?> -
  • -guid == $owner->guid) { -?> -
  • - -
  • -container_guid); + if ($container instanceof ElggGroup) { + $can_tag = $viewer && $container->isMember($viewer); + } else { + $can_tag = $viewer && $viewer->guid == $owner->guid || user_is_friend($owner->guid, $viewer->guid); + } + + // only owner and friends of owner can tag + if ($can_tag) { +?> +
  • +guid == $owner->guid) { +?> +
  • + +
  • + \ No newline at end of file diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php index 9ebec7c1e..ae3fa2b27 100644 --- a/views/default/tidypics/tagging.php +++ b/views/default/tidypics/tagging.php @@ -1,87 +1,87 @@ -getPhotoTags(); - - // defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags - $photo_tags_json = "\"\""; - if ($tag_info) { - $photo_tags_json = $tag_info['json']; - } - - if ($tag_info) { -?> -
    -

    - -
    - -
    -
    -
    -
    -
    -

    -"; - $content .= ""; - $content .= ""; - $content .= ""; - $content .= ""; - - $content .= "
    "; - - $content .= "
    "; - - echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'tidypics_phototag_form', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'method' => 'post', 'body' => $content)); - } - -?> -
    -
    -
    -

    -guid}' />"; - foreach ($tag_info['links'] as $id => $link) { - $text = htmlentities($link['text'], ENT_QUOTES, 'UTF-8'); - $content .= "
    "; - } - - $content .= ""; - $content .= ""; - - echo elgg_view('input/form', array('internalname' => 'phototag_deletetag_form', 'action' => "{$vars['url']}action/tidypics/deletetag", 'method' => 'post', 'body' => $content)); - - } - echo '
    '; // tidypics_delete_tag_menu - - echo elgg_view('js/tagging', array('photo_tags_json' => $photo_tags_json,) ); +getPhotoTags(); + + // defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags + $photo_tags_json = "\"\""; + if ($tag_info) { + $photo_tags_json = $tag_info['json']; + } + + if ($tag_info) { +?> +
    +

    + +
    + +
    +
    +
    +
    +
    +

    +"; + $content .= ""; + $content .= ""; + $content .= ""; + $content .= ""; + + $content .= "
    "; + + $content .= "
    "; + + echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'tidypics_phototag_form', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'method' => 'post', 'body' => $content)); + } + +?> +
    +
    +
    +

    +guid}' />"; + foreach ($tag_info['links'] as $id => $link) { + $text = htmlentities($link['text'], ENT_QUOTES, 'UTF-8'); + $content .= "
    "; + } + + $content .= ""; + $content .= ""; + + echo elgg_view('input/form', array('internalname' => 'phototag_deletetag_form', 'action' => "{$vars['url']}action/tidypics/deletetag", 'method' => 'post', 'body' => $content)); + + } + echo '
    '; // tidypics_delete_tag_menu + + echo elgg_view('js/tagging', array('photo_tags_json' => $photo_tags_json,) ); ?> \ No newline at end of file diff --git a/views/default/widgets/album_view/edit.php b/views/default/widgets/album_view/edit.php index 1fea6764a..992699cb0 100644 --- a/views/default/widgets/album_view/edit.php +++ b/views/default/widgets/album_view/edit.php @@ -1,24 +1,24 @@ -

    -num_display == '') $vars['entity']->num_display = 5; - -?> - +

    +num_display == '') $vars['entity']->num_display = 5; + +?> +

    \ No newline at end of file diff --git a/views/default/widgets/latest_photos/edit.php b/views/default/widgets/latest_photos/edit.php index 15a56af82..3b334d722 100644 --- a/views/default/widgets/latest_photos/edit.php +++ b/views/default/widgets/latest_photos/edit.php @@ -1,15 +1,15 @@ -

    -num_display == '') $vars['entity']->num_display = 6; - -?> - +

    +num_display == '') $vars['entity']->num_display = 6; + +?> +

    \ No newline at end of file -- cgit v1.2.3