Tag Archives: wp

Install WP-syntax Plugin

You can download the plugin from http://wordpress.org/extend/plugins/wp-syntax/. And it supports highlighting with or without line numbers and maintains formatting while copying snippets of code from the browser.

But it’s not very convenient to use it, when edit a post, I must use the ‘html view’ mode, and add

public class Hello {
  public static void main(String[] args) {
    System.out.println("Hello World!");
  }
}
class Example
  def example(arg1)
    return "Hello: " + arg1.to_s
  end
end

把数据从mt迁移至wp

wp现在推出了2.0,后台比以前人性化了一点。但编辑器依然让我不爽。
感觉wp用起来还是没有mt舒服。但wp也是需要考虑的一个blog。
wp2.0之后,导入mt数据比以前方便了很多。
具体方法是,在mt中选择 导入/导出,然后将数据导出,保存为一个txt文件。
然后进入wp,在后台选择导入。选择mt,然后按照提示进行即可
 

2005-12-31_08-56-50.jpg

MT分页的另类解决方法

网上关于mt的分页,也是一直在讨论。似乎也没有什么好的方法。
有一个相关的就是使用php来替代。但使用php,不如直接用wp了。今天作了一个测试,已经可以完美的把mt转换的wp了。
但还是不甘心放弃mt。
 
mt唯一让我不爽的就是不能分页。导致了分类归档的页面实在太长,太长
 
另类解决方法,也就是分页的一个变态解决方法
 
在分类归档的页面里面,找到
 <MTEntries>
修改为
 <MTEntries lastn="X">
其中,x为你想要分类归档显示的数目,就可以了。
如果想要看全部的,就search 和Archives