Guest User

Reinder Dijkhuis

a guest
Dec 10th, 2008
287
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $__reinAdCode = array(); //just prepping the array.
  3. //this defines the google adWords javascript for later use
  4. $__reinAdCode['adWords'] =
  5. '<script type="text/javascript">
  6. <!--
  7. google_ad_client = "[number]";
  8. google_ad_width = 160;
  9. google_ad_height = 600;
  10. google_ad_format = "160x600_as";
  11. google_ad_type = "text_image";
  12. //2007-03-18: Blog
  13. google_ad_channel = "[number]";
  14. google_color_border = "36414d";
  15. google_color_bg = "FFFFFF";
  16. google_color_link = "0000FF";
  17. google_color_text = "000000";
  18. google_color_url = "008000";
  19. //-->
  20. </script>
  21. <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
  22.  
  23. //project wonderful code for later use
  24. $__reinAdCode['project_wonderful'] =
  25. '<!-- Begin Project Wonderful ad code: -->
  26. <!-- IMPORTANT: All lines, including these comments, must be included. -->
  27. <!-- Removing or altering them could result in your ads being automatically shut down! -->
  28. <!-- Ad box ID: [number] -->
  29. <script language=\'JavaScript\' type=\'text/javascript\'>
  30. // <![CDATA[
  31. r = new String (Math.random()*1000);
  32. r = r.substr(0, 5);
  33. s = new String ("<script language=\'JavaScript\' type=\'text/javascript\'");
  34. s += "src = http://www.projectwonderful.com/gen.php";
  35. s += "?id=[number]&amp;type=4";
  36. s += "&amp;r=" + r;
  37. if (document.referrer){
  38. s += "&amp;referer=" + escape(document.referrer);
  39. }
  40. s += "><\/scr";
  41. s += "ipt>";
  42. document.write(s);
  43. // ]]>
  44. </script>
  45. <noscript><map name="admap[number]" id="admap[number]"><area href="http://www.projectwonderful.com/out_nojs.php?r=0&amp;c=0&amp;id=[number]&amp;type=4" shape="rect" coords="0,0,125,125" title="" alt="" target="_blank" /></map>
  46. <table cellpadding="0" border="0" cellspacing="0" width="125" bgcolor=""><tr><td><img src="http://www.projectwonderful.com/nojs.php?id=[number]&amp;type=4" width="125" height="125" usemap="#admap[number]" border="0" alt="" /></td></tr><tr><td bgcolor="" colspan="1"><center><a style="font-size:10px;color:#0000ff;text-decoration:none;line-height:1.2;font-weight:bold;font-family:Tahoma, verdana,arial,helvetica,sans-serif;" href="http://www.projectwonderful.com/advertisehere.php?id=[number]&amp;type=4" target="_blank">Project Wonderful - Your ad here, right now, for as low as $0</a></center></td></tr><tr><td colspan="1" valign="top" width="125" height="3" bgcolor="#000000"><center><img src="http://www.projectwonderful.com/black.png" width="125" height="3" border="0" alt="" /></center></td></tr></table>
  47. </noscript>
  48. <!-- End Project Wonderful ad code. -->';
  49.  
  50. ?>
  51.  
  52. <div id="sidebar">
  53. <?php
  54. /* Widgetized sidebar, if you have the plugin installed. */
  55. if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) :
  56. ?>
  57. <ul>
  58.  
  59. <li>
  60. <?php include (TEMPLATEPATH . '/searchform.php'); ?>
  61. </li>
  62.  
  63. <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
  64. <li><h2>Author</h2>
  65. <p>A little something about you, the author. Nothing lengthy, just an overview.</p>
  66. </li>
  67. -->
  68.  
  69. <?php
  70. if ( is_404() || is_category() || is_day() || is_month()
  71. || is_year() || is_search() || is_paged() ) :
  72. ?>
  73. <li>
  74.  
  75. <?php
  76. if (is_404()) {/* If this is a 404 page (currently empty) */
  77. } elseif (is_category()) { /* If this is a category archive */
  78. ?>
  79. <p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
  80.  
  81.  
  82. <?php } elseif (is_day()) {/* If this is a daily archive */ ?>
  83. <p>
  84. You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives for the day <?php the_time('l, F jS, Y'); ?>.
  85. </p>
  86.  
  87.  
  88. <?php } elseif (is_month()) { /* If this is a monthly archive */ ?>
  89. <p>
  90. You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a>
  91. blog archives for <?php the_time('F, Y'); ?>.
  92. </p>
  93.  
  94.  
  95. <?php } elseif (is_year()) { /* If this is a yearly archive */ ?>
  96. <p>
  97. You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a>
  98. blog archives for the year <?php the_time('Y'); ?>.
  99. </p>
  100.  
  101.  
  102. <?php } elseif (is_search()) { /* If this is a search page */ ?>
  103. <p>
  104. You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a>
  105. blog archives for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.
  106. </p>
  107.  
  108.  
  109. <?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { /* this is paged browsing view */ ?>
  110. <p>You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives.</p>
  111. <?php } /* this ends the paged browsing output and the chain of elseif's */ ?>
  112.  
  113. </li>
  114. <?php
  115. /* this ends the if( is_404() || is_category() || is_day() ||..blah blah blah crap above */
  116. endif;
  117. ?>
  118.  
  119. <li>
  120. <div style="margin:20px auto;padding:10px 3px 10px 25px;text-align:center;">
  121. <?php echo $__reinAdCode['project_wonderful']; ?>
  122. </div>
  123. </li>
  124.  
  125. <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
  126.  
  127. <li>
  128. <h2>Archives</h2>
  129. <ul>
  130. <?php wp_get_archives('type=monthly'); ?>
  131. </ul>
  132. </li>
  133.  
  134. <!-- rein I think the below needs to be wrapped in an <li></li> -->
  135. <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
  136.  
  137. <?php
  138. /* If this is the frontpage or a normal page? */
  139. if ( is_home() || is_page() ) :
  140. ?>
  141.  
  142. <li>
  143. <?php wp_list_bookmarks(); ?>
  144. </li>
  145.  
  146. <li>
  147. <?php echo $__reinAdCode['adWords']; ?>
  148. </li>
  149.  
  150. <li>
  151. <h2>Meta</h2>
  152. <ul>
  153. <?php wp_register(); ?>
  154. <li><?php wp_loginout(); ?></li>
  155. <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
  156. <?php wp_meta(); ?>
  157. </ul>
  158. </li>
  159. <?php else : ?>
  160. <li>
  161. <?php echo $__reinAdCode['adWords']; ?>
  162. </li>
  163. <?php endif; /* end of the homepage/normal page check */ ?>
  164. </ul>
  165. <?php endif; /* this is the end of the dynamic sidebar if */ ?>
  166. </div>
RAW Paste Data