twitterタイムラインの表示

当サイトの左上にあるアプリです。とりあえず、指定したID(ここではopenlaszlo_ason)のtwitterタイムラインの表示だけです。

  • タイトルクリックでopenlaszlo_asonタイムラインのページに飛ぶ
  • マウスオーバーで各行の高さが変わる
  • マウスホイールにも対応

この内容を表示するためには Adobe Flash Plugin が必要です。
(OpenLaszlo4.6.1/swf8)

<?xml version="1.0" encoding="UTF-8"?>
<canvas proxied="false" width="100%" height="200" bgcolor="0x444444">
	<method name="get_time" args="t">
		var v = t.split(" ");
		return (v[1].toString()+' '+v[2].toString()+' '+v[5].toString());
	</method>
	<dataset name="ds" type="http" request="true" src="http://www.openlaszlo-ason.com/php/request.php?url=http://twitter.com/statuses/user_timeline/openlaszlo_ason.xml?count=10"/>
	<simplelayout/>
	<text fgcolor="0x33ccff" fontsize="13" fontstyle="bold" text="OpenLaszlo ひとことTIPS">
		<handler name="onclick">
			lz.Browser.loadURL('http://twitter.com/openlaszlo_ason/','_blank'); 
		</handler>
		<handler name="onmouseover">
			this.setAttribute('textdecoration','underline');
			this.setAttribute('fgcolor',0xffffff);
			msg.animate('opacity',1,200,false);
		</handler>
		<handler name="onmouseout">
			this.setAttribute('textdecoration','none');
			this.setAttribute('fgcolor',0x33ccff);
			msg.animate('opacity',0,200,false);
		</handler>
	</text>
	<view width="${canvas.width}" height="${canvas.height-30}" clip="true">
		<vbox x="${sb.width/2}" datapath="ds:/statuses" width="${parent.width-sb.width*2}" spacing="2" >
			<vbox datapath="status" width="${parent.width}" bgcolor="0xeeeeee">
				<handler name="onclick">
					var id = this.datapath.xpathQuery('id/text()');
					lz.Browser.loadURL('http://twitter.com/openlaszlo_ason/statuses/'+id,'_blank'); 
				</handler>
				<handler name="onmouseover">
					sb.setAttribute('isMouseover',true);
					this.setAttribute('bgcolor',0xffffff);
				</handler>
				<handler name="onmouseout">
					sb.setAttribute('isMouseover',false);
					this.setAttribute('bgcolor',0xeeeeee);
				</handler>
				<text datapath="created_at/text()" fgcolor="0x555555">
					<handler name="ontext">
						this.setAttribute('text',canvas.get_time(this.text));
					</handler>
				</text>
				<text x="5" width="${parent.width-5}" datapath="text/text()" multiline="true" >
					<attribute name="orgH"/>
					<attribute name="dspH" value="17"/>
					<handler name="ontext">
						this.setAttribute('orgH',this.height);
						this.setAttribute('height',this.dspH);
					</handler>
					<handler name="onmouseover" reference="parent">
						this.animate('height',this.orgH,300,false);
					</handler>
					<handler name="onmouseout" reference="parent">
						this.animate('height',this.dspH,300,false);
					</handler>
				</text>
			</vbox>
		</vbox>
		<scrollbar id="sb" visible="${this.scrollable}" >
			<attribute name="isMouseover" value="false"/>
			<handler name="onmousewheeldelta" reference="lz.Keys" args="d">
				if(this.isMouseover)this.step(-d);
			</handler>
		</scrollbar>
		<view id="msg" width="${parent.width}" height="${parent.height}" opacity="0">
			<view width="${parent.width}" height="${parent.height}" bgcolor="black" opacity="0.9"/>
			<vbox align="center" y="500" spacing="3" fontsize="12">
				<text fgcolor="white">OpenLaszloの</text>
				<text fgcolor="white">技術的な情報を</text>
				<text fgcolor="white">twitterで不定期に</text>
				<text fgcolor="white">つぶやいています。</text>
				<text fgcolor="white" align="right">ason</text>
				<handler name="onopacity" reference="msg"><![CDATA[
					if(msg.opacity==1)this.anm.doStart();
					if(msg.opacity<0.2)this.setAttribute('y',500);
				]]></handler>
				<animator name="anm" start="false" attribute="y" from="500" to="${msg.height/2-parent.height/2}" duration="300" />
			</vbox>
		</view>
	</view>
</canvas>

▼request.php

<?php
$url = $_GET['url'];
header("Content-type: application/xml; charset=UTF-8");
readfile($url);
?>
twitter.txt · 最終更新: 2010/08/19 13:41 by ason
Copyright © 2008~ずっと ason(minamotonoason@gmail.com)

chuumap 中小企業ツイッターマップ 製造、加工、卸などB2B主体の個人事業者、中小企業のツイッターを、グーグルマップの住所の位置に正確に表示。
tentwi 店舗でツイート 飲食店、販売店など、一般消費者向けの店舗を構えるお店ツイッターを、グーグルマップの住所の位置に正確に表示。
廃句ったー あなたのツイッターの最近のツイートから廃句もとい俳句を生成。
みかけったー 超人気!あなたのツイッターの最近のツイートからみかけの年齢と性別を診断。
キキキーったー 最近のツイートからキーの使用回数をしらべます。
SLOTTER(すろったー) あなたのツイッターのタイムラインのアイコンでスロット。FLASHゲーム。
MultiLangTweet 一度に48ヶ国語に翻訳してツイート。
英訳ったー 英訳または日本語訳してツイート。
バンドメンバー募集サイト シンプルなバンドメンバー募集サイト。
CMS総合デモサイト 有名オープンソースCMS、EC、SNS、Wikiを一度に全部体験できる総合デモサイト
ビズロック BizRock(ビズロック)~音楽ライブでプレゼン!情熱型ビジネス交流会