Extending the Habari Sidebar

Habari’s sidebar (in K2) is very minimal. The following plug-ins provide much needed site-navigation:

Fluffytag shows a fluffy cloud of tags.
monthly_archives shows archives grouped by month.

To display output from both plug-ins, make the following changes to sidebar.php:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

*** system/themes/k2/sidebar.php 2010-06-21 22:15:10.587118909 +0800
--- user/themes/k2/sidebar.php 2010-06-26 14:52:35.928366633 +0800
***************
*** 13,18 ****
--- 13,28 ----

<?php $theme->area( 'sidebar' ); ?>

+ <div class="sb-archives">
+ <h2><?php _e('Archives'); ?></h2>
+ <?php $theme->monthly_archives ( '0','N' ); ?>
+ </div>
+
+ <div class="sb-tags">
+ <h2><?php _e('Tags'); ?></h2>
+ <?php $theme->fluffytag(); ?>
+ </div>
+
<div class="sb-user">
<h2><?php _e('User'); ?></h2>
<?php $theme->display ( 'loginform' ); ?>

Fluffytag’s appearance was slightly modified with the following changes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

Index: fluffytag.css
===================================================================
--- fluffytag.css (revision 3226)
+++ fluffytag.css (working copy)
@@ -7,11 +7,10 @@
#fluffytag li a {
margin: 0px;
line-height: 34px;
- color: #000;
+ color: #CCCCCC;
}
#fluffytag li a:hover {
- background: #000;
- color: #fff;
+ color: #444444;
}
#fluffytag .step-1 a {
font-size: 1.0em;
@@ -42,4 +41,4 @@
}
#fluffytag .step-10 a {
font-size: 2.8em;
-}
\ No newline at end of file
+}