From 3cb7962af7ad1c1c0e0fdda43ce0f90ac54ecdc4 Mon Sep 17 00:00:00 2001 From: Matthias Mees Date: Fri, 23 May 2014 11:54:48 +0200 Subject: [PATCH] Adapted backend markup for twitter client for 2.0 backend. Also fixed a typo in the English lang file. --- serendipity_plugin_twitter/ChangeLog | 2 + serendipity_plugin_twitter/lang_en.inc.php | 6 +- .../serendipity_event_twitter.php | 1 + .../tweeter/tweeter_client.inc.php | 94 +++++++++++++++---- 4 files changed, 81 insertions(+), 22 deletions(-) diff --git a/serendipity_plugin_twitter/ChangeLog b/serendipity_plugin_twitter/ChangeLog index 065fc86c..3be8ea64 100644 --- a/serendipity_plugin_twitter/ChangeLog +++ b/serendipity_plugin_twitter/ChangeLog @@ -11,6 +11,8 @@ TODO: 1.61 -------------------------- + * Adapted backend markup (tweeter_client.inc.php) for 2.0 backend (yellowled) + * Fixed a typo in the English lang file (yellowled) * Added int-casting to str_repeat() to prevent PHP notice * Added additional backend markup (backend_display) for 2.0 backend (yellowled) * Moved backend menu item to proper backend nav section (yellowled) diff --git a/serendipity_plugin_twitter/lang_en.inc.php b/serendipity_plugin_twitter/lang_en.inc.php index 8aa8bfbd..c9eb198d 100644 --- a/serendipity_plugin_twitter/lang_en.inc.php +++ b/serendipity_plugin_twitter/lang_en.inc.php @@ -1,4 +1,4 @@ -Please reload later..'); -// Twitter Event Plugin +// Twitter Event Plugin @define('PLUGIN_EVENT_TWITTER_NAME', 'Microblogging (Twitter,Identica)'); @define('PLUGIN_EVENT_TWITTER_DESC', 'Adds a twitter/identica client to the admininistration interface, searches for tweetbacks and announces new articles to a microblogging account.'); @@ -106,7 +106,7 @@ @define('PLUGIN_EVENT_TWITTER_IDENTITIES', 'Identities'); @define('PLUGIN_EVENT_TWITTER_ACCOUNT_IDCOUNT', 'Number of Accounts'); @define('PLUGIN_EVENT_TWITTER_ACCOUNT_IDCOUNT_DESC', 'After saving this, the configuration will give you inputs for the number of accounts. Perhaps you have to save it twice, to see the inputs.'); -@define('PLUGIN_EVENT_TWITTER_IDENTITY', 'Indentity'); +@define('PLUGIN_EVENT_TWITTER_IDENTITY', 'Identity'); @define('PLUGIN_EVENT_TWITTER_ACCOUNT_SERVICE', 'Account Service'); @define('PLUGIN_EVENT_TWITTER_ACCOUNT_SERVICE_DESC', 'Specify, if this is a twitter or identi.ca account'); @define('PLUGIN_EVENT_TWITTER_ACCOUNT_SERVICE_TWITTER', 'twitter'); diff --git a/serendipity_plugin_twitter/serendipity_event_twitter.php b/serendipity_plugin_twitter/serendipity_event_twitter.php index 9255ae8d..d5e68cd3 100644 --- a/serendipity_plugin_twitter/serendipity_event_twitter.php +++ b/serendipity_plugin_twitter/serendipity_event_twitter.php @@ -1023,6 +1023,7 @@ class serendipity_event_twitter extends serendipity_plugin { return true; case 'backend_sidebar_entries_event_display_tweeter': + echo '

' . PLUGIN_EVENT_TWITTER_TWEETER_SIDEBARTITLE . '

'; $this->display_twitter_client(true); return true; diff --git a/serendipity_plugin_twitter/tweeter/tweeter_client.inc.php b/serendipity_plugin_twitter/tweeter/tweeter_client.inc.php index d9f7e0e9..31e3a6ae 100644 --- a/serendipity_plugin_twitter/tweeter/tweeter_client.inc.php +++ b/serendipity_plugin_twitter/tweeter/tweeter_client.inc.php @@ -9,27 +9,83 @@ var twitter_https_length_str = '';
-
+ - - + + +'; + } +?> + + $idtext) {?> - -
- - -
-140 -
-
-
-
- -
+ +'; + } + if ($tweeter_has_timeline) { + if ($GLOBALS['serendipity']['version'][0] == '1') { + echo "
"; + } else { + echo '
'; + } +?> + + +'; + } + } + if ($GLOBALS['serendipity']['version'][0] == '2') { + echo '
'; + } +?> + +'; + } else { + echo '
'; + echo '
'; + echo '
'; + } +?> +
+ + +'; + } +?> +
+ + +