wyn_recent_comments 0.1 Release
一直觉得 Textpattern 自带的那个最新留言的tag比较弱, 只能显示作者和文章标题, 不过也凑合用了
昨天 dimlau 也 提到 了这个问题, 于是…无聊之中又出现了一个新的插件
功能比自带的那个稍微强一点点, 可以显示评论内容, 支持字符串截取, 支持内容格式定制以及链接的title属性以及时间格式的定制, 当然数目限制和section限制也是必不可少的
直接下载点 这里
————华丽的分割线————
Description
Fine, textpattern has already provided a recent comments tag. But someone love it and someone hate it. And it indeed is not so powerful enough. So, this thing was born.
Usage
- class: css class, default is wyn_recent_comments
- wraptag: tag of wrap, default is ul
- break: tag of every item, default is li
- label: title label, default is nothing
- labeltag: tag of title, default is nothing
- limit: number of comments to show, default is 10
- wordcount: the length of each comment. The comment whose length is longer than this value, it will be cut off, with UTF-8 support. default is 10
- messagebreak: if a comment has been cut off, this value will be showed after it. default is ‘…’
- format: the things to show. you can customize it by using tags (
%content%for comment content,%commenter%for commenter name,%time%for comment time and%title%for post title). default is%content% - atitle: the title attribute of generated a links. tags can also be used here. default is
%commenter% on %time% - section: limit the comments into one section
- timeformat: the format of time. it uses standard PHP time format, you can refer PHP doc to know more. default is ‘%d %b %Y · %X’, a little difficult :D
Download HERE
wyn_email_publish 0.2 Release
很久之前做了一个 版本 , 不过很简陋, 邮件地址和内容都要手工修改插件才行, 于是重新翻新的一遍, 加入了后台控制面板, 可以自定义多个邮件地址, 甚至可以定义邮件的标题和内容.
至于为什么有这么个插件, 无非就是为了发post的时候同时发到别的BSP上, 例如blogger, live space之类
直接下载点 这里
——————————————华丽的分割线——————————————
wyn_email_publish
Description
When you publish a new post, this plugin will mail it to everywhere (email address of course :D) you want.
That means, you can publish the post onto other BSPs, which support email publish feature (like live space, or blogger), just as the same time you publish on textpattern.
History
- 0.2: Add admin config panel, you can not only set the email addresses here, but also customize the content of mail
- 0.1: Initialize Release, just has basal function, a little troublesome to use
Usage
- Install and active it, and of course, set up your email publish function of your BSPs
- Go to extenstion -> Email Publish
- Now you can set the mail address, use ‘;’ to separator if you have more than one address
- Set the title and body of mail, you can use the tag title, body, author and link to replace the title
, the content, the author name and the link of the article. (NOTICE: link and body are NOT allowed in mail title) - Go to write a new post to introduce this little thing :D
Download HERE
Textpattern Comment SOFA (TXP沙发党)
嗯, 昨天晚上无聊, 花了三个小时实现了一个雏形, 实现了对留言者统计并输出, 支持生成列表或者cloud
今天又修修补补加了用来识别用户的keyword属性, 并支持skip列表, 称之为0.2版本
后来觉得没有准确的统计沙发, 有点和名字不符, 于是又新增了restricted模式, 用来精确计算沙发党, 当然还是同时支持cloud输出和list输出. 并同时修改到0.3版本
cloud的效果如下, 喜欢的就拿去用好了

点这里 下载
—————————————-华丽的分割线—————————————-
Comment Sofa plugin for Textpattern
It can generate a cloud or a list for commenters who commented the most. OR generate them for users who got the sofa (first comment to a post) most :D
History
- 0.3 : Add Restrict SOFA mode, which generator a cloud or a list for the users who got sofa (the first one who comment to a post) most.
- 0.2 : Add keyword attribute to identify user by name or email and get skip value accepted a list with ‘;’ delimited.
- 0.1 : Initialize Release
Usage
- wyn_comment_sofa_cloud
- wraptag: wrap your cloud with a tag
- keyword: The keyword to identify user, available values are name and email, default is name
- skip: skip the user by indicated thing, default is nothing (lots of blogs just have one admin user to do everything :D) You can set values more than one, just use a ‘;’ to separate.
- label: the label
- labeltag: tag of the label
- limit: the limit of commenters, default is 10
- class: the class of wrap
- maxsize / minsize: the max / min font size of the most / least commenter’s link. (Percent, default is 200 and 50)
- break: the break between links, default is a space
- showcount: whether to show the count of comments by each commenter, default is 1
- restricted: whether to get RESTRICTED SOFA MODE (Generate cloud by rank of first commented to posts), default is 0
- wyn_comment_sofa_list
- wraptag: wrap your list with a tag
- keyword: The keyword to identify user, available values are name and email and default is name
- skip: skip the user by indicated thing, default is nothing (lots of blogs just have one admin user to do everything :D)
- label: the label
- labeltag: tag of the label
- limit: the limit of commenters, default is 10
- class: the class of wrap
- break: the break between links, default is a space
- showcount: whether to show the count of comments by each commenter, default is 1
- restricted: whether to get RESTRICTED SOFA MODE (Generate list by rank of first commented to posts), default is 0
Download from HERE
New Hello :D主题推荐
很漂亮很大气的一款主题, 更重要的是在提供了 wordpress 版本的同时还提供了 textpattern 版本, 这对于国内用户稀少主题更稀少的Textpattern用户的确是个好消息, 效果预览图如下:

