Post Comment to Homepage

Post Comment to Homepage – MindTouch Community Portal

Post Comment to Homepage

Table of contents

1. 1. Description of the code sample
2. 2. Sample Code
3. 3. Sample Response from executing Code
4. 4. Implementation notes

Description of the code sample

The following code example creates a new comment on the home page

Sample Code
view sourceprint?
1 Plug p = Plug.New(“http://deki-hayes/@api/deki");
2 p.At(“users", “authenticate").WithCredentials(“admin", “password").Get();
3 DreamMessahttp://developer.mindtouch.com/editor/fckeditor/core/editor/images/spacer.gifge msg = DreamMessage.Ok(MimeType.TEXT, “Comment text");
4 p.At(“pages", “home", “comments").Post(msg);

Sample Response from executing Code
view sourceprint?
01
02
03
04
05
06
07 Admin
08 Admin
09 admin@mindtouch.com
10
11 2007-08-23T09:52:07Z
12
13 1
14 Comment text
15
Implementation notes

AJAX Suggestion Voter

AJAX Suggestion Voter – MindTouch Community Portal

Introduction

This template is a simple AJAX enabled Up/Down or Positive/Negative Voter. You are able to place many of these on one page to simulate the FeVote functionality. Since this uses page properties to save the voting results its not recommended for any use if security or 100% integrity maybe a concern. In order to vote the voter must have write capabilites for the page the results are being stored on. As written this voter can only be used by users that are logged in, no anon voting is allowed. It should also be noted that if a user votes twice their vote does not get counted twice instead their vote is changed. Please direct any questions / comments to this forum thread.

中文編碼解析工具 Ver 1.3

中文編碼解析工具 Ver 1.3 – 黑暗執行緒

中文編碼解析工具 Ver 1.3

上回發表中文編碼解析工具 Ver 1.2後,網友Esther建議再加上GBK-Q, GBK-B的編碼解析。

說實在話,我沒聽過這兩個名詞,但Google了一下馬上晃然大悟,原來指的是我們常在Mail Subject或收件寄件人資料上看見的那種編碼。格式像這樣:
=?x-gbk?q?=B5=C4=B7=AD=D2=EB?=

怎樣,一Show出格式,大家都很有感覺了吧? 這Mail Server為了克服Mail Header只支援7bit字元所想出來用在底層的編碼法,卻常因為Mail Server、Mail Client間的默契不足沒被順利解碼還原露了餡,赤裸裸地在郵件軟體上顯示出來。以前挺常遇到的,但這些年來,郵件伺服器及軟體漸漸聰明了,就不太常再出現。有網友提出表示這還是某些人的痛,而我用Google找了一下,也還看見不少,索性在中文編碼解析工具加入這項新功能(目前只支援Big5與簡體中文,應該夠用了),推出Ver 1.3版,有需要的朋友可以下載回去玩玩。

Tamper Data-好用的Firefox Debug工具

My Program :: Tamper Data-好用的Firefox Debug工具

在 Firefox 中, 之前已經介紹過許多好用的工具(對開發及除錯應用), 像是

Firebug – http://diary.tw/tim/7, http://diary.tw/tim/160
Web Developer – http://diary.tw/tim/2
LiveHTTPHeaders – http://diary.tw/tim/320
Fiddler – http://diary.tw/tim/757
User Agent Switcher – http://diary.tw/tim/856

這裡要介紹的是除了可以觀察每個 http 連線狀況外, 還能修改傳送資料的功能, 這個 AddOn 稱之為 Tamper Data, 光看字面上就很清楚是一個改資料的 AddOn, 但是是在執行網頁訪問的狀況下可以用插入式的方式操作, 這對於在沒有開發工具下, 要快速地進行傳送資料的調整(header, postdata), 如此一來, 可以容易地進行除錯及測試驗證.