Recently in MT|WP Category

PageArchives插件

http://www.hinn.cn/mt/plugins/pagearchives.html

先记录到这里,有空了再参考这里的折腾上~

 

Paged Archives Plugin

http://www.aldenbates.com/plugins/pagedarchives.html

 

升级MT到4.32

| No Comments | No TrackBacks

参考之前的升级说明,直接照做就可以了,当然,升级之前一定做好mysql备份和MT自己的备份.

 

本次升级,解决了一个小错误提示,参考:

Problems with Movable Type and ImageMagick

http://www.guduo.net/2009/12/000231.html

 

mt-config.cgi加了一行:

ImageDriver NetPBM

 

 

 

http://kb.siteground.com/article/Problems_with_Movable_Type_and_ImageMagick.html

Problems with Movable Type and ImageMagick

The default image driver used by Movable Type is ImageMagick. Sometimes, however, there is a problem with Movable Type and ImageMagick resulting in the following error message in the Movable Type admin area:

 

Image::Magick is either not present on your server or incorrectly configured. Due to that, you will not be able to use Movable Type's userpics feature. If you wish to use that feature, please install Image::Magick or use an alternative image driver.

 

The solution is to change the image driver to NetPBM. You can do this by adding the following line to your mt-config.cgi file:

ImageDriver NetPBM

 

This should resolve the Movable Type image driver issue for good.


http://forums.movabletype.org/2009/03/removing-error-message-on-dashboard.html

 

参考:

http://jerryong.com/blog/2008/03/how-to-create-mobile-or-wap-site-for-your-blog-and-website/

 

 

Find the URL you wish to create Mobile version and add into Google Mobile Version code. Replace your website address in {YOUR URL} of the following code.

http://www.google.com/gwt/n?u=http%3A%2F%2F{YOUR URL}&hl=en&mrestrict=xhtml

Example : if you wish to create mobile site for www.guduo.net
The code will look like this

http://www.google.com/gwt/n?u=http%3A%2F%2Fwww.guduo.net&hl=en&mrestrict=xhtml

You're Done ! Yeah very simple right

根据Tag来推荐是很简单的一种,可以参考的几个地方:
http://wiki.movabletype.org/Related_Entries
http://www.jimramsey.net/2008/08/adding-related-entries-to-mid-.html
http://www.devlounge.net/code/related-entries-in-movable-type

基于全文索引的相关性:
http://cxliv.org/2008/07/28/displaying_related_entries_on_your_movable_type_site.php

现在懒得增加插件,所以直接找了方便简单的使用Tag来推荐。

重点使用了devlounge.net的代码,不过之前没仔细看文章,copy过来的时候还特意做了一些代码美化,结果居然没法正常使用:

原来MT的setvarblock有bug,设置标签时这个代码块最好不要自己换行。

原文如下:

It's very important that when you type this in there are no line breaks within any of the <mt:setvarblock></mt:setvarblock> containers. In theory, you should be able to use the strip_linefeeds attribute and not worry about line breaks, but I've not had any luck with that. In fact, it's revealed a very strange bug. Rather than deal with bugs, we'll just remove the line breaks ourselves.

MT的论坛上也有相关反馈:

http://forums.movabletype.org/2008/08/error-when-rebuilding-after-ad.html

最后的代码:

 

<mt:EntryifTagged>
<mt:SetVarblock name="curEntry">
<mt:Entryid />
</mt:SetVarblock>

<mt:SetVarBlock name="taglist"><mt:EntryTags glue=" OR "><mt:TagName></mt:EntryTags></mt:SetVarBlock>

<mt:SetVarblock name="listitems">
<mt:Entries tags="$taglist" unique="1" lastn="6">
<mt:SetVarblock name="listEntry">
<mt:Entryid />
</mt:SetVarblock>

<mt:unless name="listEntry" eq="$curEntry">
<li> <a href="<mt:Entrypermalink />"><mt:Entrytitle /></a></li>
</mt:unless>
</mt:entries>
</mt:SetVarblock>

<mt:if name="listitems">
<div>
<h3>Related Entries</h3>
<ul>
<mt:Var name="listitems">
</ul>
</div>
</mt:if>
</mt:EntryifTagged>

 

今天无聊,下载了1个新的模板集:

http://www.movabletype.org/documentation/themes/

Mid-Century ,看着好像还不错,就兴起来试验了一把。

在替换的时候MT提示有备份,这个不错,心想大不了直接回退啊?之前更新Styles更新了很多次了,回退非常容易,想想这个应该也问题不大?

结果使用Mid-Century感觉并不怎么样,于是想回退,当然是直接又使用了Classic Blog的模板集,可惜居然是回到了最原始的情况。

再去找备份,每个模板都是独立的,恢复操作也很难用,无法直接复制到当前的模板集,只能最原始的点击进去再复制出来,浪费生产力。

