Tweetbacks and Templates

Discussion corner for Developers of Serendipity.
Post Reply
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Tweetbacks and Templates

Post by blog.brockha.us »

After playing a while with tweetbacks, I am thinking about, how to add them more properly to s9y. I really would like to have a new comment type beside NORMAL, TRACKBACK and PINGBACK: TWEETBACK. At the moment I am saving tweetbacks as trackbacks, but this doesn't match it exactly..

When adding PINGBACK as a new comment type to the s9y core, it was easy, because pingbacks are not handled by a plugin but by the s9y core itself. Viewing from templates it doesn't matter, if a comment is a trackback or a pingback, so s9y can deliver both for the templates trackback section.

Of course I would like to have a new "comment section" now, so we have trackbacks, tweetbacks and normal comments, because tweetbacks are something in between of trackbacks and normal comments in my opinion.

I could easily add a new comment type "TWEETBACK" to the s9y core, but how to handle this? What to do with the templates? If the template doesn't support the extra tweetback section, s9y has to deliver tweetbacks as trackbacks. If the template supports it, the core has to deliver TWEETBACKs separately. But where should the core know the template feature from?

Hmm.. I could add a property to the plugins configuration, but then the blog owner has to know, if the template supports tweetbacks.

Or better: The core continues to deliver tweetbacks as TRACKBACKs but with a new extra flag on it, that is set or not. Newer templates could evaluate this extra flag. Hmm.. Perhaps this would be the most compatible solution? Old templates would fetch tweetbacks and trackbacks together, as they don't know the "extra flag". New templates could seperate tweetbacks from trackbacks by evaluating this extra flag.

Any ideas on this?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Tweetbacks and Templates

Post by garvinhicking »

Hi!

I think the only way to deal with this is also like you said

- Offer a global config option to say "Put tweetbacks into trackbacks" inside the core, that is by default enabled. This config option can be ovverriden by a template that supports tweetbacks (like through confi.inc.php - $serendipity['tweetbackSupport'] = true).

- Or simply make tweetbacks not appear at all, if a template doesn't support it, and properly implement a seperated API function only, with no fallback.

My vote is on the first variant.

HTH,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
laemmy
Regular
Posts: 40
Joined: Sun Nov 19, 2006 5:13 pm
Contact:

Re: Tweetbacks and Templates

Post by laemmy »

I prefer the first variant too.
Some s9y projects
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Tweetbacks and Templates

Post by Don Chambers »

Hmmm... I think the problem I have with this is that tweetbacks are channel-specific (Twitter). Comments and Trackbacks are universal. It also sounds like the preferred method of implementation is in the s9y core, and not the twitter plugin? Perhaps maybe I just need to see it in action. It does not help that I have not been a major user of twitter.
=Don=
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Tweetbacks and Templates

Post by blog.brockha.us »

garvinhicking wrote:- Offer a global config option to say "Put tweetbacks into trackbacks" inside the core, that is by default enabled. This config option can be ovverriden by a template that supports tweetbacks (like through confi.inc.php - $serendipity['tweetbackSupport'] = true).
Wow! That's a cool solution.. Will the core see this? I have to check it out, I guess..
Don Chambers wrote:Hmmm... I think the problem I have with this is that tweetbacks are channel-specific (Twitter). Comments and Trackbacks are universal
Well, you are right.. at the moment.. But in the future tweedbacks will be microblogging trackbacks while trackbacks are macroblogging trackbacks and comments are channel specific (one blog).. So it is not *that* channel specific. At the moment it is, but identica and all that kind of microblogging services could be added easily, too.
Don Chambers wrote:I just need to see it in action. It does not help that I have not been a major user of twitter.
I haven't been neither.. But having fun now using microblogging.. ;)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Post Reply