Advertisement
DySt4f

header

Oct 21st, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.55 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="/wp-content/uploads/2012/09/favicon.png" 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.  
  90. <?php if($con_background_fixed) { ?>
  91.  
  92. <style type="text/css">
  93.  
  94. body { background-attachment:fixed !important; }
  95.  
  96. </style>
  97.  
  98. <?php } ?>
  99.  
  100. <?php if($con_breaking_hidden) { ?>
  101.  
  102. <style type="text/css">
  103.  
  104. #breaking-wrapper {display:none;}
  105.  
  106. </style>
  107.  
  108. <?php } ?>
  109.  
  110. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  111.  
  112. <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
  113.  
  114. <?php wp_enqueue_script("jquery"); //load jquery ?>
  115.  
  116. <?php wp_head(); ?>
  117.  
  118. <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/plugins.min.js"></script> <!-- jquery plugin js -->
  119. <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/custom.js"></script> <!-- continuum js -->
  120.  
  121. <?php if($con_fancy_tooltips) { ?>
  122.  
  123. <script type="text/javascript">
  124. jQuery.noConflict();
  125.  
  126. jQuery(document).ready(function() {
  127.  
  128. //FANCY TOOLTIPS
  129. jQuery('.tooltip').tipTip({delay:0, defaultPosition:"top", maxWidth:"100px"});
  130.  
  131. });
  132.  
  133. </script>
  134.  
  135. <?php } ?>
  136.  
  137. <?php if($con_colorbox) { ?>
  138.  
  139. <script type="text/javascript">
  140. jQuery.noConflict();
  141.  
  142. jQuery(document).ready(function() {
  143.  
  144. //colorbox
  145. jQuery('.review .article-image a').colorbox({transition:'fade', speed:300});
  146. jQuery('.single-post .content .article-image a').colorbox({transition:'fade', speed:300});
  147. jQuery('.colorbox').colorbox({transition:'fade', speed:300});
  148. jQuery('.colorboxiframe').colorbox({transition:'fade', speed:300, iframe:true, innerWidth:640, innerHeight:390});
  149. jQuery(".post-content a[href$='.jpg'],a[href$='.png'],a[href$='.gif']").colorbox();
  150. jQuery('.post-content .gallery a').colorbox({ rel:'gallery' });
  151.  
  152. });
  153.  
  154. </script>
  155.  
  156. <?php } ?>
  157.  
  158. <script type="text/javascript">
  159. jQuery.noConflict();
  160.  
  161. jQuery(document).ready(function() {
  162.  
  163. //BREAKING SLIDER
  164. jQuery('#breaking').anythingSlider({
  165. easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin
  166. autoPlay: <?php echo $con_breaking_rotate; ?>, // This turns off the entire FUNCTIONALY, not just if it starts running or not.
  167. delay: <?php echo $con_breaking_duration; ?>000, // How long between slide transitions in AutoPlay mode
  168. startStopped: false, // If autoPlay is on, this can force it to start stopped
  169. animationTime: 600, // How long the slide transition takes
  170. hashTags: false, // Should links change the hashtag in the URL?
  171. buildNavigation: false, // If true, builds and list of anchor links to link to each slide
  172. pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover
  173. startText: "Go", // Start text
  174. stopText: "Stop", // Stop text
  175. navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
  176. });
  177.  
  178. function formatText(index, panel) {
  179. return index + "";
  180. }
  181.  
  182. //SPOTLIGHT SLIDER LAYOUT 1
  183. jQuery('#slider1').cycle({
  184. fx: 'fade', // transition types: http://jQuery.malsup.com/cycle/browser.html
  185. timeout: <?php echo $con_spotlight_duration; ?>000, // how long the slide is displayed
  186. speed: 300, // the speed of the transition effect
  187. pause: 1, // pause on hover
  188. cleartype: true, // IE FIX
  189. cleartypeNoBg: true // IE FIX
  190. });
  191.  
  192. //SPOTLIGHT SLIDER LAYOUT 3
  193. jQuery("#slider3 > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", <?php echo $con_spotlight_duration; ?>000, true);
  194.  
  195. //RECENT REACTIONS CYCLER
  196. jQuery('.recent-reactions').cycle({
  197. fx: 'scrollUp', // transition types: http://jQuery.malsup.com/cycle/browser.html
  198. timeout: 1, // how long the slide is displayed
  199. speed: <?php echo $con_reaction_speed; ?>000, // the speed of the transition effect
  200. easing: 'linear',
  201. continuous: 1,
  202. cleartype: true, // IE FIX
  203. cleartypeNoBg: true // IE FIX
  204. });
  205. });
  206.  
  207. //setup the nivo slider
  208. jQuery(window).load(function() {
  209. jQuery('#slider2').nivoSlider({
  210. effect:'random', //Specify sets like: 'fold,fade,sliceDown'
  211. slices:15,
  212. animSpeed:300, //Slide transition speed
  213. pauseTime:<?php echo $con_spotlight_duration; ?>000,
  214. startSlide:0, //Set starting Slide (0 index)
  215. directionNav:true, //Next and Prev
  216. directionNavHide:true, //Only show on hover
  217. controlNav:true, //1,2,3...
  218. controlNavThumbs:true, //Use thumbnails for Control Nav
  219. controlNavThumbsFromRel:false, //Use image rel for thumbs
  220. controlNavThumbsSearch: '.jpg', //Replace this with...
  221. controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
  222. keyboardNav:true, //Use left and right arrows
  223. pauseOnHover:true, //Stop animation while hovering
  224. manualAdvance:false, //Force manual transitions
  225. captionOpacity:0.8 //Universal caption opacity
  226. });
  227. });
  228.  
  229. </script>
  230.  
  231. <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <!-- google plus 1 button js -->
  232.  
  233. <!--[if gte IE 9]> <script type="text/javascript"> Cufon.set('engine', 'canvas'); </script> <![endif]-->
  234.  
  235. </head>
  236.  
  237. <body <?php body_class($con_background.' '.$con_color); ?>>
  238.  
  239. <div id="page-menu-wrapper">
  240.  
  241. <div id="page-menu">
  242.  
  243. <div class="container<?php if(!$con_search_show) { ?> wide<?php } ?>">
  244.  
  245. <?php //title attribute gets in the way - remove it
  246. $menu = wp_nav_menu( array( 'theme_location' => 'top-menu', 'container' => 'div', 'fallback_cb' => 'wp_page_menu', 'container_class' => 'menu', 'echo' => '0' ) );
  247. $menu = preg_replace('/title=\"(.*?)\"/','',$menu);
  248. echo $menu;
  249. ?>
  250.  
  251. </div>
  252.  
  253. <?php if($con_search_show) { ?>
  254.  
  255. <div id="search">
  256.  
  257. <div class="wrapper">
  258.  
  259. <div class="inner">
  260.  
  261. <!-- SEARCH -->
  262. <form method="get" id="searchform" action="<?php echo home_url(); ?>/">
  263. <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" />
  264. </form>
  265.  
  266. </div>
  267.  
  268. </div>
  269.  
  270. </div>
  271.  
  272. <?php } ?>
  273.  
  274. <br class="clearer" />
  275.  
  276. </div>
  277.  
  278. </div>
  279.  
  280. <div id="page-wrap"> <!-- everything below the top menu should be inside the page wrap div -->
  281.  
  282. <?php // breaking panel
  283. if(is_front_page()) {
  284. if ($con_breaking_show) {
  285. con_get_breaking();
  286. }
  287. } else {
  288. $override = get_post_meta($post->ID, "Show Breaking Panel", $single = true);
  289. if($override!="") {
  290. $con_breaking_show=$override;
  291. if($con_breaking_show=="false") {
  292. $con_breaking_show=false;
  293. } else {
  294. $con_breaking_show=true;
  295. }
  296. }
  297. if ($con_breaking_show) {
  298. con_get_breaking();
  299. }
  300. }
  301. ?>
  302.  
  303. <div id="logo-bar">
  304.  
  305. <div class="floatleft">
  306.  
  307. <?php if($con_logo != "") { ?>
  308. <a href="<?php echo home_url(); ?>/">
  309. <img alt="<?php bloginfo('name'); ?>" src="<?php echo $con_logo; ?>" />
  310. </a>
  311. <?php } else { ?>
  312. <h1><a href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a></h1>
  313. <?php } ?>
  314.  
  315. <div class="subtitle gentesque<?php echo $subtitleclass; ?>"><?php bloginfo('description'); ?></div>
  316.  
  317. </div>
  318.  
  319.  
  320. <?php if($con_header_ad_show) { ?>
  321. <div class="header-ad">
  322. <?php echo $con_header_ad; // ad ?>
  323. </div>
  324. <?php } ?>
  325.  
  326. <br class="clearer" />
  327.  
  328. </div>
  329.  
  330. <?php if($con_smallmenu_show) { ?>
  331.  
  332. <div id="small-menu-wrapper">
  333.  
  334. <div id="small-menu">
  335.  
  336. <div class="left-cap">&nbsp;</div>
  337.  
  338. <?php //title attribute gets in the way - remove it
  339. $menu = wp_nav_menu( array( 'theme_location' => 'small-menu', 'container' => '0', 'fallback_cb' => 'wp_page_menu', 'echo' => '0' ) );
  340. $menu = preg_replace('/title=\"(.*?)\"/','',$menu);
  341. echo $menu;
  342. ?>
  343.  
  344. <div class="right-cap">&nbsp;</div>
  345.  
  346. </div>
  347.  
  348. <br class="clearer" />
  349.  
  350. </div>
  351.  
  352. <?php } ?>
  353.  
  354. <div id="main-menu-wrapper">
  355.  
  356. <div class="left-cap">&nbsp;</div>
  357.  
  358. <div id="main-menu">
  359.  
  360. <div class="container">
  361.  
  362. <?php //title attribute gets in the way - remove it
  363. $menu = wp_nav_menu( array( 'theme_location' => 'main-menu', 'container' => '0', 'fallback_cb' => 'fallback_categories', 'echo' => '0' ) );
  364. $menu = preg_replace('/title=\"(.*?)\"/','',$menu);
  365. echo $menu;
  366. ?>
  367.  
  368. </div>
  369.  
  370. <?php //random article button
  371. if ($con_random_show) {
  372. $randargs='&posts_per_page=1&orderby=rand&ignore_sticky_posts=1';
  373. $rand_loop = new WP_Query($randargs);
  374. if ($rand_loop->have_posts()) : while ($rand_loop->have_posts()) : $rand_loop->the_post();
  375. ?>
  376.  
  377. <div id="random-article">
  378.  
  379. <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>
  380.  
  381. </div>
  382.  
  383. <?php endwhile;
  384. endif;
  385. wp_reset_query();?>
  386.  
  387. <?php } ?>
  388.  
  389. </div>
  390.  
  391. <div class="right-cap">&nbsp;</div>
  392.  
  393. <br class="clearer" />
  394.  
  395. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement