aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2012-01-02 12:45:16 -0500
committercash <cash.costello@gmail.com>2012-01-02 12:45:16 -0500
commit20ab73de5248b3418bbbad27850e3d3e093c473c (patch)
treecf15a58ad857fbaa4f9b2521c5a7d17ed619f303 /start.php
parent86535f77d6b32a2c8a403609ded299a76c73bba0 (diff)
downloadelgg-20ab73de5248b3418bbbad27850e3d3e093c473c.tar.gz
elgg-20ab73de5248b3418bbbad27850e3d3e093c473c.tar.bz2
added photo tagging - but not displaying or deleting tags yet
Diffstat (limited to 'start.php')
-rw-r--r--start.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/start.php b/start.php
index 5638037cc..a81c1d854 100644
--- a/start.php
+++ b/start.php
@@ -34,6 +34,9 @@ function tidypics_init() {
$js = elgg_get_simplecache_url('js', 'photos/tidypics');
elgg_register_simplecache_view('js/photos/tidypics');
elgg_register_js('tidypics', $js, 'footer');
+ $js = elgg_get_simplecache_url('js', 'photos/tagging');
+ elgg_register_simplecache_view('js/photos/tagging');
+ elgg_register_js('tidypics:tagging', $js, 'footer');
elgg_register_js('tidypics:slideshow', 'mod/tidypics/vendors/PicLensLite/piclens_optimized.js', 'footer');
// Add photos link to owner block/hover menus
@@ -93,7 +96,7 @@ function tidypics_init() {
//register_action("tidypics/ajax_upload", true, "$base_dir/ajax_upload.php");
//register_action("tidypics/ajax_upload_complete", true, "$base_dir/ajax_upload_complete.php");
//register_action("tidypics/sortalbum", false, "$base_dir/sortalbum.php");
- //register_action("tidypics/addtag", false, "$base_dir/addtag.php");
+ elgg_register_action("photos/image/tag", "$base_dir/image/tag.php");
//register_action("tidypics/deletetag", false, "$base_dir/deletetag.php");
elgg_register_action("photos/admin/settings", "$base_dir/admin/settings.php", 'admin');
@@ -284,15 +287,27 @@ function tidypics_entity_menu_setup($hook, $type, $return, $params) {
if (elgg_instanceof($entity, 'object', 'image')) {
if (elgg_get_plugin_setting('view_count', 'tidypics')) {
$view_info = $entity->getViewInfo();
- $status_text = (int)$view_info['total'] . ' views';
+ $text = elgg_echo('tidypics:views', array((int)$view_info['total']));
$options = array(
- 'name' => 'published_status',
- 'text' => "<span>$status_text</span>",
+ 'name' => 'views',
+ 'text' => "<span>$text</span>",
'href' => false,
'priority' => 90,
);
$return[] = ElggMenuItem::factory($options);
}
+
+ if (elgg_get_plugin_setting('tagging', 'tidypics')) {
+ $options = array(
+ 'name' => 'tagging',
+ 'text' => elgg_echo('tidypics:actiontag'),
+ 'href' => '#',
+ 'title' => elgg_echo('tidypics:tagthisphoto'),
+ 'rel' => 'photo-tagging',
+ 'priority' => 80,
+ );
+ $return[] = ElggMenuItem::factory($options);
+ }
}
if (elgg_instanceof($entity, 'object', 'album')) {