Textpattern Forum

You are not logged in. Register | Login | Help

#1 2010-04-19 01:15:27

atbradley
Plugin Author
From: Rhode Island, US
Registered: 2007-02-15
Posts: 34
Website

atb_twitter: Display a formatted Twitter/StatusNet feed on your site

atb_twitter displays feeds from microblogging platforms (Twitter and sites based on StatusNet, including identi.ca) on your website, using a Textpattern form for formatting, so you can do something like this:

<txp:atb_twitter count="20" user="daydreamlab">

<txp:atb_tw_if_first_tweet>
<h2><a href="http://twitter.com/daydreamlab"><txp:atb_tw_user_name /> on Twitter</a></h2>
<ul>
</txp:atb_tw_if_first_tweet>

<li>
<span class="tweetdate"><txp:atb_tw_created_at />:</span> 
<br /><txp:atb_tw_text />

<txp:atb_tw_if_is_reply>
<br />
<a class="inreply" href="http://twitter.com/<txp:tw_atb_tw_in_reply_to_user_id />/status/<txp:atb_tw_in_reply_to_status_id />">
in reply to <txp:_atb_tw_in_reply_to_user_id />
</a>
</txp:atb_tw_if_is_reply>

</li>

<txp:atb_tw_if_last_tweet>
</ul>
</txp:atb_tw_if_last_tweet>

</txp:atb_twitter>

Update (22. April 2010): Version 0.9.1 includes corrections to typos in the example form and adds a txp:atb_tw_in_reply_to_screen_name tag, which somehow I overlooked in the first release.
Update (22. April 2010 [Um, later on]): Version 0.9.2 includes more bugfixes, including a fix for one bug I introduced in my rush to fix bugs this morning. It should totally work this time.
Update (25. April 2010): Version 0.9.3 adds support for StatusNet/identi.ca and fixes handling of @replies to screennames with hyphens or underscores.
Update (29. May 2010): Version 0.9.4 adds options for handling timezones, uses the new (versionable) twitter API URLs, adds some custom classes to links it creates inside statuses, and allows you to create wraptags around the links it creates.

Download / More info

Last edited by atbradley (2010-05-30 01:17:02)

Offline

#2 2011-05-15 19:48:23

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: atb_twitter: Display a formatted Twitter/StatusNet feed on your site

is this plugin up to date? if i do user and then count, the plugin returns nothing. if i do count first, then user, the plugin removes a large chunk of html from my template.

Offline

#3 2011-08-01 18:48:07

claywso
Member
From: Durham, NC USA
Registered: 2004-12-20
Posts: 52
Website

Re: atb_twitter: Display a formatted Twitter/StatusNet feed on your site

Hoping someone can help me with this error:

Tag error: <txp:atb_twitter count="1" user='<txp:custom_field name="twitter" />'> -> Notice: Undefined offset: 0 on line 64

I’m wondering if my quote marks are causing a problem?

that, or the fact that i’m using multiple article-offsets on one page?

Offline

#4 2011-08-02 01:10:20

claywso
Member
From: Durham, NC USA
Registered: 2004-12-20
Posts: 52
Website

Re: atb_twitter: Display a formatted Twitter/StatusNet feed on your site

just in case anyone has a similar issue, it looks like the update_lastmod option (which defaults to 1 or TRUE) causes this issue occasionally. When I set it to 0 or FALSE, the error goes away.

have no idea what the actual problem is, but at least the error is gone.

also, where this error occurred, the atb_twitter tag didn’t function…

Offline

#5 2011-08-02 03:47:08

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 559
Website

Re: atb_twitter: Display a formatted Twitter/StatusNet feed on your site

Wanna edit the plugin?

Locate line 63, and remove this:

[0]

…so that it looks like this:

$twitmod = (string)$twitmod;

Then save, and try it out. Seems to work here; not sure why there is a reference to an array index there in the first place.

Offline

#6 2012-04-30 15:05:13

phuture303
Member
Registered: 2008-09-14
Posts: 118

Re: atb_twitter: Display a formatted Twitter/StatusNet feed on your site

Did Twitter made a change on how the plugin recognizes retweets?

Normally, if the latest Tweet was a retweet, the plugin would ignore this and show the latest “original” tweet i’ve posted – that was my experience.
Yesterday I then noticed that NOTHING is displayed when the latest entry in my twitterstream is a retweet. My <div id=“tweet”> just stayed blank with no content.

After tweeting something original again, the new tweet showed up on my website as I expected it to do.

What can I do?

Thanks,
David

Offline

Board footer

Powered by FluxBB