Well,
the subject says it, is there any possibility to show Tweetbacks in S9Y? Could not find anything...
This would show if there are any referrers from twitter to a Blogpost.
Oliver
Tweetback-Plugin for s9y?
Re: Tweetback-Plugin for s9y?
Hi Oliver,
I might take a look at this because I would like a feature like this as well, but I cannot promise anything
Regards,
- Mattsches
I might take a look at this because I would like a feature like this as well, but I cannot promise anything
Regards,
- Mattsches
Re: Tweetback-Plugin for s9y?
Ok, I started to think about it more seriously. I managed to fetch tweets from the public timeline and stuff, but now I wonder how to store them.
Looks like my plugin could define a new comment type - e.g. "TWITTER" - and insert the respective tweets into the comments table. Those can be selected with serendipity_fetchComments(), but which would be the right event hook to fetch them?
Obviously it isn't "fetchcomments" because that throws an error. "frontend_display"? But what if I want to merge the twitter comments with regular comments (ordered by timestamp)? Is this possible?
Any ideas appreciated!
- Mattsches
Looks like my plugin could define a new comment type - e.g. "TWITTER" - and insert the respective tweets into the comments table. Those can be selected with serendipity_fetchComments(), but which would be the right event hook to fetch them?
Obviously it isn't "fetchcomments" because that throws an error. "frontend_display"? But what if I want to merge the twitter comments with regular comments (ordered by timestamp)? Is this possible?
Any ideas appreciated!
- Mattsches
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Tweetback-Plugin for s9y?
Hi!
This is currently not really doable without a core or template patch.
Since templates only have room for comments and trackbacks, you need to insert your pingbacks at one of these locations. I'd probably suggest to output tweetbacks in the trackbacks section.
For that, the smarty function {serendipity_printTrackbacks entry=$entry.id} is called in all entries.tpl templates. This relates to include/functions_smarty.inc.php, the serendipity_smarty_printTrackbacks() function. That one calls the serendipity_fetchTrackbacks(), and there no plugin API hooks are called. PINGBACK and TRACKBACK are hardcoded there.
So a plugin api hook would needed to be added there. Or, of course, one could create a plugin with a custom smarty function that would be called inside the template, then you could have your own independant tweetback section.
The easier alternative could be to merge tweetbacks with comments. There you could hook into "fetchcomments" and merge the data structure with all existing tweetbacks. $eventData in this event hook should hold an array of all comments; you could use array_merge or something like that to append that data structure.
Regards,
Garvin
This is currently not really doable without a core or template patch.
Since templates only have room for comments and trackbacks, you need to insert your pingbacks at one of these locations. I'd probably suggest to output tweetbacks in the trackbacks section.
For that, the smarty function {serendipity_printTrackbacks entry=$entry.id} is called in all entries.tpl templates. This relates to include/functions_smarty.inc.php, the serendipity_smarty_printTrackbacks() function. That one calls the serendipity_fetchTrackbacks(), and there no plugin API hooks are called. PINGBACK and TRACKBACK are hardcoded there.
So a plugin api hook would needed to be added there. Or, of course, one could create a plugin with a custom smarty function that would be called inside the template, then you could have your own independant tweetback section.
The easier alternative could be to merge tweetbacks with comments. There you could hook into "fetchcomments" and merge the data structure with all existing tweetbacks. $eventData in this event hook should hold an array of all comments; you could use array_merge or something like that to append that data structure.
Regards,
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/
# 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/
Re: Tweetback-Plugin for s9y?
Garvin, I had the same idea just an hour agogarvinhicking wrote:The easier alternative could be to merge tweetbacks with comments. There you could hook into "fetchcomments" and merge the data structure with all existing tweetbacks. $eventData in this event hook should hold an array of all comments; you could use array_merge or something like that to append that data structure.
- Mattsches
Re: Tweetback-Plugin for s9y?
Now I'll be moptivated to droppp off my ideas more often in this place 
I'm looking forward to the thingy being finished
I'm looking forward to the thingy being finished