Dokumentace k pluginu 'Twitter'
(serendipity_plugin_twitter)

Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 5.5.2013. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontroluj pro jistotu i aktuální německou dokumentaci, anglickou dokumentaci a ChangeLog.

Popis pluginu

Zobrazuje Tvoje nejnovější příspěvky z Twitteru

Obsah

  1. Spojení s Twitterem
  2. Mikroblogovací klient
  3. Oznámení na Twitter
  4. Tweetbacky

Spojení s Twitterem

K propojení blogu s Twitterem jsou potřeba následující kroky:

nahoru

Mikroblogovací klient

Plugin obsahuje klienta pro Twitter, resp. pro službu Identica, který zobrazuje časovou osu (Timeline) nastaveného uživatele a umí zadávat její aktualizace. Tento klient může být vložen buď na Startovací stránce v Administrační sekci, nebo jako položka "Tweeter" v menu v levém sloupci Administrační sekce.

nahoru

Oznámení na Twitter

Plugin umí oznamovat nové příspěvky blogu formou tweetu na Twitteru. Tweet bude sestaven z nadpisu příspěvku. Nadpis bude volitelně doplněn o tagy (pokud je nainstalovaný plugin Freetag). Oznámení bude naformátováno pomocí nastaveného řetězce s použitím zástupných proměnných.

K dispozici jsou následující zástupné proměnné:

Příklad:

Z toho vytvořený tweet bude vypadat následovně:

blog: Tento článek je #test od Grischa Brockhaus #příspěvek http://tinyurl.com/ne9y4f

Poznámka: Vřele doporučuji použít TinyUrl jako zkracovač URL adres, protože takto vytvořené adresy jsou pro stroje jasně identifikovatelné a proto jsou požadavky na Tweetbacky obvykle úspěšné. Nicméně je možné použít i jiné zkracovače URL adres při práci s tímto pluginem.

nahoru

Tweetbacky

"Tweetbacky" je slovo složené ze slov "Tweets" a "Trackbacks" (odezvy). Tweetbacky jsou tedy odezvy, které byly vytvořeny v Twitteru. Bohužel pro ně není k dispozici žádný automatický nástroj jako v případě Odezev v blogu. Twitter také neposílá žádná oznámení na blog, pokud je v nějakém tweetu zmíněn příspěvek na tvém blogu. Blog tudíž musí sám prohledat Twitter, aby našel Tweetbacky. To dělá tak, že prohledává odkazy v posledních tweetech.

nahoru

TODO

Historie verzí (ChangeLog)

1.51 (mattsches)
--------------------------
    * Switched tweetback search to API 1.1

1.50
-----
    * Added empty $entries, $validated_entries, $highest_ids checks to avoid foreach errors
    * Some extended whitespace, tabs and other minors cleanup

1.49
-----
    * Bump version to propagate new .htaccess in Spartacus sync and mirrors

1.48
-----
    * Static PHP5 fixes

1.47 (brockhaus)
--------------------------
    * Added API token functionality for announcing articles via pirat.ly.
    
1.46 (brockhaus)
--------------------------
    * Check tweetbacks (search) converted to API 1.1 (optional). You need to choose an OAuth acc handling the search.
    * Already implemented OAuth function will call API 1.1 instead of API 1.0 now.
    * Sitebar plugin, PHP version, optional uses Twitter API 1.1 with OAuth now.
    * Tweeter hides URL shortener functionality now if URL shortener is set to "uncompressed".
    * Added new URL shortener: pirat.ly.

1.43 (brockhaus)
--------------------------
    * Announce article: check for real URL lenght, as twitter makes it longer sometimes. 
    * Tweeter: Count chars directly after a short URL was added. Counts URLs as twitter URL length always.
    * Article announcement with "uncompressed" urls did not work very well.

1.42 (brockhaus)
--------------------------
    * Followme widget hat a " too much (thanks to Matthias Mees)
    * Auto tagging of article announcements was still not working correctly always

1.41 (brockhaus)
--------------------------
    * Auto tagging of article announcements was not working correctly always

1.40 (brockhaus)
--------------------------
    * PHP 5 required (garvin)
    * Simplyfied twitter oauth connect. The plugin uses one client for all blogs (you only have to connect). Can be overridden with an own client still.
    * Tweeter: Doesn't show timeline changer anymore, if timeline is switched off in configuration. Was too confusing.
    * Added geo location to announcement tweets: If the geotag plugin is installed and geo coords are added when publishing, the plugin will send them to twitter and / or identica. To see them, you have to enable location based tweets/dents in your profile.

1.39 (brockhaus)
--------------------------
    * Fixed Tweetback check, removed backtweet completely (as the service is gone)
    * Fixed bit.ly shortener and added j.mp version, removed tr.im and cli.gs (not working any longer).
    * Tweeter: Supports more than one twitter account now
    * Article announce: Was able to announce to first twitter acc only, no matter what was configured.
    * Added optional twitter followme widget to the sidebar plugin