下载及更多信息可以去 作者主页
Textpattern Plugin: wyn_feed_redirector
This little thing is used to redirect your feed to another url, which is very useful if you are using some feed burn service like feedburner or feedsky. Like the FeedSmith of wordpress, but more powerful
Feature:
1. You can redirect both RSS and ATOM feed, or just redirect one of them.
2. By default, Feedburner and Feedsky clients can see the original feed. And you can add new regular expression value to filter the user agent, for advanced users.
Download: wyn_feed_redirector
Find more plugins in wyn-txp-plugins
———————————— 华丽的分割线 ————————————
这个插件用来将Textpattern的feed转至指定的url地址. 对于Feedburner或者Feedsky用户比较有用, 可以将所有的feed流量和订阅转至Feedburner或者Feedsky烧制的feed, 类似wordpress的 FeedSmith
功能:
1. Textpattern生成RSS和ATOM两种feed, 你可以任选其一, 或者两者同时做转向
2. 可以设定条件转向, 既通过对比客户端HTTP_USER_AGENT值来选择是否对其转向. 为保证Feedburner和Feedsky的spider能够正确抓到信息, 默认会忽略Feedburner和Feedsky的spider.
更多插件: wyn-txp-plugins
我所使用的Textpattern插件
UPDATE: 08/03/28, 启用 wyn_feed_redirector
UPDATE: 08/03/26, 启用 glx_gravatar
1. sy_sitemap 自动生成站点的Sitemap
2. chh_article_lib chh_系列插件的支持库
3. chh_if_data 模板标签, 只在标签内部确实有数据输出的时候才输出内容
4. chh_related_articles 根据Category, keywords等生成相关文章列表
5. dpcode 高亮插入文章的代码片段
6. dru_chatometer 根据留言数量排序生成文章列表
7. gho_comments_invite 用于代替comments_invite标签, 不过我只用来获取当前留言的序号
8. glx_admin_ping 发布文章时自动ping指定的服务器列表
9. mcw_templates 导入和导出模板
10. ob1_pagination 分页插件
11. tru_tags 为Textpattern加入tag功能
12. wyn_email_publish 发布文章的同时通过email发布到其他bsp, 我用来同步发布到blogger和live spaces
13. glx_gravatar 用来显示留言用户的gravatar头像, 还不知道gravator的点 这里
中文Textpattern合集
国内的blogger似乎都比较钟爱Wordpress,其实Textpattern更有魅力,可惜国内用户不多
我所知道的和能搜索到的都很有限,欢迎各位Textpatterner留言补充 :D
// 排名不分先后…
果然还是比较喜欢这种风格
尽管昨晚才拼出来个主题, 今天是怎么看怎么不顺眼, 难道和我这几天心情不好也有关系?
不过我还是始终坚信, 相对于那些华丽而复杂的主题, 我更喜欢现在这样简单一点的 :)

