博客话题:DB2,Linux,Web,业余无线电,户外,摄影,截拳道,Thankpad,其他
MT默认的模板包含大量的重复或者类似模板代码,当你需要进行一处模板修改时,也许不得不考虑得更多,并在多个模板中同时进行,已达到统一的效果。 模板重构的目的就是尽可能将多个模板之间相同的部分抽象出来,然后在多个模板中进行引用,另外还有趋向于将一组具有相同功能的模板代码放入同一个模板文件 的作用,从而减少模板修改带来的工作量。MT很早就在模板中支持Module,定义好的Module可以通过如下代码进行引用。
<$MTInclude module="Module Name"$>
我 们需要做的就是把重复的模板代码放在一个个Module中进行定义,然后在模板中去引用他们。经过一定的重构,模板的重用性得到一定的改观,但依然会有一 些冗余的代码,除非MT可以提供一些模板标签,能够让我们判断当前所在的模板而采用不同的Module或者调整细微的模板代码差别。幸运的是,我找到了一 个MT plugin,mt-varz version 0.31。 它提供了更高级的变量支持,支持以下模板标签:
<$MTGetVar$>, <MTSetVarBlock>, <MTIf>, <MTUnless>, <MTIfOne>, <MTUnlessEmpty>, <MTUnlessZero>
其中部分标签在MT3.3中已经得到支持, mt-varz对其进行了over load,具体细节可以参考此plugin文档(在下载包内)。我们在这里需要用到MT标准标签MTSetVar,以及mt-varz 支持的MTIf 标签。我在每个模板的第一行使用MTSetVar 定义一个变量用于标识当前模板,然后在Module中需要的地方使用MTIf 判断当前模板,并注入相应模板代码。下面是一个例子:
Template: Category Archive
<$MTSetVar name="Category Archive" value="1"$> ... <$MTInclude module="Header"$> ...
Template Module: Header
<head>
<MTIf name="Category Archive">
<title><$MTBlogName encode_html="1"$>: <$MTArchiveTitle$> Archives</title>
</MTIf>
...
</head>
<$MTSetVar
name="Category Archive" value="1"$> 这里value 可以是其它非0值,如果值为1,那么MTIfOne
标签在上面与MTIf 标签的作用相同,加以利用可以进行更精细的控制。除了1以外,目前还不提供对变量值的详细判断。经过重构之后,我的Main Index 模板看起来就像这个样子,其它也很类似,模板修改主要在少量的Module中进行。
<$MTSetVar name="Main Index" value="1"$> <$MTInclude module="Template Header"$> <$MTInclude module="Header"$> <MTEntries> <$MTInclude module="Entry"$> </MTEntries> <$MTInclude module="Footer"$> <$MTInclude module="Template Footer"$>
更新:经测试,<MTIfOne> 标签不能正确的解析内嵌的<MTElse> 标签,根据不同情况,将在模板rebuild 阶段抛出错误,或者rebuild 通过,但逻辑不符合嵌套关系。下面是一个逻辑错误示例。<MTIf>标签是否存在此问题未作测试。已经report 这个bug 给了Appnel,希望可以解决。
<MTIfOne name="Search Result Template"><MTIfTagSearch>Tag Search<MTElse>None Tag Search</MTElse></MTIfTagSearch></MTIfOne>
我有一些这样的日志,需要长期更新,不断追加内容,或者内容经常变化,需要不定期进行更新。它们很容易就被新的日志淹没,从而增加了查找定位的成本。对于这样的日志,我希望可以将它们固定的列在blog边栏,方便随时查看和修改。有两种方法可以方便的实现:
指定分类的方法,将会额外增加一个blog分类,可能是不期望的,不过也可能正是使用者所期望的,我采用了第二种指定tags的方法。MT3.2 开始,MTEntries模板标签新增了tag参数,用于列出具有特定tag的日志。MT中以"@"开头的tags会被隐藏,不会在MTTags 模板标签中列出,但这个标签在其它方面与一个真正的标签没有任何区别,比如可以用来关联主题相似的日志。我为这部分日志指定了一个永远不会被其它日志用到的标签,并加上了"@"作为前缀。然后在边栏增加一下模板代码来生成这部分日志的列表。
<h3>不定期更新|Handy Entries</h3>
<div class="module-content">
<ul>
<MTEntries tag="@_handy">
<li><$MTInclude module="Entry Link"$></li>
</MTEntries>
</ul>
</div>
Template Module Entry Link:<a href="<$MTEntryPermalink$>" title="<MTEntryIfTagged>Tags: <MTEntryTags glue=", "><$MTTagName$></MTEntryTags><MTElse>No tags</MTElse></MTEntryIfTagged> "><$MTEntryTitle$></a>
Posted by Alex at 10:13 AM | Comments (0) | Edit | Taged: MT (25), Tag (2)
今天准备在Dreamhost 上自动备份blog的DB,MySQL是Dreamhost唯一提供的关系数据库服务,当前版本5.0 我了解很少(这里有个学习笔记 ),已知可以在命令行使用mysqldump 命令备份整个数据库,备份时似乎无需了解数据库的当前状态(比如是否正在运行事务),它会自行处理,从备份出的文件看,mysqldump实现的是冷备份,也就是说,仅采用这种备份方法,数据仅能恢复到最后一次运行mysqldump的时间点。
MySQL也介绍了一个热备份工具mysqlhotcopy,不过文档中有以下声明,我不清楚什么是MyISAM 与ARCHIVE tables,也不大明白MySQL 热备份的恢复机制(如何前滚日志)。还好,我的数据库目前很小,而我的空间很大很大,每次全备份只花费很少的时间,也占用很小的空间。
mysqlhotcopy works only for backing up MyISAM and ARCHIVE tables. It runs on Unix and NetWare.
使用mysqldump备份出来的文件,是一个包含了sql语句的文本文件,含有建表语句以及Insert语句。我采用这种方式恢复:连接到mysql进入mysql提示符,创建一个db(如果不存在),连接到此db,执行备份文件,如:
mysql> source ./mybackup.sql
执行结束则恢复完毕。这里有篇日志 介绍了另外一种恢复方法(如下),不过我没有尝试过。
$ mysqldump -u root -p'123456' test2 < samp.db.txt
言归正传,我准备采用crontab 自动运行mysqldump 来自动备份数据库。写了一个shell脚本如下,备份文件使用当前系统时间(到分钟)作为文件名,备份成功后进行压缩。
backupdb.sh
bakfile=~/xxx/mt-db_`date '+\%Y\%m\%d\%H\%M'|tr -d '\\\'`.sql mysqldump -hmysql.mydomain.com -umyname -pmypasswd mt > $bakfile gzip $bakfile exit 0
然后在crontab中加入条目,定时自动运行此脚本。这里设置为每4个小时,在整点运行一次,每天产生一份日志。
00 0-23/4 * * * ~/xxx/backupdb.sh >> ~/xxx/logs/backupdb_`date '+\%Y\%m\%d'|tr -d '\\\'`.log
经试验`date '+\%Y\%m\%d'|tr -d '\\\'`部分似乎不能被cron命令成功替换,但是在shell中是可以成功执行的。
$ echo backupdb_`date '+\%Y\%m\%d'|tr -d '\\\'`.log
backupdb_20070127.log
Posted by Alex at 2:09 AM | Comments (1) | Edit | Taged: backup (2), Database (12), Dreamhost (4), mysql (4), 备份 (1)
I use <pre> to wrap the programming code in my pages. What I want is:
That's all I want, but it won't work out with both Firefox and IE without hacks. I had this style first.
pre {overflow: auto;border: 1px solid #ccc;width: 90%;max-height: 450px;padding: 8px;}
overflow: auto tells to have scrollbar as need. maxheight tells the limitation of the height. I soon found that maxheight is not supported in IE. IE would extend the height as far as the content need. And that's not all, IE push it much. With overflow: auto, you will get the unexpected vertical scrollbar that follows horizontal scrollbar. The reason is that IE will see the horizontal scrollbar as a part of content, then it will give the stupid vertical scrollbar like this. (you'll see an unexpected vertical scrollbar below if you use IE)
Here's a simple for test IE vertical scroll bar problem. When this line is long enough to exceed container that makes IE have a horizontal scrollbar, then the vertical scrollbar comes. If this line is not long enough for your screen yet, please decrease your screen size.The style this object using:<pre style="border: 1px solid #cccccc; padding: 8px; overflow: auto; width: 90%">
There's solution found here and here(none English, none Chinsese, only see the code) , they use IE hacks to resolve the vertical scrollbar problem. It do works, but I still prefer to have the limited height. I got this IE hack for having maxheight in IE. Below's the style.
pre {overflow: auto;border: 1px solid #ccc;width: 90%;max-height: 450px;padding: 8px;}* html pre { /* IE hacks */height: expression(this.scrollHeight > 450 ? "450px" : "auto");}
For the damn vertical scrollbar in IE I got an idea from the code in this post. The idea is to encrease the height after IE calculated the object height. Here's a show, the damn vertical scrollbar in the example above will be removed.About IE scrollHeight logic there's more detail, here's an artible for it.
Here's a simple for test IE vertical scroll bar problem. When this line is long enough to exceed container that makes IE have a horizontal scrollbar, then the vertical scrollbar comes. If this line is not long enough for your screen yet, please decrease your screen size.This style remove the unexpected verticle scrollbar.<pre style="border: 1px solid #cccccc; padding: 8px; overflow: auto; height: expression(this.scrollHeight+15); width: 90%">
It works but new problem came. This style width: 90% is not going to act as expect if I use above code. IE will confuse the base line between window width and container(div) width for the objects having scrollHeight > 450. I have to have below code with it together in IE hack to resolve. IE brings too much issue!
height: expression(this.scrollHeight > 450 ? "450px" : this.scrollHeight+15);width: expression(this.scrollHeight > 450 ? "62%" : "90%");
62% is an experience value that works for me. For you it depends your page structure and your favor. Finally, I had my things done. Below is the finally code in my style sheet. The image code.gif is a cool idea to personalize your code area. CSS Selector ":before" and ":after" could do the similar thing but it's only supported by CSS 3. Currently CSS 2 is widely supported. Another article(Chinese) about CSS Selector.
pre {margin: 16px;overflow: auto;padding: 40px 0 20px 60px;max-height: 450px;background: transparent url(/images/code.gif) left top no-repeat;}* html pre { /* IE hacks */height: expression(this.scrollHeight > 450 ? "450px" : this.scrollHeight-40);width: expression(this.scrollHeight > 450 ? "62%" : "90%");}
Posted by Alex at 2:43 AM | Comments (0) | Edit | Taged: Firefox (7), IE (3)
Yueyue is migrating her blog from msn spaces to movable type . It's a real difficult thing. Msn spaces have a limited number of post in the rss feed. Yueyue didn't find any option to overcome this limitation. So it's difficult to have the entire rss feed for importing. Here's a discussion(Chinese) on this issue and gave a way: Get the rss feed then remove the posts in this feed, then get the rss feed again and plus to previous feed, then remove... untill get the entire feed. It works, but really takes time if you have a long list. Anyhow, you would have it! We go to Movable Type.
MT builds in import/export feature but it only works on his own format, rss x.0 is not supported yet. We can not import the msn rss feed directly. I had a solution for it. I write a macro file for UltraEdit that read a msn rss feed file and convert it to MT import/export format. After the convert ion, you could save the output as a new file for importing use.
AUTHOR, ALLOW COMMENTS, CONVERT BREAKS and ALLOW PINGS are set default value, you could change them before your importing. DATE might not match your requirement if you have different timezone settings between msn spaces and movable type. Another point, in this case the same charset setting(UTF-8 here) is taken for both side movable type and msn spaces. If you have different setting between them, must do additional charset convertion for the feed file. this could be done within UltraEdit. Unfortunaly some convertion only available in UltraEdit menu but not in Macro. So we have to do it manually.Output example:
AUTHOR: #authorname TITLE: importing rss feed from msn spaces to movable type ALLOW COMMENTS: 1 CONVERT BREAKS: 1 ALLOW PINGS: 1 PRIMARY CATEGORY: essay DATE: 11/23/2006 03:42:07 ----- BODY: <p>Yueyue is migrating her blog from ... ----- --------
UltraEdit tool is necessary for running this macro file. The macro could be used on migrating other rss 2.0 feed to movable type with little change.
msn_feed2mt.mac
InsertMode ColumnModeOff HexOff UnixReOff Top Find RegExp "<generator>Microsoft Spaces v[0-9.]+</generator>" IfNotFound ExitMacro EndIf Top Find RegExp "^n" Replace All "" Find RegExp "<^?xml*</cf:listinfo>" Replace All "" Find RegExp "<item><title>Photo Album:*</item>" Replace All "" Find RegExp "<item><title>Custom List:*</item>" Replace All "" Find RegExp "<item><title>Music List:*</item>" Replace All "" Find RegExp "<item><title>Blog List:*</item>" Replace All "" Find RegExp "</channel></rss>" Replace All "" Find RegExp "<link>*</link>" Replace All "" Find RegExp "<guid*</guid>" Replace All "" Find RegExp "<comments>*</comments>" Replace All "" Find RegExp "<slash:comments>*</slash:comments>" Replace All "" Find RegExp "<msn:type>*</msn:type>" Replace All "" Find RegExp "<live:type>*</live:type>" Replace All "" Find RegExp "<live:typelabel>*</live:typelabel>" Replace All "" Find RegExp "<dcterms:modified>*</dcterms:modified>" Replace All "" Find "<item>" Replace All "" Find "</item>" Replace All "" Find "<" Replace All "<" Find ">" Replace All ">" Find RegExp "<title>^(*^)</title><description>^(*^)</description><category>^(*^)</category><pubDate>^(*^)</pubDate>" Replace All "^nAUTHOR: #authorname^nTITLE: ^1^nALLOW COMMENTS: 1^nCONVERT BREAKS: 1^nALLOW PINGS: 1^nPRIMARY CATEGORY: ^3^nDATE: ^4^n-----^nBODY: ^n^2^n-----^n--------" Find RegExp "%DATE: *, ^([0-9]+^) ^([a-zA-Z]+^) ^([0-9]+^) ^(*^) GMT$" Replace All "DATE: ^2/^1/^3 ^4" Find RegExp "%DATE: Jan*/" Replace All "DATE: 01/" Find RegExp "%DATE: Feb*/" Replace All "DATE: 02" Find RegExp "%DATE: Mar*/" Replace All "DATE: 03/" Find RegExp "%DATE: Apr*/" Replace All "DATE: 04/" Find RegExp "%DATE: May/" Replace All "DATE: 05/" Find RegExp "%DATE: Jun*/" Replace All "DATE: 06/" Find RegExp "%DATE: Jul*/" Replace All "DATE: 07/" Find RegExp "%DATE: Aug*/" Replace All "DATE: 08/" Find RegExp "%DATE: Sep*/" Replace All "DATE: 09/" Find RegExp "%DATE: Oct*/" Replace All "DATE: 10/" Find RegExp "%DATE: Nov*/" Replace All "DATE: 11/" Find RegExp "%DATE: Dec*/" Replace All "DATE: 12/"
For getting rss feed on msn spaces, it needs to turn the option Syndicate this space On within msn spaces setting.
Yueyue have another place blogcn need to migrate. The rss feed from blogcn is more clear than msn spaces. But it's in GB2312. I made changes on the macro file as below that works for blogcn's rss feed. Following step must be taken after the macro process: File -> Conversions -> ASCII to UTF-8 (Unicode Editing), then save. Or you have other way to do the charset convertion.
InsertMode ColumnModeOff HexOff DosToUnix UnixReOff Top Find RegExp "<rss version=" IfNotFound ExitMacro EndIf Top Find RegExp "^p" Replace All "" Find RegExp "<^?xml*</dc:language>" Replace All "" Find RegExp "</channel></rss>" Replace All "" Find RegExp "<link>*</link>" Replace All "" Find RegExp "<guid*</guid>" Replace All "" Find RegExp "<comments>*</comments>" Replace All "" Find "<item>" Replace All "" Find "</item>" Replace All "" Find RegExp "<author>^(*^)</author>*<title><!^[CDATA^[^(*^)]]></title>*<pubDate>^(*^)</pubDate>*<description>*<!^[CDATA^[^(*^)]]>*</description>" Replace All "^nAUTHOR: ^1^nTITLE: ^2^nALLOW COMMENTS: 1^nCONVERT BREAKS: 1^nALLOW PINGS: 1^nPRIMARY CATEGORY: #blogcn^nDATE: ^3^n-----^nBODY: ^n^4^n-----^n--------" Find RegExp "%DATE: ^([0-9]+^)-^([0-9]+^)-^([0-9]+^) ^(*^)$" Replace All "DATE: ^2/^3/^1 ^4"
My blog is hosted by Dreamhost, that is based on linux and allows crontab command. About cron here's good article for reference. To add a new schedual job, use following command in shell.
$crontab -ethen insert a line like this.
00 0-23/4 * * * /home/yourname/jobs/updawt.sh > /home/yourname/jobs/logs/updawt_`date '+\%Y\%m\%d\%H\%M'|tr -d '\\\'`.log
That means run the script once every 4 hour each day. The code is for updawt.sh:
cd /home/yourname/aiview.com/cgi-bin/awstats/ ./awstats.pl -config=aiview.com -update exit 0
As the time of cron was not available, I used this solution.
# updawt.sh # run this shell as: # nohup ./updawt.sh & # then it will keep running in background whatever you # logout your shell. # # this shell trigers the awstats to update httpd log for # website aiview.com # # by alex, alezhangs@gmail.com, www.aiview.com # last modified: Jan 18, 2007 cd /home/xxx/aiview.com/cgi-bin/awstats/ ./awstats.pl -config=aiview.com -update sleep 3600 . $0 exit 03600 is meaning 3600 second, 10 hours. Run this script as below on Linux, then logout.
$ nohup ./updawt.sh &
Posted by Alex at 1:05 AM | Comments (0) | Edit | Taged: awstats (5), linux (38)
I use several javascript for some features on blog, such as highlighting keywords , collapse and expand the entry area and switch the style sheets . There's a problem that the javascript would not apply untill the whole page is loaded completely. If there's big images in the page or the Internet is very slow, the visitor will have the real bad expereices. Is there's a way to have the javascript work after the document is loaded but before the images are loading? I'm really in luck, the guy make this work on Firefox, IE and Safari.
So now I have below code for my each .js file that need this feature. (no Safari supported so for)
// Only for Mozila/Firefox Browser
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", Switchcss.run, false);
}
// Only for IE
/*@cc_on @*/
/*@if (@_win32)
document.write("<script defer src=/ie_onload.js><"+"/script>");
/*@end @*/
// For all other Browsers
if (window.onload) {
Switchcss._old_onload = window.onload;
window.onload = function(e) {
Switchcss._old_onload(e);
Switchcss.run();
}
} else {
window.onload = function(e) {
Switchcss.run();
}
}
ie_onload.js
try{Switchcss.run()}catch(e){}
try{Keyword.run()}catch(e){}
try{Hidebody.run()}catch(e){}
Posted by Alex at 12:45 AM | Comments (0) | Edit | Taged: Javascript (5)
I was using below page structure for this blog. The stucture is very simple and clear. It works well on auto-width mode. The css is easy to design and also easy to deal with different browsers. No much effort on keeping identical for different browsers. However there's hard thing for it, the fixed width with center mode. I could not have the right style sheet making it work well with this structure.
Now I have below structure. It's my balance on flexible style and clear page structure. I don't like too much level div there, it would cost more client resource and make the page fat. When I play with this structure, I took more effort on having it work out with different browsers.
More about the refine work please see Refine and add new features to my web site.
Posted by Alex at 10:44 PM | Comments (0) | Edit | Taged: blog (2), refine (2)
Let's have a compare with the 2.02.
The interface with full features of 2.02
The interface with full features of 2.09
Lots of changes, include: (I only list the changes which are most important for me. I didn't check the change logs, this info just for reference. )
Development kit interface
This kit interface is able to collsape and expand.
Donwload the package file at here. Unpackage it and prepare to upgrade. Here's the steps:
mt-static\plugins\Ajaxify\tinymce\ \cgi-bin\mt\plugins\Ajaxify\EnhancedEntryEditing.pl (You won't have and don't need to backup this file if you don't use the plugin EnhancedEntryEditing.)
settings => new MT::PluginSettings([
['tinymce_config', { Default => q{
old setttings here
}}]
]),
settings => new MT::PluginSettings([
['tinymce_config', { Default => q{
/* old settings here */
new setttings here
}}]
]),
mode : "textareas",mode : "exact" elements : "text,text_more",content_css : "example_full.css",content_css : "/css/extend.css",
Here's the new interface in MT, a little fat for MT got overflow, but not a big problem. Enjoy it!
The full code section in \cgi-bin\mt\plugins\Ajaxify\EnhancedEntryEditing.pl
settings => new MT::PluginSettings([
['tinymce_config', { Default => q{
/** This section was used by TinyMCE v2.01
mode : "exact",
elements : "text,text_more,excerpt",
theme : "advanced",
plugins : "iespell, emotions, inlinepopups",
theme_advanced_blockformats : "p,h1,h2,h3,h4,h5,h6",
theme_advanced_buttons1 : "formatselect,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,undo,redo,separator,link,unlink,separator,image,emotions,iespell,help",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],span[class|align|style]",
force_p_newlines : true,
relative_urls : false,
remove_script_host : false,
button_tile_map : true,
ask : false,
auto_cleanup_word : true,
theme_advanced_path_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
safari_warning: false,
oninit: "quicktagsHide"
**/
/** This section was used by TinyMCE v2.02
//mode : "textareas",
mode : "exact",
elements : "text,text_more",
//editor_selector : "mceEditor",
theme : "advanced",
//plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",
plugins : "table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",
//theme_advanced_buttons1_add_before : "save,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
external_link_list_url : "example_data/example_link_list.js",
external_image_list_url : "example_data/example_image_list.js",
flash_external_list_url : "example_data/example_flash_list.js",
content_css : "/css/extend.css",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
oninit: "quicktagsHide"
**/
/** This section was used by Tiny MCE v2.09 **/
//mode : "textareas",
mode : "exact",
elements : "text,text_more",
theme : "advanced",
plugins : "devkit,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
theme_advanced_buttons1_add_before : "save,newdocument,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor,advsearchreplace",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
content_css : "/css/extend.css",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
external_link_list_url : "example_link_list.js",
external_image_list_url : "example_image_list.js",
flash_external_list_url : "example_flash_list.js",
media_external_list_url : "example_media_list.js",
file_browser_callback : "fileBrowserCallBack",
theme_advanced_resize_horizontal : false,
theme_advanced_resizing : true,
nonbreaking_force_tab : true,
apply_source_formatting : true
}}]
]),
Posted by Alex at 1:33 AM | Comments (0) | Edit | Taged: MT (25), TinyMCE (4), upgrade (5), wysiwyg (6)
About EnhancedEntryEditing here's an article talked about it in update section.
I was trying to change the style sheet for the MT entry editing area of the plugin EnhancedEntryEditing.
Here's the access to edit the settings in MT plugin management.
To click Show Settings will get the settings text and be able to edit then save change.
I did the change and the save action did work but got no affection on the MT entry edit interface. It continued to refer to the old style sheet.
Finally I track to EnhancedEntryEditing.pl where is the true settings live. I found that the change on MT plugin management don't effect this file in some abnormal reason. So I edited the .pl file directly and it works out.
EnhancedEntryEditing.pl is locate at: cgi-bin\mt\plugins\Ajaxify
I talked about blockquote at this article, then want to have it in TinyMCE, but I did not found where to insert it into content. After I did some hack work on Format feature I got this tag on the panel of TinyMCE. It's already there, the Indent will insert <blockquote> tag.
As my new learned, I should only use blockquote tag for real quoted content, not for the format indent. So, I might never use this button.
Posted by Alex at 4:16 PM | Comments (0) | Edit | Taged: EnhancedEntryEditing (2), TinyMCE (4)
I sent this suggestion at Gmail help center.
I want to get a none-grouped Contacts view, then easier to give groups on each of them.
I got hundreds contacts there, so experienced difficult to indicate who are not in any group that's very important to organize new contacts from the incoming email or imported without group given.
Thank you a million!
Keep an eye to see if google will response this well.
Posted by Alex at 5:48 PM | Comments (0) | Edit | Taged: Gmail (6)
前几日在电视台播出一个节目,云南一位妇女谷丫 突然掌握了绘制神秘图画的能力,画的什么自己也不知道,完全是下意识的。而且可以将图画用不属于任何现存已知语言的声音读出来。
画出的内容繁复而似乎又透着规律,线条流畅而一气呵成,从美术学考虑,是需要很深厚的绘画功底的,而谷丫没有经过专业的绘画练习。
一位UFO专家专程赶到云南,语出惊人,说这种语言是用来与外星人交流的,地球上还有其他人也神奇的掌握了这种语言,并做了异地语言测试,让谷丫在这边用外星语言翻译测试组随即写出的句子,通过电话读给异地的另一个奇人,看他能否翻译出原意。测试结果还未公布。
另一个人网名理喻 说他自己也有类似的能力,并写了文章说: “谷丫现象”并不稀奇,并发布了几张自己从前做的画
Posted by Alex at 10:27 AM | Comments (0) | Edit | Taged: 谷丫 (1)

![]()