その他: 2011年7月アーカイブ

せっかくTwitterを始めたのでサイドバーに最近のつぶやきを表示させることにします。

<手順>

  1. http://twitter.com/about/resources/widgets ここでプロフィールウィジェットをカスタマイズしてコードを取得します。
  2. 次に取得したコードをコピーして新規にウィジェットテンプレートを作成します。
  3. そして最後は、サイドバー関連のウィジェットセットにTwitterウィジェットを追加すれば完成です。

簡単です!

まずは、テンプレートモジュールを2つ作成する。

Tweetボタン

<a href="http://twitter.com/share" class="twitter-share-button"
    data-url="<$mt:EntryPermalink$>" data-text="<$mt:EntryTitle$>"
    data-count="none" data-via="BeliberDaisuke" data-lang="ja">Tweet</a>


Tweetボタンscript

<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

次に各エントリーにボタンを表示させるための修正を行う。赤字の部分が修正箇所。

ブログ記事のメタデータ

・・・省略
<mt:Unless name="hide_counts" eq="1">
    <mt:IfCommentsActive><a href="<$mt:EntryPermalink$>#comments" class="entry-meta-comments" title="<$mt:EntryCommentCount singular="コメント(1)" plural="コメント(#)"$>">Comments(<$mt:EntryCommentCount$>)</a></mt:IfCommentsActive>
    <mt:IfPingsActive><a href="<$mt:EntryPermalink$>#trackbacks" class="entry-meta-trackbacks" title="<$mt:EntryTrackbackCount singular="トラックバック(1)" plural="トラックバック(#)"$>">Trackbacks(<$mt:EntryTrackbackCount$>)</a></mt:IfPingsActive>
    <$mt:Include module="Tweetボタン"$>
    <!-- <a href="javascript:void(0)" onclick="return mtScore(<$mt:EntryID$>)" id="scoring-id-<$mt:EntryID$>" class="scoring">
        <span id="scoring-vote-<$mt:EntryID$>" class="scoring-vote">票</span>
        <span id="scoring-score-<$mt:EntryID$>" class="scoring-score"><$mt:EntryScore namespace="community_pack_recommend" singular="1" plural="#" none="0"$></span>
        <span id="scoring-score-label-<$mt:EntryID$>" class="scoring-score-label"><$mt:EntryScore namespace="community_pack_recommend" singular="票" plural="票" none="票"$></span>
    </a> -->
</mt:Unless>
</div>

今回の修正では、Tweetボタンの他,★マークを非表示(コメントアウト)にした。

Beliberのプロフィール

過去、公共図書館員。現在、大学図書館員…ではなく研究費関連部署で修行中。 早く図書館に戻って鈍った感を取り戻したいな。図書館情報大学の14期卒業生です。 今の趣味はジョギングでフルマラソン完走が目標! かわいい2人の息子が自慢です。 このブログでは、図書館関連やBeliberの日常などを更新しています。 ちなみに決して私がBest Librarianという訳ではありませんので念のため! その他のプロフィールはこちらからどうぞ。

Twitter Beliberのつぶやき

Twitter 図書館系つぶやき

ぜひ!アクセスを

Beliberは、大学の先輩でもある空手家図書館員の娘さん「れいこちゃん」を応援しています。

このアーカイブについて

このページには、2011年7月以降に書かれたブログ記事のうちその他カテゴリに属しているものが含まれています。

前のアーカイブはその他: 2011年5月です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

その他: 月別アーカイブ