-
Notifications
You must be signed in to change notification settings - Fork 1
/
sidebar.php
executable file
·57 lines (57 loc) · 3.68 KB
/
sidebar.php
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php global $traction; ?>
<div id="sidebar">
<?php if ($traction->sideboxState() != 'true') {?>
<div id="sidebox">
<?php if ($traction->sideboxCustom() == 'true') : ?>
<?php echo $traction->sideboxCode(); ?>
<?php else : ?>
<a href="/"><img src="<?php bloginfo('template_url'); ?>/images/sidebar/sidebox.jpg" width="250" height="200" alt="Traction WordPress Theme" /></a>
<?php endif; ?>
</div><!--end sidebox-->
<?php } ?>
<?php if ($traction->adboxState() == 'true') { ?>
<div id="adbox" class="clear">
<a href="<?php if ($traction->adboxUrl1() != '') echo $traction->adboxUrl1(); else echo "#"; ?>"><img class="alignleft" src="<?php bloginfo('stylesheet_directory'); ?>/images/ads/<?php if ($traction->adboxImage1() != '') echo $traction->adboxImage1(); else echo "125_ad.png"; ?>" width="125" height="125" alt="<?php if ($traction->adboxAlt1() != '') echo $traction->adboxAlt1(); else echo bloginfo('name'); ?>" /></a>
<a href="<?php if ($traction->adboxUrl2() != '') echo $traction->adboxUrl2(); else echo "#"; ?>"><img class="alignright" src="<?php bloginfo('stylesheet_directory'); ?>/images/ads/<?php if ($traction->adboxImage2() != '') echo $traction->adboxImage2(); else echo "125_ad.png"; ?>" width="125" height="125" alt="<?php if ($traction->adboxAlt2() != '') echo $traction->adboxAlt2(); else echo bloginfo('name'); ?>" /></a>
</div><!--end adbox-->
<?php } ?>
<?php if ($traction->news() == 'true') { ?>
<div id="newsletter">
<h3><?php if ($traction->newsTitle() != '') echo $traction->newsTitle(); else echo _e('Sign up for our free newsletter', 'traction'); ?></h3>
<form class="newsletter" action="http://feedburner.google.com/fb/a/mailverify?uri=<?php echo $traction->newsName(); ?>" method="post">
<div>
<input id="news-email" class="text" name="email" type="text" value="<?php _e('Email address', 'traction') ?>" onfocus="if (this.value == '<?php _e('Email address', 'traction') ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Email address', 'traction') ?>';}" />
<input id="news-button" type="image" src="<?php bloginfo('template_url'); ?>/images/newsletter-go.png" alt="<?php _e('Go', 'traction') ?>" class="button" value="Go" />
</div>
</form>
</div>
<?php } ?>
<?php if ($traction->twitterState() == 'true') { ?>
<div class="widget twitter">
<h2 class="widgettitle"><?php _e('Twitter', 'traction'); ?> <a href="http://twitter.com/<?php echo $traction->twitter(); ?>"><?php echo $traction->twitter(); ?></a></h2>
<div class="tweet">
<?php twitter_messages($traction->twitter(), $traction->twitterUpdates(), true, true, false, true, true, true); ;?>
</div>
</div>
<?php } ?>
<?php if ( is_active_sidebar('normal_sidebar') ) echo "<ul>" ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('normal_sidebar') ) : ?>
<ul>
<li class="widget widget_recent_entries">
<h2 class="widgettitle"><?php _e('Recent Articles', 'traction'); ?></h2>
<ul>
<?php $side_posts = get_posts('numberposts=10'); foreach($side_posts as $post) : ?>
<li><a href= "<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
</li>
<li class="widget widget_meta">
<h2 class="widgettitle"><?php _e('Archives', 'traction'); ?></h2>
<ul>
<?php wp_get_archives(); ?>
</ul>
</li>
</ul>
<?php endif; ?>
<?php if ( is_active_sidebar('normal_sidebar') ) echo "</ul>" ?>
</div><!--end sidebar-->