Advertisement
Patrykos360

Header.php

Feb 12th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.12 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <?php //get theme options
  4. global $con_front, $con_layout, $con_feed, $con_reviews, $con_ads, $con_misc;
  5. $con_front = get_option( 'con_front', $con_front );
  6. $con_layout = get_option( 'con_layout', $con_layout );
  7. $con_feed = get_option( 'con_feed', $con_feed );
  8. $con_reviews = get_option( 'con_reviews', $con_reviews );
  9. $con_ads = get_option( 'con_ads', $con_ads );
  10. $con_misc = get_option( 'con_misc', $con_misc ); ?>
  11. <?php //set theme options
  12. $con_background = $con_misc['background'];
  13. $con_background_fixed = $con_misc['background_fixed'];
  14. $con_logo = $con_misc['con_logo'];
  15. $con_color = $con_misc['color'];
  16. $con_breaking_show = $con_misc['breaking_show'];
  17. $con_breaking_hidden = $con_misc['breaking_hidden'];
  18. $con_breaking_rotate = $con_misc['breaking_rotate'];
  19. $con_breaking_duration = $con_misc['breaking_duration'];
  20. $con_smallmenu_show = $con_misc['smallmenu_show'];
  21. $con_search_show = $con_misc['search_show'];
  22. $con_random_show = $con_misc['random_show'];
  23. $con_fancy_tooltips = $con_misc['fancy_tooltips'];
  24. $con_colorbox = $con_misc['colorbox'];
  25. $con_spotlight_duration = $con_front['spotlight_duration'];
  26. $con_reaction_speed = $con_front['reaction_speed'];
  27. $con_header_ad_show = $con_ads['header_ad_show'];
  28. $con_header_ad = $con_ads['header_ad'];
  29. ?>
  30. <?php // use variables from page custom fields instead of continuum options page (if they exist)
  31. $override = get_post_meta($post->ID, "Show Ad In Header", $single = true);
  32. if($override!="") {
  33. $con_header_ad_show=$override;
  34. if($con_header_ad_show=="false") {
  35. $con_header_ad_show=false;
  36. } else {
  37. $con_header_ad_show=true;
  38. }
  39. }
  40. if($con_breaking_rotate) { //jquery needs string instead of boolean
  41. $con_breaking_rotate="true";
  42. } else {
  43. $con_breaking_rotate="false";
  44. }
  45. //figure out what color to use for subtitle based on selected background
  46. if(substr($con_background,0,4) == "dark" || substr($con_background,0,4) == "silk") $subtitleclass=" dark";
  47. ?>
  48.  
  49. <?php if ( ! isset( $content_width ) ) $content_width = 960; ?>
  50. <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  51.  
  52. <head profile="http://gmpg.org/xfn/11">
  53.  
  54. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  55.  
  56. <?php if (is_search()) { ?>
  57. <meta name="robots" content="noindex, nofollow" />
  58. <?php } ?>
  59.  
  60. <title>
  61. <?php //Print the <title> tag based on what is being viewed
  62. global $page, $paged;
  63. wp_title( '|', true, 'right' );
  64. // Add the blog name.
  65. bloginfo( 'name' );
  66. // Add the blog description for the home/front page.
  67. $site_description = get_bloginfo( 'description', 'display' );
  68. if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description";
  69. // Add a page number if necessary:
  70. if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'continuum' ), max( $paged, $page ) );
  71. ?>
  72. </title>
  73.  
  74. <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
  75.  
  76. <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" /> <!-- the main structure and main page elements style -->
  77. <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/components.css" type="text/css" /> <!-- included components and additional style -->
  78. <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/js/js.css" type="text/css" media="screen" /> <!-- styles for the various jquery plugins -->
  79. <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/colors.css" type="text/css" /> <!-- different color options -->
  80. <!--[if IE 7]>
  81. <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/ie7.css" />
  82. <![endif]-->
  83.  
  84. <!--[if gte IE 8]>
  85. <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/ie8.css" />
  86. <![endif]-->
  87.  
  88. <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/custom.css" type="text/css" /> <!-- custom css for users to edit instead of build-in stylesheets -->
  89. <link rel="stylesheet" type="text/css" href="http://darkdesign.org/wp-content/themes/continuum/lib/buddypress/bp.css"/>
  90. <link rel="stylesheet" type="text/css" href="http://darkdesign.org/wp-content/themes/continuum/lib/buddypress/bp-admin.css"/>
  91.  
  92. <?php if($con_background_fixed) { ?>
  93.  
  94. <style type="text/css">
  95.  
  96. body { background-attachment:fixed !important; }
  97.  
  98. </style>
  99.  
  100. <?php } ?>
  101.  
  102. <?php if($con_breaking_hidden) { ?>
  103.  
  104.  
  105. <style type="text/css">
  106.  
  107. #breaking-wrapper {display:none;}
  108.  
  109. </style>
  110.  
  111. <?php } ?>
  112.  
  113. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  114.  
  115. <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
  116.  
  117. <?php wp_enqueue_script("jquery"); //load jquery ?>
  118.  
  119. <?php wp_head(); ?>
  120.  
  121. <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/plugins.min.js"></script> <!-- jquery plugin js -->
  122. <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/custom.js"></script> <!-- continuum js -->
  123.  
  124. <?php if($con_fancy_tooltips) { ?>
  125.  
  126. <script type="text/javascript">
  127. jQuery.noConflict();
  128.  
  129. jQuery(document).ready(function() {
  130.  
  131. //FANCY TOOLTIPS
  132. jQuery('.tooltip').tipTip({delay:0, defaultPosition:"top", maxWidth:"100px"});
  133.  
  134. });
  135.  
  136. </script>
  137.  
  138. <?php } ?>
  139.  
  140. <?php if($con_colorbox) { ?>
  141.  
  142. <script type="text/javascript">
  143. jQuery.noConflict();
  144.  
  145. jQuery(document).ready(function() {
  146.  
  147. //colorbox
  148. jQuery('.review .article-image a').colorbox({transition:'fade', speed:300});
  149. jQuery('.single-post .content .article-image a').colorbox({transition:'fade', speed:300});
  150. jQuery('.colorbox').colorbox({transition:'fade', speed:300});
  151. jQuery('.colorboxiframe').colorbox({transition:'fade', speed:300, iframe:true, innerWidth:640, innerHeight:390});
  152. jQuery(".post-content a[href$='.jpg'],a[href$='.png'],a[href$='.gif']").colorbox();
  153. jQuery('.post-content .gallery a').colorbox({ rel:'gallery' });
  154.  
  155. });
  156.  
  157. </script>
  158.  
  159. <?php } ?>
  160.  
  161. <script type="text/javascript">
  162. jQuery.noConflict();
  163.  
  164. jQuery(document).ready(function() {
  165.  
  166. //BREAKING SLIDER
  167. jQuery('#breaking').anythingSlider({
  168. easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin
  169. autoPlay: <?php echo $con_breaking_rotate; ?>, // This turns off the entire FUNCTIONALY, not just if it starts running or not.
  170. delay: <?php echo $con_breaking_duration; ?>000, // How long between slide transitions in AutoPlay mode
  171. startStopped: false, // If autoPlay is on, this can force it to start stopped
  172. animationTime: 600, // How long the slide transition takes
  173. hashTags: false, // Should links change the hashtag in the URL?
  174. buildNavigation: false, // If true, builds and list of anchor links to link to each slide
  175. pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover
  176. startText: "Go", // Start text
  177. stopText: "Stop", // Stop text
  178. navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
  179. });
  180.  
  181. function formatText(index, panel) {
  182. return index + "";
  183. }
  184.  
  185. //SPOTLIGHT SLIDER LAYOUT 1
  186. jQuery('#slider1').cycle({
  187. fx: 'fade', // transition types: http://jQuery.malsup.com/cycle/browser.html
  188. timeout: <?php echo $con_spotlight_duration; ?>000, // how long the slide is displayed
  189. speed: 300, // the speed of the transition effect
  190. pause: 1, // pause on hover
  191. cleartype: true, // IE FIX
  192. cleartypeNoBg: true // IE FIX
  193. });
  194.  
  195. //SPOTLIGHT SLIDER LAYOUT 3
  196. jQuery("#slider3 > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", <?php echo $con_spotlight_duration; ?>000, true);
  197.  
  198. //RECENT REACTIONS CYCLER
  199. jQuery('.recent-reactions').cycle({
  200. fx: 'scrollUp', // transition types: http://jQuery.malsup.com/cycle/browser.html
  201. timeout: 1, // how long the slide is displayed
  202. speed: <?php echo $con_reaction_speed; ?>000, // the speed of the transition effect
  203. easing: 'linear',
  204. continuous: 1,
  205. cleartype: true, // IE FIX
  206. cleartypeNoBg: true // IE FIX
  207. });
  208. });
  209.  
  210. //setup the nivo slider
  211. jQuery(window).load(function() {
  212. jQuery('#slider2').nivoSlider({
  213. effect:'random', //Specify sets like: 'fold,fade,sliceDown'
  214. slices:15,
  215. animSpeed:300, //Slide transition speed
  216. pauseTime:<?php echo $con_spotlight_duration; ?>000,
  217. startSlide:0, //Set starting Slide (0 index)
  218. directionNav:true, //Next and Prev
  219. directionNavHide:true, //Only show on hover
  220. controlNav:true, //1,2,3...
  221. controlNavThumbs:true, //Use thumbnails for Control Nav
  222. controlNavThumbsFromRel:false, //Use image rel for thumbs
  223. controlNavThumbsSearch: '.jpg', //Replace this with...
  224. controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
  225. keyboardNav:true, //Use left and right arrows
  226. pauseOnHover:true, //Stop animation while hovering
  227. manualAdvance:false, //Force manual transitions
  228. captionOpacity:0.8 //Universal caption opacity
  229. });
  230. });
  231.  
  232. </script>
  233.  
  234. <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <!-- google plus 1 button js -->
  235.  
  236. <!--[if gte IE 9]> <script type="text/javascript"> Cufon.set('engine', 'canvas'); </script> <![endif]-->
  237.  
  238. </head>
  239.  
  240. <div id="fb-root"></div>
  241. <script>(function(d, s, id) {
  242. var js, fjs = d.getElementsByTagName(s)[0];
  243. if (d.getElementById(id)) return;
  244. js = d.createElement(s); js.id = id;
  245. js.src = "//connect.facebook.net/pl_PL/all.js#xfbml=1&appId=295901897182291";
  246. fjs.parentNode.insertBefore(js, fjs);
  247. }(document, 'script', 'facebook-jssdk'));</script>
  248.  
  249. <body <?php body_class($con_background.' '.$con_color); ?>>
  250.  
  251. <div id="page-menu-wrapper">
  252.  
  253. <div id="page-menu">
  254.  
  255. <div class="container<?php if(!$con_search_show) { ?> wide<?php } ?>">
  256.  
  257. <?php //title attribute gets in the way - remove it
  258. $menu = wp_nav_menu( array( 'theme_location' => 'top-menu', 'container' => 'div', 'fallback_cb' => 'wp_page_menu', 'container_class' => 'menu', 'echo' => '0' ) );
  259. $menu = preg_replace('/title=\"(.*?)\"/','',$menu);
  260. echo $menu;
  261. ?>
  262.  
  263. </div>
  264.  
  265. <?php if($con_search_show) { ?>
  266.  
  267. <div id="search">
  268.  
  269. <div class="wrapper">
  270.  
  271. <div class="inner">
  272.  
  273. <!-- SEARCH -->
  274. <form method="get" id="searchform" action="<?php echo home_url(); ?>/">
  275. <input type="text" value="<?php _e( 'search', 'continuum' ); ?>" onfocus="if (this.value == '<?php _e( 'search', 'continuum' ); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'search', 'continuum' ); ?>';}" name="s" id="s" />
  276. </form>
  277.  
  278. </div>
  279.  
  280. </div>
  281.  
  282. </div>
  283.  
  284. <?php } ?>
  285.  
  286. <br class="clearer" />
  287.  
  288. </div>
  289.  
  290. </div>
  291.  
  292. <div id="page-wrap"> <!-- everything below the top menu should be inside the page wrap div -->
  293.  
  294. <?php // breaking panel
  295. if(is_front_page()) {
  296. if ($con_breaking_show) {
  297. con_get_breaking();
  298. }
  299. } else {
  300. $override = get_post_meta($post->ID, "Show Breaking Panel", $single = true);
  301. if($override!="") {
  302. $con_breaking_show=$override;
  303. if($con_breaking_show=="false") {
  304. $con_breaking_show=false;
  305. } else {
  306. $con_breaking_show=true;
  307. }
  308. }
  309. if ($con_breaking_show) {
  310. con_get_breaking();
  311. }
  312. }
  313. ?>
  314.  
  315. <div id="logo-bar">
  316.  
  317. <div class="floatleft">
  318.  
  319. <?php if($con_logo != "") { ?>
  320. <a href="<?php echo home_url(); ?>/">
  321. <img alt="<?php bloginfo('name'); ?>" src="<?php echo $con_logo; ?>" />
  322. </a>
  323. <?php } else { ?>
  324. <h1><a href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a></h1>
  325. <?php } ?>
  326.  
  327. <div class="subtitle gentesque<?php echo $subtitleclass; ?>"><?php bloginfo('description'); ?></div>
  328.  
  329. </div>
  330.  
  331.  
  332. <?php if($con_header_ad_show) { ?>
  333. <div class="header-ad">
  334. <?php echo $con_header_ad; // ad ?>
  335. </div>
  336. <?php } ?>
  337.  
  338. <br class="clearer" />
  339.  
  340. </div>
  341.  
  342. <?php if($con_smallmenu_show) { ?>
  343.  
  344. <div id="small-menu-wrapper">
  345.  
  346. <div id="small-menu">
  347.  
  348. <div class="left-cap">&nbsp;</div>
  349.  
  350. <?php //title attribute gets in the way - remove it
  351. $menu = wp_nav_menu( array( 'theme_location' => 'small-menu', 'container' => '0', 'fallback_cb' => 'wp_page_menu', 'echo' => '0' ) );
  352. $menu = preg_replace('/title=\"(.*?)\"/','',$menu);
  353. echo $menu;
  354. ?>
  355.  
  356. <div class="right-cap">&nbsp;</div>
  357.  
  358. </div>
  359.  
  360. <br class="clearer" />
  361.  
  362. </div>
  363.  
  364. <?php } ?>
  365.  
  366. <div id="main-menu-wrapper">
  367.  
  368. <div class="left-cap">&nbsp;</div>
  369.  
  370. <div id="main-menu">
  371.  
  372. <div class="container">
  373.  
  374. <?php //title attribute gets in the way - remove it
  375. $menu = wp_nav_menu( array( 'theme_location' => 'main-menu', 'container' => '0', 'fallback_cb' => 'fallback_categories', 'echo' => '0' ) );
  376. $menu = preg_replace('/title=\"(.*?)\"/','',$menu);
  377. echo $menu;
  378. ?>
  379.  
  380. </div>
  381.  
  382. <?php //random article button
  383. if ($con_random_show) {
  384. $randargs='&posts_per_page=1&orderby=rand&ignore_sticky_posts=1';
  385. $rand_loop = new WP_Query($randargs);
  386. if ($rand_loop->have_posts()) : while ($rand_loop->have_posts()) : $rand_loop->the_post();
  387. ?>
  388.  
  389. <div id="random-article">
  390.  
  391. <a class="tooltip" title="<?php _e( 'Random Article', 'continuum' ); ?>" href="<?php the_permalink(); ?>"><img alt="<?php _e( 'Random Article', 'continuum' ); ?>" src="<?php echo get_template_directory_uri(); ?>/images/random-article.png" /></a>
  392.  
  393. </div>
  394.  
  395. <?php endwhile;
  396. endif;
  397. wp_reset_query();?>
  398.  
  399. <?php } ?>
  400.  
  401. </div>
  402.  
  403. <div class="right-cap">&nbsp;</div>
  404.  
  405. <br class="clearer" />
  406.  
  407. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement