Archive for the ‘Wordpress’ Category:
Page rank 4 now.
好久没写博了,这两天网站的PR更新了,上来看一下,居然到4了,有9分意外。刚进入后台一看,68个Comments,68个垃圾广告。 --统删。 近来,有朋友问要此皮,有空整理一下,一定会共享出来。
---------------------------------------
此博所有文章都是英文标题,中文内容。 不知是不是这个原因,baidu就将这个站看成是英文站了,从久久前都是只收录首页,其他页面却从不关心。 而google却对此博非常关照,每次更新后,不到3小时都会收录下来。对于google的照顾,我想是不是应该给此博加上多语言插件。 做的另一个站(KPC),google却不会给那么多关照,更新页面后总要过两三天才能收录。 这也很有可能是与链接结构有关。 若是做网站的话,用此博的链接结构会很难看。网站会有blog部分,是应该研究一下如何让网站以网站的链接结构存在,而网站的blog以此博这样的链接结构存在。
-------------------------------------------
最近重装系统几次,已经彻底抛弃了xp,现在用vista,用购买的HB版本就是不爽,非要用盗版的U版,这就是中国人吧,呵呵。 抛弃了xp,也抛弃了IE,现在已经习惯了使用Firefox。装上插件后,感觉的确很舒服。FF装了的插件有:
AI Roboform Toolbar for Firefox
Easy DraTogo
Fast Dial
FireGestures
Foxmarks Bookmark Synchronizer
IE Tab
SearchStatus
Torbutton
记录一下,以后再装时,就方便查找了。
--------------------------------------
Show category list in wordpress page
现在用Wordpress做KPC网站,会用到分类贴子列表调用,所以在网上查了一下,记录下来。
<?php $posts = get_posts( “category=2&numberposts=8″ ); ?>
<?php if( $posts ) : ?>
<ul><?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<li>
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_title(); ?></a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
其中
<?php $posts = get_posts( “category=2&numberposts=8″ ); ?>
的category=2&numberposts=8分别是分类ID和调用条数。
WordPress 2.5.1
The latest stable release of WordPress (Version 2.5.1) is available in two formats from the links to your right. If you have no idea what to do with this download, we recommend signing up with one of our web hosting partners that offers a one click install of WordPress or getting a free account on WordPress.com.
What’s Next?
With our famous 5-minute installation, setting up WordPress for the first time is simple. We’ve created a handy guide to see you through the installation process. If you’re upgrading your existing installation, we’ve got a guide for that, too. And should you run into any trouble along the way, our support forums are a great resource, where seasoned WordPress experts volunteer their time to help you get the most out of your blog.
Theme For WordPress Administration Panel
WordPress 的DIYer们真是无孔不入呀,各式各样的前台Style琳琅满目,而在刚才又在网上发现了Administrator panel的Theme,因为还没有亲自体验,所以截图先不放上来,记录下链接地址吧:
1、Shuttle
http://www.brokenkode.com/shuttle/
2、planet-x7
http://www.sevban.com/wordpress/planet-x7-wordpress-admin-theme/
以上的两款在本文发布之时还不支持wordpress2.5,蓝色系列。
3、Fluency
http://www.deanjrobinson.com/projects/fluency-admin/
这第三款是支持WordPress 2.5的,可能会在明天亲自试用一下,因为在他给出的截图上看,界面非常的细腻,很是喜欢。
Wordpress 2.5 file uploader fix for ie
wp-admin/includes/media.php
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
debug: false, <!– Old –>
debug: false <!– New –>
});
$(”#flash-browse-button”).bind( “click”, function(){swfu.selectFiles();});
});
————————-
wp-includes/js/swfupload/handlers.js
jQuery(’#media-item-’ + this.id + ‘ .filename’).append(’ ‘+swfuploadL10n.deleted+’‘).siblings(’a.toggle’).remove();
jQuery(’#media-item-’ + this.id).children(’.describe’).css({backgroundColor:’#fff’}).end()
.animate({backgroundColor:’#ffc0c0′}, {queue:false,duration:50})
.animate({minHeight:0,height:36,}, 400, null, function(){jQuery(this).children(’.describe’).remove()})
.animate({minHeight:0,height:36}, 400, null, function(){jQuery(this).children(’.describe’).remove()})
.animate({backgroundColor:’#fff’}, 400)
.animate({height:0}, 800, null, function(){jQuery(this).remove();updateMediaForm();});
WordPress 2.5
WordPress 2.5, the culmination of six months of work by the WordPress community, people just like you. The improvements in 2.5 are numerous, and almost entirely a result of your feedback: multi-file uploading, one-click plugin upgrades, built-in galleries, customizable dashboard, salted passwords and cookie encryption, media library, a WYSIWYG that doesn’t mess with your code, concurrent post editing protection, full-screen writing, and search that covers posts and pages.
For a short overview of the features with screenshots, it’d be best to visit our sneak peek announcement for RC1. Or check out a 4-minute screencast of the new interface in action. If you just want to jump straight to the good stuff here’s where you can find 2.5 upgrade and download information.
If you want to see everything I would grab a cup of coffee or a mojito, because this post is epic.
User Features
Cleaner, faster, less cluttered dashboard - we’ve worked hard to take your feedback about what’s most important in the dashboard and organize things to allow you to focus on what’s important - your blog - and get out of your way. In collaboration with Happy Cog and the community we’ve taken the first major step forward in the WordPress interface since version 1.5.
Dashboard Widgets - the dashboard home page is now a series of widgets, including ones to show you fun stats about your posting, latest comments, people linking to you, new and popular plugins, and of course WordPress news. You can customize any of the dashboard widgets to show, for example, news from your local paper instead of WP news. Plugins can also hook in, for example the WordPress.com stats widget adds a handy double-wide stats box.

Multi-file upload with progress bar - before when you would upload a large file you’d wait forever, never knowing how far along it was. And uploading more than one photo was an exercise in patience, as you could only do one at a time. Now you can select a whole of folder images or music or videos at once and it’ll show you the progress of each upload.
Bonus: EXIF extraction - if you upload JPEG files with EXIF metadata like camera make and model, aperture, shutter speed, ISO, et al. WordPress will extract all the data into custom fields you can use in your template. If you use the EXIF title fields or similar those will be put into their equivalent fields in WP. Most modern digital cameras generate EXIF data.
Search posts and pages - search used to cover just posts, now it includes pages too, a great boon for thoe using WordPress as a CMS. New themes can style or sort pages differently in results.
Tag management - you can now add, rename, delete, and do whatever else you like to tags from inside WordPress, no plugins needed.
Password strength meter - when you change your password on your profile it’ll tell you how strong your password is to help you pick a good one.
Concurrent editing protection - for those of you on multi-author blogs, have you ever opened a post while someone was already editing it, and your auto-saves kept overwriting each other, irrecoverably losing hours of work? I bet that added a few words to your vocabulary. Now if you open a post that someone else is editing, WordPress magically locks it and prevents you from saving until the other person is done. You’ll see a message like below.

Few-click plugin upgrades - if the plugins you use are part of the plugin directory since 2.3 we’ve told you when they have an update available. Now we take that to the next logical step - downloading and installing the upgrade for you. This is dependent a little bit on your host setup, and it may ask you for your FTP password much like OS X or Windows will ask you for a password, but it works well on majority of hosts we were able to test, your mileage may very, plugins in mirror may be larger than they appear.
Friendlier visual post editor - I’m not sure how to articulate this improvement except to say “it doesn’t mess with your code anymore.” We’re now using version 3.0 of TinyMCE, which means better compatibility with Safari, and we’ve paid particular attention this release to its integration and interaction with complex HTML. It also now has a “no-distractions” mode which is like Writeroom for your browser.
Built-in galleries - when you take advantage of multi-file upload to upload a bunch of photos, we have a new shortcode that lets you to easily embed galleries by just putting [ gallery] (without the space) in your post. It’ll display all your thumbnails and captions and each will link each to a page where people can comment on the individual photos. I’ve been using this feature on my blog and have already uploaded over 1,200 pictures into 23 galleries. The shortcode has some hidden options too, check out this documentation.
Developer Features
Now for the geeky stuff. While we’re excited about the above features, each one represents a new opportunity or API for other developers to take to another level. (The best of which we’ll someday integrate back into WP.)
Salted passwords - we now use the phpass library to stretch and salt all passwords stored in the database, which makes brute-forcing them impractical. If you use something like mod_auth_mysql we’ve created a plugin that will allow you to use legacy MD5 hashing. (The hashing is completely pluggable.) Users will automatically switch to the more secure passwords next time they log in.
Secure cookies - cookies are now encrypted based on the protocol described in this PDF paper. which is something like user name|expiration time|HMAC( user name|expiration time, k) where k = HMAC(user name|expiration time, sk) and where sk is a secret key, which you can define in your config.
Easy taxonomy and URL creation - probably best illustrated with an example: I can call register_taxonomy() with a few arguments to register a “people” taxonomy and whenever I edit an image I’ll see a UI like tags has for identifying the people in a photo, and these will be URL addressable with /person/firstname-lastname/. All with a single function call.
Inline documentation - the vast majority of the new code going into WordPress include inline documentation that explains the functions and documents their arguments.
Database optimization - we haven’t changed the table layout in this release, which is one of the reasons so many plugins work fine with 2.5. We have added a few new indicies and made a few default fields more flexible based on some bottlenecks we found on WordPress.com, which now hosts 2.7 million WordPress blogs. It should be invisible to the application, just a bit faster on the database side.
$wpdb->prepare() - now almost all of the SQL in WordPress is prepared first, and the same functions are available to your plugins. This should prevent elementary SQL escaping issues.
Media buttons - the add media buttons above the post are both expandable, so you could have an “Add Google Map” button if you like, They can be overridden, so if you think you can do the video or audio tab better than we have you can replace the default.
Shortcode API - the new gallery functionality is powered by the new shortcode API. Shortcodes are little bracket-delineated strings that can be magically expanded at runtime to something more interesting. They give users a short, easy to type and copy/paste string they can move around their post without worrying about messing up complex HTML or embed codes. The Shortcode API is fully documented.
Now you see why 2.5 took a little extra time. ![]()
Upgrade Notes
The upgrade instructions for this version are pretty much the same as any other version. The most important thing to check is your plugins, so if for example everything works except the new uploader, a legacy plugin might be causing a javascript error on the page and breaking it. If something goes wrong, the safest thing to do is turn your plugins off (we have a button to do them all at once, now) and turn them back on one-by-one, testing the problem along the way. This has solved almost everybody’s problems in testing, and it also lets you know which plugin author to show some love to so they’ll update their plugin, and which plugin authors already have so you can shower them with praises on your blog.
One brief note about some of the new upload and plugin upgrade features, there are some edge-case hosting platforms, like versions of Lighttpd before 1.5 or over-agressive mod_security rules, which can break. If something isn’t working like it was looked in the screenshot, ask your host if there’s something on the server side which may be interfering. Hosts, feel free to join and post to our wp-testers mailing list if you have an environment that requires some extra code to work around. We’d be happy to include it in the next update.
Quick tip: in 2.5 you click the name of things to edit them, like your username to edit your profile or the title of a post to edit it.
The Community is Growing
More than growing, it’s on fire. We always talk about things like downloads, and the 2.3 branch has already had 1.92 million downloads as I write this post, but this time we have some far more interesting information I’d like to share.
There were over 1,200 commits to our repository since 2.3.0 and over 90 people were credited in them. This means in our core code, not plugins, there were at least 90 individual folks that contributed something high-quality enough that it made the cut to be part of the download you guys get today. I had no idea this group of people was so large.
Outside of the core commit team, there was particular help from these people, in rough order of number of credits and tickets: mdawaffe (Michael Adams), azaozz (Andrew Ozz), nbachiyski (Nikolay Bachiyski), andy (Andy Skelton), iammattthomas (Matt Thomas), tellyworth (Alex Shiels), josephscott (Joseph Scott), lloydbudd (Lloyd Budd), DD32 (Dion), filosofo (Austin Matzko), hansengel (Hans Engel), pishmishy, ffemtcj, Viper007Bond, ionfish (Benedict Eastaugh), jhodgdon (Jennifer Hodgdon), Otto42, thee17 (Charles E. Free-Melvin), and xknown. Also want to thank MichaelH and Lorelle on the documentation side, and moshu, Kafkaesqui, whooami, MichaelH, Otto42, and jeremyclark13 for helping with support.
The 2.5 branch is nicknamed “Brecker” in honor of Michael Brecker, an exceptionally talented saxophonist who could cross styles effortlessly and never stopped experimenting and pushing himself until he passed away last year.
New WordPress.org
All of this wasn’t enough, so in our copious spare time we decided to redesign WordPress.org to better match the aesthetics of the new dashboard and also to spruce up a few areas that needed lovin’. Some parts of the site, like the Codex, might show the old style for a day or two. We know, just give us a bit of time. Thanks to Matt Thomas for his epic effort in designing and coding the new site.
What’s Next
As always with WordPress, we don’t claim any of these features to be perfect, or to be better than everyone else in the world, but they are done by and for the people and the one thing we do promise is that with every release we listen and do our best to improve.
2.5 is a major milestone for WordPress not because it added dozens of user-requested features, but because it reaffirms that we’re as passionate about blogging as the day we started. Our community is too fierce to rest on its laurels - contrary to what pundits claim, blogging is far from “finished” and every improvement just whets our appetite for more. And more is coming.
It’s a good thing WordPress doesn’t limit the length of posts, because this one would have hit it. If you made it this far, thanks for sharing a bit of your day with us. I sincerely hope this new version of WordPress helps you do what you love to do.
Free Premium Wordpress Themes - Free Blogger Templates
Blue jeans wordpress theme.

The theme would be available as a two and three column theme.
Some of the features are:
Widget ready
resolution independent
Docking boxes side bar
Download links: Visit & Download | Download
一款非常精细的主题,当第一眼看到它时,真让我眼前一亮,不由得感叹其创意和页面中图片的细腻表现。
Old place new outset
几年的米了,日志程序换了又换,日志地方换了又换,数据丢了又丢(这次是故意丢的),唯一不变的,还是这个米aoxia.com
前天看了WordPress出了个2.5RC 喜欢体验新鲜的我又装上玩玩。 后台还真是大变动呀。
后台变了,前台也不能寂寞呀,索性做了一个皮。 说真的,对这皮的设计倒是简单,但制作却让我郁闷了一大会。。。之前没这么彻底的做过,都是找个布局相似的改改。 这一做下来,可学习到不少东西。
话不多留,纪念一下这皮的基本出锅,上张设计时的稿图。

Wordpress templet help for chinese
Wordpress模板基本文件
style.css 样式表文件
index.php 主页文件
single.php 日志单页文件
page.php 页面文件
archvie.php 分类和日期存档页文件
searchform.php 搜索表单文件
search.php 搜索页面文件
comments.php 留言区域文件(包括留言列表和留言框)
404.php 404错误页面
header.php 网页头部文件
sidebar.php 网页侧边栏文件
footer.php 网页底部文件
Wordpress Header头部 PHP代码
注: 也就是位于<head>和</head>之间的PHP代码
<?php bloginfo(’name’); ?> 网站标题
<?php wp_title(); ?> 日志或页面标题
<?php bloginfo(’stylesheet_url’); ?> Wordpress主题样式表文件style.css的相对地址
<?php bloginfo(’pingback_url’); ?> Wordpress博客的Pingback地址
<?php bloginfo(’template_url’); ?> Wordpress主题文件的相对地址
<?php bloginfo(’version’); ?> 博客的Wordpress版本
<?php bloginfo(’atom_url’); ?> Wordpress博客的Atom地址
<?php bloginfo(’rss2_url’); ?> Wordpress博客的RSS2地址
<?php bloginfo(’url’); ?> Wordpress博客的绝对地址
<?php bloginfo(’name’); ?> Wordpress博客的名称
<?php bloginfo(’html_type’); ?> 网站的HTML版本
<?php bloginfo(’charset’); ?> 网站的字符编码格式
Wordpress 主体模板 PHP代码
<?php the_content(); ?> 日志内容
<?php if(have_posts()) : ?> 确认是否有日志
<?php while(have_posts()) : the_post(); ?> 如果有,则显示全部日志
<?php endwhile; ?> 结束PHP函数”while”
<?php endif; ?> 结束PHP函数”if”
<?php get_header(); ?> header.php文件的内容
<?php get_sidebar(); ?> sidebar.php文件的内容
<?php get_footer(); ?> footer.php文件的内容
<?php the_time(’m-d-y’) ?> 显示格式为”02-19-08″的日期
<?php comments_popup_link(); ?> 显示一篇日志的留言链接
<?php the_title(); ?> 显示一篇日志或页面的标题
<?php the_permalink() ?> 显示一篇日志或页面的永久链接/URL地址
<?php the_category(’, ‘) ?> 显示一篇日志或页面的所属分类
<?php the_author(); ?> 显示一篇日志或页面的作者
<?php the_ID(); ?> 显示一篇日志或页面的ID
<?php edit_post_link(); ?> 显示一篇日志或页面的编辑链接
<?php get_links_list(); ?> 显示Blogroll中的链接
<?php comments_template(); ?> comments.php文件的内容
<?php wp_list_pages(); ?> 显示一份博客的页面列表
<?php wp_list_cats(); ?> 显示一份博客的分类列表
<?php next_post_link(’ %link ‘) ?> 下一篇日志的URL地址
<?php previous_post_link(’%link’) ?> 上一篇日志的URL地址
<?php get_calendar(); ?> 调用日历
<?php wp_get_archives() ?> 显示一份博客的日期存档列表
<?php posts_nav_link(); ?> 显示较新日志链接(上一页)和较旧日志链接(下一页)
<?php bloginfo(’description’); ?> 显示博客的描述信息
其它的一些Wordpress模板代码
/%postname%/ 显示博客的自定义永久链接
<?php the_search_query(); ?> 搜索表单的值
<?php _e(’Message’); ?> 打印输出信息
<?php wp_register(); ?> 显示注册链接
<?php wp_loginout(); ?> 显示登入/登出链接
<!-next page-> 在日志或页面中插入分页
<!-more-> 截断日志
<?php wp_meta(); ?> 显示管理员的相关控制信息
<?php timer_stop(1); ?> 显示载入页面的时间
<?php echo get_num_queries(); ?> 显示载入页面查询
