Monthly Archives: February 2006

Googlify your Movable Type Blog

With the recent release of the new version of Google’s toolbar for Internet Explorer on Windows, it’s now possible to make your own custom buttons for the popular browser extension. Once installed, the button gives you easy access to your most recent entries and provides you with a simple way to search your site for a word or phrase you highlight on any web page.
 
In addition to just being a cool feature for your own personal use, by providing it to your visitors, it’s also a great vehicle for promoting and increasing traffic to your Movable Type-powered blog.
 
Creating a Google Toolbar button for your site
So how do you do it? Easy. You can just make use of the template that Niall Kennedy created, which uses the power of Movable Type’s publishing engine to automatically generate the code for the button.
 
First, create a new index template. You might want to name it "Google Toolbar Button" and then set the Output File to toolbar_button.xml. Then, copy the following text and paste it in as the body of the template.
 
<?xml version="1.0" encoding="utf-8"?>
<custombuttons xmlns="http://toolbar.google.com/custombuttons/">
  <button>
    <title><$MTBlogName remove_html="1" encode_xml="1"$></title>
    <description><$MTBlogDescription remove_html="1" encode_xml="1"$></description>
    <site><$MTBlogURL$></site>
    <search><$MTCGIPath$><$MTSearchScript$>?search={query}&IncludeBlogs=<$MTBlogID$></search>
    <send><$MTCGIPath$><$MTSearchScript$>?search={selection}&IncludeBlogs=<$MTBlogID$></send>
    <feed refresh-interval="3600"><$MTBlogURL$>atom.xml</feed>
     <icon mode="base64" type="image/x-icon">AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAD///8A//f3APf39wD39+8A9+/vAO/v5wDv5+cA5+feAN7e1gDe3s4A3tbOAN7WxgDW1sYA
1s7GAM7GvQDOxrUAxr2tAMa9pQDGtaUAvbWlAL21nAC1rZQAtaWMAK2ljACllHsApZRzAJyMawCU
hGMAlHtaAIx7WgCMe1IAjHNSAIRzUgCEc0oAhGtKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHRoNGh0dHR0dHR0dIR0dHR0EECIdHSIdHR0dHR0d
HSIVABciHR0YHR0dHR0dHR0iDgAFHSIdBx0dHR0dHR0dHQUAAAcNBQkdHR0dHR0dIhMAAAAAAAUa
HR0dHSIdHRUAAAAFCRAcHR0dHR0UDQQAAAAQGiIiHR0dHRoIDQ4IAAAQIh0dIR0dHR0JDSIiGgUE
HR0dHR0dHR0dBBoiHSIQDSIdHR0dHR0dHQUXIh0dDRAhHR0dHR0dHR0VABodFQAaIh0dHR0dHR0d
HRUHAAkaHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</icon>
  </button>
</custombuttons>

Save the template, rebuild it (if necessary), and your new button code should be all set. By default, your output should look something like this. Then, your last step is to make a simple link to your new file. That should look like:

 <a href="http://toolbar.google.com/buttons/add?url=[your blog URL]toolbar_button.xml">Add to Google Toolbar</a>

The results will give you a link that says Add to Google Toolbar. So what are you waiting for? Click the button! Then you’ll have a new toolbar button updating you on the latest Movable Type news, along with a new search function that lets you have direct access to the Movable Type knowledge base and help documentation. Then be sure to post your own button link on your blog.

Still not appeased the Googlebot enough? Be sure to check out Niall’s Sitemap instructions, which let you simply and easily make a Google Sitemap XML file, which lets you instruct Google’s spiders on how to crawl your site, while letting you as the site owner have access to more statistics and information about your site.

If you want to make your site as reader-friendly (and Google-friendly) as possible, it’s easy to start with Movable Type today and you’ll be button-making, sitemapping and blogging in no time.

 

 

2款嗅探器

这2天上网找了下嗅探器。国内和国外各有一款。分别是密码窃听专家和ace password sniffer。
在局域网中用了一下,结果就不用说了。。
这2个嗅探器的功能都很强大,都可以嗅探ftp,pop3,smtp,web的密码。
当然,对于web密码的嗅探,大致使用的是判断你的数据包中有没有password这个字段。然后来选择截取或者drop。
2个嗅探器相对而言,似乎ace password sniffer对于web的嗅探效果更好。
而另一方面。嗅探也暴露了网站的安全问题。
对于sina,似乎验证这一段也进行了特殊加密,得不到效果。而163和sohu则直接暴露了。
 
 
 
2006-02-04_11-03-37.jpg 2006-02-04_11-03-46.jpg

关于在mt中显示最新评论的完整代码

matt给了我下面这段代码,用来解决上篇文章提到的问题
 
<h2>最近收到的评注</h2>
<ul>
<MTComments lastn="12"  sort_order="descend">
<MTCommentEntry>
<li><a href="<$MTEntryPermalink$>#comment-<$MTCommentID$>">
Re:
<$MTEntryTitle$>
   </a>
   </MTCommentEntry>
  , by
  <$MTCommentAuthor$>
  (
   <$MTCommentDate format="%b %d"$>
)
</li>
</MTComments>
</ul>
 <p class="entry-footer">
 </p>
 
 
针对自己的css,修改了下,我使用就是下面这段
 
<div>
<h2 class="module-header">Recent Comments</h2>
<ul class="module-list">
<MTComments lastn="24" sort_order="descend">
<MTCommentEntry>
<li class="module-list-item">
<a href="<$MTEntryPermalink$>#more">
<$MTCommentBody$></a></li>
</MTCommentEntry>
</MTComments>
</ul>
</div>

关于在mt中显示最新评论的

如何在mt中显示最新评论,官方给的代码是
 
<MTComments lastn="6" sort_order="descend">
<p><$MTCommentAuthor$> said:<br />
<$MTCommentBody$></p>
</MTComments>
 
但是,这样的话,是没有链接的,效果不好。
我修改之后的是
 
<div>
<h2 class="module-header">Recent Comments</h2>
<MTEntries lastn="***">
<MTComments lastn="10" sort_order="descend">
<div id="c<$MTCommentID$>">
<ul class="module-list">
<li class="module-list-item">
<a href="<$MTEntryPermalink$>#more">
<$MTCommentBody$></a>
</div>
</MTComments></MTEntries>
</MTEntryIfCommentsActive>
</li>
</ul>
</div>
 
似乎mtcomments 中参数lastn现在不起作用。
这里的问题就是,<mtcomments>,必须在<MTEntries></MTEntries> 中,而在这一段代码中,如果不给<MTEntries>制订lastn的数目,默认就为首页显示的文章数目。从而导致显示的评论是首页上出现的文章的评论
我的这段代码,只能够实现显示指定数目文章的所有评论,而不能显示指定数目的评论。
继续研究