From 08023eb0993eb63aac96669afd01beae7e134964 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 2 Jul 2013 21:04:46 -0700 Subject: tag cloud feature (enable the feature, then it will show up on your channel page) --- include/features.php | 1 + include/taxonomy.php | 8 ++++--- mod/channel.php | 3 +++ view/theme/redbasic/css/style.css | 48 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/include/features.php b/include/features.php index c2aabbc42..da1322a14 100644 --- a/include/features.php +++ b/include/features.php @@ -58,6 +58,7 @@ function get_features() { array('filing', t('Saved Folders'), t('Ability to file posts under folders')), array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments')), array('star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator')), + array('tagadelic', t('Tag Cloud'), t('Provide a personal tag cloud on your channel page')), ), ); diff --git a/include/taxonomy.php b/include/taxonomy.php index 7e9a4c856..0ebda2b1c 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -146,14 +146,16 @@ function tags_sort($a,$b) { function tagblock($link,$uid,$count = 0,$type = TERM_HASHTAG) { + $o = ''; $tab = 0; $r = tagadelic($uid,$count,$type); if($r) { - echo '
'; + $o = '

' . t('Tags') . '

'; foreach($r as $rr) { - echo ''.$rr[0].' '; + $o .= ''.$rr[0].' ' . "\r\n"; } - echo '
'; + $o .= '
'; } + return $o; } diff --git a/mod/channel.php b/mod/channel.php index 1442070a9..d1d9fd90f 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -47,6 +47,9 @@ function channel_aside(&$a) { $a->set_widget('archive',posted_date_widget($a->get_baseurl(true) . '/channel/' . $a->profile['channel_address'],$a->profile['profile_uid'],true)); $a->set_widget('categories',categories_widget($a->get_baseurl(true) . '/channel/' . $a->profile['channel_address'],$cat)); } + if(feature_enabled($a->profile['profile_uid'],'tagadelic')) + $a->set_widget('tagcloud',tagblock('search',$a->profile['profile_uid'])); + } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 38eea5b94..b1509c34f 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -3833,3 +3833,51 @@ span.mail-date { float:left; width: 200px; } + + +.tag1 { + font-size : 1.0em !important; + } +.tag2 { + font-size : 1.2em !important; + } + + +.tag3 { + font-size : 1.4em !important; + } + + +.tag4 { + font-size : 1.6em !important; + } + + +.tag5 { + font-size : 1.8em !important; + } + + +.tag6 { + font-size : 2.0em !important; + } + + +.tag7 { + font-size : 2.2em !important; + } + + +.tag8 { + font-size : 2.4em !important; + } + + +.tag9 { + font-size : 2.6em !important; + } + + +.tag10 { + font-size : 2.8em !important; + } -- cgit v1.2.3