source: trunk/www.guidonia.net/wp/wp-content/themes/fusion/header.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 15 years ago
File size: 6.9 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<?php /* Fusion/digitalnature */
3 $options = get_option('fusion_options');
4 if (is_home()) {
5 $metakeywords = $options['metakeywords'];
6 } else if (is_single()) {
7 $metakeywords = "";
8 $tags = wp_get_post_tags($post->ID);
9 foreach ($tags as $tag ) {
10 $metakeywords = $metakeywords . $tag->name . ", ";
11 }
12 }
13?>
14<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
15
16<head profile="http://gmpg.org/xfn/11">
17<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
18<?php if($options['metakeywords']) { ?>
19<meta name="keywords" content="<?php echo $metakeywords; ?>" />
20<meta name="description" content="<?php bloginfo('description'); ?>" />
21<?php } ?>
22
23<title><?php wp_title('&laquo;', true, 'right'); ?><?php bloginfo('name'); ?></title>
24
25<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
26<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
27<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
28
29<style type="text/css" media="all">@import "<?php bloginfo('stylesheet_url'); ?>";</style>
30<!--[if lte IE 6]>
31<script type="text/javascript">
32/* <![CDATA[ */
33 blankimgpath = '<?php bloginfo('template_url'); ?>/images/blank.gif';
34 /* ]]> */
35</script>
36<style type="text/css" media="screen">
37 @import "<?php bloginfo('template_url'); ?>/ie6.css";
38 body{ behavior:url("<?php bloginfo('template_url'); ?>/js/ie6hoverfix.htc"); }
39 img{ behavior: url("<?php bloginfo('template_url'); ?>/js/ie6pngfix.htc"); }
40</style>
41<![endif]-->
42
43<?php if($options['layouttype']=='fluid') { ?><style type="text/css" media="all">@import "<?php bloginfo('template_url'); ?>/options/fluid.css";</style><?php }?>
44<?php if($options['sidebarpos']=='left') { ?><style type="text/css" media="all">@import "<?php bloginfo('template_url'); ?>/options/leftsidebar.css";</style><?php }?>
45<?php // custom css?
46 $usercss = $options['customcss'];
47 if($usercss<>'') { ?>
48<style type="text/css" media="screen">
49 <?php echo $usercss; ?>
50</style>
51<?php } ?>
52
53<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
54<?php if(!$options['nojquery']) { ?>
55 <?php wp_enqueue_script('jquery'); ?>
56 <?php wp_enqueue_script('fusion',get_bloginfo('template_url').'/js/fusion.js'); ?>
57<?php } ?>
58
59<?php wp_head(); ?>
60
61<?php if(!$options['nojquery']) { ?>
62<script type="text/javascript">
63/* <![CDATA[ */
64 jQuery(document).ready(function(){
65 // body .safari class
66 if (jQuery.browser.safari) jQuery('body').addClass('safari');
67
68 // layout controls
69 <?php if(!$options['nolayoutcontrol']) { ?>
70 jQuery("#layoutcontrol a").click(function() {
71 switch (jQuery(this).attr("class")) {
72 case 'setFont' : setFontSize(); break;
73 case 'setLiquid' : setPageWidth(); break;
74 }
75 return false;
76 });
77 // set the font size from cookie
78 var font_size = jQuery.cookie('fontSize');
79 if (font_size == '.7em') { jQuery('body').css("font-size",".7em"); }
80 if (font_size == '.95em') { jQuery('body').css("font-size",".95em"); }
81 if (font_size == '.8em') { jQuery('body').css("font-size",".8em"); }
82
83 // set the page width from cookie
84 var page_width = jQuery.cookie('pageWidth');
85 if (page_width) jQuery('#page').css('width', page_width);
86 <?php } ?>
87
88 jQuery('#secondary-tabs').minitabs(333, 'slide');
89
90 if (document.all && !window.opera && !window.XMLHttpRequest && jQuery.browser.msie) { var isIE6 = true; }
91 else { var isIE6 = false;} ;
92 jQuery.browser.msie6 = isIE6;
93 if (!isIE6) {
94 initTooltips({
95 timeout: 6000
96 });
97 }
98 tabmenudropdowns();
99
100 // some jquery effects...
101 jQuery('#sidebar ul.nav li ul li a').mouseover(function () {
102 jQuery(this).animate({ marginLeft: "4px" }, 100 );
103 });
104 jQuery('#sidebar ul.nav li ul li a').mouseout(function () {
105 jQuery(this).animate({ marginLeft: "0px" }, 100 );
106 });
107 // scroll to top
108 jQuery("a#toplink").click(function(){
109 jQuery('html, body').animate({scrollTop:0}, 'slow');
110 });
111
112 });
113
114 /* ]]> */
115</script>
116<?php } ?>
117
118</head>
119<body <?php if (is_home()) { ?>class="home"<?php } else { ?>class="<?php echo $post->post_name; ?>"<?php } ?>>
120 <!-- page wrappers (100% width) -->
121 <div id="page-wrap1">
122 <div id="page-wrap2">
123 <!-- page (actual site content, custom width) -->
124 <div id="page"<?php if(is_page_template('page-3col.php')) { ?> class="with-sidebar2"<?php } else if(!is_page_template('page-nosidebar.php')) { ?> class="with-sidebar"<?php } ?>>
125
126 <!-- main wrapper (side & main) -->
127 <div id="main-wrap">
128 <!-- mid column wrap -->
129 <div id="mid-wrap">
130 <!-- sidebar wrap -->
131 <div id="side-wrap">
132 <!-- mid column -->
133 <div id="mid">
134 <!-- header -->
135 <div id="header">
136 <div id="topnav" class="description"> <?php bloginfo('description'); ?></div>
137
138 <?php
139 // logo image option checked?
140 if($options['logoimage']) {
141 ?><a id="logo" href="<?php bloginfo('url'); ?>/"><img src="<?php if(file_exists(TEMPLATEPATH.'/logo.png')) echo get_bloginfo('template_url').'/logo.png'; else echo get_bloginfo('template_url').'/logo-default.png'; ?>" title="<?php bloginfo('name'); ?>" alt="<?php bloginfo('name'); ?>" /></a><?php
142 } else {
143 ?><h1 id="title"><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1><?php
144 }
145 ?>
146 <!-- top tab navigation -->
147 <div id="tabs">
148 <ul>
149 <?php
150 if((!$options['hidehometab']) && (!$options['categorytabs'])) {
151 if(is_home() && !is_paged()){ ?>
152 <li class="current_page_item"><a href="<?php echo get_settings('home'); ?>" title="<?php _e('You are Home','fusion'); ?>"><span><span><?php _e('Home','fusion'); ?></span></span></a></li>
153 <?php } else { ?>
154 <li><a href="<?php echo get_option('home'); ?>" title="<?php _e('Click for Home','fusion'); ?>"><span><span><?php _e('Home','fusion'); ?></span></span></a></li>
155 <?php
156 }
157 }
158 ?>
159 <?php
160 if($options['categorytabs']) {
161 echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a$2><span><span>$3</span></span></a>', wp_list_categories('show_count=0&echo=0&title_li='));
162 }
163 else {
164 echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a$2><span><span>$3</span></span></a>', wp_list_pages('echo=0&orderby=name&title_li=&'));
165 }
166 ?>
167 </ul>
168 </div>
169 <!-- /top tabs -->
170
171 </div><!-- /header -->
Note: See TracBrowser for help on using the repository browser.