Source

IAMWW w2 DnD / sidebar.php

Full commit
<div id="sidebar">
<?php if (is_home()) { ?>
	<ul>
		<?php w_ShowAbout(); ?>
	</ul>
	<?php } ?>
		
	<?php if (function_exists('wp_theme_switcher')) { ?>
    <ul>
		<li>
		<h3><?php _e('The Themes' ); ?></h3>
		<?php wp_theme_switcher('dropdown'); ?>
		</li>
    </ul>
   	<?php } ?>
		
<?php if ( (is_archive()) or (is_search()) or (is_paged()) or (is_page()) or (is_category()) or (is_single()) or ($notfound == '1') ) { ?>
	<h3>recent posts</h3>
	<ul>
		<?php query_posts('showposts=7'); ?>
		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
		<li><strong><a href="<?php the_permalink() ?>"><?php the_title() ?> </a></strong></li>
		<?php endwhile; endif; ?>
	</ul>
	<?php } ?>

<div class="sbwidgets">

<ul id="sidebarright">
	<?php if ( !function_exists('dynamic_sidebar')
        || !dynamic_sidebar(2) ) : ?>

	<li id="archives">
		<h3><?php _e('Archives' ); ?></h3>
			<ul>
				<?php wp_get_archives('type=monthly') ?>
			</ul>
	</li>
	
	<li id="rsslinks">
		<h3><?php _e('Syndication' ); ?></h3>
		<ul>
			<li>
				<a href="feed:<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>">Site Feed</a>
			</li>
			<li>
				<a href="feed:<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>">Comments Feed</a>
			</li>
		</ul>
	</li>
	
        <li id="meta">
        <h3><?php _e('Meta' ); ?></h3>
		<ul>
	    	    <?php wp_register(); ?>
          		<?php wp_loginout(); ?>
	 		<li>
	 			<a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a>
			</li>
			<li>
		        <?php wp_meta(); ?>
			</li>
		</ul>
	</li>

<?php endif; ?>
</ul>

<ul id="sidebarleft">
	<?php if ( !function_exists('dynamic_sidebar')
        || !dynamic_sidebar(1) ) : ?>
	<li id="categories">
		<h3><?php _e('Categories'); ?></h3>
		<ul>
			<?php wp_list_categories('orderby=name&title_li='); ?>
		</ul>
	</li>
	<li id="links">
		<h3><?php _e('Links' ); ?></h3>
		<ul>
			<?php wp_list_bookmarks('categorize=0&title_li='); ?>
		</ul>
 	</li>
	<?php endif; ?>
</ul>

</div><!-- end sbwidgets-->
</div><!--end sidebar-->