From 872a5469da80557721e32b22e93af531c2a279fa Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 8 Feb 2011 12:42:12 +0000 Subject: cleaned up tagcloud plugin git-svn-id: http://code.elgg.org/elgg/trunk@8076 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/tagcloud/languages/de.php | 12 -------- mod/tagcloud/languages/en.php | 20 ++++++------- mod/tagcloud/manifest.xml | 8 ++--- mod/tagcloud/start.php | 6 ++-- mod/tagcloud/tagcloud.php | 24 --------------- mod/tagcloud/views/default/tagcloud/css.php | 6 ---- .../views/default/widgets/tagcloud/content.php | 8 +++-- .../views/default/widgets/tagcloud/edit.php | 35 ++++++++++++---------- 8 files changed, 39 insertions(+), 80 deletions(-) delete mode 100644 mod/tagcloud/languages/de.php delete mode 100644 mod/tagcloud/tagcloud.php delete mode 100644 mod/tagcloud/views/default/tagcloud/css.php (limited to 'mod/tagcloud') diff --git a/mod/tagcloud/languages/de.php b/mod/tagcloud/languages/de.php deleted file mode 100644 index 1192202b3..000000000 --- a/mod/tagcloud/languages/de.php +++ /dev/null @@ -1,12 +0,0 @@ - "Schlagworte", - "tagcloud:widget:description" => "Schlagworte", - "tagcloud:widget:notags" => "Anzahl anzeigen", - "item:object" => "Alle Einträge", - ); - - add_translation("de",$german); - -?> diff --git a/mod/tagcloud/languages/en.php b/mod/tagcloud/languages/en.php index 749a86434..f64e0553a 100644 --- a/mod/tagcloud/languages/en.php +++ b/mod/tagcloud/languages/en.php @@ -1,14 +1,12 @@ 'Tag Cloud', - 'tagcloud:site:title' => 'Site Tag Cloud', - 'tagcloud:widget:description' => 'Tag cloud', - 'tagcloud:widget:numtags' => 'Number of tags to show', - 'item:object' => 'Items', - 'advancedsearchtitle' => '%s with tags matching %s', - ); +$english = array( + 'tagcloud:widget:title' => 'Tag Cloud', + 'tagcloud:widget:description' => 'Tag cloud', + 'tagcloud:widget:numtags' => 'Number of tags to show', +); - add_translation('en',$english); - -?> +add_translation('en', $english); diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index 6338debaf..8966926c3 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -1,10 +1,10 @@ - + - - - + + + diff --git a/mod/tagcloud/start.php b/mod/tagcloud/start.php index 6e6df0445..663cec0e6 100644 --- a/mod/tagcloud/start.php +++ b/mod/tagcloud/start.php @@ -1,12 +1,10 @@ 0, - 'limit' => 100, - 'tag_name' => 'tags', -); -$tags = elgg_view_tagcloud($options); - -$params = array( - 'content' => $title . $tags, - 'sidebar' => $sidebar -); -$body = elgg_view_layout("one_sidebar", $params); - -echo elgg_view_page(elgg_echo('tagcloud:site:title', array($page_owner->name)), $body); \ No newline at end of file diff --git a/mod/tagcloud/views/default/tagcloud/css.php b/mod/tagcloud/views/default/tagcloud/css.php deleted file mode 100644 index 37f887075..000000000 --- a/mod/tagcloud/views/default/tagcloud/css.php +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/mod/tagcloud/views/default/widgets/tagcloud/content.php b/mod/tagcloud/views/default/widgets/tagcloud/content.php index 5ed71d66a..af1d6a5f6 100644 --- a/mod/tagcloud/views/default/widgets/tagcloud/content.php +++ b/mod/tagcloud/views/default/widgets/tagcloud/content.php @@ -1,10 +1,11 @@ num_items; -if (!isset($num_items)) { - $num_items = 30; -} +elgg_push_context('tags'); $options = array( 'owner_guid' => elgg_get_page_owner_guid(), 'threshold' => 1, @@ -12,3 +13,4 @@ $options = array( 'tag_name' => 'tags', ); echo elgg_view_tagcloud($options); +elgg_pop_context(); diff --git a/mod/tagcloud/views/default/widgets/tagcloud/edit.php b/mod/tagcloud/views/default/widgets/tagcloud/edit.php index b3b0f43ef..d860df549 100644 --- a/mod/tagcloud/views/default/widgets/tagcloud/edit.php +++ b/mod/tagcloud/views/default/widgets/tagcloud/edit.php @@ -1,20 +1,23 @@ -

-num_items)) { + $vars['entity']->num_items = 30; +} - $num_items = $vars['entity']->num_items; - if (!isset($num_items)) $num_items = 30; +$params = array( + 'internalname' => 'params[num_items]', + 'value' => $vars['entity']->num_items, + 'options' => array(10, 20, 30, 50, 100), +); +$dropdown = elgg_view('input/dropdown', $params); - echo elgg_echo('tagcloud:widget:numtags'); - - echo elgg_view('input/dropdown', array( - 'internalname' => 'params[num_items]', - 'options_values' => array( '10' => '10', - '20' => '20', - '30' => '30', - '50' => '50', - '100' => '100', - ), - 'value' => $num_items - )); ?> +

+ : +

-- cgit v1.2.3