PageRenderTime 25ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/WebSite/minibuzz3/header.php

http://slowpub-development.googlecode.com/
PHP | 255 lines | 191 code | 32 blank | 32 comment | 33 complexity | 1bc6bb982022afc2c82068f59e6d8c19 MD5 | raw file
  1. <?php
  2. /**
  3. * The Header for our theme.
  4. * @package WordPress
  5. * @subpackage Minibuzz
  6. * @since Minibuzz 1.0
  7. */
  8. ?><!DOCTYPE html>
  9. <html <?php language_attributes(); ?>>
  10. <head>
  11. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  12. <title><?php
  13. /*
  14. * Print the <title> tag based on what is being viewed.
  15. * We filter the output of wp_title() a bit -- see
  16. * twentyten_filter_wp_title() in functions.php.
  17. */
  18. wp_title( '|', true, 'right' );
  19. ?></title>
  20. <link rel="profile" href="http://gmpg.org/xfn/11" />
  21. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  22. <link href="<?php bloginfo('template_url'); ?>/prettyPhoto.css" rel="stylesheet" type="text/css" />
  23. <link href="<?php bloginfo('stylesheet_directory');?>/jqueryslidemenu.css" rel="stylesheet" type="text/css" />
  24. <link href="<?php bloginfo('stylesheet_directory');?>/s3slider.css" rel="stylesheet" type="text/css" />
  25. <link href="<?php bloginfo('stylesheet_directory');?>/fancy.css" rel="stylesheet" type="text/css" />
  26. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  27. <?php
  28. $favicon = get_option('templatesquare_favicon');
  29. if($favicon =="" ){
  30. ?>
  31. <link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/images/favicon.ico" />
  32. <?php }else{?>
  33. <link rel="shortcut icon" href="<?php echo $favicon; ?>" />
  34. <?php }?>
  35. <?php
  36. /* We add some JavaScript to pages with the comment form
  37. * to support sites with threaded comments (when in use).
  38. */
  39. if ( is_singular() && get_option( 'thread_comments' ) )
  40. wp_enqueue_script( 'comment-reply' );
  41. /* Always have wp_head() just before the closing </head>
  42. * tag of your theme, or you will break many plugins, which
  43. * generally use this hook to add elements to <head> such
  44. * as styles, scripts, and meta tags.
  45. */
  46. wp_head();
  47. ?>
  48. <!-- ////////////////////////////////// -->
  49. <!-- // Javascript Files // -->
  50. <!-- ////////////////////////////////// -->
  51. <!-- dropdown menu -->
  52. <?php $time = get_option('templatesquare_slider_timeout') ;?>
  53. <?php $slidetype = get_option('templatesquare_slider_type');?>
  54. <!-- dropdown menu -->
  55. <script type="text/javascript">
  56. //Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs):
  57. var arrowimages={down:['downarrowclass', '<?php bloginfo('stylesheet_directory');?>/images/down.gif', 38], right:['rightarrowclass', '<?php bloginfo('stylesheet_directory');?>/images/right.gif']}
  58. </script>
  59. <script type="text/javascript" src="<?php bloginfo('stylesheet_directory');?>/js/jqueryslidemenu.js"></script>
  60. <?php if(is_front_page()){?>
  61. <?php if($slidetype == 'slider1'){?>
  62. <script type="text/javascript">
  63. /* for s3Slider homepage slider */
  64. var $ = jQuery.noConflict();
  65. $(document).ready(function() {
  66. $('#s3slider').s3Slider({
  67. timeOut:<?php echo $time ;?>
  68. });
  69. });
  70. </script>
  71. <?php } ?>
  72. <?php } ?>
  73. <script type="text/javascript">
  74. var $ = jQuery.noConflict();
  75. jQuery(document).ready(function($) {
  76. /* for Testimonial cycle */
  77. $('.boxslideshow').cycle({
  78. timeout: <?php echo $time;?>, // milliseconds between slide transitions (0 to disable auto advance)
  79. fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
  80. pause: 0, // true to enable "pause on hover"
  81. pauseOnPagerHover: 0 // true to pause when hovering over pager link
  82. });
  83. /* for portfolio prettyPhoto */
  84. $("#main-gallery a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});
  85. });
  86. </script>
  87. <script type="text/javascript">
  88. Cufon.replace('h1') ('h1 a') ('h2') ('h3') ('h4') ('h5') ('h6') ('.desc') ('.largetext')
  89. </script>
  90. <?php
  91. $bgcolor = get_option('templatesquare_bgcolor');
  92. $bgimage = get_option('templatesquare_bgimage');
  93. $hcolor = get_option('templatesquare_hcolor');
  94. $topline = get_option('templatesquare_topline');
  95. $pagetitlecolor = get_option('templatesquare_pagetitle');
  96. $linkcolor = get_option('templatesquare_linkcolor');
  97. $disableslidertext= get_option('templatesquare_disable_slider_text');
  98. if($bgcolor==""){ $bgcolor = "#ebeceb"; }
  99. if($hcolor==""){ $hcolor = "#2d84b6"; }
  100. if($topline==""){ $topline = "#2d84b6"; }
  101. if($linkcolor==""){ $linkcolor = "#df7034"; }
  102. ?>
  103. <style type="text/css">
  104. body{background-color:<?php echo $bgcolor; ?>; <?php if($bgimage!=""){ ?>background-image:url(<?php echo $bgimage; ?>)<?php } ?>}
  105. a, a:visited{color:<?php echo $linkcolor; ?>;}
  106. h1, h2, h3, h4, h5, h6, h1 a, h1 a:visited, h2 a, h2 a:visited, h3 a, h3 a:visited, h4 a, h4 a:visited, h5 a, h5 a:visited, h6 a, h6 a:visited, span.tblue,
  107. span.tblue a, span.tblue a:visited, span.tblue2, .name-testi .user
  108. {color:<?php echo $hcolor; ?> !important}
  109. #searchresult .post h3 a, .current-menu-parent .current-menu-item a, .current_page_parent .current_page_item a{color:<?php echo $hcolor; ?> !important;}
  110. #top{border-top:solid 2px <?php echo $topline; ?>;}
  111. code{border-left:solid 5px <?php echo $topline; ?>;}
  112. #topnav ul li.current_page_item a, #topnav ul li.current-menu-item a, #topnav-full ul li.current_page_item a, #topnav-full ul li.current-menu-item a{border-top:solid 3px <?php echo $topline; ?>;}
  113. .current_page_parent a, .current-menu-item a, .current-menu-parent a{border-top:solid 3px <?php echo $topline; ?>; padding-top:4px !important;}
  114. #topnav ul li.current_page_item ul li a, #topnav ul li.current-menu-item ul li a,
  115. #topnav ul li ul li.current_page_item a, #topnav ul li ul li.current-menu-item a,
  116. #topnav-full ul li.current_page_item ul li a, #topnav-full ul li.current-menu-item ul li a,
  117. #topnav-full ul li ul li.current_page_item a, #topnav-full ul li ul li.current-menu-item a {border-top:0px !important;}
  118. #sideright ul li.recentcomments a, #sideright ul li.recentcomments a:visited,
  119. .boxslideshow a, .boxslideshow a:visited, .wp-pagenavi a:hover, .wp-pagenavi span.current
  120. {color:<?php echo $linkcolor; ?> !important;}
  121. #header-inner h1.pagetitle{color:<?php echo $pagetitlecolor; ?> !important;}
  122. .pagination a{color:#656253; }
  123. .pagination .current{color:<?php echo $linkcolor; ?>;}
  124. <?php if(is_front_page()){?>
  125. .hentry {
  126. margin: 0 0 0px 0;
  127. padding:0px 0px 0px 0px;
  128. }
  129. <?php } ?>
  130. <?php if($disableslidertext==true){ ?>
  131. .s3sliderImage div {background-color:transparent !important;}
  132. <?php } else { ?>
  133. .s3sliderImage div {background-color:#000;}
  134. <?php }?>
  135. </style>
  136. <!--[if IE 6]>
  137. <script src="<?php bloginfo('stylesheet_directory');?>/js/DD_belatedPNG.js"></script>
  138. <script>
  139. DD_belatedPNG.fix('img');
  140. </script>
  141. <![endif]-->
  142. </head>
  143. <body>
  144. <div id="wrapper">
  145. <div id="container">
  146. <div id="top">
  147. <?php
  148. $logotype = get_option('templatesquare_logo_type');
  149. $logoimage = get_option('templatesquare_logo_image');
  150. $sitename = get_option('templatesquare_site_name');
  151. $tagline = get_option('templatesquare_tagline');
  152. if($logoimage == ""){ $logoimage = get_bloginfo('stylesheet_directory') . "/images/logo.png"; }
  153. ?>
  154. <?php if($logotype == 'textlogo'){ ?>
  155. <div id="logo">
  156. <?php if($sitename=="" && $tagline==""){?>
  157. <h1><a href="<?php echo get_option('home'); ?>/" title="<?php _e('Click for Home','templatesquare'); ?>"><?php bloginfo('name'); ?></a></h1>
  158. <span class="desc"><?php bloginfo('description'); ?></span>
  159. <?php }else{ ?>
  160. <h1><a href="<?php echo get_option('home'); ?>/" title="<?php _e('Click for Home','templatesquare'); ?>"><?php echo $sitename; ?></a></h1>
  161. <span class="desc"><?php echo $tagline; ?></span>
  162. <?php }?>
  163. </div><!-- end #logo -->
  164. <?php } else { ?>
  165. <div id="logoimage">
  166. <a href="<?php echo get_option('home'); ?>/"><img src="<?php echo $logoimage ?>" alt="" height="100" /></a>
  167. </div>
  168. <?php }?>
  169. <?php $searchposition = get_option('templatesquare_search_position');?>
  170. <?php if($searchposition == 'above'){?>
  171. <div id="topsearch-menu">
  172. <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
  173. <p><input type="text" name="s" id="s" class="inputbox" /><input type="submit" value="Search" class="but" /></p>
  174. </form>
  175. </div><!-- end #topsearch -->
  176. <?php }?>
  177. </div><!-- end #top -->
  178. <div id="topnavigation">
  179. <?php if($searchposition == 'default'){
  180. $navigation = "topnav";
  181. }else{
  182. $navigation = "topnav-full";
  183. }
  184. ?>
  185. <div id="<?php echo $navigation;?>">
  186. <div id="myslidemenu" class="jqueryslidemenu">
  187. <?php if ( function_exists( 'wp_nav_menu' ) ) {?>
  188. <?php wp_nav_menu( array(
  189. 'container' => 'ul',
  190. 'menu_class' => 'menu',
  191. 'menu_id' => '',
  192. 'depth' => 0,
  193. 'theme_location' => 'mainmenu'
  194. ));
  195. ?>
  196. <?php } else {?>
  197. <?php
  198. if(is_array(get_option('templatesquare_menu'))){
  199. $menu = implode(",",get_option('templatesquare_menu'));
  200. }else{
  201. $menu = "";
  202. }
  203. ?>
  204. <ul>
  205. <li class="home<?php if (is_front_page() || is_home()) echo ' current_page_item'; ?>">
  206. <a href="<?php echo get_option('home'); ?>/">Home</a>
  207. </li>
  208. <?php wp_list_pages('title_li=0&depth=3&sort_column=menu_order&exclude=' . $menu ); ?>
  209. </ul>
  210. <?php } ?>
  211. </div>
  212. </div><!-- end #topnav -->
  213. <?php if($searchposition == 'default'){?>
  214. <div id="topsearch">
  215. <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
  216. <p><input type="text" name="s" id="s" class="inputbox" /><input type="submit" value="Search" class="but" /></p>
  217. </form>
  218. </div><!-- end #topsearch -->
  219. <?php }?>
  220. </div><!-- end #topnavigation -->
  221. <?php if(is_front_page()){?>
  222. <?php include_once (TEMPLATEPATH . '/slider.php'); ?>
  223. <?php } ?>