Archive for April, 2007

Buy Abilify Without Prescription

题外话:WordPress团队最近干了两件很2的事情,其一是将一个极不成熟的tag系统引入WordPress 2.2。仅从模板开发者的角度来说,该tag系统与UTW的兼容性较差,基本上支持了WordPress内生的tag就等于放弃对UTW的支持(屠杀啊),而该tag系统不过是原分类系统的畸形衍生品,功能上实在不敢恭维。其二是他们又把tag给去掉了,说是要到2.3的时候再推出,这就是对UTW判了死缓。对贫僧个人而言,这意味着刚刚加入对这个破玩艺支持的Unnamed 1.2作废了,搞得贫僧很没有兴致。这些行为实在是太2了,连Blogging Pro也说

Buy Abilify Without Prescription, I would rather see the team take their time, delay a release until June with the tagging feature properly implemented and tested, rather than removing it due to potential issues.

OK,让我们进入正题。

四、杂项

4.1    Custom Image Header

Custom Image Header 是WordPress 2.1增加的一个新功能,支持该功能的主题允许用户自定义Header图片。所以今天贫僧来介绍如何让施主们的WordPress主题支持该牛逼闪闪的功能。本文中涉及的相关代码可以在Unnamed Special Edition 的functions.php中找到。

首先,各位施主请看如下几行代码,它们分别定义了header部分的字体颜色、默认背景图片以及图片尺寸:
define('HEADER_TEXTCOLOR','FFFFFF');
define('HEADER_IMAGE','%s/images/bg_header.jpg');
define('HEADER_IMAGE_HEIGHT',150);
define('HEADER_IMAGE_WIDTH',960);

这段代码告诉我们一个道理:Unnamed SE的header部分字体颜色为白色(FFFFFF),默认背景图片为bg_header.jpg,背景图片尺寸为960*150。

再来看下面这段代码,在这里,函数custom_css()包含了定义主题header样式所需的CSS,它会被输出到模板的头部(如果施主不想在页面头部生成过多代码,可以考虑和Unnamed一样将CSS写入php文件,不过贫僧不推荐这样做,尽管好处大大地,但弊端也很是不少)。

<?php
function custom_css() {
?>
<style type="text/css">
#header {
height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;
background:url(<?php header_image() ?>) transparent repeat top center;
}
<?php if (get_header_textcolor()=='blank' ) { ?>
#header h1, .description {
display:none;
}
<?php } else { ?>
#header h1 a,.description {
color:#<?php header_textcolor() ?>;
}
<?php } ?>
</style>
<?php } ?>

其中,#header部分定义了header图片的高度(HEADER_IMAGE_HEIGHT)和url(header_image());而后一部分则判断header的文字部分是否需要隐藏;header_textcolor()则用于定义字体颜色。

用户们都喜欢所见即所得,所以,为用户着想的施主们需要在管理页面中设置当前header样式的预览。为了与模板中的样式保持一致,我们用admin_header_style()定义预览部分的样式(代码意义与前一段基本相同):

<?php function
admin_header_style() {
?>
<style type="text/css">
#headimg {
background-image:url(<?php header_image() ?>);
background-repeat:repeat !important;
height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;
width:<?php echo HEADER_IMAGE_WIDTH; ?>px;
margin:0 0 10px;
}
#headimg h1 {
font-size:2.2em;
text-align:left;
margin:0;
padding:45px 0 0 20px;
}
#headimg h1 a {
color:#<?php header_textcolor() ?>;
text-decoration: none;
border-bottom: none;
}
#headimg #desc {
color:#<?php header_textcolor() ?>;
font-size:1em;
text-align:left;
padding:0 0 5px 20px;
}
<?php if ('blank' == get_header_textcolor()) { ?>
#headimg h1,#headimg #desc {
display:none;
}
#headimg h1 a,#headimg #desc {
color:#<?php echo HEADER_TEXTCOLOR ?>;
}
<?php } ?>
</style>
<?php } ?>

最后,我们通过add_custom_image_header()来输出CSS到主题和管理页面的头部。

<?php add_custom_image_header('custom_css', 'admin_header_style'); ?>

