翻译:wordpress杂志型模板BranfordMagazine的一般使用及配置
BranfordMagazine模板作者撰写的使用说明,在他的网站上有英文和好像是德文的版本,我自然都不能直接阅读。为了用起这个模板,没办法只好自己翻了翻,工具使用了google翻译,我英文够烂,所以下面采取了一段英文一段中文的方式以方便比对阅读。翻的很烂,不过我自己是看明白了
!
原文地址:http://www.der-prinz.com/2008/01/20/wordpress-magazine-style-theme-branfordmagazine/
General useage of the theme and configuration
BranfordMagazine is built to support the current version of Wordpress (2.3). If you get fatal errors related to tags (”Call to undefined function: is_tag”), please upgrade.
In the “index.php” and “sidebar.php” templates, you will find a series of query_posts functions which refer to specific category ID numbers from my database.
Example:
< ?php query_posts(’showposts=1&cat=4′); ?>
You will need to change them to reflect the ID numbers in your own database. They can be found in your control panel under Manage >> Categories.
一般使用及配置
branfordmagazine支持当前版本WordPress(2.3),如果你发现诸如“致命错误”的标签("命名为不明函数:is_tag" ),请升级。
在"index.php"和"sidebar.php"模板中,你将发现一系列的query_posts函数,它们指特定分类的ID。
例如:
< ?PHP query_posts(’showposts=1&cat=4′); ?>
你需要改变它们,以指明它们在你数据库中的ID,ID可以在你控制面板下的 管理>>类别 中找到。

分类ID示例
How to use the tabed section and the lead story
BranfordMagazine features a lead story with a photo, a category title, an article title and an excerpt. This is part of the tabed section on top of the homepage. The content of the tabed section will be defined and configured in the “tabs.php” file. Everything that is displayed as a tab and its content has to be configured here.
Let’s start with the photo. First find an appropriate image and resize it to a size that fits (300×200px is fine). Next,upload it using standard WP-Upload functionality. Make sure the standard upload path is used (normally /wp-content/uploads/).
Write your story and put it into the right category (Standard is the category with ID 1). You might also write an optional excerpt for full text control.
Define the custom field key and value by typing the name of the key “leadimage” and it′s value which is the path of the image after /wp-content/uploads/. This is quite easy to find in the uploader of the post. Once you have typed in a key it is available for all other posts, so you don′t have to type it in twice. In the picture you see all required keys and an example of the value for the lead image.
You can put almost any type of content into the tabed section like most recent posts, popular posts, recent comments or simply some text. For some purposes you need to install certain plugins (like for the popular posts).
如何使用tabed section(标签分页界面)和lead story(头条文章)
branfordmagazine features(branfordmagazine特写)是一篇带照片的头条文章、一个类别标题、一个文章标题或一个摘要。这是网页顶部tabed section的一部分,这个tabed section的内容在“tabs.php”中定义和配置。一切都显示为一个标签,其内容已被配置在这里。
让我们从照片开始。首先找到一张大小合适的图片(300×200px就不错),接下来,使用标准wp上传功能上传它,确保标准上传路径可用(一般为:/wp-content/uploads/)。
写出你的文章,并把它归入正确的类别(通常这个类别的ID是1 ),您可能会再写一篇全文摘要。
在“自定义字段”中分别输入“key(键)”——“leadimage”和它的“value(值)”即/wp-content/uploads/之后的图片路径,这在张贴上传位置很容找到。一旦你输入了一个“key”后,它在其它时候都可用,所以你不需要两次输入它。在下面这张图片中,下图所有需要用到头条图片的“key”值。
所有需要的自定义字段(点击打开大图)
(具体你可以在tabs.php、index.php等文件代码的相关部位看到一些()括起来的字样,它们就是在那设置图片的“key”)。
你可以把几乎任何类别的内容纳入tabed section中,比如“最新的文章”、“最受欢迎的文章”、“最新的评论”或干脆一些文本。出于一些目的,你需要安装某些插件(如为热门文章)。
The idea behind the featured articles is to have a category for teasers, specials and whatever you like to show in a featured way.
Create a category and name it e.g. “Featured Articles”. Make sure the ID of this category is called in the relevant area in the index.php file.
The relevant area is called “leftcol”. You have to define the Featured Article category in the query_posts call. While “showposts=3″ means the three most recent posts from the category are displayed and “cat=7″ means the category with ID 7. You have to define the ID once again in the wp_list_catagories template tag. You have to use custom fields again to display the image here and the key for that field is “featuredarticleimage”.
If you don′t want to display the Featured Articles category in the Sidebar you have to exclude it.
featured articles(特集)部分
“featured articles”部分的设计思路就是假设有一个难以处理的类别,用来展示特别的或任何类型文章的一个特别方式。
新建一个类别,命名为例如:“Featured Articles(特集)”,确保这个类别的ID在index.php的“相关位置”中(如图)。
特集的示例代码(点击打开大图)
“相关位置”是指“leftcol”,你必须确定“Featured Article”类别在query_posts中被引用,而"showposts=3"是指显示3篇最新的文章,
"cat=7"是指类别ID为7。你要再次使用自定义字段去显示图片,自定义字段中的“key”填写为"featuredarticleimage"。
如果你不想在侧栏中展示“Featured Article”,你就去掉它。
The middle homepage column
In the middle column you can teaser the first article of any other catagory except the News and the Featured Articles (of course you can show these as well but does that really make sense?). The excerpt of the most recent article of each category will be shown here. In the demo you see the first one with a thumbnail image and the others without. If you like to give it a thumbnail you have to use custom field again. The key for this custom field is “rightcolimage” and it works in the same way as for the Featured Article and the Lead Article.
The middle homepage column(中栏)
在中栏你可以放置(?)除“新闻”和“特集”类别外任一类别的第一条(当然,你也可以在这展示它们,但是真的有意义吗?)。每一类别中最新一篇文章的摘要将在这里显示。在这个demo中你看到第一个类别文章带一个缩略图,而别的类别文章没带,如果你想让它也带缩略图,你必须再次使用自定义字段。这个自定义字段的“key”值"rightcolimage",与“Featured Article”、“Lead Article”使用同种方式工作。
Special page templates: The Featured Page
This theme comes with two additional templates for static WordPress pages. One is the “Featured Page” template. Its purpose is to build a page that has some featured content on top that comes along with an image of the same size like the homepage image in the tabed section (300×200px). You have three different areas you can edit seperately by using – you guessed it – custom fields again.
1. The featured page headline
2. The featured page copy (text)
3. The featured page image
If you set up this custom fields correctly it should look kinda like that:
And the result will be like that.
Below the top-section that is powered by the custom fields you see the regular content that you entder via the WordPress writepanel.
Special page templates: The Featured Page(特殊页面模板:精选页)
这个主题具有两个额外的静态WordPress页模板,其一为“精选页”模板,其目的是要建立一个有些特殊内容的页面,都带1个大小一样的图象,如在“tabed section”的网页图像( 300 × 200px )。你可以——猜一下——再次使用自定义字段编辑这三个不同的字段。
1. The featured page headline1(精选页标题)
2. The featured page copy (text)(精选页副本[文字])
3. The featured page image(精选页图片)
如果你恰当的设置了自定义字段,它看上是这样的:
特殊页面代码(点击打开大图)
结果将像这样:
上部顶端部分靠近自定义字段控制,你可以看出这些是通过WordPress撰写面板来实现的。
Special page templates: The 3-Columns-Page
This template gives you the opportunity to display three different categories in a static page. It can be a nice starting point if you use it e.g as the entry for a news section with three sub-categories. You don′t have to enter any content via the WP write panel since this page shows the most recent posts from three categories that you define.
The code for the three columns uses three different loops (what a surprise) to display the most recent post of three different categories and custom fields to display the image on top of each article. In addition the three most recent posts of the specific category are teasered below the excerpt of the post.
I assume the screenshot makes it clear. if not check out the WordPress Codex for a whole universe of interresting and helpfull stuff about our favorite blogging system Important code areas of the 3-Column-Page template.
Special page templates: The 3-Columns-Page(特殊页面模板:3栏页)
这个模板让你有机会在一个静态页面中展示三个不同类别,你可以将它做为一个很好的起始页使用,例如进入新闻门类的3个下层类别。你在这页不用通过WP撰写面板来发布任何内容,是哪三个类别的最新发布文章由你设定。
这三栏的代码使用了3个不同的循环(不要奇怪)以展示三个不同类的最新发布,通过自定义字段在每一篇文章顶端显示图片,再加上三篇最新的特殊类别的文章,下面跟着文章摘要。
我想截图是清楚的,如果没有检查WordPress规则食品法典委员会(??·#¥%!!%¥~~~~
),为整个宇宙的interresting和有益的东西,我们最喜欢的blog系统。
3栏页模板的重要代码域(点击打开大图)
The result should look more or less like this.
Tested in
- Firefox
- Internet Explorer 7
- Internet Exporer 6
- Opera
That′s it so far. More details will follow soon. I hope this little documentation helps you to set up the first steps with BranfordMagazine. If you need any support, contact me.
结果应该看看较多或较少这样。(?·#%%##!!~~~~~
)
测试通过
-Firefox
-IE7
-IE6
-Opera
很快,更多的详细资料将会问世,我希望这个小文档可以帮你首次设置branfordmagazine。如果你需要任何支援,与我联系。
不错我正找这个模板的使用方法呢,作者真极时,并且现在用的这款改的也是那么的棒!精典!
对于我一个WP菜鸟操作起来可能有些不太手生!:)
太好了,好好学习学习!正准备研究研究这个theme,谢谢!
完全按照作者的意思改的,但图片还是不能显示,可能是那个环节露了吧。希望站长收信留言后提供指点,谢谢!peiqingxin@gmail.com
to:裴庆新 也许是键值搞混了?也许是取的图片路径不正确?例如一张图片的URL是:/wp-content/uploads/2008/01/1.jpg,则取2008/01/1.jpg这一部分即可。
[...] http://www.augcy.com/2008/02/246 [...]
[...] 使用说明(中文):http://www.augcy.com/2008/02/246 Tags: 主题 [...]
请问:Special page templates: The 3-Columns-Page(特殊页面模板:3栏页)在导航栏怎么显示?谢谢!
to jackie:3栏页好像是个“页面”,你建立了以后应该会自动出现在导航栏吧。
我很喜欢Branford Magazine这个主题.可是我真的不知道如何安装,你能教我吗.我上网查了好久都没有找到比你更详细的安装了.你有QQ吗.我的QQ是:79100101.如果你不介意可以加我.做个朋友.好吗?
如果看到这个详细的说明还是真的不知道如何安装,建议你换个别的试试,WP的主题千千万……
请教一下:顶部下拉菜单如何显示?中文如何限定字数?谢谢
好久以前用过的这个主题 现在也不很熟悉了 呵呵 抱歉