1.38: Link shortener lookup creation patch by danst0, deprecate border=0

1.37: If bit.ly url truncation fails, silently discard

1.36: Changed twitter link to new API, thanks to matthias2

1.35
--------------------------
    * Added missing blank before 'class' parameter, thanks to shadowm

1.34
--------------------------
    * Patch by danst0: Try to properly detect tweetbacks if the
      twittersearch says so
    * Allow to utilize linktrimmer plugin by danst0 (TODO:
      Needs some work, see 'TODO' in classes/UrlShortener.php)

1.33
--------------------------
    * Properly convert twitter INT to string, to prevent Status-IDs like
5.12321313+E10

1.32
--------------------------
    * Added German translation for the new option for default setting of "Announce article"
    
1.31
--------------------------
    * Added new option for default setting of "Announce article"
    
1.30
--------------------------

    * Fix bad Twitter link to a tweet in PHP mode
    * Improve XHTML
    
1.28
-------------------------
    * When twitter username contains a "_" properly update
      cache reference for Tweet display (only when using "PHP" format)
      
1.27 (brockhaus)
-------------------------
    * Tweeter was showing invalid status links in twitter mode. 

1.26 (Garvinhicking)
-------------------------

    * Changed tweetid db storage from 15 to 20 chars, because it
      was already overflowing. Thanks to Matthias2.

1.25 (Garvinhicking)
-------------------------
    * When announcing with freetag tags, properly shorten out spaces
      in tags, without stripping characters (thanks to danst0)

1.24 (garvinhicking)
-------------------------
    * Fix for returning September instead of October in dates
    * XHTML compliant 

1.23: (rasch,garvinhicking)
----------------------
    * Twitters OAuth authentication

1.21: Fix parse error

1.20
----------------------
    * Only show option to suppress announces when configured.
    
1.18 (brockhaus)
----------------------
    * FIX: Tweet This buttons always requestet short urls again
      instead of fetching them from local DB. Slowed the blog
      down a lot!

1.17 (brockhaus)
----------------------
    * FIX: In some s9y installations the plugin continiously
      saved the same tweetbacks again and again.    
    * removed snipr service as it doesn't support creating 
      shorturls w/o an account anymore. 

1.16 (brockhaus)
----------------------
    * Finaly found the problem producing the white page / 500 
      error. Thanks to a sandbox installation given to me by
      Silvio Kunze. THANKS!
    * Updated the sidebar plugins default css a little to make
      it look nicer. 

1.15 (garvin)
----------------------
    * removed depreciated split() code.

1.14 (brockhaus)
----------------------
    * Overworked the tweetback moderation again. Now it should
      work as intended.
    * FIX: Reported warnings while saving, if backtweet was used 
      straiht from the beginning. (cmscritic reported this)
    * FIX: Backtweet search didn't save the last highest ID.
      For luck this was only a little performance problem.

1.13 (brockhaus)
----------------------
    * Better tweetback png check urls (contributed by ruben)
    * The old tweetback search is optionaly only executed in full
      article view.
    * Tweetback moderation did not work as configured.

1.1x (brockhaus)
----------------------
    * Optionaly add short url to each articles footer.

1.12 (brockhaus)
----------------------
    * Added backtweets.com support! Now the search for tweetbacks
      is a lot more efficient and even produces more search 
      results by supporting user short urls.
    * One global search for tweetbacks using backtweets instead of
      one for each article. Huge performance win and *all* articles
      will be checked.
    * The event plugin now emits CSS for the sidebar plugin to
      look good. The sidebar plugin can't do it itself.
    * Sidebar plugins cachefile deleted after saving 
      configuration in order to reflect new settings.
    * Tweetbacks will be loaded oldest first, so they are in
      correct order if more than one is found.
    * Added optional moderation of tweetbacks.
    * 2 different tweet filters: Filter all tweets starting with @
      or containung @ (sidebar)

1.11 (brockhaus)
----------------------
    * FIX: Tweet backup didn't work anymore because of int 
      overflow in the database. :-(
    * FIX: Sidebar was not realy stackable with different accs.
      (only one cachefile was defined)
    * FIX: First time loading of sidebar with installed event
      plugin reported wrong "Twitter not accessable".
    * Optional: Sidebar plugin displays only tweets/dents to 
      all (only for PHP version available)
    * Disable backup, if in identica mode (this was never 
      implemented)
    * Password inputs are now displayed as such with newest s9y
      version from CVS.

1.10 (brockhaus)
----------------------
    * Extended Article Attributes: special tags, announce yes/no
    * Doesn't announce future entries anymore.
    * If an article is deleted, the tweetback history is 
      deleted, too.
    * default announce format now doesn't change after 
      upgrading (sorry yellowled ;))
    * Exchanged "identi.ca this" buttons with "IDENT THIS".
      Looks nicer near the "TWEET THIS" button.

1.09 (brockhaus)
----------------------
    FIX: dent_this URL smartified didn't work..
    * Nicer dent_this buttons.

