diff options
Diffstat (limited to 'views/default/tidypics')
| -rw-r--r-- | views/default/tidypics/admin/imagelib.php | 62 | ||||
| -rw-r--r-- | views/default/tidypics/admin/settings.php | 25 | ||||
| -rw-r--r-- | views/default/tidypics/admin/stats.php | 35 | ||||
| -rw-r--r-- | views/default/tidypics/admin/thumbnails.php | 33 | ||||
| -rw-r--r-- | views/default/tidypics/admin/tidypics.php | 52 | ||||
| -rw-r--r-- | views/default/tidypics/albums.php | 51 | ||||
| -rw-r--r-- | views/default/tidypics/breadcrumbs.php | 22 | ||||
| -rw-r--r-- | views/default/tidypics/content_wrapper.php | 8 | ||||
| -rw-r--r-- | views/default/tidypics/css.php | 284 | ||||
| -rw-r--r-- | views/default/tidypics/exif.php | 14 | ||||
| -rw-r--r-- | views/default/tidypics/forms/edit.php | 118 | ||||
| -rw-r--r-- | views/default/tidypics/forms/edit_multi.php | 57 | ||||
| -rw-r--r-- | views/default/tidypics/forms/settings.php | 145 | ||||
| -rw-r--r-- | views/default/tidypics/forms/upload.php | 91 | ||||
| -rw-r--r-- | views/default/tidypics/groupprofile_albums.php | 15 | ||||
| -rw-r--r-- | views/default/tidypics/hover_menu.php | 12 | ||||
| -rw-r--r-- | views/default/tidypics/image_menu.php | 54 | ||||
| -rw-r--r-- | views/default/tidypics/tagging.php | 86 |
18 files changed, 0 insertions, 1164 deletions
diff --git a/views/default/tidypics/admin/imagelib.php b/views/default/tidypics/admin/imagelib.php deleted file mode 100644 index deb32d0f3..000000000 --- a/views/default/tidypics/admin/imagelib.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php
-
- $img_type = get_subtype_id('object', 'image');
- $query = "SELECT count(guid) as total from {$CONFIG->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');
-?>
-<br />
-<h3>Overview</h3>
-<p>
-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 <a href="http://www.php.net/manual/en/book.image.php">GD</a>,
-<a href="http://www.imagemagick.org/">ImageMagick</a> called via a system call, and the PHP extension
-<a href="http://pecl.php.net/package/imagick/">imagick</a>. 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.
-</p>
-<h3>Testing ImageMagick Commandline</h3>
-<p>
-To use the ImageMagick executables, PHP must be configured to allow calls to exec(). You can check our
-<a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/server_analysis.php'; ?>">server analysis page</a> 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.
-</p>
-<br />
-<p>
-<?php echo elgg_echo('tidypics:settings:im_path'); ?><br />
-<input name="im_location" type="text" />
-<input type="submit" value="Submit" onclick="TestImageMagickLocation();" />
-</p>
-<div id="im_results"></div>
-
-<script type="text/javascript">
-function TestImageMagickLocation()
-{
- var loc = $('input[name=im_location]').val();
- $("#im_results").html("");
- $.ajax({
- type: "GET",
- url: "<?php echo $CONFIG->wwwroot . 'mod/tidypics/actions/imtest.php'; ?>",
- data: {location: loc},
- cache: false,
- success: function(html){
- $("#im_results").html(html);
- }
- });
-}
-</script>
\ No newline at end of file diff --git a/views/default/tidypics/admin/settings.php b/views/default/tidypics/admin/settings.php deleted file mode 100644 index 1b449cfc7..000000000 --- a/views/default/tidypics/admin/settings.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php
-
- echo elgg_view('output/longtext', array('value' => 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;
-?>
-<p>
-<?php
- if ($upgrade) {
-?>
-<a href="<?php echo $upgrade_url; ?>">Upgrade</a><br />
-<?php
- }
-?>
-<a href="<?php echo $system_url; ?>">Run Server Analysis</a>
-</p>
-<?php
- echo elgg_view("tidypics/forms/settings");
-?>
\ No newline at end of file diff --git a/views/default/tidypics/admin/stats.php b/views/default/tidypics/admin/stats.php deleted file mode 100644 index 8de3415a1..000000000 --- a/views/default/tidypics/admin/stats.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php
-
- $img_type = get_subtype_id('object', 'image');
- $query = "SELECT count(guid) as total from {$CONFIG->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');
-?>
-<p>
-<br />
-Photos: <?php echo $num_images; ?><br />
-Albums: <?php echo $num_albums; ?><br />
-Comments on photos: <?php echo $num_comments_photos; ?><br />
-Comments on albums: <?php echo $num_comments_albums; ?><br />
-Total views: <?php echo $num_views; ?><br />
-<?php
- if ($num_tags) {
-?>
-Photo tags: <?php echo $num_tags; ?><br />
-<?php
- }
-?>
-</p>
\ No newline at end of file diff --git a/views/default/tidypics/admin/thumbnails.php b/views/default/tidypics/admin/thumbnails.php deleted file mode 100644 index 0af59090e..000000000 --- a/views/default/tidypics/admin/thumbnails.php +++ /dev/null @@ -1,33 +0,0 @@ -<br />
-<h3>Overview</h3>
-<p>
-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.
-</p>
-<h3>Thumbnail Creation</h3>
-<p>
-<b><?php echo elgg_echo('tidypics:settings:im_id'); ?></b>:
-<input name="image_id" type="text" />
-<input type="submit" value="Submit" onclick="TestThumbnailCreation();" />
-</p>
-<div id="im_results"></div>
-<script type="text/javascript">
-function TestThumbnailCreation()
-{
- var image_id = $('input[name=image_id]').val();
- $("#im_results").html("");
- $.ajax({
- type: "GET",
- url: "<?php echo $CONFIG->wwwroot . 'mod/tidypics/actions/create_thumbnails.php'; ?>",
- data: {guid: image_id},
- cache: false,
- success: function(html){
- $("#im_results").html(html);
- }
- });
-}
-</script>
\ No newline at end of file diff --git a/views/default/tidypics/admin/tidypics.php b/views/default/tidypics/admin/tidypics.php deleted file mode 100644 index 7aeb3a195..000000000 --- a/views/default/tidypics/admin/tidypics.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - - global $CONFIG; - - $tab = $vars['tab']; - - $settingsselect = ''; - $statsselect = ''; - $imagelibselect = ''; - $thumbnailselect = ''; - switch($tab) { - case 'settings': - $settingsselect = 'class="selected"'; - break; - case 'stats': - $statsselect = 'class="selected"'; - break; - case 'imagelib': - $imagelibselect = 'class="selected"'; - break; - case 'thumbnail': - $thumbnailselect = 'class="selected"'; - break; - } - -?> -<div class="contentWrapper"> - <div id="elgg_horizontal_tabbed_nav"> - <ul> - <li <?php echo $settingsselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=settings'; ?>"><?php echo elgg_echo('tidypics:settings'); ?></a></li> - <li <?php echo $statsselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=stats'; ?>"><?php echo elgg_echo('tidypics:stats'); ?></a></li> - <li <?php echo $imagelibselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=imagelib'; ?>"><?php echo elgg_echo('tidypics:settings:image_lib'); ?></a></li> - <li <?php echo $thumbnailselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=thumbnail'; ?>"><?php echo elgg_echo('tidypics:settings:thumbnail'); ?></a></li> - </ul> - </div> -<?php - switch($tab) { - case 'settings': - echo elgg_view("tidypics/admin/settings"); - break; - case 'stats': - echo elgg_view("tidypics/admin/stats"); - break; - case 'imagelib': - echo elgg_view("tidypics/admin/imagelib"); - break; - case 'thumbnail': - echo elgg_view("tidypics/admin/thumbnails"); - break; - } -?> -</div> diff --git a/views/default/tidypics/albums.php b/views/default/tidypics/albums.php deleted file mode 100644 index 9c75bf024..000000000 --- a/views/default/tidypics/albums.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php
-
- //the number of albums to display
- $number = (int)$vars['num_albums'];
- if (!$number)
- $number = 5;
-
- $owner = page_owner_entity();
- $owner_albums = get_entities("object", "album", page_owner(), "", $number, 0, false);
-
- echo '<div id="tidypics_album_widget_container">';
-
- if ($owner_albums) {
- foreach($owner_albums as $album) {
-
- if($album->cover)
- $album_cover = '<img src="'.$vars['url'].'mod/tidypics/thumbnail.php?file_guid='.$album->cover.'&size=small" class="tidypics_album_cover" alt="' . $album->title . '"/>';
- else
- $album_cover = '<img src="'.$vars['url'].'mod/tidypics/graphics/empty_album.png" class="tidypics_album_cover" alt="' . $album->title . '">';
-?>
- <div class="tidypics_album_widget_single_item">
- <div class="tidypics_album_widget_title"><a href="<?php echo $album->getURL();?>"><?php echo $album->title;?></a></div>
- <div class="tidypics_album_widget_timestamp"> <?php echo elgg_echo("album:created:on") . ' ' . friendly_time($album->time_created);?></div>
-<?php
- //get the number of comments
- $numcomments = elgg_count_comments($album);
- if ($numcomments)
- echo "<a href=\"{$album->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a><br>";
-?>
- <a href="<?php echo $album->getURL();?>"><?php echo $album_cover;?></a>
- </div>
-<?php
- } //end of foreach loop
-
- // bottom link to all group/user albums
- if (is_null($owner->username) || empty($owner->username)) {
- echo '<p class="profile_info_edit_buttons"><a href="' . $vars['url'] . 'pg/photos/world">' . elgg_echo('album:all') . '</a></p>';
- } else {
- echo '<p class="tidypics_download"><a href="' . $vars['url'] . 'pg/photos/owned/' . $owner->username . '">' . elgg_echo('album:more') . '</a></p>';
- }
-
- }
-
- if (can_write_to_container(0, $owner->guid)) {
- echo '<p class="tidypics_download"><a href=' . $CONFIG->wwwroot .'pg/photos/new/' . $owner->username . '>' . elgg_echo("album:create") . '</a></p>';
- }
-
-
- //close album_widget_container div
- echo "</div>";
-?>
\ No newline at end of file diff --git a/views/default/tidypics/breadcrumbs.php b/views/default/tidypics/breadcrumbs.php deleted file mode 100644 index 1a96e921c..000000000 --- a/views/default/tidypics/breadcrumbs.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php
- $file_guid = $vars['file_guid'];
- $page_owner = page_owner_entity();
-
- $first_level_text = '';
- $first_level_link = $CONFIG->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);
-?>
-<a href="<?php echo $first_level_link; ?>"><?php echo $first_level_text; ?></a>
-<?php
- $second_level_text = '';
- if (isset($vars['album'])) {
- $second_level_text = $vars['album']->title;
- $second_level_link = $vars['album']->getURL();
-?>
->> <a href="<?php echo $second_level_link; ?>"><?php echo $second_level_text; ?></a>
-<?php
- }
-?>
diff --git a/views/default/tidypics/content_wrapper.php b/views/default/tidypics/content_wrapper.php deleted file mode 100644 index 08fd74aff..000000000 --- a/views/default/tidypics/content_wrapper.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - echo elgg_view_title($vars['title']); -?> -<div class="contentWrapper"> -<?php - echo $vars['content']; -?> -</div>
\ No newline at end of file diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php deleted file mode 100644 index b65d73789..000000000 --- a/views/default/tidypics/css.php +++ /dev/null @@ -1,284 +0,0 @@ -<?php - /** - * tidypics CSS extender - */ -?> -/* ---- tidypics object views ---- */ - -#tidypics_wrapper { -} - -#tidypics_breadcrumbs { -margin:5px 0 15px 0; -font-size:80%; -} - -#tidypics_desc { -padding:0 20px; -font-style:italic; -} - -#tidypics_image_nav { -text-align:center; -} - -#tidypics_image_wrapper { -margin:10px 0 10px 0; -text-align:center; -} - -#tidypics_image { -border:1px solid #dedede; -padding:5px; -} - -#tidypics_image_nav ul li { -display:inline; -margin-right:15px; -} - -#tidypics_controls { -text-align:center; -margin-bottom:10px; -} - -#tidypics_controls a { -margin:10px; -} - -#tidypics_controls ul { -list-style:none; -margin:0px; -padding:8px; -} - -#tidypics_controls ul li { -padding:2px 10px 2px 22px; -margin:2px 0px; -display:inline; -} - -.tidypics_info { -padding:20px; -} - -#tidypics_exif { -padding-left:20px; -font-size:80%; -} - -.tidypics_album_images { -float:left; -width:153px; -height:153px; -margin:3px; -padding:4px; -border:1px solid #dedede; -text-align:center; -} - -.tidypics_album_cover { -padding:2px; -border:1px solid #dedede; -margin:8px 0; -} - -.tidypics_album_widget_single_item { -margin-bottom:8px; -} - -.tidypics_album_gallery_item { -text-align:center; -} - -.tidypics_popup { -border:1px solid #3B5999; -width:200px; -position:absolute; -z-index:10000; -display:none; -background:#ffffff; -padding:10px; -font-size:12px; -text-align:left; -} - -/* ------ tidypics widget view ------ */ - -#tidypics_album_widget_container { -text-align:center; -} - -.tidypics_album_widget_timestamp { -color:#333333; -} - -.tidypics_widget_latest { -margin: 0 auto; -width: 208px; -} - -/* --------- image upload/edit forms ------------ */ - -#tidpics_image_upload_list li { -margin:3px 0; -} - -.tidypics_edit_image_container { -padding:5px; -margin:5px 0; -overflow:auto; -} - -.tidypics_edit_images { -float:right; -width:160px; -height:160px; -margin:4px; -padding:5px; -border:1px solid #dedede; -text-align:center; -} - -.tidypics_image_info { -float:left; -width:60%; -} - -.tidypics_image_info label { -font-size:1em; -} - -.tidypics_caption_input { - width:98%; - height:100px; -} - -/* ---- tidypics group css ----- */ - -#tidypics_group_profile { --webkit-border-radius: 8px; --moz-border-radius: 8px; -background:white none repeat scroll 0 0; -margin:0 0 20px; -padding:0 0 5px; -} - - -/* --------- tidypics river items ------------ */ - -.river_object_image_create { - background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_image.gif) no-repeat left -1px; -} -.river_object_album_create { - background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_album.gif) no-repeat left -1px; -} -.river_object_image_comment { - background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; -} -.river_object_album_comment { - background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; -} -.river_user_tag { - background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_tag.gif) no-repeat left -1px; -} - -/* ----------- tagging ---------------- */ -#tidypics_tag_instructions { -background:#BBDAF7; -border:1px solid #4690D6; -padding:10px; -height:25px; -min-width:360px; -display:none; -overflow:hidden; -position:absolute; -z-index:10000; --webkit-border-radius: 8px; --moz-border-radius: 8px; -} - -#tidypics_tag_instruct_text { -padding-top: 3px; -float: left; -} - -#tidypics_tag_instruct_button_div { -float: left; -margin-left: 15px; -} - -#tidypics_tag_instruct_button { -margin:0; -} - -#tidypics_tag_menu { -width:240px; -max-height:400px; -overflow:hidden; --webkit-border-radius: 8px; --moz-border-radius: 8px; -} - -.tidypics_popup_header { -width:100%; -margin-bottom:10px; -} - - -#tidypics_tagmenu_left { -width:175px; -float:left; -} - -#tidypics_tagmenu_right { -float:left; -} - -#tidypics_tagmenu_right .submit_button { -margin-top:2px; -} - -#tidypics_delete_tag_menu { --webkit-border-radius: 8px; --moz-border-radius: 8px; -overflow:hidden; -} - -.tidypics_tag { -display:none; -background:url(<?php echo $vars['url']; ?>mod/tidypics/graphics/spacer.gif); -border:2px solid #ffffff; -overflow:hidden; -position:absolute; -z-index:0; -} - -.tidypics_tag_text { -display:none; -overflow:hidden; -position:absolute; -z-index:0; -text-align:center; -background:#BBDAF7; -border:1px solid #3B5999; --webkit-border-radius:3px; --moz-border-radius:3px; -padding:1px; -} - -#tidypics_phototags_list { -padding:0 20px 0 20px; -} - -#tidypics_phototags_list ul { -list-style:none; -margin:0px; -padding:8px; -} - -#tidypics_phototags_list ul li { -padding-right:10px; -margin:2px 0px; -display:inline; -} diff --git a/views/default/tidypics/exif.php b/views/default/tidypics/exif.php deleted file mode 100644 index 525665754..000000000 --- a/views/default/tidypics/exif.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php
-
- $guid = $vars['guid'];
-
- $exif = tp_exif_formatted($guid);
- if ($exif) {
- echo '<div id="tidypics_exif">';
- foreach ($exif as $name => $value) {
- echo $name . ': ' . $value . '<br />';
- }
- echo '</div>';
- }
-
-?>
\ No newline at end of file diff --git a/views/default/tidypics/forms/edit.php b/views/default/tidypics/forms/edit.php deleted file mode 100644 index cec1945f0..000000000 --- a/views/default/tidypics/forms/edit.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php
- /**
- * Tidypics images edit/add form
- * This form is used to:
- * - create albums
- * - edit albums
- * - edit images
- */
-
- //set stuff if we are editing existing album or image
- if (isset($vars['entity'])) {
- $action = "tidypics/edit";
- $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 {
- $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();
-
-?>
-<div class="contentWrapper">
- <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
- <p>
- <label><?php echo elgg_echo('album:title'); ?></label>
- <?php echo elgg_view("input/text", array("internalname" => "tidypicstitle", "value" => $title,)); ?>
- </p>
-<?php
- if ($subtype == 'album') {
-?>
- <p>
- <label><?php echo elgg_echo('album:desc'); ?></label>
- <?php echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,)); ?>
- </p>
-<?php
- } else {
-?>
- <p>
- <label><?php echo elgg_echo('caption'); ?></label>
- <?php echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,"class" => 'tidypics_caption_input')); ?>
- </p>
-<?php
- }
-?>
- <p>
- <label><?php echo elgg_echo("tags"); ?></label>
- <?php echo elgg_view("input/tags", array( "internalname" => "tidypicstags","value" => $tags,)); ?>
- </p>
-
-<?php
- if ($subtype == 'image') {
- $container_guid = $vars['entity']->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) {
-
-?>
- <p>
-<?php echo elgg_view('input/checkboxes', array('internalname' => "cover",
- 'options' => array(elgg_echo("album:cover")),
- ));
-?>
- </p>
-<?php
- }
-
- } else {
- // album so display access control
-?>
- <p>
- <label><?php echo elgg_echo('access'); ?></label>
- <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
- </p>
-
-<?php
- }
-
- if (isset($vars['entity'])) {
-?>
- <input type="hidden" name="guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
-<?php
- }
-
- echo elgg_view('input/securitytoken');
-?>
- <input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" />
- <input type="hidden" name="subtype" value="<?php echo $subtype; ?>" />
- <p><input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" /></p>
- </form>
-</div>
\ No newline at end of file diff --git a/views/default/tidypics/forms/edit_multi.php b/views/default/tidypics/forms/edit_multi.php deleted file mode 100644 index 634c343bb..000000000 --- a/views/default/tidypics/forms/edit_multi.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php
- /**
- * form for mass editing all uploaded images
- */
-?>
-<div class="contentWrapper">
-<form action="<?php echo $vars['url']; ?>action/tidypics/edit_multi" method="post">
-<?php
-
- $file_array = $vars['file_array'];
-
- // make sure one of the images becomes the cover if there isn't one already
- $album_entity = get_entity($vars['album_guid']);
- if (!$album_entity->cover) $no_cover = true;
-
- foreach ($file_array as $key => $file_guid){
- $entity = get_entity($file_guid);
- $guid = $entity->guid;
- $body = $entity->description;
- $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 '<div class="tidypics_edit_image_container">';
- echo '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $guid . '&size=small" class="tidypics_edit_images" alt="' . $title . '"/>';
- echo '<div class="tidypics_image_info">';
- echo '<p><label>' . elgg_echo('album:title') . '</label>';
- echo elgg_view("input/text", array("internalname" => "title[$key]", "value" => $title,)) . "\n";
- echo '</p>';
- echo '<p><label>' . elgg_echo('caption') . "</label>";
- echo elgg_view("input/longtext",array("internalname" => "caption[$key]", "value" => $body, "class" => 'tidypics_caption_input',)) . "\n";
- echo "</p>";
- echo '<p><label>' . elgg_echo("tags") . "</label>\n";
- echo elgg_view("input/tags", array( "internalname" => "tags[$key]","value" => $tags)) . "\n";
- echo '</p>';
- echo '<input type="hidden" name="image_guid[' .$key. ']" value="'. $guid .'">' . "\n";
- echo elgg_view('input/securitytoken');
-
- echo elgg_view("input/radio", array("internalname" => "cover",
- "value" => $val,
- 'options' => array( elgg_echo('album:cover') => $guid,
- ),
- ));
- echo '</div>';
- echo '</div>';
- }
-
-?>
-<input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" />
-<p><input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" /></p>
-</form>
-</div>
\ No newline at end of file diff --git a/views/default/tidypics/forms/settings.php b/views/default/tidypics/forms/settings.php deleted file mode 100644 index 6ab9dfcc9..000000000 --- a/views/default/tidypics/forms/settings.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php
- /**
- * Tidypics admin settings form
- */
-
-
-
- $action = $vars['url'] . 'action/tidypics/settings';
-
- $plugin = find_plugin_settings('tidypics');
-
-
- // bootstrap the plugin version here for now
- if (!$plugin->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 = '<p>' . 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 .= '<br/>Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.</p>';
-
- 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 .= "<p>" . elgg_echo('tidypics:settings:im_path') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "</p>";
- }
-
- // Tagging
- $tagging = $plugin->tagging;
- if(!$tagging) $tagging = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "</p>";
-
- // Download Link
- $download_link = $plugin->download_link;
- if(!$download_link) $download_link = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "</p>";
-
- // Ratings
- $photo_ratings = $plugin->photo_ratings;
- if(!$photo_ratings) $photo_ratings = "disabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "</p>";
-
- // Show EXIF
- $exif = $plugin->exif;
- if(!$exif) $exif = "disabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "</p>";
-
- // Show View count
- $view_count = $plugin->view_count;
- if(!$view_count) $view_count = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "</p>";
- - // Watermark Text
- $form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>";
- - // Max Image Size
- $maxfilesize = $plugin->maxfilesize;
- if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB
- $form_body .= "<p>" . elgg_echo('tidypics:settings:maxfilesize') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "</p>";
-
- // Quota Size
- $quota = $plugin->quota;
- if (!$quota) $quota = 0;
- $form_body .= "<p>" . elgg_echo('tidypics:settings:quota') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "</p>";
-
- // River Image options
- $img_river_view = $plugin->img_river_view;
- if (!$img_river_view) $img_river_view = '1';
- $form_body .= '<p>' . 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 .= '</p>';
-
- // River Album options
- $album_river_view = $plugin->album_river_view;
- if (!$album_river_view) $album_river_view = 'set';
- $form_body .= '<p>' . 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 .= '</p>';
-
- // 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 .= "<p>" . elgg_echo('tidypics:settings:largesize') . "<br />";
- $form_body .= 'width: <input style="width: 20%;" type="text" name="large_thumb_width" value=' . "\"{$image_sizes['large_image_width']}\"" . ' class="input-text" /> ';
- $form_body .= 'height: <input style="width: 20%;" type="text" name="large_thumb_height" value=' . "\"{$image_sizes['large_image_height']}\"" . ' class="input-text" /></p>';
- $form_body .= "<p>" . elgg_echo('tidypics:settings:smallsize') . "<br />";
- $form_body .= 'width: <input style="width: 20%;" type="text" name="small_thumb_width" value=' . "\"{$image_sizes['small_image_width']}\"" . ' class="input-text" /> ';
- $form_body .= 'height: <input style="width: 20%;" type="text" name="small_thumb_height" value=' . "\"{$image_sizes['small_image_height']}\"" . ' class="input-text" /></p>';
- $form_body .= "<p>" . elgg_echo('tidypics:settings:thumbsize') . "<br />";
- $form_body .= 'width: <input style="width: 20%;" type="text" name="thumb_width" value=' . "\"{$image_sizes['thumb_image_width']}\"" . ' class="input-text" /> ';
- $form_body .= 'height: <input style="width: 20%;" type="text" name="thumb_height" value=' . "\"{$image_sizes['thumb_image_height']}\"" . ' class="input-text" /></p>';
-
-
- // Group permission override
- $grp_perm_override = $plugin->grp_perm_override;
- if(!$grp_perm_override) $grp_perm_override = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "</p>";
-
- $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/forms/upload.php b/views/default/tidypics/forms/upload.php deleted file mode 100644 index 522a51c4b..000000000 --- a/views/default/tidypics/forms/upload.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - global $CONFIG; - - //this is for image uploads only. Image edits are handled by edit.php form - - $container_guid = get_input('container_guid'); - $album = get_entity($vars['album']); - $access_id = $album->access_id; - - $maxfilesize = (float) get_plugin_setting('maxfilesize','tidypics'); - if (!$maxfilesize) - $maxfilesize = 5; - - $quota = get_plugin_setting('quota','tidypics'); - if ($quota) { - $image_repo_size_md = get_metadata_byname($album->container_guid, "image_repo_size"); - $image_repo_size = (int)$image_repo_size_md->value; - $image_repo_size = round($image_repo_size / 1024 / 1024); - if ($image_repo_size > $quota) - $image_repo_size = $quota; - } - -?> -<div id="tidypics_ref"></div> -<div class="contentWrapper"> -<?php - ob_start(); -?> -<p style="line-height:1.6em;"> - <label><?php echo elgg_echo("images:upload"); ?></label><br /> - <i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br /> -<?php - if ($quota) { -?> - <i><?php echo elgg_echo("tidypics:quota") . ' ' . $image_repo_size . '/' . $quota . ' MB'; ?></i><br /> -<?php - } -?> - <div class="tidypics_popup"> - Uploading images<br /> - <div style="margin:20px 0px 20px 80px;"><img id="progress" alt="..." border="0" src="<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>" /></div> - </div> - <ol id="tidypics_image_upload_list"> -<?php - for ($x = 0; $x < 10; $x++) { - echo '<li>' . elgg_view("input/file",array('internalname' => "upload_$x")) . '</li>'; - } -?> - </ol> -</p> -<p> -<?php - if ($container_guid) - echo '<input type="hidden" name="container_guid" value="' . $container_guid . '" />'; - if ($access_id) - echo '<input type="hidden" name="access_id" value="' . $access_id . '" />'; -?> - <input type="submit" value="<?php echo elgg_echo("save"); ?>" onclick="displayProgress();" /> -</p> -<?php - $form_body = ob_get_clean(); - - echo elgg_view('input/form', array( 'action' => "{$vars['url']}action/tidypics/upload", - 'body' => $form_body, - 'internalid' => 'tidypicsUpload', - 'enctype' => 'multipart/form-data', - 'method' => 'post',)); -?> -</div> -<script type="text/javascript"> - - function displayProgress() - { - offsetY = 60; - offsetX = 120; - - divWidth = $('#tidypics_ref').width(); - imgOffset = $('#tidypics_ref').offset(); - imgWidth = $('#tidypics_ref').width(); - - _top = imgOffset.top + offsetY; - _left = imgOffset.left + offsetX; - - $('.tidypics_popup').show().css({ - "top": _top + "px", - "left": _left + "px" - }); - - setTimeout('document.images["progress"].src = "<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>"', 200); - } -</script>
\ No newline at end of file diff --git a/views/default/tidypics/groupprofile_albums.php b/views/default/tidypics/groupprofile_albums.php deleted file mode 100644 index 7f28705c7..000000000 --- a/views/default/tidypics/groupprofile_albums.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php
-
-/***********************************************
- *
- * This is used on the group profile page
- *
- ***********************************************/
-
-if ($vars['entity']->photos_enable != 'no') {
- echo '<div id="tidypics_group_profile">';
- echo '<h2>' . elgg_echo('album:group') . '</h2>';
- echo elgg_view('tidypics/albums', array('num_albums' => 5));
- echo '</div>';
-}
-?>
\ No newline at end of file diff --git a/views/default/tidypics/hover_menu.php b/views/default/tidypics/hover_menu.php deleted file mode 100644 index a36c4be17..000000000 --- a/views/default/tidypics/hover_menu.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php
-
- /**
- * Elgg hoverover extender for tidypics
- *
- */
-
-?>
-
- <p class="user_menu_file <?php if(get_context() == 'photos') echo 'profile_select';?>">
- <a href="<?php echo $vars['url']; ?>pg/photos/owned/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("albums"); ?></a>
- </p>
\ No newline at end of file diff --git a/views/default/tidypics/image_menu.php b/views/default/tidypics/image_menu.php deleted file mode 100644 index cb004395e..000000000 --- a/views/default/tidypics/image_menu.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php
-
- /**************************************************************************
- *
- * Tidypics Image Menu
- *
- * This is the menu that appears below an image. Admins can override the
- * menu with a different view to provide a look and feel that matches
- * their themes. The view can be extended to provide additional controls.
- *
- **************************************************************************/
-
- $image_guid = $vars['image_guid'];
- $viewer = $vars['viewer'];
- $owner = $vars['owner'];
- $anytags = $vars['anytags'];
- $album = $vars['album'];
-
- if (get_plugin_setting('tagging', 'tidypics') != "disabled") {
-
- $can_tag = false;
-
- $container = get_entity($album->container_guid);
- if ($container instanceof ElggGroup) {
- $can_tag = $viewer && $container->isMember($viewer);
- } else {
- $can_tag = $viewer && $viewer->guid == $owner->guid || user_is_friend($owner->guid, $viewer->guid);
- }
-
- // only owner and friends of owner can tag
- if ($can_tag) {
-?>
-<li id="start_tagging"><a id="tidypics_tag_control" href="javascript:void(0)" onclick="startTagging()"><?= elgg_echo('tidypics:tagthisphoto') ?></a></li>
-<?php
- }
-
- // only owner can delete tags
- if ($anytags && $viewer && $viewer->guid == $owner->guid) {
-?>
-<li id="delete_tags"><a href="javascript:void(0)" onclick="deleteTags()"><?= elgg_echo('tidypics:deletetag') ?></a></li>
-<?php
- }
- }
-
- if (get_plugin_setting('download_link', 'tidypics') != "disabled") {
- $ts = time();
- $token = generate_action_token($ts);
-
- $download_url = $vars['url'] . "action/tidypics/download?file_guid=" . $image_guid . "&__elgg_token={$token}&__elgg_ts={$ts}";
-?>
-<li id="download_image"><a href="<?php echo $download_url; ?>"><?php echo elgg_echo("image:download"); ?></a></li>
-<?php
- }
-?>
\ No newline at end of file diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php deleted file mode 100644 index ed33c4702..000000000 --- a/views/default/tidypics/tagging.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php
-
- $image = $vars['image'];
- $viewer = $vars['viewer'];
- $owner = $vars['owner'];
-
- // get photo tags
- $tag_info = $image->getPhotoTags();
-
- // defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags
- $photo_tags_json = "\"\"";
- if ($tag_info) {
- $photo_tags_json = $tag_info['json'];
- }
-
- if ($tag_info) {
-?>
-<div id="tidypics_phototags_list">
- <h3><?php echo elgg_echo('tidypics:inthisphoto') ?></h3>
- <ul>
-<?php
- foreach ($tag_info['links'] as $id=>$link) {
- echo "<li><a class='tidypics_phototag_links' id='taglink{$id}' href='{$link['url']}'>{$link['text']}</a></li>";
- }
-?>
- </ul>
-</div>
-<?php
- }
-?>
-<div id='tidypics_tag_instructions'>
- <div id='tidypics_tag_instruct_text'><?php echo elgg_echo('tidypics:taginstruct'); ?></div>
- <div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'><?php echo elgg_echo('tidypics:finish_tagging'); ?></button></div>
-</div>
-<div id="tidypics_tag_menu" class="tidypics_popup">
- <div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:tagthisphoto'); ?></h3></div>
-<?php
-
- if ($viewer) {
-
- $people_list = tp_get_tag_list($viewer);
-
- $content = "<div id='tidypics_tagmenu_left'>";
- $content .= "<input type='hidden' name='image_guid' value='{$image->guid}' />";
- $content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
- $content .= "<input type='hidden' name='user_id' id='user_id' value='' />";
- $content .= "<input type='hidden' name='word' id='word' value='' />";
-
- $content .= "<ul id='tidypics_phototag_list'>";
- $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
-
- if ($people_list) {
- foreach($people_list as $friend_guid => $friend_name) {
- $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$friend_guid}, \"{$friend_name}\")'>{$friend_name}</a></li>";
- }
- }
-
- $content .= "</ul></div>";
-
- $content .= "<div id='tidypics_tagmenu_right'><input type='submit' value='" . elgg_echo('tidypics:actiontag') . "' class='submit_button' /></div>";
-
- echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'tidypics_phototag_form', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'method' => 'post', 'body' => $content));
- }
-
-?>
-</div>
-<div id="tidypics_delete_tag_menu" class="tidypics_popup">
-<div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:deltag_title'); ?></h3></div>
-<?php
- if ($tag_info) {
- $content = "<input type='hidden' name='image_guid' value='{$image->guid}' />";
- foreach ($tag_info['links'] as $id => $link) {
- $name = "tags[{$id}]";
- $content .= elgg_view("input/checkboxes", array('options' => array($link['text'] => $link['text']), 'internalname' => $name, 'value' => '' ));
- }
-
- $content .= "<input type='submit' value='" . elgg_echo('tidypics:actiondelete') . "' class='submit_button' />";
- $content .= "<input type='button' value='" . elgg_echo('cancel') . "' class='cancel_button' onclick='hideDeleteMenu();' />";
-
- echo elgg_view('input/form', array('internalname' => 'phototag_deletetag_form', 'action' => "{$vars['url']}action/tidypics/deletetag", 'method' => 'post', 'body' => $content));
-
- }
- echo '</div>'; // tidypics_delete_tag_menu
-
- echo elgg_view('js/tagging', array('photo_tags_json' => $photo_tags_json,) );
-?>
\ No newline at end of file |