这么一折腾,大概也明白了Template和Style的区别了,只可惜之前做的好几个widget懒得恢复了,没有了之后访问速度更快嘛!

 

 

升级MT到4.23

| No Comments | No TrackBacks

1)数据备份:guduo.net、MT、MySQL 一个不少

2)程序临时备份:cgi-bin/mt mt-static

3)移动相关目录升级

4)设置style

5)修改style的css --

$ cp .../mt-static_back/support/themes/minimalist-green/minimalist-green.css ./

 

自从半年前被河蟹以后,无论是web访问还是ssh上guduo.net都变的异常困难。

曾经想过一些办法,www访问还是很好的解决了的,找几个可用的代理即可。但想要ssh上来还是折腾了一些时间。

最初是想直接使用fg的代理模式上来,不过后来试了好像行不通,另外也不是很稳定,后来就没有继续尝试。

之前无聊折腾了一个free shell ,上来升级了一把MT,后来也没怎么继续玩它了。

今天晚上带闺女,5点多就睡不着了,起来看看俺的网站,顺便也使用一下俺之前的free shell,
没想到今天大有收获:

1)silenceisdefeat.org是支持 ssh tunnel的,更令我高兴的是,还提供了另外的端口来访问
    ssh.silenceisdefeat.org  fw.silenceisdefeat.org都可以使用443 80来访问的,真是太爽了。
    当然,支持ssh的free shell也很爽,这样就可以实战一把putty来直接ssh到guduo.net了。

2)上面silenceisdefeat.org提供了3个域名,分别有三个IP,我都直接ssh上去之后发现其实都是登陆到了silenceisdefeat.org,这个地方怎么实现的还想更深入的了解看看:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
        groups: lo
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:30:48:54:39:ab
        groups: egress
        media: Ethernet 10baseT full-duplex
        status: active
        inet 66.111.62.170 netmask 0xffffff00 broadcast 66.111.62.255
        inet6 fe80::230:48ff:fe54:39ab%em0 prefixlen 64 scopeid 0x1
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33224
pfsync0: flags=0<> mtu 1460
        groups: carp
enc0: flags=0<> mtu 1536
好奇的跑到guduo.net上也ifconfig了一把: 

$ ifconfig | grep  "inet addr"
          inet addr:74.220.199.22  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.100  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.123  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.130  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.133  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.185  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.190  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.200  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.209  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.231  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.240  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.249  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.55  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.56  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.57  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.73  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.75  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.76  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.79  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.81  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.84  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.99  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.74  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.246  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.107  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.215  Bcast:74.220.199.255  Mask:255.255.255.0
          inet addr:74.220.199.180  Bcast:74.220.199.255  Mask:255.255.255.0

2008.12.14发现新增的:

inet addr:74.220.199.87  Bcast:74.220.199.255  Mask:255.255.255.0
inet addr:74.220.199.113  Bcast:74.220.199.255  Mask:255.255.255.0

2008.12.27新增:

inet addr:70.40.192.52  Bcast:70.40.193.255  Mask:255.255.254.0


发现这个机器的IP真不少啊~~去掉第一个,发现其它的基本都可以ping通,再试试ssh,

竟然上来了!确认没有通过ssh tunnel上来的之后真是高兴了一把,这样以后就可以很方便的直接上来拉,而且用我的fastdomain帐号来做ssh tunnel,速度更是比free shell快了不知道多少倍!俺这台主机上的用户很少,另外由于被河蟹,机器负载很轻啊。

不过不爽的是fastdomain不提供其它端口的ssh访问,而在公司22端口是被封了的 -- BT,开放了23端口,22端口竟然封禁!

高兴之余跑去找了一下fastdomain的客服,竟然要我购买独立IP,30$一年呢,也太贵了啊,玩不起。

反正俺的blog是自娱自乐,先暂且就这么玩着,只要自己能很方便的ssh上来,也可以很方便的ssh proxy访问就很高兴了!


 

好不容易设置好了代理,能够访问guduo.net了,不想却不能写日志,郁闷之极。

记得上次升级之后是有写日志的,证明不是升级导致的问题。

在Firefox中用FireBug看了后发现是editor-content.html这里的错误,google后发现:
http://forums.sixapart.com/lofiversion/index.php/t63693.html

两个解决方案:
1)重新安装 --  估计也是碰巧了,呵呵,我没试过。
2)注意mt-config.cgi中的配置:
CGIPath    http://www.guduo.net/cgi-bin/mt/

因为我之前使用的是guduo.net来访问,这样和配置中的cgipath不一样,导致js错误,
所以就不能发布日志了。

About this Archive

This page is an archive of recent entries in the MT|WP category.

MySQL is the next category.

Find recent content on the main index or look in the archives to find all content.