1.08 (brockhaus)
----------------------
    * TweetThis buttons may now be added via template. The plugin
      emits only url_tweetthis and url_dentthis. In that way
      textlinks are possible, too.
    * TweetThis target=_blank optional

1.07 (brockhaus)
----------------------
    FIX: JS Version of identi.ca sidebar plugin didn't work.
    * !Group linking for identi.ca timeline (PHP version only)
    * Announcing of articles may now freely formated with more
      infos like autor and stuff
    * TweetThis / IdenticaThis button below articles. 
      There is a new configuration tab for this!

1.06 (brockhaus)
----------------------
    * Tweetbacks in non UTF8 blogs were saved as UTF8 and didn't
      look good..
    * Warning inside of the sidebar plugins configuration if the
      event plugin was not installed yet. Too many people were
      confused about "missing options".
    * Removed debug output on static pages. Thanks yellowled for 
      reporting.
    * "check tweetback" link now apears on entries without footer,
      too. (thanks RobLen for reporting the problem).

1.05 (brockhaus)
----------------------
    FIX: Lost PHP4 compatibility while tweetback checking :-/

1.04 (brockhaus)
----------------------
    FIX: Code cleanup prevented plugin to search for tweetbacks on
         new articles. The "check tweetback" link didn't work for
         the same reason. :-(

1.03 (brockhaus)
----------------------

    General
    * Tabbed configuration
    * Mutliple accounts (twitter, identi.ca). Easy changing
      of accounts in Backend Tweeter Client
    * Cleaned up code a lot

    Sidebar
    * Removed "needs PHP5" in description for tweet backup, as
      it doesn't anymore.

    Event
    * Article announcement now possible using twitter and/or identica
    * added cli.gs as URL shortener
    * Fix: Tweetbacks containing "&" where saved with "&"
    * Fix: "ignore my tweeds" while tweetback adding didn't work, 
      if the acc was written in wrong case.
    * Fix: Tweetback fetching PNG produced problems on *some* static 
      page installations.
    * Doesn't save or load corrupted short urls anymore. "Error" short
      urls will be deleted when saving configuration.

    Tweeter
    * Removed "Umlaut" counting, because it doesn't seem, that twitter
      counts that strict (also they say so in the API doc)
    * Retweet, Reply and DM links.

1.02 (brockhaus)
----------------------

    General
    * Made it better working with non UTF-8 blogs.
      (announcement and twittertweeter were involved)
    * Some PHP installations had a strtotime function not able
      to evaluate twitter time strings. Now they are "reparsed"
      to something working. (tweeter showing "42 years ago" for 
      tweets.)
    * Completed German translation (I hope ;))

    Sidebar
    * Changed requirements for sidebar plugin down to php 4.0.1

    Event
    * "check tweetbacks" was only visible for logged in users.
      But the URL itself was executable for anyone. (well, the
      URL was very hard to guess at least.. ;-))
    * Optional save profile url or web url given by the twitter
      user as tweetback url instead of the url of the tweet.
    * Decide, if you want tweetbacks to be saved as comments or
      trackbacks.

    Tweeter
    * Counts chars no matter if they produce more than
      one char while sending the update. (German Umlaute i.e.)
    * It was impossible to tweet "&".

1.01 (brockhaus)
----------------------

    General
    * Fix: json class was included twice
    * Fix: HTTP_Request class was not found always

    Event:
    * added 7ax.de. It has the same benefits like tinyurl.com
      but it's URLs are shorter.
    * added tr.im.
    
    Sidebar
    * PHP version didn't work if the event plugin was not 
      installed, too. It always (false) reported, that twitter
      is not accessible at the moment.

1.0 (brockhaus)
----------------------
    General
    * Added JSON Class for PHP4 jsondecode().

    Sidebar:
    * Added optional "follow me" link below tweets in sidebar
    * Added class and div tags to the sidebar plugin in order
      design it more easy using css.
    * Removed local blogger.js (and configuration), as it was
      already outdated!
    * PHP Version: Made HTML code more compatible to the twitter
      JS widget.
    * PHP Version: Replaced written links with an html link
    * PHP Version: Added links to the userprofile where @name
      is found.
    * Replaced simplexml with json code in order to make it 
      PHP4 compatible
    * Caching Dateformat was dependend on the visitors country
      who triggered the caching! Japanese Dates shown up at my
      German blog.. :)
    * Caching of twitter timeline is done in the background, if
      event_twitter is installed, too. This won't block the blog
      when twitter is blocked (for maintenance i.e.)

    Event:
    * Tweetback check functionality.
    * Announce articles on twitter. 
    * Implemented db cache for shorturls
    * Merged TwitterTweeter plugin into the event plugin,
      cleaned it up and enhanced it a little.

0.9:
---

Remove block level element in blogger.js for JS compatibility

0.7:
---

Use utf8-decoding, when charset is not UTF-8

0.6:
----

* Support for identi.ca (more Services are now easy to implement)

0.5:
----

* Allow creating backups of your tweets.