旁白: 諦めましょう、次を探して忘れましょう、ゲンキダシテ!!! :D
Textpattern Plugin: wyn_email_publish (Sync TXP to Live Space)
UPDATE 2008-03-28: 已上传至 Google Codes: wyn-txp-plugins
It has been uploaded to Google Codes: wyn-txp-plugins
————————————————-
如果msn messenger那个联系人边上的小星星能够反映除了live space以外其他blog的更新,那么这个插件绝对不会出现。。。
Wordpress有个一样功能的插件 dj-email-publish , 不过自从换到Textpattern之后就一直没找到同样的插件,最近搭错了神经自己动手写
好吧,我承认我很懒,以至于没有写任何的配置页面,连Post的style甚至email地址都全部hard coding了。。。挨骂了再改吧
用法:
1. 安装插件
2. 编辑插件,找到 txpHtmlMail (“yourmail@mail.com”, $Title, $body); 一行,修改 yourmail@mail.com 为你的邮件地址
3. 激活插件
————————- 传说中的分割线 ————————-
I will never write this if the star beside contact list of msn messenger will be showed after I update my TXP blog.
Usage:
1. Install plugin
2. Edit plugin, find txpHtmlMail (“yourmail@mail.com”, $Title, $body); line and change yourmail@mail.com to your target email address.
3. Active plugin
Download
wyn_email_publish.txt
让Textpattern的URL支持中文
UPDATE: 其实原本的txp在生成urltitle的部分无非是想要trim掉空格并把大写字母转化成小写,那么我们似乎大可以不必动用urlencode,更何况urlencode的链接似乎也不那么友好
还是和下面一样,不过要添加的代码是
效果还是见本文
Textpattern的永久链接的中文bug已经是众所周知的事情了,在撰写文章或者保存文章时,如果没有指定url title,那么将根据文章的标题生成url title,最要命的是,这个生成的url title会无视标题中的中文,例如类似 中文chinese 的标题,最终生成的url title则是 chinese 不难想象,如果title全部是中文的话。。。
当然,如果你的永久链接结构包含文章id的话就没什么问题了,或者,每次都能在发表文章前记得指定一个url title
很遗憾,我不是这种人,只好想个一劳永逸的解决办法了—hack一下code
说来很简单,php提供了一个urlencode的函数,对titile调用这个函数然后把结果指定给url title就行了
编辑 textpattern/include/txp_article.php 文件,找到 textile_main_fields 函数(4.0.5版在第925行),在函数末尾
之前加一段
if (empty($incoming[‘url_title’])) {
$incoming[‘url_title’] = urlencode ($incoming[‘Title’]);
}
即可,效果看看本文的永久链接就知道了
修正plugin和Textpattern 4.10的兼容性问题
换到4.10后发现之前的一部分插件在后台的管理功能无法正常使用,其实没什么大问题,因为插件功能还是正常,只是插件自身的后台管理部分有些问题
今天升级tru_tags到3.0,顺手也把这个毛病解决了.问题出在text_input函数上,函数的作用是生成一个输入框的html代码,不过4.10的textpattern已经完全废弃了这个函数,看了4.0.5的代码,发现这个函数不过也只是fInput的一个包装,那么解决就很easy了
编辑有问题的插件,愿意按fInput的参数列表逐个替换text_input也行,不过最方便的是在插件代码的最前面加上原来4.0.5的代码
其实把这段代码直接加到textpattern的源码也行,不过不推荐,毕竟是要废弃的函数嘛...
Textpattern不能自动保存,头痛阿
Textpattern的编辑器真得是简陋的不能再简陋了,不支持所见即所得的富文本编辑倒也没什么,简单就是美嘛,不过不支持撰写时自动保存的确是让人有些头痛
本来是写另一篇的,查字典看语法用日语写了一大通,结果Safari一个崩溃…紧接着我也崩溃了,实在没心情再重复一遍
其实很多东西可以很简洁甚至简陋,但是必要的功能最好还是又的不是么,又或者,textpattern本来就不建议在线编辑?
不过不管怎么样,用了些日子的Textpattern,还是很喜欢的,很简单,又很邪恶的东东
PS:尝试了一下textpattern的trackback插件,还是不错的,不过似乎没有考虑spam的问题,暂时还是不加了,有空再研究研究
Textpattern 4.10
程序换完了,模板搞好了,消停了两天又坐不住了,于是乎。。。把textpattern从4.0.5升级到了svn的trunk版本,4.10
没什么太大的变化,不过有些插件已经不太工作了,比如 rss_admin_quikpik ,而 rss_article_edit , rss_live_archive 等插件的后台设置也不行了,后台检测也是错误警告一大堆
还是开发版本的缘故吧,而且原本textpattern的更新就比较慢,所以也不是很期待能有什么比较大的改变,其实现在的4.0.5就已经很不错了,呵呵
- 撰写页面, 高级选项里的文章标记语言部分从原来的三项增加到五项,添加了Strip Tags和Textile Lite。其他没什么大的变化,只是布局稍微改变了一下
- Section的设置部分UI有所变化,添加了parent section的设置,现在可以设置级联section了
变化不多,不知道bug多不多,用用看吧
Textpattern Plugin Creator
熟悉了Wordpress的插件体制的用户,一下子转到Textpattern,对其插件系统可能会很不适应,就像我一样…
Wordpress设置了专有的插件目录,按照特定的格式编写php文件,放到插件目录并在后台激活就可以了,而Textpattern则不同
在Textpattern中,一个插件不仅要遵循某种格式,而且在发布前要经过所谓的“编译”,而安装后的插件也不是以文件形式来存放,而是放在数据库的txp_plugin表里
大致看了一下表的字段,除了版本作者等基本信息外,有三个比较有意思的字段: code, code_restore, code_md5
第一个code字段保存的是插件源代码,也是当前正在工作的版本
第二个code_restore字段保存的是插件的初始源代码,也就是安装时候的源代码,因为textpattern允许用户在后台随时修改插件代码,而修改后的代码会单独保存在code字段,不会涉及到初始的代码,这样在必要时可以做恢复
第三个code_md5字段保存的是插件md5校验码,大概是用来比较当前版本和初始安装的版本比较有没有变化吧
跑题了,回头看看plugin所谓的编译吧
翻了一下官方的插件模板,发现所谓的编译其实很简单,就是新建一个数组,在数组里填入插件的作者版本帮助和源码,然后算出md5一并保存,接着对这个数组序列化并转换成base64编码,不难猜到textpattern后台安装插件的动作了,无非是所有操作的逆操作
不过每次都修改模板并运行获得源码似乎也挺麻烦的,于是借鉴zem plugin template写了一个简单的“编译器”,顺便学习了一下Sajax,和我一样懒得可以用这个吧,呵呵
简单到简陋的东西,使用说明也免了吧,谁叫我懒呢…
迁移: Wordpress 2 Textpattern
暂且告一段落
折腾了两天,始终也找不到一个满意的主题,相比wordpress真得是太少了,于是乎想起了毛主席他老人家的一句至理名言—自己动手,丰衣足食
于是就有了现在的这么个简陋的模板,也还凑合看看,顺便也熟悉了一下textpattern
下一步就是把gregarius里的blogroll链接集成进来,因为所有的blogroll基本都有订阅,而在gregarius和blog管理两套blogroll链接总是觉得很不爽也很麻烦,之前的wordpress就自己写了个插件实现,过两天有空了移植过来好了
明天先抽空把wordpress->textpattern的过程整理出来
初试Textpattern
换到Textpattern了,不是wordpress不好,只是有点腻了,大概我真的有什么更新强迫症之类的,所有的东西都是最新版,可以称作“man living in the edge“了,哈哈
说不清为什么选择了Textpattern,有人说Textpattern简洁,有人说Textpattern灵活,也有人说Textpattern快速,而我,大概只是第一次看到Textpattern,就觉得有什么东西在吸引着我吧
Txp提供了wp导入,不过问题多多,中文乱码,永久链接,tag,分类…网上搜了一下,发现用Textpattern的人还真不多,也或许是用Textpattern的人本来也很个性的不屑于写这些东西
于是自己动手,修改了一些代码,把wp里的post都转过来,改天把修改的代码放上来吧
Txp的论坛真得可以用冷清这个词来形容,其他资源像插件和模板之类的相对于wordpress也好像只能算个零头,嗯…
现在开始要稍微学一下Textile了,大致看了一下语法,和很多wiki的语法很像,很快就能熟悉起来了吧
总算把以前的post弄回来了
一直不甘心以前的post就这么没了,今天闲来无事就继续想办法看看能不能把原来的post找回来
尝试从之前的blog里导出,然后在这边导入,发现很多post依然还是无法导入,于是怀疑是插件的问题,禁用所有插件问题还是依然如故。
记得以前在网上看到一个blogsync的工具,试试看,过了很久,提示2个失败254个成功,顿时欣喜若狂,但是在打开blog之后又是失望,还是只有70篇正常导入
这回试试迂回战术,先找个其他的blog程序看看能不能导入,于是瞄上了textpattern
安装分分钟搞定,然后导入……靠,怎么中文都变成问好了,没办法,顺道把这个也解决了把
这种问题多半是数据库编码引起的,于是翻textpattern的源码,导入wordpress的在
textpattern/include/import/import_wp.php
里面,在
$results[]= ‘connected to wp database. Importing Data’;
后面加一句
mysql_query(“SET NAMES ‘utf8’”);
ok,中文没问题了,浏览了一下一切正常,然后回到新站,wordpress后台导入textpattern,一步,两步,三步。。。mysql query error
靠……没辙了,换用textpattern的心都有了
还是不甘心,嗯。。。难道是wp自己的问题?死马当活马医吧,于是下个2.3的回来(我现在用的svn trunk,2.4),安装,导入,居然成功了,诶,又当了一次小白…… svn害死人啊
哈哈哈哈哈哈,不管怎么说,以前的post总算是都回来了,至于转到drupal后发的几篇。。。数量也不多,丢了就丢了吧,反正99%都找回来了
然后嘛,轻车熟路配置一番,大体上ok了
看看表,4:57……