这样,当该WordPress主题被激活时,系统会自动加载Custom Image Header管理页面,用户可以通过该页面上传和处理header背景图片。更多内容可以参考/wp-admin/custom-header.php。
. Cheap Abilify. Cheap Abilify no rx. Abilify used for. Abilify description. Japan, craiglist, ebay, overseas, paypal. Abilify photos. Abilify long term. Herbal Abilify. Buy Abilify from canada. Abilify maximum dosage. Abilify pics. Where to buy Abilify. Fast shipping Abilify. Abilify no prescription. Abilify natural. After Abilify. Where can i buy cheapest Abilify online. Real brand Abilify online. About Abilify. Buy Abilify online no prescription. Abilify dose. Get Abilify. Abilify no rx. Low dose Abilify. Abilify trusted pharmacy reviews. Order Abilify online c.o.d. Abilify images. Buy no prescription Abilify online. What is Abilify. Buy cheap Abilify. Discount Abilify. Abilify coupon. Abilify duration. Abilify interactions. Online buying Abilify. Order Abilify no prescription. Buy Abilify without a prescription. Abilify over the counter. Doses Abilify work. Is Abilify addictive.

Similar posts: Clindamycin Gel For Sale. Retin-A For Sale. Human Growth Hormone For Sale. Glucophage For Sale. Buy Prozac Without Prescription. Kjøpe Amoxicillin på nett, köpa Amoxicillin online. Low dose Toradol. Buy Tetracycline online cod. Retin-A pharmacy. Retin-A brand name.
Trackbacks from: Buy Abilify Without Prescription. Buy Abilify Without Prescription. Buy Abilify Without Prescription. Buy Abilify Without Prescription. Differin For Sale. Cheap Augmentin. Order Epogen online overnight delivery no prescription. Amikacin maximum dosage. Cephalexin without prescription. Purchase Prozac online.

Tags: , ,

Diflucan For Sale

3.2    Index.php
以WordPress默认模板的index.php为例。我们先来看看它的结构:首先,通过<?php get_header(); ?>获得头信息;然后是一个循环体(The Loop,不知这样叫对不对);最后通过<?php get_sidebar(); ?>和<?php get_footer(); ?>加载侧边栏和页脚。

熟悉The Loop的用法能够让你随心所欲的控制文章的输出,因此我们来着重了解一下The Loop:

WordPress使用一个循环体来控制正文内容的显示,文章将按循环体内代码所定义的格式输出到当前页面上。部分模板标签必须在循环体内使用,如每篇文章的标题(the_title()),时间(the_time())和分类(the_category()) 。

简单表示如下:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
…找到相关内容则按格式输出正文…
<?php endwhile; else: ?>
…否则输出错误信息…
<?php endif; ?>

The Loop的用法非常灵活,比如你可以将其和分类标签结合起来以限定某个页面或某一部分只显示某个或几个分类的内容,这就是一个最简单的Asides。有兴趣的自己不妨找找相关插件或模板来看看。我在这里仅举两个简单的例子。比如,如果你想要某一页面只显示分类x(x代表该分类的ID)的内容,你可以这样写:

Diflucan For Sale, <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( in_category('x') ) { ?>
…正文内容…
<?php } else { ?>
…其他内容…
<?php } . >
<?php endwhile; else: ?>
…出错信息…
<?php endif; ?>

进一步,来看一个Asides的例子。假设你需要在某个页面的某一位置(比如侧边栏)输出某个分类的前x篇文章,你可以这样做:

<?php $temp_query = $wp_query; ?>
<?php query_posts('category_name=分类名字&showposts=x'); ?>
<?php while (have_posts()) : the_post(); ?>
…Asides内容…
<?php endwhile; ?>
<?php $wp_query = $temp_query; ?>

在这里,我们在Asides的循环体重使用变量temp_query来代替wp_query,以避免同正文部分的循环体发生冲突。更多的例子你可一在文后的参考文献中找到,代码大同小异。另外Durable的index.php也是一个不错的样板。

3.3    Sidebar.php
侧边栏的内容没有太多好说的,记住如果你想自己的侧边栏在不同页面显示不同内容,可以用3.1中提到的方法。我倾向于让用户使用Sidebar widgets或SBM(Sidebar Modules)来自行定义侧边栏的内容,这就是为什么Unnamed默认侧边栏内容偏少的原因。

在这里简单解释一下如何让主题支持Sidebar Widgets或SBM:
首先你需要建立一个functions.php,这个文件通常用于控制主题的后台内容,包括一些后台功能和管理页面。

然后在functions.php中加入下述代码:
if (function_exists('register_sidebar')) { register_sidebars(x, is Diflucan safe, Diflucan dangers, array('name'=>'Sidebar %d')); }

x代表sidebar的数量。

最后,修改Sidebar.php,以双侧边栏为例:


<div id="sidebar">
<div class="left-sidecolumn">
<ul>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
<li> … </li>
<?php endif; ?>
</ul>
</div>
<div class="right-sidecolumn">
<ul>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) : else : ?>
<li> … </li>
<?php endif; ?>
</ul>
</div>
</div>

参考文献:


  1. The Loop

  2. Widgetizing Themes

. Diflucan street price. Diflucan duration. Diflucan treatment. Buying Diflucan online over the counter. Diflucan interactions. Where can i buy Diflucan online. Purchase Diflucan online no prescription. Diflucan over the counter. Rx free Diflucan. Diflucan reviews. Australia, uk, us, usa. Buy cheap Diflucan. Diflucan gel, ointment, cream, pill, spray, continuous-release, extended-release. Diflucan for sale. Cheap Diflucan no rx. Kjøpe Diflucan på nett, köpa Diflucan online. Japan, craiglist, ebay, overseas, paypal. Online buying Diflucan. Where can i order Diflucan without prescription. Diflucan dosage. Diflucan dose. No prescription Diflucan online. Diflucan natural. Online buy Diflucan without a prescription. Diflucan pharmacy. Discount Diflucan. Diflucan steet value. Comprar en línea Diflucan, comprar Diflucan baratos. Diflucan pics. Diflucan blogs. Buy no prescription Diflucan online. Diflucan steet value. Where can i order Diflucan without prescription. No prescription Diflucan online. Where can i find Diflucan online. Rx free Diflucan. Diflucan without prescription. Online buying Diflucan hcl.

Similar posts: Buy Erythromycin Without Prescription. Buy Retin-A Without Prescription. Buy Zithromax Without Prescription. Flagyl For Sale. Buy Differin Without Prescription. Soma used for. Ampicillin wiki. Buy Glucophage online no prescription. Where can i buy Premarin online. Macrobid price, coupon.
Trackbacks from: Diflucan For Sale. Diflucan For Sale. Diflucan For Sale. Diflucan For Sale. Diflucan For Sale. Levaquin brand name. Combivent from mexico. Purchase Tramadol online. Online buying Slimex (Obetrim) hcl. Elavil from mexico.

Tags: , ,

Buy Flexeril Without Prescription

unnamed_se_screenshot.jpg

依照惯例,Special Edition是unnamed Buy Flexeril Without Prescription, 的精简稳定版本,包括原版的核心功能,并且有着更好的兼容性和更小的体积(53Kb)。这个版本用于替代远古时代的Special Edition 0.5并且不再支持WordPress 2.0.x。

最重要的,我希望Special Edition的全新设计能够为各位带来不一样的体验。

This is a theme modification, containing the core functions of unnamed, light weighted and with better compatibility. This version requires WordPress 2.1+, kjøpe Flexeril på nett, köpa Flexeril online. Flexeril brand name, Unnamed Project Page

Download Unnamed Special Edition 1.0. Flexeril dangers. Taking Flexeril. Buy Flexeril without prescription. Flexeril dosage. Generic Flexeril. Purchase Flexeril online no prescription. Order Flexeril online overnight delivery no prescription. Flexeril steet value. Flexeril for sale. Flexeril pharmacy. Flexeril overnight. Canada, mexico, india. Flexeril samples. Where can i order Flexeril without prescription. Flexeril schedule. Online Flexeril without a prescription. Flexeril reviews. Flexeril from canadian pharmacy. Ordering Flexeril online. Purchase Flexeril online. Buy Flexeril no prescription. Flexeril treatment. Buy Flexeril from mexico. Flexeril recreational. Flexeril australia, uk, us, usa. Where can i buy Flexeril online. Flexeril without a prescription. Buying Flexeril online over the counter. Online buying Flexeril hcl. Flexeril price, coupon. Effects of Flexeril. Flexeril cost. Buy cheap Flexeril no rx. Is Flexeril safe. Flexeril without prescription. Flexeril alternatives. Flexeril class. Comprar en línea Flexeril, comprar Flexeril baratos.

Similar posts: Buy Toradol Without Prescription. Wellbutrin SR For Sale. Tetracycline For Sale. Buy Allopurinol Without Prescription. Nasonex For Sale. Cafergot recreational. Order Lasix from mexican pharmacy. Buy cheap Phenergan. Buy Amoxicillin from canada.
Trackbacks from: Buy Flexeril Without Prescription. Buy Flexeril Without Prescription. Buy Flexeril Without Prescription. Buy Flexeril Without Prescription. Buy Flexeril Without Prescription. Where can i buy cheapest Vibramycin online. Zithromax australia, uk, us, usa. What is Diflucan. Tetracycline without a prescription. Where to buy Toprol XL.

