1
|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 |
<?php |
|
3 |
$options = get_option('elegantbox_options'); |
|
4 |
if (is_home()) { |
|
5 |
$home_menu = 'current_page_item'; |
|
6 |
} else { |
|
7 |
$home_menu = 'page_item'; |
|
8 |
} |
|
9 |
if($options['feed'] && $options['feed_url']) { |
|
10 |
if (substr(strtoupper($options['feed_url']), 0, 7) == 'HTTP://') { |
|
11 |
$feed = $options['feed_url']; |
|
12 |
} else { |
|
13 |
$feed = 'http://' . $options['feed_url']; |
|
14 |
} |
|
15 |
} else { |
|
16 |
$feed = get_bloginfo('rss2_url'); |
|
17 |
} |
|
18 |
?> |
|
19 |
|
|
20 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
21 |
<head profile="http://gmpg.org/xfn/11"> |
|
22 |
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> |
|
23 |
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> |
|
24 |
|
|
25 |
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title> |
|
26 |
<link rel="alternate" type="application/rss+xml" title="<?php _e('RSS 2.0 - all posts', 'elegantbox'); ?>" href="<?php echo $feed; ?>" /> |
|
27 |
<link rel="alternate" type="application/rss+xml" title="<?php _e('RSS 2.0 - all comments', 'elegantbox'); ?>" href="<?php bloginfo('comments_rss2_url'); ?>" /> |
|
28 |
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> |
|
29 |
|
|
30 |
<!-- style START --> |
|
31 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> |
|
32 |
<?php if (strtoupper(get_locale()) == 'ZH_CN' || strtoupper(get_locale()) == 'ZH_TW') : ?> |
|
33 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/chinese.css" type="text/css" media="screen" /> |
|
34 |
<?php endif; ?> |
|
35 |
<!--[if IE]> |
|
36 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" type="text/css" media="screen" /> |
|
37 |
<![endif]--> |
|
38 |
|
|
39 |
<!-- default style --> |
|
40 |
<?php if($options['style']) : ?> |
|
41 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/<?php echo($options['style']); ?>/default.css" type="text/css" media="screen" title="<?php echo($options['style']); ?>" /> |
|
42 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/<?php echo($options['style']); ?>/global.css" type="text/css" media="screen" /> |
|
43 |
<?php else : ?> |
|
44 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/white/default.css" type="text/css" media="screen" title="white" /> |
|
45 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/white/global.css" type="text/css" media="screen" /> |
|
46 |
<?php endif; ?> |
|
47 |
|
|
48 |
<!-- others styles --> |
|
49 |
<?php |
|
50 |
if($options['style_switcher']) { |
|
51 |
|
|
52 |
// get the styles folder listing |
|
53 |
$styleFolder = TEMPLATEPATH . '/styles/'; |
|
54 |
$styleArray = array(); |
|
55 |
$objStyleFolder = dir($styleFolder); |
|
56 |
while(false !== ($styleFile = $objStyleFolder->read())) { |
|
57 |
if(is_dir($styleFolder . $styleFile) && $styleFile != '.' && $styleFile != '..') { |
|
58 |
$styleArray[] = $styleFile; |
|
59 |
} |
|
60 |
} |
|
61 |
$objStyleFolder->close(); |
|
62 |
|
|
63 |
// display other styles |
|
64 |
if (is_array($styleArray)) { |
|
65 |
foreach ($styleArray as $style) { |
|
66 |
if($style != $options['style']) { |
|
67 |
?> |
|
68 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/<?php echo($style); ?>/default.css" type="text/css" media="screen" title="<?php echo($style); ?>" /> |
|
69 |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/styles/<?php echo($style); ?>/global.css" type="text/css" media="screen" /> |
|
70 |
<?php |
|
71 |
} |
|
72 |
} |
|
73 |
} |
|
74 |
} |
|
75 |
?> |
|
76 |
<!-- style END --> |
|
77 |
|
|
78 |
<!-- javascript START --> |
|
79 |
<?php if ($options['style_switcher']) : ?> |
|
80 |
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/styleswitcher.js"></script> |
|
81 |
<?php endif; ?> |
|
82 |
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/base.js"></script> |
|
83 |
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/menu.js"></script> |
|
84 |
<!-- javascript END --> |
|
85 |
|
|
86 |
<?php if(is_singular()) wp_enqueue_script('comment-reply'); ?> |
|
87 |
<?php wp_head(); ?> |
|
88 |
</head> |
|
89 |
|
|
90 |
<?php flush(); ?> |
|
91 |
|
|
92 |
<body> |
|
93 |
<!-- header START --> |
|
94 |
<div id="header"> |
|
95 |
<div class="inner"> |
|
96 |
<div class="content"> |
|
97 |
<div class="caption"> |
|
98 |
<h1 id="title"><a href="<?php echo get_settings('home'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('title'); ?></a></h1> |
|
99 |
<div id="tagline"><?php bloginfo('description'); ?></div> |
|
100 |
</div> |
|
101 |
|
|
102 |
<!-- search box --> |
|
103 |
<?php if($options['google_cse'] && $options['google_cse_cx']) : ?> |
|
104 |
<form action="http://www.google.com/cse" id="search_box" method="get"> |
|
105 |
<div id="searchbox"> |
|
106 |
<input type="text" id="searchtxt" class="textfield" name="q" size="24" /> |
|
107 |
<input type="hidden" name="cx" value="<?php echo $options['google_cse_cx']; ?>" /> |
|
108 |
<input type="hidden" name="ie" value="UTF-8" /> |
|
109 |
</div> |
|
110 |
</form> |
|
111 |
<?php else : ?> |
|
112 |
<form action="<?php bloginfo('home'); ?>/" id="search_box" method="get"> |
|
113 |
<div id="searchbox"> |
|
114 |
<input type="text" id="searchtxt" class="textfield" name="s" value="<?php echo wp_specialchars($s, 1); ?>" /> |
|
115 |
</div> |
|
116 |
</form> |
|
117 |
<?php endif; ?> |
|
118 |
<script type="text/javascript"> |
|
119 |
//<![CDATA[ |
|
120 |
var searchbox = document.getElementById("searchbox"); |
|
121 |
var searchtxt = document.getElementById("searchtxt"); |
|
122 |
var tiptext = "<?php _e('Type text to search here...', 'elegantbox'); ?>"; |
|
123 |
if(searchtxt.value == "" || searchtxt.value == tiptext) { |
|
124 |
searchtxt.className += " searchtip"; |
|
125 |
searchtxt.value = tiptext; |
|
126 |
} |
|
127 |
searchtxt.onfocus = function(e) { |
|
128 |
if(searchtxt.value == tiptext) { |
|
129 |
searchtxt.value = ""; |
|
130 |
searchtxt.className = searchtxt.className.replace(" searchtip", ""); |
|
131 |
} |
|
132 |
} |
|
133 |
searchtxt.onblur = function(e) { |
|
134 |
if(searchtxt.value == "") { |
|
135 |
searchtxt.className += " searchtip"; |
|
136 |
searchtxt.value = tiptext; |
|
137 |
} |
|
138 |
} |
|
139 |
//]]> |
|
140 |
</script> |
|
141 |
|
|
142 |
<!-- navigation START --> |
|
143 |
<ul id="navigation"> |
|
144 |
|
|
145 |
<li class="<?php echo($home_menu); ?>"><a href="<?php echo get_settings('home'); ?>/"><?php _e('Home', 'elegantbox'); ?></a></li> |
|
146 |
<?php |
|
147 |
if($options['menu_type'] == 'categories') { |
|
148 |
wp_list_categories('title_li=0&orderby=name&show_count=0'); |
|
149 |
} else { |
|
150 |
wp_list_pages('title_li=0&sort_column=menu_order'); |
|
151 |
} |
|
152 |
if($options['twitter'] && $options['twitter_username']) { ?> |
|
153 |
<li> |
|
154 |
<a rel="external nofollow" title="<?php _e('Follow me!', 'elegantbox'); ?>" id="twitter" href="http://twitter.com/<?php echo $options['twitter_username']; ?>/"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/transparent.gif" alt="<?php _e('Twitter', 'elegantbox'); ?>" /></a> |
|
155 |
</li> |
|
156 |
<?php } ?> |
|
157 |
<li id="subscribe"> |
|
158 |
<a rel="external nofollow" title="<?php _e('Subscribe to this blog...', 'elegantbox'); ?>" id="feed" href="<?php echo $feed; ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/transparent.gif" alt="<?php _e('RSS feed', 'elegantbox'); ?>" /></a> |
|
159 |
<?php if($options['feed_readers']) : ?> |
|
160 |
<ul> |
|
161 |
<li class="first"><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('Youdao', 'elegantbox'); ?>" href="http://reader.youdao.com/b.do?url=<?php echo $feed; ?>"> <?php _e('Youdao', 'elegantbox'); ?></a></li> |
|
162 |
<li><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('Xian Guo', 'elegantbox'); ?>" href="http://www.xianguo.com/subscribe.php?url=<?php echo $feed; ?>"> <?php _e('Xian Guo', 'elegantbox'); ?></a></li> |
|
163 |
<li><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('Zhua Xia', 'elegantbox'); ?>" href="http://www.zhuaxia.com/add_channel.php?url=<?php echo $feed; ?>"> <?php _e('Zhua Xia', 'elegantbox'); ?></a></li> |
|
164 |
<li><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('Google', 'elegantbox'); ?>" href="http://fusion.google.com/add?feedurl=<?php echo $feed; ?>"> <?php _e('Google', 'elegantbox'); ?></a></li> |
|
165 |
<li><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('My Yahoo!', 'elegantbox'); ?>" href="http://add.my.yahoo.com/rss?url=<?php echo $feed; ?>"> <?php _e('My Yahoo!', 'elegantbox'); ?></a></li> |
|
166 |
<li><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('newsgator', 'elegantbox'); ?>" href="http://www.newsgator.com/ngs/subscriber/subfext.aspx?url=<?php echo $feed; ?>"> <?php _e('newsgator', 'elegantbox'); ?></a></li> |
|
167 |
<li><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('Bloglines', 'elegantbox'); ?>" href="http://www.bloglines.com/sub/<?php echo $feed; ?>"> <?php _e('Bloglines', 'elegantbox'); ?></a></li> |
|
168 |
<li><a rel="external nofollow" title="<?php _e('Subscribe with ', 'elegantbox'); _e('iNezha', 'elegantbox'); ?>" href="http://inezha.com/add?url=<?php echo $feed; ?>"> <?php _e('iNezha', 'elegantbox'); ?></a></li> |
|
169 |
</ul> |
|
170 |
<?php endif; ?> |
|
171 |
</li> |
|
172 |
|
|
173 |
</ul> |
|
174 |
<!-- navigation END --> |
|
175 |
|
|
176 |
</div> |
|
177 |
</div> |
|
178 |
</div> |
|
179 |
<!-- header END --> |
|
180 |
|
|
181 |
<div id="container"> |
|
182 |
<div id="content"> |
|
183 |
<div id="main"> |