Recently in MT|WP Category

修改了网站样式

| No Comments
借用dbanotes.net,修改了如下CSS:
http://www.guduo.net/styles.css,内容如下:

@import url(http://www.guduo.net/mt-static/themes-base/blog.css);
@import url(http://www.guduo.net/mt-static/themes/unity-blue/screen.css);

看起来清爽了不少,再次感谢 Fenng

同时,也针对 Entry Summary 模板,加了如下信息:

<p>--<acronym title="End of File">EOF</acronym>--</p>

学习~

--EOF--

MT的Design->Themes功能慎用

| No Comments
如果调整,则之前自定义的模板会全部丢失,恢复非常麻烦,估计只能通过数据库进行恢复。

今天闲着蛋疼,手工调整了一下,悲剧了,通过调整数据库才恢复之前的模板,这里的操作过程后续会完整的再来整理一下。

现在的进展情况:直接使用了之前的备份DB,目前功能正常,下一步我想想如何做到只恢复做这个改动影响的相关数据库表。


相关操作,xxx为数据库名,新的数据库需要到cPanel后台去新建一个。

1)导入原有数据到新库:

mysql -uxx -p xxx < xxx.dump.20101211

2)修改gi-bin/mt/mt-config.cgi到新的库
ObjectDriver DBI::mysql
Database yimutian_xxx

3)测试上述是否升级正常恢复到原来的模板设置


备份新库和老库:
mysqldump -uxxx -p xxx > dump.20101212.new
mysqldump -uxxx -p xxx > dump.20101212.old.bad

导如新库数据到原DB:
mysql -uxxx -p xxx < dump.20101212.new
恢复mt-config.cgi



--EOF--

MT更新小记

| No Comments
1.升级到了Movable Type 5.02 Pro
2.安装了PubSubHubbub

本来按照PubSubHubbub的介绍,应该实时更新Google Reader的,但现在看起来好像没有生效:(
是这个插件的问题呢还是我修改的问题?

README:

This is PubSubHubbub publisher plugin for Movable Type 4 or later.
ou need to configure Hub URL(s) in your per-blog preference page, and then insert

    <$mt:PubSubHubbubLinks$>

in your 'Feed - Recent Entries' (atom.xml) template, probably after '<link rel="self".../>'.

--EOF--

PageArchives插件

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

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

 

Paged Archives Plugin

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

 

--EOF--

升级MT到4.32

| No Comments

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

 

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

Problems with Movable Type and ImageMagick

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

 

mt-config.cgi加了一行:

ImageDriver NetPBM

 

 

 

--EOF--

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

 

--EOF--

参考:

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

--EOF--

恢复和修改了RSS2.0的模板

| No Comments

参考:

http://bblog.biz/movabletype/_tips/tags_movable_type_rss.html

这里的,试试先

--EOF--

给MovableType增加相关文章

| No Comments

根据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>

 

--EOF--

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

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

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

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

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

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

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

 

 

--EOF--

Pages

May 2016

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Archive

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

DayDayUp is the previous category.

MySQL is the next category.

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