Twitter は無料ではじめることができる、140文字以内の「つぶやき」投稿サービス。比較的「ゆるい」コミュニケーションを取り合えことが一般的な支持を得て、広まりをみせています。
このプラグイン「NP_Twitter」は、NucleusにTwitterクライアントとしての機能を持たせることができます。
特徴:
保有アカウントの投稿をダウンロードし、アーカイブ
statistics of a twitter, #friends/#followers
NucleusからTwitterに投稿
-
build-in tweetlet support
NucleusによってTwitter外部・内部のインターフェイスを代替可
インストール方法
Zipファイルを展開して、中身をサーバーのプラグインディレクトリにアップロードする
プラグイン管理画面にてNP_Twitterをインストールする
メンバー管理にてTwitterのアカウント、パスワードをセット
プラグイン管理画面にてNP_Twitterの設定を任意に変更
スキン(及びテンプレート)に記述を行う(下記大項目参照)
Twiiter の Cron Job を、下記のサンプルのようにすべてのユーザへセットアップ
i.e. 4,7,14,21,28,35,42,49,56 * * * * root /usr/bin/GET "http://localhost/blog/action.php?action=plugin&name=Twitter&op=refresh" &> /dev/null
The setup steps:
create a new skin call “twitter”, this can be clone from an existing skin to provide a consistent layout with the blog.
from the skin’s main index, insert <%Twitter(tweets,[member],40)%> and <%Twitter(updatebox)%> to list recent tweets and a update box. If the skin is cloned, likely replacing all contents in the main contents section, and with the sidebar removed.
create a tweet.php to use the new skin, code example
here
When calling the Nucleus twitter web interface, parameter ?tpage=1 is required, this will trigger the tweet badge into archive mode. A older/newer link will be shown to allow user to see older updates.
see example
javascript:location.href='http://yourblog.com/blog/action.php?action=plugin&name=Twitter&op=tweetlet&url='+encodeURIComponent(location.href)+'&text='+encodeURIComponent(document.title)
このプラグインの使い方
NucleusのTwitter投稿ボックスから投稿できます。
[reply] 返信を行う場合は、メッセージの最後に「@相手のID」を含めて投稿します。
[delete] button is also visible for a login user to delete his/her update.
スキンへの記述
ログインユーザのTwitter投稿ボックス、及び文字カウントを表示します。これは必ず <%if(loggedin)%> を使用し、当事者ユーザ以外に表示させないほうが良いでしょう。
「member」にNucleusで保存されているアカウントを入れることによって、friendsを表示します。
「member」にNucleusで保存されているアカウントを入れることによって、Twitterへのリンクを表示します。
show a twitter badge of x most recent tweets by a particular member only, the twitter name formating can be overrided by putting optional parameter text/icon at the end
show a twitter badge of x most recent tweets by a particular member and those he/she followed, the twitter name formating can be overrided by putting optional parameter text/icon at the end
テンプレートへの記述
オプション
Tweets header formating - header for the twitter badge
Tweets formating - formating of each update. Available formating tag: TWITTERT for twitter name in text, TWITTERI for twitter name with image, TWEET for update text, TDATE - date
Tweets footer formating - footer for the twitter badge
Text to tweet on new post - formatting to use when sending update for a new post . One format per line, will be randomly pick so multiple format is possible. Available formating tag: %l == item url, %t == title, %e == excerpt
Delete tweets cache on uninstall - whether to delete update archive when uninstall
Show Date in Archive - whether to show date to separate tweets in badge
Tipsと裏技
The tweetlet will not work if there are ' somewhere in URL…. it’s a firefox/javascript not sure how to fix it…
希望事項
バグ
The tweetlet will not work if there are ' somewhere in
URL…. it’s a firefox/javascript not sure how to fix it…
開発履歴
【Version 0.x リリース <リリース日付>】
【Version 0.7 リリース <2008,2/20>】
【Version 0.6 リリース <2007,10/29>】
(一般公開)Nucleus
CMS 3.31 に対応