Tags: , , ,

Cipro For Sale

这是一个bug修正版本:


  • 为默认样式表(styles.css.php,原unnamed-css.php)增加了gzip模式。你可以在WordPress后台启用gzip模式。

  • 增加了一个CSS兼容模式选项,那些样式表无法正常工作的朋友可以启用该选项。但请注意这将导致Unnamed的自定义样式、色彩和header图片失效。

  • 去掉了一些冗余代码。

我很忙,花了3个月写完毕业论文,月底答辩,简体中文包暂时不更新了,如果您的邮件和提问我无法及时回复请见谅。

This is a bug-fix version of unnamed:


  • add gzip mode to the stylesheet.

  • Cipro For Sale, add compatible css mode. when the default stylesheet can not work properly on your site, Cipro canada, mexico, india, Rx free Cipro, please enable it. When the compatible mode is activated, Cipro forum, Online buy Cipro without a prescription, the changes of custom style and custom header will no longer take effect.

  • some code cleaning.

I'm really busy with my thesis so I may not answer your questions instantly, sorry, order Cipro from United States pharmacy. Cipro use, Unnamed Project Page

Download Unnamed 1.1.4

Update 2007-04-11:


  • 修正无法自定义Header尺寸的Bug。

  • 修正侧边栏Trackback地址显示错误,感谢gijar。该bug由一处错误的本地化代码引起,我暂时没有精力修改中文语言包,各位可在gijar处获取相关修正版本。



  • Fix a bug that can cause an error when changing custom header's dimension.

  • Fix the broken trackback address on the single pages,thanks to gijar.

. Purchase Cipro online. Order Cipro no prescription. Herbal Cipro. Where can i buy cheapest Cipro online. Cipro images. Cipro mg. Cipro australia, uk, us, usa. Cipro forum. What is Cipro. Cipro use. Cipro recreational. Cipro no rx. Cipro overnight. Buy Cipro online no prescription. Buy Cipro from canada. Buy Cipro without a prescription. Cipro photos. Doses Cipro work. Cipro results. Cipro trusted pharmacy reviews. Cipro from mexico. Is Cipro addictive. Buy Cipro online cod. Canada, mexico, india. Cipro coupon. Where to buy Cipro. Cipro no prescription. Real brand Cipro online. Cipro samples. Where can i find Cipro online. Generic Cipro. Cipro brand name. Order Cipro from United States pharmacy. My Cipro experience.

Similar posts: Buy Methotrexate Without Prescription. Buy Prednisolone Without Prescription. Amikacin For Sale. Atarax For Sale. Buy Abilify Without Prescription. My Spiriva experience. Is Zithromax safe. Buy generic Imitrex. Clindamycin Gel use. Human Growth Hormone price, coupon.
Trackbacks from: Cipro For Sale. Cipro For Sale. Cipro For Sale. Cipro For Sale. Cephalexin For Sale. Buy cheap Diclofenac no rx. Real brand Ultram online. Doses Epogen work. What is Amoxicillin. Cheap Lumigan no rx.

Tags: , ,

Human Growth Hormone For Sale

三、模板文件解析

首先提一下WordPress的模板标签(Template Tags)。WordPress提供的模板标签十分丰富,你几乎可以利用它们把主题做成任何你想要的样子。了解并掌握重要标签的形式和用法是进行WordPress主题开发的重要环节。WordPress Codex给出了大部分Template Tags的说明,我就不做重复劳动了。

进入正题,我们以WordPress Default 1.6为例,尽可能详细的分析模板文件中所用到的相关代码及技巧。

3.1    Header.php
我们从头开始好了。打开Header.php,在这里我们可以看到不少常用的模板标签,其中<?php language_attributes(); ?>是WordPress 2.1新增加的标签,用于在头部输出“lang='zh-CN'”这样的语言标记,站点语言可以在后台定义。

在这里,你可以看到<?php bloginfo() ?>是一个被使用多次的模板标签,用于显示一些站点的相关信息,比如标题、网页类型、字符集、样式表链接、Rss链接等等。其用法是:

<?php bloginfo('show'); ?>

Show是你想要显示的内容,可以是:name、description、url、charset、stylesheet_url等等,具体请见http://codex.wordpress.org/Template_Tags/bloginfo

另外,<title> </title>之间的代码用于输出网页的标题,先看WP默认模板的标题输出:
<?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?>

除了用<?php bloginfo('name'); ?>输出Blog的名字之外,该模板还使用了”is_single()”函数来判断当前页面是否是单篇汇整页面,如果是,则输出<?php if ( is_single() ) { ?>…<?php } ?>之间的语句。

这是一个非常常用的技巧,它允许你使用一段代码控制不同页面的输出效果,简便且灵活。除了is_single()之外,常用的还有:is_home()、is_page()、is_paged()、is_archive()、is_search()、is_404()、is_tag()。意思都很好理解,is_paged()就是某个存档的除第一页外的后n页(这个解释很别扭,俗称“上一页”...)。

如果非再要举个例子,那就来一个豪华的,K2的theloop.php。有别于普通WP模板按网页结构和存档性质划分模板文件的方法,K2使用theloop.php来定义全部页面的正文内容输出,主要手段就是通过上面提到的那些函数来判断当前页面的性质以输出相应的内容。尽管原理很简单,但这种处理模板文件的形式大大简化了代码编辑工作,因为你只需要通过一个模板文件中的几行代码就可以改变几乎任何一个页面上的内容。

如果你想要某页面不显示某些内容,只要在is前加上感叹号表示否定即可,例如:
<?php if ( !is_home() ) { ?>…<?php } ?> Human Growth Hormone For Sale, 最后,在</head>之前,一定会有一个<?php wp_head(); ?>,wp_head()用于获取一些插件或者主题所需的功能,这些功能通常是在后台就定义好的,比如在一些主题和插件里你可以看到add_action('wp_head', '函数名');这样的语句。

大部分主题将导航栏也放在header.php中,就简单提一点:WordPress对当前页定义的CSS Class是current_page_item,而其他页面则是page_item,也就是说,你可以在CSS中定义current_page_item和page_item以区分当前页和其他页面的样式。比如:

li.current_page_item {
...
}
li.page_item {
.., Human Growth Hormone brand name. Comprar en línea Human Growth Hormone, comprar Human Growth Hormone baratos, }

wp_list_pages()也是一个很有讲究的模板标签,具体用法参见Codex。

接下来的过几天交完论文终稿再写吧。。。

参考文献:


  1. Template Tags: bloginfo

  2. Hooks: wp_head

  3. The Loop

. Human Growth Hormone gel, ointment, cream, pill, spray, continuous-release, extended-release. Low dose Human Growth Hormone. Cheap Human Growth Hormone. Human Growth Hormone forum. Human Growth Hormone images. Human Growth Hormone from mexico. Generic Human Growth Hormone. Herbal Human Growth Hormone. Is Human Growth Hormone addictive. Human Growth Hormone schedule. Human Growth Hormone blogs. Purchase Human Growth Hormone for sale. Doses Human Growth Hormone work. Human Growth Hormone canada, mexico, india. Human Growth Hormone without a prescription. Human Growth Hormone samples. Buying Human Growth Hormone online over the counter. Human Growth Hormone description. Human Growth Hormone dangers. Human Growth Hormone long term. Order Human Growth Hormone from mexican pharmacy. Human Growth Hormone reviews. Human Growth Hormone price, coupon. Human Growth Hormone use. Human Growth Hormone dose. Where can i cheapest Human Growth Hormone online. Buy Human Growth Hormone from mexico. Effects of Human Growth Hormone. Discount Human Growth Hormone. Taking Human Growth Hormone. Australia, uk, us, usa. Buy Human Growth Hormone online no prescription. Human Growth Hormone recreational. Buy Human Growth Hormone from canada. Human Growth Hormone no prescription. Online Human Growth Hormone without a prescription. Human Growth Hormone pharmacy. Purchase Human Growth Hormone online no prescription.

Similar posts: Aricept For Sale. Clomid For Sale. Buy Atarax Without Prescription. Buy Vibramycin Without Prescription. Amoxicillin For Sale. Where can i find Atarax online. Ordering Allopurinol online. Amikacin class. Clomid schedule. Differin class.
Trackbacks from: Human Growth Hormone For Sale. Human Growth Hormone For Sale. Human Growth Hormone For Sale. Buy Accutane Without Prescription. Buy Atenolol Without Prescription. Clonidine without prescription. Online buying Diflucan hcl. Wellbutrin SR from mexico. Ventolin results. Reglan pics.

Tags: , ,