Version Description
- Fixed a bug which allowed editing of posts to be tweeted if status updates on editing Pages were permitted.
- Fixed a bug in the support check routine which caused all Cli.gs tests to fail.
- Streamlined logic controlling whether a new or edited item should be tweeted.
- Added Italian translation. Thanks to Gianni Diurno!
Download this release
Release Info
Developer | joedolson |
Plugin | WP to Twitter |
Version | 1.4.11 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.4.11
- json.class.php +806 -0
- readme.txt +57 -2
- uninstall.php +23 -1
- wp-to-twitter-de_DE.mo +0 -0
- wp-to-twitter-de_DE.po +449 -0
- wp-to-twitter-it_IT.mo +0 -0
- wp-to-twitter-it_IT.po +452 -0
- wp-to-twitter-manager.php +195 -152
- wp-to-twitter.jpg +0 -0
- wp-to-twitter.php +342 -90
- wp-to-twitter.pot +173 -120
json.class.php
ADDED
@@ -0,0 +1,806 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Converts to and from JSON format.
|
6 |
+
*
|
7 |
+
* JSON (JavaScript Object Notation) is a lightweight data-interchange
|
8 |
+
* format. It is easy for humans to read and write. It is easy for machines
|
9 |
+
* to parse and generate. It is based on a subset of the JavaScript
|
10 |
+
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
|
11 |
+
* This feature can also be found in Python. JSON is a text format that is
|
12 |
+
* completely language independent but uses conventions that are familiar
|
13 |
+
* to programmers of the C-family of languages, including C, C++, C#, Java,
|
14 |
+
* JavaScript, Perl, TCL, and many others. These properties make JSON an
|
15 |
+
* ideal data-interchange language.
|
16 |
+
*
|
17 |
+
* This package provides a simple encoder and decoder for JSON notation. It
|
18 |
+
* is intended for use with client-side Javascript applications that make
|
19 |
+
* use of HTTPRequest to perform server communication functions - data can
|
20 |
+
* be encoded into JSON notation for use in a client-side javascript, or
|
21 |
+
* decoded from incoming Javascript requests. JSON format is native to
|
22 |
+
* Javascript, and can be directly eval()'ed with no further parsing
|
23 |
+
* overhead
|
24 |
+
*
|
25 |
+
* All strings should be in ASCII or UTF-8 format!
|
26 |
+
*
|
27 |
+
* LICENSE: Redistribution and use in source and binary forms, with or
|
28 |
+
* without modification, are permitted provided that the following
|
29 |
+
* conditions are met: Redistributions of source code must retain the
|
30 |
+
* above copyright notice, this list of conditions and the following
|
31 |
+
* disclaimer. Redistributions in binary form must reproduce the above
|
32 |
+
* copyright notice, this list of conditions and the following disclaimer
|
33 |
+
* in the documentation and/or other materials provided with the
|
34 |
+
* distribution.
|
35 |
+
*
|
36 |
+
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
37 |
+
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
38 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
39 |
+
* NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
40 |
+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
41 |
+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
42 |
+
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
43 |
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
44 |
+
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
45 |
+
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
46 |
+
* DAMAGE.
|
47 |
+
*
|
48 |
+
* @category
|
49 |
+
* @package Services_JSON
|
50 |
+
* @author Michal Migurski <mike-json@teczno.com>
|
51 |
+
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
|
52 |
+
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
|
53 |
+
* @copyright 2005 Michal Migurski
|
54 |
+
* @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
|
55 |
+
* @license http://www.opensource.org/licenses/bsd-license.php
|
56 |
+
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
|
57 |
+
*/
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Marker constant for Services_JSON::decode(), used to flag stack state
|
61 |
+
*/
|
62 |
+
define('SERVICES_JSON_SLICE', 1);
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Marker constant for Services_JSON::decode(), used to flag stack state
|
66 |
+
*/
|
67 |
+
define('SERVICES_JSON_IN_STR', 2);
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Marker constant for Services_JSON::decode(), used to flag stack state
|
71 |
+
*/
|
72 |
+
define('SERVICES_JSON_IN_ARR', 3);
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Marker constant for Services_JSON::decode(), used to flag stack state
|
76 |
+
*/
|
77 |
+
define('SERVICES_JSON_IN_OBJ', 4);
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Marker constant for Services_JSON::decode(), used to flag stack state
|
81 |
+
*/
|
82 |
+
define('SERVICES_JSON_IN_CMT', 5);
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Behavior switch for Services_JSON::decode()
|
86 |
+
*/
|
87 |
+
define('SERVICES_JSON_LOOSE_TYPE', 16);
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Behavior switch for Services_JSON::decode()
|
91 |
+
*/
|
92 |
+
define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Converts to and from JSON format.
|
96 |
+
*
|
97 |
+
* Brief example of use:
|
98 |
+
*
|
99 |
+
* <code>
|
100 |
+
* // create a new instance of Services_JSON
|
101 |
+
* $json = new Services_JSON();
|
102 |
+
*
|
103 |
+
* // convert a complexe value to JSON notation, and send it to the browser
|
104 |
+
* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
|
105 |
+
* $output = $json->encode($value);
|
106 |
+
*
|
107 |
+
* print($output);
|
108 |
+
* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
|
109 |
+
*
|
110 |
+
* // accept incoming POST data, assumed to be in JSON notation
|
111 |
+
* $input = file_get_contents('php://input', 1000000);
|
112 |
+
* $value = $json->decode($input);
|
113 |
+
* </code>
|
114 |
+
*/
|
115 |
+
class Services_JSON
|
116 |
+
{
|
117 |
+
/**
|
118 |
+
* constructs a new JSON instance
|
119 |
+
*
|
120 |
+
* @param int $use object behavior flags; combine with boolean-OR
|
121 |
+
*
|
122 |
+
* possible values:
|
123 |
+
* - SERVICES_JSON_LOOSE_TYPE: loose typing.
|
124 |
+
* "{...}" syntax creates associative arrays
|
125 |
+
* instead of objects in decode().
|
126 |
+
* - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
|
127 |
+
* Values which can't be encoded (e.g. resources)
|
128 |
+
* appear as NULL instead of throwing errors.
|
129 |
+
* By default, a deeply-nested resource will
|
130 |
+
* bubble up with an error, so all return values
|
131 |
+
* from encode() should be checked with isError()
|
132 |
+
*/
|
133 |
+
function Services_JSON($use = 0)
|
134 |
+
{
|
135 |
+
$this->use = $use;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* convert a string from one UTF-16 char to one UTF-8 char
|
140 |
+
*
|
141 |
+
* Normally should be handled by mb_convert_encoding, but
|
142 |
+
* provides a slower PHP-only method for installations
|
143 |
+
* that lack the multibye string extension.
|
144 |
+
*
|
145 |
+
* @param string $utf16 UTF-16 character
|
146 |
+
* @return string UTF-8 character
|
147 |
+
* @access private
|
148 |
+
*/
|
149 |
+
function utf162utf8($utf16)
|
150 |
+
{
|
151 |
+
// oh please oh please oh please oh please oh please
|
152 |
+
if(function_exists('mb_convert_encoding')) {
|
153 |
+
return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
|
154 |
+
}
|
155 |
+
|
156 |
+
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
|
157 |
+
|
158 |
+
switch(true) {
|
159 |
+
case ((0x7F & $bytes) == $bytes):
|
160 |
+
// this case should never be reached, because we are in ASCII range
|
161 |
+
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
162 |
+
return chr(0x7F & $bytes);
|
163 |
+
|
164 |
+
case (0x07FF & $bytes) == $bytes:
|
165 |
+
// return a 2-byte UTF-8 character
|
166 |
+
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
167 |
+
return chr(0xC0 | (($bytes >> 6) & 0x1F))
|
168 |
+
. chr(0x80 | ($bytes & 0x3F));
|
169 |
+
|
170 |
+
case (0xFFFF & $bytes) == $bytes:
|
171 |
+
// return a 3-byte UTF-8 character
|
172 |
+
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
173 |
+
return chr(0xE0 | (($bytes >> 12) & 0x0F))
|
174 |
+
. chr(0x80 | (($bytes >> 6) & 0x3F))
|
175 |
+
. chr(0x80 | ($bytes & 0x3F));
|
176 |
+
}
|
177 |
+
|
178 |
+
// ignoring UTF-32 for now, sorry
|
179 |
+
return '';
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* convert a string from one UTF-8 char to one UTF-16 char
|
184 |
+
*
|
185 |
+
* Normally should be handled by mb_convert_encoding, but
|
186 |
+
* provides a slower PHP-only method for installations
|
187 |
+
* that lack the multibye string extension.
|
188 |
+
*
|
189 |
+
* @param string $utf8 UTF-8 character
|
190 |
+
* @return string UTF-16 character
|
191 |
+
* @access private
|
192 |
+
*/
|
193 |
+
function utf82utf16($utf8)
|
194 |
+
{
|
195 |
+
// oh please oh please oh please oh please oh please
|
196 |
+
if(function_exists('mb_convert_encoding')) {
|
197 |
+
return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
|
198 |
+
}
|
199 |
+
|
200 |
+
switch(strlen($utf8)) {
|
201 |
+
case 1:
|
202 |
+
// this case should never be reached, because we are in ASCII range
|
203 |
+
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
204 |
+
return $utf8;
|
205 |
+
|
206 |
+
case 2:
|
207 |
+
// return a UTF-16 character from a 2-byte UTF-8 char
|
208 |
+
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
209 |
+
return chr(0x07 & (ord($utf8{0}) >> 2))
|
210 |
+
. chr((0xC0 & (ord($utf8{0}) << 6))
|
211 |
+
| (0x3F & ord($utf8{1})));
|
212 |
+
|
213 |
+
case 3:
|
214 |
+
// return a UTF-16 character from a 3-byte UTF-8 char
|
215 |
+
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
216 |
+
return chr((0xF0 & (ord($utf8{0}) << 4))
|
217 |
+
| (0x0F & (ord($utf8{1}) >> 2)))
|
218 |
+
. chr((0xC0 & (ord($utf8{1}) << 6))
|
219 |
+
| (0x7F & ord($utf8{2})));
|
220 |
+
}
|
221 |
+
|
222 |
+
// ignoring UTF-32 for now, sorry
|
223 |
+
return '';
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* encodes an arbitrary variable into JSON format
|
228 |
+
*
|
229 |
+
* @param mixed $var any number, boolean, string, array, or object to be encoded.
|
230 |
+
* see argument 1 to Services_JSON() above for array-parsing behavior.
|
231 |
+
* if var is a strng, note that encode() always expects it
|
232 |
+
* to be in ASCII or UTF-8 format!
|
233 |
+
*
|
234 |
+
* @return mixed JSON string representation of input var or an error if a problem occurs
|
235 |
+
* @access public
|
236 |
+
*/
|
237 |
+
function encode($var)
|
238 |
+
{
|
239 |
+
switch (gettype($var)) {
|
240 |
+
case 'boolean':
|
241 |
+
return $var ? 'true' : 'false';
|
242 |
+
|
243 |
+
case 'NULL':
|
244 |
+
return 'null';
|
245 |
+
|
246 |
+
case 'integer':
|
247 |
+
return (int) $var;
|
248 |
+
|
249 |
+
case 'double':
|
250 |
+
case 'float':
|
251 |
+
return (float) $var;
|
252 |
+
|
253 |
+
case 'string':
|
254 |
+
// STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
|
255 |
+
$ascii = '';
|
256 |
+
$strlen_var = strlen($var);
|
257 |
+
|
258 |
+
/*
|
259 |
+
* Iterate over every character in the string,
|
260 |
+
* escaping with a slash or encoding to UTF-8 where necessary
|
261 |
+
*/
|
262 |
+
for ($c = 0; $c < $strlen_var; ++$c) {
|
263 |
+
|
264 |
+
$ord_var_c = ord($var{$c});
|
265 |
+
|
266 |
+
switch (true) {
|
267 |
+
case $ord_var_c == 0x08:
|
268 |
+
$ascii .= '\b';
|
269 |
+
break;
|
270 |
+
case $ord_var_c == 0x09:
|
271 |
+
$ascii .= '\t';
|
272 |
+
break;
|
273 |
+
case $ord_var_c == 0x0A:
|
274 |
+
$ascii .= '\n';
|
275 |
+
break;
|
276 |
+
case $ord_var_c == 0x0C:
|
277 |
+
$ascii .= '\f';
|
278 |
+
break;
|
279 |
+
case $ord_var_c == 0x0D:
|
280 |
+
$ascii .= '\r';
|
281 |
+
break;
|
282 |
+
|
283 |
+
case $ord_var_c == 0x22:
|
284 |
+
case $ord_var_c == 0x2F:
|
285 |
+
case $ord_var_c == 0x5C:
|
286 |
+
// double quote, slash, slosh
|
287 |
+
$ascii .= '\\'.$var{$c};
|
288 |
+
break;
|
289 |
+
|
290 |
+
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
|
291 |
+
// characters U-00000000 - U-0000007F (same as ASCII)
|
292 |
+
$ascii .= $var{$c};
|
293 |
+
break;
|
294 |
+
|
295 |
+
case (($ord_var_c & 0xE0) == 0xC0):
|
296 |
+
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
297 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
298 |
+
$char = pack('C*', $ord_var_c, ord($var{$c + 1}));
|
299 |
+
$c += 1;
|
300 |
+
$utf16 = $this->utf82utf16($char);
|
301 |
+
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
302 |
+
break;
|
303 |
+
|
304 |
+
case (($ord_var_c & 0xF0) == 0xE0):
|
305 |
+
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
306 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
307 |
+
$char = pack('C*', $ord_var_c,
|
308 |
+
ord($var{$c + 1}),
|
309 |
+
ord($var{$c + 2}));
|
310 |
+
$c += 2;
|
311 |
+
$utf16 = $this->utf82utf16($char);
|
312 |
+
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
313 |
+
break;
|
314 |
+
|
315 |
+
case (($ord_var_c & 0xF8) == 0xF0):
|
316 |
+
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
317 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
318 |
+
$char = pack('C*', $ord_var_c,
|
319 |
+
ord($var{$c + 1}),
|
320 |
+
ord($var{$c + 2}),
|
321 |
+
ord($var{$c + 3}));
|
322 |
+
$c += 3;
|
323 |
+
$utf16 = $this->utf82utf16($char);
|
324 |
+
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
325 |
+
break;
|
326 |
+
|
327 |
+
case (($ord_var_c & 0xFC) == 0xF8):
|
328 |
+
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
329 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
330 |
+
$char = pack('C*', $ord_var_c,
|
331 |
+
ord($var{$c + 1}),
|
332 |
+
ord($var{$c + 2}),
|
333 |
+
ord($var{$c + 3}),
|
334 |
+
ord($var{$c + 4}));
|
335 |
+
$c += 4;
|
336 |
+
$utf16 = $this->utf82utf16($char);
|
337 |
+
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
338 |
+
break;
|
339 |
+
|
340 |
+
case (($ord_var_c & 0xFE) == 0xFC):
|
341 |
+
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
342 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
343 |
+
$char = pack('C*', $ord_var_c,
|
344 |
+
ord($var{$c + 1}),
|
345 |
+
ord($var{$c + 2}),
|
346 |
+
ord($var{$c + 3}),
|
347 |
+
ord($var{$c + 4}),
|
348 |
+
ord($var{$c + 5}));
|
349 |
+
$c += 5;
|
350 |
+
$utf16 = $this->utf82utf16($char);
|
351 |
+
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
352 |
+
break;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
return '"'.$ascii.'"';
|
357 |
+
|
358 |
+
case 'array':
|
359 |
+
/*
|
360 |
+
* As per JSON spec if any array key is not an integer
|
361 |
+
* we must treat the the whole array as an object. We
|
362 |
+
* also try to catch a sparsely populated associative
|
363 |
+
* array with numeric keys here because some JS engines
|
364 |
+
* will create an array with empty indexes up to
|
365 |
+
* max_index which can cause memory issues and because
|
366 |
+
* the keys, which may be relevant, will be remapped
|
367 |
+
* otherwise.
|
368 |
+
*
|
369 |
+
* As per the ECMA and JSON specification an object may
|
370 |
+
* have any string as a property. Unfortunately due to
|
371 |
+
* a hole in the ECMA specification if the key is a
|
372 |
+
* ECMA reserved word or starts with a digit the
|
373 |
+
* parameter is only accessible using ECMAScript's
|
374 |
+
* bracket notation.
|
375 |
+
*/
|
376 |
+
|
377 |
+
// treat as a JSON object
|
378 |
+
if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
|
379 |
+
$properties = array_map(array($this, 'name_value'),
|
380 |
+
array_keys($var),
|
381 |
+
array_values($var));
|
382 |
+
|
383 |
+
foreach($properties as $property) {
|
384 |
+
if(Services_JSON::isError($property)) {
|
385 |
+
return $property;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
|
389 |
+
return '{' . join(',', $properties) . '}';
|
390 |
+
}
|
391 |
+
|
392 |
+
// treat it like a regular array
|
393 |
+
$elements = array_map(array($this, 'encode'), $var);
|
394 |
+
|
395 |
+
foreach($elements as $element) {
|
396 |
+
if(Services_JSON::isError($element)) {
|
397 |
+
return $element;
|
398 |
+
}
|
399 |
+
}
|
400 |
+
|
401 |
+
return '[' . join(',', $elements) . ']';
|
402 |
+
|
403 |
+
case 'object':
|
404 |
+
$vars = get_object_vars($var);
|
405 |
+
|
406 |
+
$properties = array_map(array($this, 'name_value'),
|
407 |
+
array_keys($vars),
|
408 |
+
array_values($vars));
|
409 |
+
|
410 |
+
foreach($properties as $property) {
|
411 |
+
if(Services_JSON::isError($property)) {
|
412 |
+
return $property;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
return '{' . join(',', $properties) . '}';
|
417 |
+
|
418 |
+
default:
|
419 |
+
return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
|
420 |
+
? 'null'
|
421 |
+
: new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* array-walking function for use in generating JSON-formatted name-value pairs
|
427 |
+
*
|
428 |
+
* @param string $name name of key to use
|
429 |
+
* @param mixed $value reference to an array element to be encoded
|
430 |
+
*
|
431 |
+
* @return string JSON-formatted name-value pair, like '"name":value'
|
432 |
+
* @access private
|
433 |
+
*/
|
434 |
+
function name_value($name, $value)
|
435 |
+
{
|
436 |
+
$encoded_value = $this->encode($value);
|
437 |
+
|
438 |
+
if(Services_JSON::isError($encoded_value)) {
|
439 |
+
return $encoded_value;
|
440 |
+
}
|
441 |
+
|
442 |
+
return $this->encode(strval($name)) . ':' . $encoded_value;
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* reduce a string by removing leading and trailing comments and whitespace
|
447 |
+
*
|
448 |
+
* @param $str string string value to strip of comments and whitespace
|
449 |
+
*
|
450 |
+
* @return string string value stripped of comments and whitespace
|
451 |
+
* @access private
|
452 |
+
*/
|
453 |
+
function reduce_string($str)
|
454 |
+
{
|
455 |
+
$str = preg_replace(array(
|
456 |
+
|
457 |
+
// eliminate single line comments in '// ...' form
|
458 |
+
'#^\s*//(.+)$#m',
|
459 |
+
|
460 |
+
// eliminate multi-line comments in '/* ... */' form, at start of string
|
461 |
+
'#^\s*/\*(.+)\*/#Us',
|
462 |
+
|
463 |
+
// eliminate multi-line comments in '/* ... */' form, at end of string
|
464 |
+
'#/\*(.+)\*/\s*$#Us'
|
465 |
+
|
466 |
+
), '', $str);
|
467 |
+
|
468 |
+
// eliminate extraneous space
|
469 |
+
return trim($str);
|
470 |
+
}
|
471 |
+
|
472 |
+
/**
|
473 |
+
* decodes a JSON string into appropriate variable
|
474 |
+
*
|
475 |
+
* @param string $str JSON-formatted string
|
476 |
+
*
|
477 |
+
* @return mixed number, boolean, string, array, or object
|
478 |
+
* corresponding to given JSON input string.
|
479 |
+
* See argument 1 to Services_JSON() above for object-output behavior.
|
480 |
+
* Note that decode() always returns strings
|
481 |
+
* in ASCII or UTF-8 format!
|
482 |
+
* @access public
|
483 |
+
*/
|
484 |
+
function decode($str)
|
485 |
+
{
|
486 |
+
$str = $this->reduce_string($str);
|
487 |
+
|
488 |
+
switch (strtolower($str)) {
|
489 |
+
case 'true':
|
490 |
+
return true;
|
491 |
+
|
492 |
+
case 'false':
|
493 |
+
return false;
|
494 |
+
|
495 |
+
case 'null':
|
496 |
+
return null;
|
497 |
+
|
498 |
+
default:
|
499 |
+
$m = array();
|
500 |
+
|
501 |
+
if (is_numeric($str)) {
|
502 |
+
// Lookie-loo, it's a number
|
503 |
+
|
504 |
+
// This would work on its own, but I'm trying to be
|
505 |
+
// good about returning integers where appropriate:
|
506 |
+
// return (float)$str;
|
507 |
+
|
508 |
+
// Return float or int, as appropriate
|
509 |
+
return ((float)$str == (integer)$str)
|
510 |
+
? (integer)$str
|
511 |
+
: (float)$str;
|
512 |
+
|
513 |
+
} elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
|
514 |
+
// STRINGS RETURNED IN UTF-8 FORMAT
|
515 |
+
$delim = substr($str, 0, 1);
|
516 |
+
$chrs = substr($str, 1, -1);
|
517 |
+
$utf8 = '';
|
518 |
+
$strlen_chrs = strlen($chrs);
|
519 |
+
|
520 |
+
for ($c = 0; $c < $strlen_chrs; ++$c) {
|
521 |
+
|
522 |
+
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
523 |
+
$ord_chrs_c = ord($chrs{$c});
|
524 |
+
|
525 |
+
switch (true) {
|
526 |
+
case $substr_chrs_c_2 == '\b':
|
527 |
+
$utf8 .= chr(0x08);
|
528 |
+
++$c;
|
529 |
+
break;
|
530 |
+
case $substr_chrs_c_2 == '\t':
|
531 |
+
$utf8 .= chr(0x09);
|
532 |
+
++$c;
|
533 |
+
break;
|
534 |
+
case $substr_chrs_c_2 == '\n':
|
535 |
+
$utf8 .= chr(0x0A);
|
536 |
+
++$c;
|
537 |
+
break;
|
538 |
+
case $substr_chrs_c_2 == '\f':
|
539 |
+
$utf8 .= chr(0x0C);
|
540 |
+
++$c;
|
541 |
+
break;
|
542 |
+
case $substr_chrs_c_2 == '\r':
|
543 |
+
$utf8 .= chr(0x0D);
|
544 |
+
++$c;
|
545 |
+
break;
|
546 |
+
|
547 |
+
case $substr_chrs_c_2 == '\\"':
|
548 |
+
case $substr_chrs_c_2 == '\\\'':
|
549 |
+
case $substr_chrs_c_2 == '\\\\':
|
550 |
+
case $substr_chrs_c_2 == '\\/':
|
551 |
+
if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
|
552 |
+
($delim == "'" && $substr_chrs_c_2 != '\\"')) {
|
553 |
+
$utf8 .= $chrs{++$c};
|
554 |
+
}
|
555 |
+
break;
|
556 |
+
|
557 |
+
case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
|
558 |
+
// single, escaped unicode character
|
559 |
+
$utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
|
560 |
+
. chr(hexdec(substr($chrs, ($c + 4), 2)));
|
561 |
+
$utf8 .= $this->utf162utf8($utf16);
|
562 |
+
$c += 5;
|
563 |
+
break;
|
564 |
+
|
565 |
+
case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
|
566 |
+
$utf8 .= $chrs{$c};
|
567 |
+
break;
|
568 |
+
|
569 |
+
case ($ord_chrs_c & 0xE0) == 0xC0:
|
570 |
+
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
571 |
+
//see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
572 |
+
$utf8 .= substr($chrs, $c, 2);
|
573 |
+
++$c;
|
574 |
+
break;
|
575 |
+
|
576 |
+
case ($ord_chrs_c & 0xF0) == 0xE0:
|
577 |
+
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
578 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
579 |
+
$utf8 .= substr($chrs, $c, 3);
|
580 |
+
$c += 2;
|
581 |
+
break;
|
582 |
+
|
583 |
+
case ($ord_chrs_c & 0xF8) == 0xF0:
|
584 |
+
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
585 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
586 |
+
$utf8 .= substr($chrs, $c, 4);
|
587 |
+
$c += 3;
|
588 |
+
break;
|
589 |
+
|
590 |
+
case ($ord_chrs_c & 0xFC) == 0xF8:
|
591 |
+
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
592 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
593 |
+
$utf8 .= substr($chrs, $c, 5);
|
594 |
+
$c += 4;
|
595 |
+
break;
|
596 |
+
|
597 |
+
case ($ord_chrs_c & 0xFE) == 0xFC:
|
598 |
+
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
599 |
+
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
600 |
+
$utf8 .= substr($chrs, $c, 6);
|
601 |
+
$c += 5;
|
602 |
+
break;
|
603 |
+
|
604 |
+
}
|
605 |
+
|
606 |
+
}
|
607 |
+
|
608 |
+
return $utf8;
|
609 |
+
|
610 |
+
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
|
611 |
+
// array, or object notation
|
612 |
+
|
613 |
+
if ($str{0} == '[') {
|
614 |
+
$stk = array(SERVICES_JSON_IN_ARR);
|
615 |
+
$arr = array();
|
616 |
+
} else {
|
617 |
+
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
618 |
+
$stk = array(SERVICES_JSON_IN_OBJ);
|
619 |
+
$obj = array();
|
620 |
+
} else {
|
621 |
+
$stk = array(SERVICES_JSON_IN_OBJ);
|
622 |
+
$obj = new stdClass();
|
623 |
+
}
|
624 |
+
}
|
625 |
+
|
626 |
+
array_push($stk, array('what' => SERVICES_JSON_SLICE,
|
627 |
+
'where' => 0,
|
628 |
+
'delim' => false));
|
629 |
+
|
630 |
+
$chrs = substr($str, 1, -1);
|
631 |
+
$chrs = $this->reduce_string($chrs);
|
632 |
+
|
633 |
+
if ($chrs == '') {
|
634 |
+
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
635 |
+
return $arr;
|
636 |
+
|
637 |
+
} else {
|
638 |
+
return $obj;
|
639 |
+
|
640 |
+
}
|
641 |
+
}
|
642 |
+
|
643 |
+
//print("\nparsing {$chrs}\n");
|
644 |
+
|
645 |
+
$strlen_chrs = strlen($chrs);
|
646 |
+
|
647 |
+
for ($c = 0; $c <= $strlen_chrs; ++$c) {
|
648 |
+
|
649 |
+
$top = end($stk);
|
650 |
+
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
651 |
+
|
652 |
+
if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
|
653 |
+
// found a comma that is not inside a string, array, etc.,
|
654 |
+
// OR we've reached the end of the character list
|
655 |
+
$slice = substr($chrs, $top['where'], ($c - $top['where']));
|
656 |
+
array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
|
657 |
+
//print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
658 |
+
|
659 |
+
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
660 |
+
// we are in an array, so just push an element onto the stack
|
661 |
+
array_push($arr, $this->decode($slice));
|
662 |
+
|
663 |
+
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
664 |
+
// we are in an object, so figure
|
665 |
+
// out the property name and set an
|
666 |
+
// element in an associative array,
|
667 |
+
// for now
|
668 |
+
$parts = array();
|
669 |
+
|
670 |
+
if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
671 |
+
// "name":value pair
|
672 |
+
$key = $this->decode($parts[1]);
|
673 |
+
$val = $this->decode($parts[2]);
|
674 |
+
|
675 |
+
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
676 |
+
$obj[$key] = $val;
|
677 |
+
} else {
|
678 |
+
$obj->$key = $val;
|
679 |
+
}
|
680 |
+
} elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
681 |
+
// name:value pair, where name is unquoted
|
682 |
+
$key = $parts[1];
|
683 |
+
$val = $this->decode($parts[2]);
|
684 |
+
|
685 |
+
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
686 |
+
$obj[$key] = $val;
|
687 |
+
} else {
|
688 |
+
$obj->$key = $val;
|
689 |
+
}
|
690 |
+
}
|
691 |
+
|
692 |
+
}
|
693 |
+
|
694 |
+
} elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
|
695 |
+
// found a quote, and we are not inside a string
|
696 |
+
array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
|
697 |
+
//print("Found start of string at {$c}\n");
|
698 |
+
|
699 |
+
} elseif (($chrs{$c} == $top['delim']) &&
|
700 |
+
($top['what'] == SERVICES_JSON_IN_STR) &&
|
701 |
+
((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
|
702 |
+
// found a quote, we're in a string, and it's not escaped
|
703 |
+
// we know that it's not escaped becase there is _not_ an
|
704 |
+
// odd number of backslashes at the end of the string so far
|
705 |
+
array_pop($stk);
|
706 |
+
//print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
|
707 |
+
|
708 |
+
} elseif (($chrs{$c} == '[') &&
|
709 |
+
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
710 |
+
// found a left-bracket, and we are in an array, object, or slice
|
711 |
+
array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
|
712 |
+
//print("Found start of array at {$c}\n");
|
713 |
+
|
714 |
+
} elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
|
715 |
+
// found a right-bracket, and we're in an array
|
716 |
+
array_pop($stk);
|
717 |
+
//print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
718 |
+
|
719 |
+
} elseif (($chrs{$c} == '{') &&
|
720 |
+
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
721 |
+
// found a left-brace, and we are in an array, object, or slice
|
722 |
+
array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
|
723 |
+
//print("Found start of object at {$c}\n");
|
724 |
+
|
725 |
+
} elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
|
726 |
+
// found a right-brace, and we're in an object
|
727 |
+
array_pop($stk);
|
728 |
+
//print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
729 |
+
|
730 |
+
} elseif (($substr_chrs_c_2 == '/*') &&
|
731 |
+
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
732 |
+
// found a comment start, and we are in an array, object, or slice
|
733 |
+
array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
|
734 |
+
$c++;
|
735 |
+
//print("Found start of comment at {$c}\n");
|
736 |
+
|
737 |
+
} elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
|
738 |
+
// found a comment end, and we're in one now
|
739 |
+
array_pop($stk);
|
740 |
+
$c++;
|
741 |
+
|
742 |
+
for ($i = $top['where']; $i <= $c; ++$i)
|
743 |
+
$chrs = substr_replace($chrs, ' ', $i, 1);
|
744 |
+
|
745 |
+
//print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
746 |
+
|
747 |
+
}
|
748 |
+
|
749 |
+
}
|
750 |
+
|
751 |
+
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
752 |
+
return $arr;
|
753 |
+
|
754 |
+
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
755 |
+
return $obj;
|
756 |
+
|
757 |
+
}
|
758 |
+
|
759 |
+
}
|
760 |
+
}
|
761 |
+
}
|
762 |
+
|
763 |
+
/**
|
764 |
+
* @todo Ultimately, this should just call PEAR::isError()
|
765 |
+
*/
|
766 |
+
function isError($data, $code = null)
|
767 |
+
{
|
768 |
+
if (class_exists('pear')) {
|
769 |
+
return PEAR::isError($data, $code);
|
770 |
+
} elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
|
771 |
+
is_subclass_of($data, 'services_json_error'))) {
|
772 |
+
return true;
|
773 |
+
}
|
774 |
+
|
775 |
+
return false;
|
776 |
+
}
|
777 |
+
}
|
778 |
+
|
779 |
+
if (class_exists('PEAR_Error')) {
|
780 |
+
|
781 |
+
class Services_JSON_Error extends PEAR_Error
|
782 |
+
{
|
783 |
+
function Services_JSON_Error($message = 'unknown error', $code = null,
|
784 |
+
$mode = null, $options = null, $userinfo = null)
|
785 |
+
{
|
786 |
+
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
|
787 |
+
}
|
788 |
+
}
|
789 |
+
|
790 |
+
} else {
|
791 |
+
|
792 |
+
/**
|
793 |
+
* @todo Ultimately, this class shall be descended from PEAR_Error
|
794 |
+
*/
|
795 |
+
class Services_JSON_Error
|
796 |
+
{
|
797 |
+
function Services_JSON_Error($message = 'unknown error', $code = null,
|
798 |
+
$mode = null, $options = null, $userinfo = null)
|
799 |
+
{
|
800 |
+
|
801 |
+
}
|
802 |
+
}
|
803 |
+
|
804 |
+
}
|
805 |
+
|
806 |
+
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: joedolson
|
|
3 |
Donate link: http://www.joedolson.com/donate.php
|
4 |
Tags: twitter, microblogging, cligs, redirect, shortener, post, links
|
5 |
Requires at least: 2.5
|
6 |
-
Tested up to: 2.8.
|
7 |
Stable tag: trunk
|
8 |
|
9 |
Posts a Twitter status update when you update your WordPress blog or post to your blogroll, using the Cligs URL shortening service.
|
@@ -18,10 +18,65 @@ The plugin can send a default message for updating or editing posts or pages, bu
|
|
18 |
|
19 |
Any status update you write which is longer than the available space will automatically be truncated by the plugin. This applies to both the default messages and to your custom messages.
|
20 |
|
21 |
-
This plugin is based loosely on the Twitter Updater plugin by [Jonathan Dingman](http://www.firesidemedia.net/dev/), which he adapted from a plugin by Victoria Chan. Other contributions by [Thor Erik](http://www.thorerik.net), Bill Berry and [Andrea Baccega](http://www.andreabaccega.com).
|
22 |
|
23 |
== Changelog ==
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
= 1.4.0 =
|
26 |
|
27 |
* Added support for the Bit.ly URL shortening service.
|
3 |
Donate link: http://www.joedolson.com/donate.php
|
4 |
Tags: twitter, microblogging, cligs, redirect, shortener, post, links
|
5 |
Requires at least: 2.5
|
6 |
+
Tested up to: 2.8.4
|
7 |
Stable tag: trunk
|
8 |
|
9 |
Posts a Twitter status update when you update your WordPress blog or post to your blogroll, using the Cligs URL shortening service.
|
18 |
|
19 |
Any status update you write which is longer than the available space will automatically be truncated by the plugin. This applies to both the default messages and to your custom messages.
|
20 |
|
21 |
+
This plugin is based loosely on the Twitter Updater plugin by [Jonathan Dingman](http://www.firesidemedia.net/dev/), which he adapted from a plugin by Victoria Chan. Other contributions by [Thor Erik](http://www.thorerik.net), Bill Berry and [Andrea Baccega](http://www.andreabaccega.com). Thanks to [Cory LaViska](http://abeautifulsite.net/notebook/71) for PHP 4 compatible `json_decode` and `json_encode`. Thanks to [Michal Migurski](http://mike.teczno.com) for authoring the JSON class.
|
22 |
|
23 |
== Changelog ==
|
24 |
|
25 |
+
= 1.4.11 =
|
26 |
+
|
27 |
+
* Fixed a bug which allowed editing of posts to be tweeted if status updates on editing Pages were permitted.
|
28 |
+
* Fixed a bug in the support check routine which caused all Cli.gs tests to fail.
|
29 |
+
* Streamlined logic controlling whether a new or edited item should be tweeted.
|
30 |
+
* Added Italian translation. Thanks to [Gianni Diurno](http://www.gidibao.net)!
|
31 |
+
|
32 |
+
= 1.4.10 =
|
33 |
+
|
34 |
+
* Was never supposed to exist, except that I *forgot* to include a backup function.
|
35 |
+
|
36 |
+
= 1.4.9 =
|
37 |
+
|
38 |
+
* Added German translation. Thanks to [Melvin](http://www.toxicavenger.de/)!
|
39 |
+
* Fixed a bug relating to missing support for a function or two.
|
40 |
+
* Fixed a bug relating to extraneous # symbols in tags
|
41 |
+
|
42 |
+
= 1.4.8 =
|
43 |
+
|
44 |
+
* Adds a function to provide PHP5s str_split functionality for PHP4 installations.
|
45 |
+
|
46 |
+
= 1.4.7 =
|
47 |
+
|
48 |
+
* Actually resolves the bug which 1.4.6 was supposed to fix.
|
49 |
+
|
50 |
+
= 1.4.6 =
|
51 |
+
|
52 |
+
* Hopefully resolved bug with empty value for new field in 1.4.5. It's late, so I won't know until tomorrow...
|
53 |
+
|
54 |
+
= 1.4.5 =
|
55 |
+
|
56 |
+
* Resolved bug with extraneous hash sign when no tags are attached.
|
57 |
+
* Resolved bug where #url# would appear when included in posting string but with 'link to blog' disabled.
|
58 |
+
* Added expansion of short URL via longURL.org stored in post meta data.
|
59 |
+
* Resolved additional uncommon bug with PHP 4.
|
60 |
+
* Added option to incorporate optional post excerpt.
|
61 |
+
* Better handling of multibyte character sets.
|
62 |
+
|
63 |
+
= 1.4.4 =
|
64 |
+
|
65 |
+
* Resolved two bugs with hashtag support: spaces in multi-word tags and the posting of hashtag-only status updates when posting shouldn't happen.
|
66 |
+
|
67 |
+
= 1.4.3 =
|
68 |
+
|
69 |
+
* Resolved plugin conflict with pre-existing function name.
|
70 |
+
|
71 |
+
= 1.4.2 =
|
72 |
+
|
73 |
+
* No changes, just adding a missing file from previous commit.
|
74 |
+
|
75 |
+
= 1.4.1 =
|
76 |
+
|
77 |
+
* Revised to not require functions from PHP 5.2
|
78 |
+
* Fixed bug in hashtag conversion
|
79 |
+
|
80 |
= 1.4.0 =
|
81 |
|
82 |
* Added support for the Bit.ly URL shortening service.
|
uninstall.php
CHANGED
@@ -15,6 +15,8 @@ delete_option( 'jd_twit_edited_pages' );
|
|
15 |
|
16 |
delete_option( 'jd_twit_remote' );
|
17 |
|
|
|
|
|
18 |
// Use Google Analytics with Twitter
|
19 |
delete_option( 'twitter-analytics-campaign' );
|
20 |
delete_option( 'use-twitter-analytics' );
|
@@ -26,9 +28,11 @@ delete_option( 'jd_twit_custom_url' );
|
|
26 |
delete_option( 'cligsapi' );
|
27 |
|
28 |
// Error checking
|
29 |
-
delete_option( '
|
30 |
delete_option( 'wp_twitter_failure' );
|
31 |
delete_option( 'wp_cligs_failure' );
|
|
|
|
|
32 |
|
33 |
// Blogroll options
|
34 |
delete_option( 'jd-use-link-title' );
|
@@ -47,5 +51,23 @@ delete_option( 'twitterpw' );
|
|
47 |
delete_option( 'twitterlogin_encrypted' );
|
48 |
delete_option( 'cligsapi' );
|
49 |
delete_option( 'jd_twit_quickpress' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
?>
|
15 |
|
16 |
delete_option( 'jd_twit_remote' );
|
17 |
|
18 |
+
delete_option( 'jd_post_excerpt' );
|
19 |
+
|
20 |
// Use Google Analytics with Twitter
|
21 |
delete_option( 'twitter-analytics-campaign' );
|
22 |
delete_option( 'use-twitter-analytics' );
|
28 |
delete_option( 'cligsapi' );
|
29 |
|
30 |
// Error checking
|
31 |
+
delete_option( 'jd-functions-checked' );
|
32 |
delete_option( 'wp_twitter_failure' );
|
33 |
delete_option( 'wp_cligs_failure' );
|
34 |
+
delete_option( 'wp_url_failure' );
|
35 |
+
delete_option( 'wp_bitly_failure' );
|
36 |
|
37 |
// Blogroll options
|
38 |
delete_option( 'jd-use-link-title' );
|
51 |
delete_option( 'twitterlogin_encrypted' );
|
52 |
delete_option( 'cligsapi' );
|
53 |
delete_option( 'jd_twit_quickpress' );
|
54 |
+
delete_option( 'jd-use-cligs' );
|
55 |
+
delete_option( 'jd-use-none' );
|
56 |
+
|
57 |
+
// Special Options
|
58 |
+
delete_option( 'jd_twit_prepend' );
|
59 |
+
delete_option( 'jd_twit_remote' );
|
60 |
+
delete_option( 'twitter-analytics-campaign' );
|
61 |
+
delete_option( 'use-twitter-analytics' );
|
62 |
+
delete_option( 'jd_twit_custom_url' );
|
63 |
+
delete_option( 'jd_shortener' );
|
64 |
+
delete_option( 'jd_twit_append' );
|
65 |
+
delete_option( 'jd_individual_twitter_users' );
|
66 |
+
delete_option( 'use_tags_as_hashtags' );
|
67 |
+
|
68 |
+
// Bitly Settings
|
69 |
+
delete_option( 'bitlylogin' );
|
70 |
+
delete_option( 'jd-use-bitly' );
|
71 |
+
delete_option( 'bitlyapi' );
|
72 |
}
|
73 |
?>
|
wp-to-twitter-de_DE.mo
ADDED
Binary file
|
wp-to-twitter-de_DE.po
ADDED
@@ -0,0 +1,449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# SOME DESCRIPTIVE TITLE.
|
2 |
+
# Copyright (C) YEAR Joseph Dolson
|
3 |
+
# This file is distributed under the same license as the PACKAGE package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: WP to Twitter\n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n"
|
10 |
+
"POT-Creation-Date: 2009-09-01 22:02+0000\n"
|
11 |
+
"PO-Revision-Date: \n"
|
12 |
+
"Last-Translator: Joseph Dolson <design@joedolson.com>\n"
|
13 |
+
"Language-Team: Thomas Boehm <t.boehm@mac.com>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"X-Poedit-Language: German\n"
|
18 |
+
"X-Poedit-Country: GERMANY\n"
|
19 |
+
|
20 |
+
#: wp-to-twitter-manager.php:55
|
21 |
+
msgid "Set your Twitter login information and URL shortener API information to use this plugin!"
|
22 |
+
msgstr "Twitter Login Informationen und URL Verkürzer API Informationen eingeben um das Plugin zu verwenden!"
|
23 |
+
|
24 |
+
#: wp-to-twitter-manager.php:59
|
25 |
+
msgid "Please add your Twitter password. "
|
26 |
+
msgstr "Bitte das Twitter Passwort eingeben."
|
27 |
+
|
28 |
+
#: wp-to-twitter-manager.php:65
|
29 |
+
msgid "WP to Twitter Errors Cleared"
|
30 |
+
msgstr "WP to Twitter Fehlermeldung gelöscht."
|
31 |
+
|
32 |
+
#: wp-to-twitter-manager.php:71
|
33 |
+
msgid "URL shortener request failed! We couldn't shrink that URL, so we attached the normal URL to your Tweet. Check with your URL shortening provider to see if there are any known issues. [<a href=\"http://blog.cli.gs\">Cli.gs Blog</a>] [<a href=\"http://blog.bit.ly\">Bit.ly Blog</a>]"
|
34 |
+
msgstr "Anfrage an den URL Verkürzer fehlgeschlagen! Wir konnten die URL nicht kürzen und haben deshalb die normale URL in den Tweet eingefügt. Überprüfe beim Anbieter ob Probleme bekannt sind. [<a href=\"http://blog.cli.gs\">Cli.gs Blog</a>] [<a href=\"http://blog.bit.ly\">Bit.ly Blog</a>]"
|
35 |
+
|
36 |
+
#: wp-to-twitter-manager.php:75
|
37 |
+
msgid "Sorry! I couldn't get in touch with the Twitter servers to post your new blog post. Your tweet has been stored in a custom field attached to the post, so you can Tweet it manually if you wish! "
|
38 |
+
msgstr "Sorry! Ich konnte den Twitter Server nicht erreichten, um einen Tweet über deinen neuen Blog Eintrag zu veröffentlichen. Der Tweet wurde in einem Feld am Ende des Eintrags gespeichert, damit du ihn manuell veröffentlichen kannst!"
|
39 |
+
|
40 |
+
#: wp-to-twitter-manager.php:77
|
41 |
+
msgid "Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. "
|
42 |
+
msgstr "Sorry! Ich konnte den Twitter Server nicht erreichten, um einen Tweet über deinen neuen <strong>neuen Link</strong> zu veröffentlichen! Ich befürchte, du musst ihn manuell veröffentlichen."
|
43 |
+
|
44 |
+
#: wp-to-twitter-manager.php:135
|
45 |
+
msgid "You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly."
|
46 |
+
msgstr "Du musst deinen Bit.ly Login und API Key eingeben um die URLs mit Bit.ly zu kürzen."
|
47 |
+
|
48 |
+
#: wp-to-twitter-manager.php:146
|
49 |
+
msgid "WP to Twitter Options Updated"
|
50 |
+
msgstr "WP to Twitter Einstellungen Aktualisiert"
|
51 |
+
|
52 |
+
#: wp-to-twitter-manager.php:156
|
53 |
+
msgid "Twitter login and password updated. "
|
54 |
+
msgstr "Twitter Login und Passwort aktualisiert."
|
55 |
+
|
56 |
+
#: wp-to-twitter-manager.php:158
|
57 |
+
msgid "You need to provide your twitter login and password! "
|
58 |
+
msgstr "Du musst deinen Twitter Login und dein Passwort eingeben!"
|
59 |
+
|
60 |
+
#: wp-to-twitter-manager.php:165
|
61 |
+
msgid "Cligs API Key Updated"
|
62 |
+
msgstr "Cli.gs API Key aktualisiert."
|
63 |
+
|
64 |
+
#: wp-to-twitter-manager.php:168
|
65 |
+
msgid "Cli.gs API Key deleted. Cli.gs created by WP to Twitter will no longer be associated with your account. "
|
66 |
+
msgstr "Cli.gs API Key gelöscht. Cli.gs, welche mit WP to Twitter erstellt werden, werden nicht mehr in deinem Account erstellt."
|
67 |
+
|
68 |
+
#: wp-to-twitter-manager.php:170
|
69 |
+
msgid "Cli.gs API Key not added - <a href='http://cli.gs/user/api/'>get one here</a>! "
|
70 |
+
msgstr "Cli.gs API Key nicht hinzugefügt - <a href='http://cli.gs/user/api/'>HIER</a> klicken zum Anlegen!"
|
71 |
+
|
72 |
+
#: wp-to-twitter-manager.php:176
|
73 |
+
msgid "Bit.ly API Key Updated."
|
74 |
+
msgstr "Bit.ly API Key aktualisiert."
|
75 |
+
|
76 |
+
#: wp-to-twitter-manager.php:179
|
77 |
+
msgid "Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
78 |
+
msgstr "Bit.ly API Key gelöscht. Du kannst die Bit.ly API nicht ohne API Key verwenden."
|
79 |
+
|
80 |
+
#: wp-to-twitter-manager.php:181
|
81 |
+
msgid "Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
82 |
+
msgstr "Bit.ly API Key nicht hinzugefügt - <a href='http://bit.ly/account/'>HIER</a> klicken zum Anlegen!"
|
83 |
+
|
84 |
+
#: wp-to-twitter-manager.php:185
|
85 |
+
msgid " Bit.ly User Login Updated."
|
86 |
+
msgstr "Bit.ly Benutzer Login aktualisiert."
|
87 |
+
|
88 |
+
#: wp-to-twitter-manager.php:188
|
89 |
+
msgid "Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. "
|
90 |
+
msgstr "Bit.ly Benutzer Login gelöscht. Du kannst die Bit.ly API nicht ohne Benutzernamen verwenden."
|
91 |
+
|
92 |
+
#: wp-to-twitter-manager.php:190
|
93 |
+
msgid "Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
94 |
+
msgstr "Bit.ly Login nicht hinzugefügt - <a href='http://bit.ly/account/'>HIER</a> klicken zum Anlegen!"
|
95 |
+
|
96 |
+
#: wp-to-twitter-manager.php:223
|
97 |
+
#: wp-to-twitter-manager.php:262
|
98 |
+
msgid "<li>Successfully contacted the Cli.gs API via Snoopy.</li>"
|
99 |
+
msgstr "<li>Cli.gs API via Snoopy erfolgreich kontaktiert.</li>"
|
100 |
+
|
101 |
+
#: wp-to-twitter-manager.php:226
|
102 |
+
#: wp-to-twitter-manager.php:265
|
103 |
+
msgid "<li>Failed to contact the Cli.gs API via Snoopy.</li>"
|
104 |
+
msgstr "<li>Cli.gs API Verbindung via Snoopy fehlgeschlagen.</li>"
|
105 |
+
|
106 |
+
#: wp-to-twitter-manager.php:234
|
107 |
+
#: wp-to-twitter-manager.php:256
|
108 |
+
msgid "<li>Successfully contacted the Bit.ly API via Snoopy.</li>"
|
109 |
+
msgstr "<li>Bit.ly API erfolgreich via Snoopy kontaktiert.</li>"
|
110 |
+
|
111 |
+
#: wp-to-twitter-manager.php:236
|
112 |
+
#: wp-to-twitter-manager.php:258
|
113 |
+
msgid "<li>Failed to contact the Bit.ly API via Snoopy.</li>"
|
114 |
+
msgstr "<li>Bit.ly API Verbindung via Snoopy fehlgeschlagen.</li>"
|
115 |
+
|
116 |
+
#: wp-to-twitter-manager.php:240
|
117 |
+
msgid "<li>Successfully contacted the Twitter API via Snoopy.</li>"
|
118 |
+
msgstr "<li>Twitter API via Snoopy erfolgreich kontaktiert.</li>"
|
119 |
+
|
120 |
+
#: wp-to-twitter-manager.php:242
|
121 |
+
msgid "<li>Failed to contact the Twitter API via Snoopy.</li>"
|
122 |
+
msgstr "<li>Twitter API Verbindung via Snoopy fehlgeschlagen.</li>"
|
123 |
+
|
124 |
+
#: wp-to-twitter-manager.php:248
|
125 |
+
msgid "<li>Successfully contacted the Twitter API via cURL.</li>"
|
126 |
+
msgstr "<li>Twitter API erfolgreich via cURL kontaktiert.</li>"
|
127 |
+
|
128 |
+
#: wp-to-twitter-manager.php:250
|
129 |
+
msgid "<li>Failed to contact the Twitter API via cURL.</li>"
|
130 |
+
msgstr "<li>Twitter API Verbindung via cURL fehlgeschlagen.</li>"
|
131 |
+
|
132 |
+
#: wp-to-twitter-manager.php:270
|
133 |
+
msgid "<li><strong>Your server should run WP to Twitter successfully.</strong></li>"
|
134 |
+
msgstr "<li><strong>Dein Server sollte WP to Twitter problemlos ausführen.</strong></li>"
|
135 |
+
|
136 |
+
#: wp-to-twitter-manager.php:275
|
137 |
+
msgid "<li>Your server does not support <code>fputs</code>.</li>"
|
138 |
+
msgstr "<li>Dein Server unterstützt nicht <code>fputs</code>.</li>"
|
139 |
+
|
140 |
+
#: wp-to-twitter-manager.php:279
|
141 |
+
msgid "<li>Your server does not support <code>file_get_contents</code> or <code>cURL</code> functions.</li>"
|
142 |
+
msgstr "<li>Dein Server unterstützt nicht <code>file_get_contents</code> oder <code>cURL</code> Funktionen.</li>"
|
143 |
+
|
144 |
+
#: wp-to-twitter-manager.php:283
|
145 |
+
msgid "<li>Your server does not support <code>Snoopy</code>.</li>"
|
146 |
+
msgstr "<li>Dein Server unterstützt nicht <code>Snoopy</code>.</li>"
|
147 |
+
|
148 |
+
#: wp-to-twitter-manager.php:286
|
149 |
+
msgid "<li><strong>Your server does not appear to support the required PHP functions and classes for WP to Twitter to function.</strong> You can try it anyway - these tests aren't perfect - but no guarantees.</li>"
|
150 |
+
msgstr "<li><strong>Es scheint als würde dein Server NICHT die benötigten PHP Funktion und Klassen für WP to Twitter bereitstellen.</strong> Du kannst es trotzdem versuchen - da der Test nicht perfekt ist - aber ohne Garantie.</li>"
|
151 |
+
|
152 |
+
#: wp-to-twitter-manager.php:295
|
153 |
+
msgid "This plugin may not work in your server environment."
|
154 |
+
msgstr "Dieses Plugin funktioniert vielleicht nicht in deiner Server Umgebung."
|
155 |
+
|
156 |
+
#: wp-to-twitter-manager.php:306
|
157 |
+
msgid "WP to Twitter Options"
|
158 |
+
msgstr "WP to Twitter Einstellungen"
|
159 |
+
|
160 |
+
#: wp-to-twitter-manager.php:308
|
161 |
+
msgid "For any update field, you can use the codes <code>#title#</code> for the title of your blog post, <code>#blog#</code> for the title of your blog, <code>#post#</code> for a short excerpt of the post content or <code>#url#</code> for the post URL (shortened or not, depending on your preferences.)"
|
162 |
+
msgstr "Für jedes Aktualisierungsfeld kannst du die Codes <code>#title#</code> für den Name des Blogeintrags, <code>#blog#</code> für den Blogname, <code>#post#</code> für einen Auszug des Blogeintrags oder <code>#url#</code> für die URL verwenden! Da du nur 140 Zeichen hast, solltest du dir gut überlegen, ob du den Blognamen verwendest."
|
163 |
+
|
164 |
+
#: wp-to-twitter-manager.php:315
|
165 |
+
msgid "One or more of your last posts has failed to send it's status update to Twitter. Your Tweet has been saved in the custom meta data for your post, and you can re-Tweet it at your leisure."
|
166 |
+
msgstr "Einer oder mehrere deiner letzten Einträge konnte nicht über Twitter veröffentlicht werden. Die Tweets wurden am Ende der Einträge gespeichert, damit du sie manuell veröffentlichen kannst."
|
167 |
+
|
168 |
+
#: wp-to-twitter-manager.php:318
|
169 |
+
msgid "The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet."
|
170 |
+
msgstr "Die Verbindung zum URL Verkürzer API schlug fehl und deine URL wurde nicht verkürzt. Es wurde die normale URL wurde im Tweet veröffentlicht."
|
171 |
+
|
172 |
+
#: wp-to-twitter-manager.php:330
|
173 |
+
msgid "Clear 'WP to Twitter' Error Messages"
|
174 |
+
msgstr "'WP to Twitter' Fehlermeldung löschen"
|
175 |
+
|
176 |
+
#: wp-to-twitter-manager.php:342
|
177 |
+
msgid "Wordpress to Twitter Publishing Options"
|
178 |
+
msgstr "Wordpress to Twitter Veröffentlichungs-Optionen"
|
179 |
+
|
180 |
+
#: wp-to-twitter-manager.php:346
|
181 |
+
msgid "Update when a post is published"
|
182 |
+
msgstr "Aktualisieren wenn ein neuer Eintrag veröffentlicht wird"
|
183 |
+
|
184 |
+
#: wp-to-twitter-manager.php:346
|
185 |
+
msgid "Text for new post updates:"
|
186 |
+
msgstr "Text für neuen Eintrag: "
|
187 |
+
|
188 |
+
#: wp-to-twitter-manager.php:349
|
189 |
+
#: wp-to-twitter-manager.php:357
|
190 |
+
msgid "Provide link to blog?"
|
191 |
+
msgstr "Link zum Blog hinzufügen?"
|
192 |
+
|
193 |
+
#: wp-to-twitter-manager.php:354
|
194 |
+
msgid "Update when a post is edited"
|
195 |
+
msgstr "Aktualisieren wenn ein neuer Eintrag aktualisiert wird"
|
196 |
+
|
197 |
+
#: wp-to-twitter-manager.php:354
|
198 |
+
msgid "Text for editing updates:"
|
199 |
+
msgstr "Text für aktualisierte Einträge:"
|
200 |
+
|
201 |
+
#: wp-to-twitter-manager.php:361
|
202 |
+
msgid "Add tags as hashtags on Tweets"
|
203 |
+
msgstr "Verwende Tags als Hashtags in Tweets"
|
204 |
+
|
205 |
+
#: wp-to-twitter-manager.php:365
|
206 |
+
msgid "Update Twitter when new Wordpress Pages are published"
|
207 |
+
msgstr "Aktualisiere Twitter wenn eine neue WordPress Seite veröffentlicht wird"
|
208 |
+
|
209 |
+
#: wp-to-twitter-manager.php:369
|
210 |
+
msgid "Update Twitter when WordPress Pages are edited"
|
211 |
+
msgstr "Aktualisiere Twitter wenn eine WordPress Seite aktualisiert wird"
|
212 |
+
|
213 |
+
#: wp-to-twitter-manager.php:373
|
214 |
+
msgid "Update Twitter when you post a Blogroll link"
|
215 |
+
msgstr "Aktualisiere Twitter wenn du einen neuen Blogroll Link veröffentlichst."
|
216 |
+
|
217 |
+
#: wp-to-twitter-manager.php:373
|
218 |
+
msgid "Use <strong>link title</strong> for Twitter updates"
|
219 |
+
msgstr "Verwende den <strong>Link Namen</strong> für Twitter Aktualisierungen"
|
220 |
+
|
221 |
+
#: wp-to-twitter-manager.php:373
|
222 |
+
msgid "Use <strong>link description</strong> for Twitter updates"
|
223 |
+
msgstr "Verwende die <strong>Link Beschreibung</strong> für Twitter Aktualisierungen"
|
224 |
+
|
225 |
+
#: wp-to-twitter-manager.php:373
|
226 |
+
msgid "Text for new link updates (used if title/description isn't available.):"
|
227 |
+
msgstr "Text für neuen Link (wenn kein Namen oder Beschreibung vorhanden sind.):"
|
228 |
+
|
229 |
+
#: wp-to-twitter-manager.php:378
|
230 |
+
msgid "Set default Tweet status to 'No.'"
|
231 |
+
msgstr "Setze Tweet veröffentlichen auf 'Nein' als Standard."
|
232 |
+
|
233 |
+
#: wp-to-twitter-manager.php:379
|
234 |
+
msgid "Twitter updates can be set on a post by post basis. By default, posts WILL be posted to Twitter. Check this to change the default to NO."
|
235 |
+
msgstr "Twitter Aktualisierungen können auch für jeden Eintrag einzeln freigeschaltet werden. Standardmäßig wird JEDER Eintrag auf Twitter veröffentlich. Hier kann diese Funktion deaktiviert werden."
|
236 |
+
|
237 |
+
#: wp-to-twitter-manager.php:383
|
238 |
+
msgid "Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"
|
239 |
+
msgstr "Twitter Aktualisierungen bei Remote Veröffentlichungen (Einträge per Email oder XMLRPC Client)"
|
240 |
+
|
241 |
+
#: wp-to-twitter-manager.php:387
|
242 |
+
msgid "Update Twitter when a post is published using QuickPress"
|
243 |
+
msgstr "Aktualisiere Twitter wenn ein Eintrag über QuickPress veröffentlicht wird"
|
244 |
+
|
245 |
+
#: wp-to-twitter-manager.php:391
|
246 |
+
msgid "Length of post excerpt (in characters):"
|
247 |
+
msgstr "Länge des Blogeintrag Auszugs (in Zeichen):"
|
248 |
+
|
249 |
+
#: wp-to-twitter-manager.php:391
|
250 |
+
msgid "By default, extracted from the post itself. If you use the 'Excerpt' field, that will be used instead."
|
251 |
+
msgstr "Standardmäßig, Auszug aus dem Blogeintrag selbst. Wenn du das 'Auszug' Feld verwendest, wird dieser Text verwendet."
|
252 |
+
|
253 |
+
#: wp-to-twitter-manager.php:395
|
254 |
+
msgid "Custom text prepended to Tweets:"
|
255 |
+
msgstr "Eigener Text zu Beginn des Tweets:"
|
256 |
+
|
257 |
+
#: wp-to-twitter-manager.php:399
|
258 |
+
msgid "Custom text appended to Tweets:"
|
259 |
+
msgstr "Eigener Text am Ende des Tweets:"
|
260 |
+
|
261 |
+
#: wp-to-twitter-manager.php:403
|
262 |
+
msgid "Custom field for an alternate URL to be shortened and Tweeted:"
|
263 |
+
msgstr "Benutzerfeld für eine alternative URL zum Verkürzen und Tweeten:"
|
264 |
+
|
265 |
+
#: wp-to-twitter-manager.php:404
|
266 |
+
msgid "You can use a custom field to send Cli.gs and Twitter an alternate URL from the permalink provided by WordPress. The value is the name of the custom field you're using to add an external URL."
|
267 |
+
msgstr "Du kannst das Benutzerfeld verwenden um Cli.gs und Twitter eine andere URL als den Permalink von WordPress zu verwenden. Der Wert ist der Name des Benutzerfeldes, welches du für eine externe URL verwenden kannst."
|
268 |
+
|
269 |
+
#: wp-to-twitter-manager.php:408
|
270 |
+
msgid "Use Google Analytics with WP-to-Twitter"
|
271 |
+
msgstr "Verwende Google Analytics mit WP-to-Twitter"
|
272 |
+
|
273 |
+
#: wp-to-twitter-manager.php:409
|
274 |
+
msgid "Campaign identifier for Google Analytics:"
|
275 |
+
msgstr "Campaign Identifier für Google Analytics:"
|
276 |
+
|
277 |
+
#: wp-to-twitter-manager.php:410
|
278 |
+
msgid "You can track the response from Twitter using Google Analytics by defining a campaign identifier here."
|
279 |
+
msgstr "Du kannst die Antworten von Twitter mit Google Analytics aufzeichnen, wenn du einen Campaign Identifier angibst."
|
280 |
+
|
281 |
+
#: wp-to-twitter-manager.php:415
|
282 |
+
msgid "Authors have individual Twitter accounts"
|
283 |
+
msgstr "Autoren haben individuelle Twitter Accounts"
|
284 |
+
|
285 |
+
#: wp-to-twitter-manager.php:415
|
286 |
+
msgid "Each author can set their own Twitter username and password in their user profile. Their posts will be sent to their own Twitter accounts."
|
287 |
+
msgstr "Jeder Autor kann seinen Twitter Benutzernamen und Passwort in seinem Profil festlegen. Die Einträge werden unter dem jeweiligen Twitter Account veröffentlicht."
|
288 |
+
|
289 |
+
#: wp-to-twitter-manager.php:420
|
290 |
+
msgid "Use <strong>Cli.gs</strong> for my URL shortener."
|
291 |
+
msgstr "Verwende <strong>Cli.gs</strong> als URL Verkürzer."
|
292 |
+
|
293 |
+
#: wp-to-twitter-manager.php:420
|
294 |
+
msgid "Use <strong>Bit.ly</strong> for my URL shortener."
|
295 |
+
msgstr "Verwende <strong>Bit.ly</strong> als URL Verkürzer."
|
296 |
+
|
297 |
+
#: wp-to-twitter-manager.php:420
|
298 |
+
msgid "Don't shorten URLs."
|
299 |
+
msgstr "URLs nicht kürzen."
|
300 |
+
|
301 |
+
#: wp-to-twitter-manager.php:425
|
302 |
+
msgid "Save WP->Twitter Options"
|
303 |
+
msgstr "WP->Twitter Einstellungen sichern"
|
304 |
+
|
305 |
+
#: wp-to-twitter-manager.php:431
|
306 |
+
msgid "Your Twitter account details"
|
307 |
+
msgstr "Deine Twitter Account Informationen"
|
308 |
+
|
309 |
+
#: wp-to-twitter-manager.php:438
|
310 |
+
msgid "Your Twitter username:"
|
311 |
+
msgstr "Dein Twitter Benutzername:"
|
312 |
+
|
313 |
+
#: wp-to-twitter-manager.php:442
|
314 |
+
msgid "Your Twitter password:"
|
315 |
+
msgstr "Dein Twitter Passwort:"
|
316 |
+
|
317 |
+
#: wp-to-twitter-manager.php:442
|
318 |
+
msgid "(<em>Saved</em>)"
|
319 |
+
msgstr "(<em>Gespeichert</em>)"
|
320 |
+
|
321 |
+
#: wp-to-twitter-manager.php:446
|
322 |
+
msgid "Save Twitter Login Info"
|
323 |
+
msgstr "Twitter Login speichern"
|
324 |
+
|
325 |
+
#: wp-to-twitter-manager.php:446
|
326 |
+
msgid "» <small>Don't have a Twitter account? <a href='http://www.twitter.com'>Get one for free here</a>"
|
327 |
+
msgstr "» <small>Du hast keinen Twitter Account? <a href='http://www.twitter.com'>HIER</a> klicken zum Anlegen!"
|
328 |
+
|
329 |
+
#: wp-to-twitter-manager.php:450
|
330 |
+
msgid "Your Cli.gs account details"
|
331 |
+
msgstr "Deine Cli.gs Account Informationen"
|
332 |
+
|
333 |
+
#: wp-to-twitter-manager.php:457
|
334 |
+
msgid "Your Cli.gs <abbr title='application programming interface'>API</abbr> Key:"
|
335 |
+
msgstr "Dein Cli.gs <abbr title='application programming interface'>API</abbr> Key:"
|
336 |
+
|
337 |
+
#: wp-to-twitter-manager.php:463
|
338 |
+
msgid "Don't have a Cli.gs account or Cligs API key? <a href='http://cli.gs/user/api/'>Get one free here</a>!<br />You'll need an API key in order to associate the Cligs you create with your Cligs account."
|
339 |
+
msgstr "Keinen Cli.gs Account oder Cligs API Key? <a href='http://cli.gs/user/api/'>HIER</a> klicken zum Anlegen!!<br />Du benötigst einen API Key um cligs einem Cli.gs Account zuzuordnen."
|
340 |
+
|
341 |
+
#: wp-to-twitter-manager.php:468
|
342 |
+
msgid "Your Bit.ly account details"
|
343 |
+
msgstr "Deine Bit.ly Account Informationen"
|
344 |
+
|
345 |
+
#: wp-to-twitter-manager.php:474
|
346 |
+
msgid "Your Bit.ly username:"
|
347 |
+
msgstr "Dein Bit.ly Benutzername:"
|
348 |
+
|
349 |
+
#: wp-to-twitter-manager.php:478
|
350 |
+
msgid "Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
351 |
+
msgstr "Dein Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
352 |
+
|
353 |
+
#: wp-to-twitter-manager.php:504
|
354 |
+
msgid "Need help?"
|
355 |
+
msgstr "Du benötigst Hilfe?"
|
356 |
+
|
357 |
+
#: wp-to-twitter-manager.php:505
|
358 |
+
msgid "Visit the <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to Twitter plugin page</a>."
|
359 |
+
msgstr "Besuche die <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to Twitter Plugin Seite</a>."
|
360 |
+
|
361 |
+
#: wp-to-twitter.php:718
|
362 |
+
msgid "Add_new_tag"
|
363 |
+
msgstr "Tag_hinzufügen"
|
364 |
+
|
365 |
+
#. #-#-#-#-# plugin.pot (PACKAGE VERSION) #-#-#-#-#
|
366 |
+
#. Plugin Name of an extension
|
367 |
+
#: wp-to-twitter.php:735
|
368 |
+
msgid "WP to Twitter"
|
369 |
+
msgstr "WP to Twitter"
|
370 |
+
|
371 |
+
#: wp-to-twitter.php:776
|
372 |
+
msgid "Twitter Post"
|
373 |
+
msgstr "Twitter Nachricht"
|
374 |
+
|
375 |
+
#: wp-to-twitter.php:781
|
376 |
+
msgid " characters.<br />Twitter posts are a maximum of 140 characters; if your Cli.gs URL is appended to the end of your document, you have 119 characters available. You can use <code>#url#</code>, <code>#title#</code>, <code>#post#</code> or <code>#blog#</code> to insert the shortened URL, post title, a post excerpt or blog name into the Tweet."
|
377 |
+
msgstr " Zeichen.<br />Twitter Nachrichten können maximal 140 Zeichen haben; wenn du eine Cli.gs URL in deinen Tweets verwendest, hast du noch 119 Zeichen zur Verfügung. Du kannst <code>#url#</code>, <code>#title#</code>, <code>#post#</code>, oder <code>#blog#</code> verwenden um die gekürzte URL, Name des Blogeintrags, ein Auszug des Blogeintrags oder Blogname im Tweet zu verwenden."
|
378 |
+
|
379 |
+
#: wp-to-twitter.php:781
|
380 |
+
msgid "Get Support"
|
381 |
+
msgstr "Hilfe anfordern"
|
382 |
+
|
383 |
+
#: wp-to-twitter.php:784
|
384 |
+
msgid "Don't Tweet this post."
|
385 |
+
msgstr "Diesen Eintrag nicht twittern."
|
386 |
+
|
387 |
+
#: wp-to-twitter.php:836
|
388 |
+
msgid "WP to Twitter User Settings"
|
389 |
+
msgstr "WP to Twitter Benutzer Einstellungen"
|
390 |
+
|
391 |
+
#: wp-to-twitter.php:840
|
392 |
+
msgid "Use My Twitter Account"
|
393 |
+
msgstr "Verwende meinen Twitter Account"
|
394 |
+
|
395 |
+
#: wp-to-twitter.php:841
|
396 |
+
msgid "Select this option if you would like your posts to be Tweeted into your own Twitter account with no @ references."
|
397 |
+
msgstr "Wähle diese Option wenn du möchtest, dass dein Eintrag in deinem Twitter Account ohne @ Referenz veröffentlicht wird."
|
398 |
+
|
399 |
+
#: wp-to-twitter.php:842
|
400 |
+
msgid "Tweet my posts into my Twitter account with an @ reference to the site's main Twitter account."
|
401 |
+
msgstr "Tweete meinen Eintrag in meinem Twitter Account mit einer @ Referenz zum Haupt Twitter Account der Seite."
|
402 |
+
|
403 |
+
#: wp-to-twitter.php:843
|
404 |
+
msgid "Tweet my posts into the main site Twitter account with an @ reference to my username. (Password not required with this option.)"
|
405 |
+
msgstr "Tweete meinen Eintrag im Haupt Twitter Account mit einer @ Referenz zu meinem Benutzernamen. (Für diese Option wird kein Passwort benötigt.)"
|
406 |
+
|
407 |
+
#: wp-to-twitter.php:846
|
408 |
+
msgid "Your Twitter Username"
|
409 |
+
msgstr "Dein Twitter Benutzername"
|
410 |
+
|
411 |
+
#: wp-to-twitter.php:847
|
412 |
+
msgid "Enter your own Twitter username."
|
413 |
+
msgstr "Gib deinen Twitter Benutzernamen ein."
|
414 |
+
|
415 |
+
#: wp-to-twitter.php:850
|
416 |
+
msgid "Your Twitter Password"
|
417 |
+
msgstr "Dein Twitter Passwort"
|
418 |
+
|
419 |
+
#: wp-to-twitter.php:851
|
420 |
+
msgid "Enter your own Twitter password."
|
421 |
+
msgstr "Gib dein Twitter Passwort ein."
|
422 |
+
|
423 |
+
#: wp-to-twitter.php:929
|
424 |
+
msgid "Settings"
|
425 |
+
msgstr "Einstellungen"
|
426 |
+
|
427 |
+
#. Plugin URI of an extension
|
428 |
+
msgid "http://www.joedolson.com/articles/wp-to-twitter/"
|
429 |
+
msgstr "http://www.joedolson.com/articles/wp-to-twitter/"
|
430 |
+
|
431 |
+
#. Description of an extension
|
432 |
+
msgid "Updates Twitter when you create a new blog post or add to your blogroll using Cli.gs. With a Cli.gs API key, creates a clig in your Cli.gs account with the name of your post as the title."
|
433 |
+
msgstr "Aktualisiert Twitter wenn du einen neuen Blog Eintrag oder einen neuen Blogroll hinzufügst unter Verwendung von Cli.gs. Mit einem Cli.gs API Key wird ein neuer clig mit dem Namen deines Eintrags erstellen lassen."
|
434 |
+
|
435 |
+
#. Author of an extension
|
436 |
+
msgid "Joseph Dolson"
|
437 |
+
msgstr "Joseph Dolson"
|
438 |
+
|
439 |
+
#. Author URI of an extension
|
440 |
+
msgid "http://www.joedolson.com/"
|
441 |
+
msgstr "http://www.joedolson.com/"
|
442 |
+
|
443 |
+
#~ msgid ""
|
444 |
+
#~ "Your server appears to support the required PHP functions and classes for "
|
445 |
+
#~ "WP to Twitter to function."
|
446 |
+
#~ msgstr ""
|
447 |
+
#~ "Es scheint als würde dein Server die benötigten PHP Funktion und Klassen "
|
448 |
+
#~ "für WP to Twitter bereitstellen."
|
449 |
+
|
wp-to-twitter-it_IT.mo
ADDED
Binary file
|
wp-to-twitter-it_IT.po
ADDED
@@ -0,0 +1,452 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# SOME DESCRIPTIVE TITLE.
|
2 |
+
# Copyright (C) YEAR Joseph Dolson
|
3 |
+
# This file is distributed under the same license as the PACKAGE package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: WP to Twitter\n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n"
|
10 |
+
"POT-Creation-Date: 2009-09-16 18:42+0000\n"
|
11 |
+
"PO-Revision-Date: 2009-09-16 23:37+0100\n"
|
12 |
+
"Last-Translator: Gianni Diurno (aka gidibao) <gidibao@gmail.com>\n"
|
13 |
+
"Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"X-Poedit-Language: Italian\n"
|
18 |
+
"X-Poedit-Country: ITALY\n"
|
19 |
+
|
20 |
+
#: wp-to-twitter-manager.php:55
|
21 |
+
msgid "Set your Twitter login information and URL shortener API information to use this plugin!"
|
22 |
+
msgstr "Per potere utilizzare questo plugin dovrai inserire i tuoi dati login di Twitter e le informazioni API per i servizi URL brevi! "
|
23 |
+
|
24 |
+
#: wp-to-twitter-manager.php:61
|
25 |
+
msgid "Please add your Twitter password. "
|
26 |
+
msgstr "Inserisci la tua password di Twitter."
|
27 |
+
|
28 |
+
#: wp-to-twitter-manager.php:67
|
29 |
+
msgid "WP to Twitter Errors Cleared"
|
30 |
+
msgstr "Gli errori WP to Twitter sono stati azzerati"
|
31 |
+
|
32 |
+
#: wp-to-twitter-manager.php:73
|
33 |
+
msgid "URL shortener request failed! We couldn't shrink that URL, so we attached the normal URL to your Tweet. Check with your URL shortening provider to see if there are any known issues. [<a href=\"http://blog.cli.gs\">Cli.gs Blog</a>] [<a href=\"http://blog.bit.ly\">Bit.ly Blog</a>]"
|
34 |
+
msgstr "La richiesta é fallita! Non essendo stato possibile abbreviare l'URL abbiamo utilizzato per il messaggio l'indirizzo normale. Verifica la documentazione in merito presso il tuo provider di URL brevi. [<a href=\"http://blog.cli.gs\">Cli.gs Blog</a>] [<a href=\"http://blog.bit.ly\">Bit.ly Blog</a>]"
|
35 |
+
|
36 |
+
#: wp-to-twitter-manager.php:77
|
37 |
+
msgid "Sorry! I couldn't get in touch with the Twitter servers to post your new blog post. Your tweet has been stored in a custom field attached to the post, so you can Tweet it manually if you wish! "
|
38 |
+
msgstr "Non é stato possibile contattare i server di Twitter per comunicare l'aggiornamento avvenuto. Il tuo messaggio é stato inserito in un campo personalizzato in allegato all'articolo in modo tale che tu possa compiere manualmente l'operazione!"
|
39 |
+
|
40 |
+
#: wp-to-twitter-manager.php:79
|
41 |
+
msgid "Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. "
|
42 |
+
msgstr "Non é stato possibile contattare i server di Twitter per comunicare il tuo <strong>nuovo link</strong>. Prova a compiere manualmente l'operazione."
|
43 |
+
|
44 |
+
#: wp-to-twitter-manager.php:137
|
45 |
+
msgid "You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly."
|
46 |
+
msgstr "E' necessario che tu inserisca i dati per il login e la chiave API di Bit.ly in modo da potere abbreviare gli URL con Bit.ly."
|
47 |
+
|
48 |
+
#: wp-to-twitter-manager.php:148
|
49 |
+
msgid "WP to Twitter Options Updated"
|
50 |
+
msgstr "Le opzioni di WP to Twitter sono state aggiornate"
|
51 |
+
|
52 |
+
#: wp-to-twitter-manager.php:158
|
53 |
+
msgid "Twitter login and password updated. "
|
54 |
+
msgstr "Il login e la password di Twitter sono state aggiornate."
|
55 |
+
|
56 |
+
#: wp-to-twitter-manager.php:160
|
57 |
+
msgid "You need to provide your twitter login and password! "
|
58 |
+
msgstr "E' necessario fornire i dati login e password di Twitter!"
|
59 |
+
|
60 |
+
#: wp-to-twitter-manager.php:167
|
61 |
+
msgid "Cligs API Key Updated"
|
62 |
+
msgstr "La chiave API di Cligs é stata aggiornata."
|
63 |
+
|
64 |
+
#: wp-to-twitter-manager.php:170
|
65 |
+
msgid "Cli.gs API Key deleted. Cli.gs created by WP to Twitter will no longer be associated with your account. "
|
66 |
+
msgstr "La chiave API di Cli.gs é stata cancellata. I Cli.gs creati da WP to Twitter non saranno più associati al tuo account. "
|
67 |
+
|
68 |
+
#: wp-to-twitter-manager.php:172
|
69 |
+
msgid "Cli.gs API Key not added - <a href='http://cli.gs/user/api/'>get one here</a>! "
|
70 |
+
msgstr "Non é stata inserita la chiave API di Cli.gs - <a href='http://cli.gs/user/api/'>vai qui</a>! "
|
71 |
+
|
72 |
+
#: wp-to-twitter-manager.php:178
|
73 |
+
msgid "Bit.ly API Key Updated."
|
74 |
+
msgstr "La chiave API di Bit.ly é stata aggiornata."
|
75 |
+
|
76 |
+
#: wp-to-twitter-manager.php:181
|
77 |
+
msgid "Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
78 |
+
msgstr "La chiave API di Bit.ly é stata cancellata. Non puoi utilizzare la API di Bit.ly senza la chiave API. "
|
79 |
+
|
80 |
+
#: wp-to-twitter-manager.php:183
|
81 |
+
msgid "Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
82 |
+
msgstr "La chiave API di Bit.ly non é stata aggiunta - <a href='http://bit.ly/account/'>vai qui</a>! "
|
83 |
+
|
84 |
+
#: wp-to-twitter-manager.php:187
|
85 |
+
msgid " Bit.ly User Login Updated."
|
86 |
+
msgstr " Il login utente per Bit.ly é stato aggiornato."
|
87 |
+
|
88 |
+
#: wp-to-twitter-manager.php:190
|
89 |
+
msgid "Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. "
|
90 |
+
msgstr "Sono stati cancellati i dati per il login utente Bit.ly. Non puoi utilizzare la API di Bit.ly senza fornire il tuo nome utente. "
|
91 |
+
|
92 |
+
#: wp-to-twitter-manager.php:192
|
93 |
+
msgid "Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
94 |
+
msgstr "Non sono stati inseriti i dati per il login a Bit.ly - <a href='http://bit.ly/account/'>vai qui</a>! "
|
95 |
+
|
96 |
+
#: wp-to-twitter-manager.php:224
|
97 |
+
msgid "<li>Successfully contacted the Cli.gs API via Snoopy, but the URL creation failed.</li>"
|
98 |
+
msgstr "<li>Contattata con successo (via Snoopy) la API di Cli.gs. Purtroppo la creazione dell'URL é fallita.</li>"
|
99 |
+
|
100 |
+
#: wp-to-twitter-manager.php:226
|
101 |
+
msgid "<li>Successfully contacted the Cli.gs API via Snoopy, but a Cli.gs server error prevented the URL from being shrotened.</li>"
|
102 |
+
msgstr "<li>Contattata con successo (via Snoopy) la API di Cli.gs. Purtroppo un errore del server Cli.gs non ha permesso l'abbreviazione dell'URL.</li>"
|
103 |
+
|
104 |
+
#: wp-to-twitter-manager.php:228
|
105 |
+
msgid "<li>Successfully contacted the Cli.gs API via Snoopy and created a shortened link.</li>"
|
106 |
+
msgstr "<li>Contattata con successo (via Snoopy) la API di Cli.gs. Il link breve é stato creato.</li>"
|
107 |
+
|
108 |
+
#: wp-to-twitter-manager.php:237
|
109 |
+
#: wp-to-twitter-manager.php:259
|
110 |
+
msgid "<li>Successfully contacted the Bit.ly API via Snoopy.</li>"
|
111 |
+
msgstr "<li>Contattata con successo (via Snoopy) la API di Bit.ly.</li>"
|
112 |
+
|
113 |
+
#: wp-to-twitter-manager.php:239
|
114 |
+
#: wp-to-twitter-manager.php:261
|
115 |
+
msgid "<li>Failed to contact the Bit.ly API via Snoopy.</li>"
|
116 |
+
msgstr "<li>Non é stato possibile contattare (via Snoopy) la API di Bit.ly.</li>"
|
117 |
+
|
118 |
+
#: wp-to-twitter-manager.php:243
|
119 |
+
msgid "<li>Successfully contacted the Twitter API via Snoopy.</li>"
|
120 |
+
msgstr "<li>Contattata con successo (via Snoopy) la API di Twitter.</li>"
|
121 |
+
|
122 |
+
#: wp-to-twitter-manager.php:245
|
123 |
+
msgid "<li>Failed to contact the Twitter API via Snoopy.</li>"
|
124 |
+
msgstr "<li>Non é stato possibile contattare (via Snoopy) la API di Twitter.</li>"
|
125 |
+
|
126 |
+
#: wp-to-twitter-manager.php:251
|
127 |
+
msgid "<li>Successfully contacted the Twitter API via cURL.</li>"
|
128 |
+
msgstr "<li>Contattata con successo (via cURL) la API di Twitter.</li>"
|
129 |
+
|
130 |
+
#: wp-to-twitter-manager.php:253
|
131 |
+
msgid "<li>Failed to contact the Twitter API via cURL.</li>"
|
132 |
+
msgstr "<li>Non é stato possibile contattare (via cURL) la API di Twitter.</li>"
|
133 |
+
|
134 |
+
#: wp-to-twitter-manager.php:265
|
135 |
+
msgid "<li>Successfully contacted the Cli.gs API via Snoopy.</li>"
|
136 |
+
msgstr "<li>Contattata con successo (via Snoopy) la API di Cli.gs.</li>"
|
137 |
+
|
138 |
+
#: wp-to-twitter-manager.php:268
|
139 |
+
msgid "<li>Failed to contact the Cli.gs API via Snoopy.</li>"
|
140 |
+
msgstr "<li>Non é stato possibile contattare (via Snoopy) la API di Cli.gs.</li>"
|
141 |
+
|
142 |
+
#: wp-to-twitter-manager.php:273
|
143 |
+
msgid "<li><strong>Your server should run WP to Twitter successfully.</strong></li>"
|
144 |
+
msgstr "<li><strong>WP to Twitter funziona correttamente per il tuo server.</strong></li>"
|
145 |
+
|
146 |
+
#: wp-to-twitter-manager.php:278
|
147 |
+
msgid "<li>Your server does not support <code>fputs</code>.</li>"
|
148 |
+
msgstr "<li>Il tuo server non supporta <code>fputs</code>.</li>"
|
149 |
+
|
150 |
+
#: wp-to-twitter-manager.php:282
|
151 |
+
msgid "<li>Your server does not support <code>file_get_contents</code> or <code>cURL</code> functions.</li>"
|
152 |
+
msgstr "<li>Il tuo server non supporta le funzioni <code>file_get_contents</code> oppure <code>cURL</code>.</li>"
|
153 |
+
|
154 |
+
#: wp-to-twitter-manager.php:286
|
155 |
+
msgid "<li>Your server does not support <code>Snoopy</code>.</li>"
|
156 |
+
msgstr "<li>Il tuo server non supporta <code>Snoopy</code>.</li>"
|
157 |
+
|
158 |
+
#: wp-to-twitter-manager.php:289
|
159 |
+
msgid "<li><strong>Your server does not appear to support the required PHP functions and classes for WP to Twitter to function.</strong> You can try it anyway - these tests aren't perfect - but no guarantees.</li>"
|
160 |
+
msgstr "<li><strong>Pare che il tuo server non supporti le funzioni PHP richieste affinché WP to Twitter possa funzionare correttamente.</strong> Puoi comunque provare ugualmente - queste verifiche non sono perfette - ma non garantisco i risultati.</li>"
|
161 |
+
|
162 |
+
#: wp-to-twitter-manager.php:298
|
163 |
+
msgid "This plugin may not work in your server environment."
|
164 |
+
msgstr "Questo plugin non può funzionare sul tuo server."
|
165 |
+
|
166 |
+
#: wp-to-twitter-manager.php:309
|
167 |
+
msgid "WP to Twitter Options"
|
168 |
+
msgstr "Opzioni WP to Twitter"
|
169 |
+
|
170 |
+
#: wp-to-twitter-manager.php:311
|
171 |
+
msgid "For any update field, you can use the codes <code>#title#</code> for the title of your blog post, <code>#blog#</code> for the title of your blog, <code>#post#</code> for a short excerpt of the post content or <code>#url#</code> for the post URL (shortened or not, depending on your preferences.)"
|
172 |
+
msgstr "Per aggiornare ogni campo potrai utilizzare i codici <code>#title#</code> per il titolo del tuo articolo, <code>#blog#</code> per il nome del tuo blog, <code>#post#</code> per un riassunto breve del contenuto dell'articolo oppure <code>#url#</code> per l'URL all'articolo (breve o normale, a tuo piacere)"
|
173 |
+
|
174 |
+
#: wp-to-twitter-manager.php:318
|
175 |
+
msgid "One or more of your last posts has failed to send it's status update to Twitter. Your Tweet has been saved in the custom meta data for your post, and you can re-Tweet it at your leisure."
|
176 |
+
msgstr "Uno o più dei tuoi articoli recenti non é stato in grado di comunicare l'aggiornamento a Twitter. Il tuo messaggio é stato inserito nei dati meta del campo personalizzato del tuo articolo in modo tale che tu possa ripetere a tuo piacere l'operazione!"
|
177 |
+
|
178 |
+
#: wp-to-twitter-manager.php:321
|
179 |
+
msgid "The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet."
|
180 |
+
msgstr "La richiesta API per la creazione dell'URL breve é fallita: il tuo URL non é stato abbreviato. E' stato allegato l'URL completo al tuo messaggio."
|
181 |
+
|
182 |
+
#: wp-to-twitter-manager.php:333
|
183 |
+
msgid "Clear 'WP to Twitter' Error Messages"
|
184 |
+
msgstr "Svuota i messaggiodi errore 'WP to Twitter'"
|
185 |
+
|
186 |
+
#: wp-to-twitter-manager.php:345
|
187 |
+
msgid "Wordpress to Twitter Publishing Options"
|
188 |
+
msgstr "Opzioni editoriali Wordpress to Twitter"
|
189 |
+
|
190 |
+
#: wp-to-twitter-manager.php:349
|
191 |
+
msgid "Update when a post is published"
|
192 |
+
msgstr "Aggiorna quando viene pubblicato un articolo"
|
193 |
+
|
194 |
+
#: wp-to-twitter-manager.php:349
|
195 |
+
msgid "Text for new post updates:"
|
196 |
+
msgstr "Testo per aggiornamenti articolo:"
|
197 |
+
|
198 |
+
#: wp-to-twitter-manager.php:352
|
199 |
+
#: wp-to-twitter-manager.php:360
|
200 |
+
msgid "Provide link to blog?"
|
201 |
+
msgstr "Desideri il link al blog?"
|
202 |
+
|
203 |
+
#: wp-to-twitter-manager.php:357
|
204 |
+
msgid "Update when a post is edited"
|
205 |
+
msgstr "Aggiorna quando modifichi un articolo"
|
206 |
+
|
207 |
+
#: wp-to-twitter-manager.php:357
|
208 |
+
msgid "Text for editing updates:"
|
209 |
+
msgstr "Testo per aggiornamenti modifiche:"
|
210 |
+
|
211 |
+
#: wp-to-twitter-manager.php:364
|
212 |
+
msgid "Add tags as hashtags on Tweets"
|
213 |
+
msgstr "Aggiungi ai messaggi i tag come fossero degli hashtag "
|
214 |
+
|
215 |
+
#: wp-to-twitter-manager.php:368
|
216 |
+
msgid "Update Twitter when new Wordpress Pages are published"
|
217 |
+
msgstr "Aggiorna Twitter quando viene pubblicata una nuova pagina WordPress"
|
218 |
+
|
219 |
+
#: wp-to-twitter-manager.php:372
|
220 |
+
msgid "Update Twitter when WordPress Pages are edited"
|
221 |
+
msgstr "Aggiorna Twitter quando viene modificata una pagina WordPress"
|
222 |
+
|
223 |
+
#: wp-to-twitter-manager.php:376
|
224 |
+
msgid "Update Twitter when you post a Blogroll link"
|
225 |
+
msgstr "Aggiorna Twitter quando viene aggiunto un nuovo link al blogroll"
|
226 |
+
|
227 |
+
#: wp-to-twitter-manager.php:376
|
228 |
+
msgid "Use <strong>link title</strong> for Twitter updates"
|
229 |
+
msgstr "Utilizza un <strong>link di testo</strong> per gli aggiornamenti di Twitter"
|
230 |
+
|
231 |
+
#: wp-to-twitter-manager.php:376
|
232 |
+
msgid "Use <strong>link description</strong> for Twitter updates"
|
233 |
+
msgstr "Utilizza un <strong>link descrittivo</strong> per gli aggiornamenti di Twitter"
|
234 |
+
|
235 |
+
#: wp-to-twitter-manager.php:376
|
236 |
+
msgid "Text for new link updates (used if title/description isn't available.):"
|
237 |
+
msgstr "Testo per il link ai nuovi aggiornamenti (se titolo/descrizione non fossero disponibili):"
|
238 |
+
|
239 |
+
#: wp-to-twitter-manager.php:381
|
240 |
+
msgid "Set default Tweet status to 'No.'"
|
241 |
+
msgstr "Imposta al 'No' lo stato predefinito per i messaggi"
|
242 |
+
|
243 |
+
#: wp-to-twitter-manager.php:382
|
244 |
+
msgid "Twitter updates can be set on a post by post basis. By default, posts WILL be posted to Twitter. Check this to change the default to NO."
|
245 |
+
msgstr "Gli aggiornamenti per Twitter possono essere impostati in ogni singolo articolo. Come funzione predefinita, gli articoli VERRANNO segnalati a Twitter. Metti il segno di spunta per modificare al NO."
|
246 |
+
|
247 |
+
#: wp-to-twitter-manager.php:386
|
248 |
+
msgid "Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"
|
249 |
+
msgstr "Invio degli aggiornamenti di Twitter via punti di pubblicazione remoti (Email o client XMLRPC)"
|
250 |
+
|
251 |
+
#: wp-to-twitter-manager.php:390
|
252 |
+
msgid "Update Twitter when a post is published using QuickPress"
|
253 |
+
msgstr "Aggiorna Twitter quando un articolo é stato pubblicato via QuickPress"
|
254 |
+
|
255 |
+
#: wp-to-twitter-manager.php:394
|
256 |
+
msgid "Length of post excerpt (in characters):"
|
257 |
+
msgstr "Lunghezza riassunto messaggi (in caratteri)"
|
258 |
+
|
259 |
+
#: wp-to-twitter-manager.php:394
|
260 |
+
msgid "By default, extracted from the post itself. If you use the 'Excerpt' field, that will be used instead."
|
261 |
+
msgstr "Come funzione predefinita, gli estratti verranno generati in automatico. Utilizzassi il campo 'Excerpt', questi avrà la priorità."
|
262 |
+
|
263 |
+
#: wp-to-twitter-manager.php:398
|
264 |
+
msgid "Custom text prepended to Tweets:"
|
265 |
+
msgstr "Testo personalizzato davanti al messaggio:"
|
266 |
+
|
267 |
+
#: wp-to-twitter-manager.php:402
|
268 |
+
msgid "Custom text appended to Tweets:"
|
269 |
+
msgstr "Testo personalizzato in coda al messaggio:"
|
270 |
+
|
271 |
+
#: wp-to-twitter-manager.php:406
|
272 |
+
msgid "Custom field for an alternate URL to be shortened and Tweeted:"
|
273 |
+
msgstr "Campo personalizzato riferito ad un URL alternativo da abbreviare ed inviare a Twitter:"
|
274 |
+
|
275 |
+
#: wp-to-twitter-manager.php:407
|
276 |
+
msgid "You can use a custom field to send Cli.gs and Twitter an alternate URL from the permalink provided by WordPress. The value is the name of the custom field you're using to add an external URL."
|
277 |
+
msgstr "Puoi utilizzare un campo personalizzato per inviare a Cli.gs ed a Twitter un URL alternativo dal permalink fornito da WordPress. Questo valore é il nome del campo personalizzato che utilizzerai per aggiungere un URL esterno."
|
278 |
+
|
279 |
+
#: wp-to-twitter-manager.php:411
|
280 |
+
msgid "Use Google Analytics with WP-to-Twitter"
|
281 |
+
msgstr "Utilizza Google Analytics con WP-to-Twitter"
|
282 |
+
|
283 |
+
#: wp-to-twitter-manager.php:412
|
284 |
+
msgid "Campaign identifier for Google Analytics:"
|
285 |
+
msgstr "Identificatore Google Analytics:"
|
286 |
+
|
287 |
+
#: wp-to-twitter-manager.php:413
|
288 |
+
msgid "You can track the response from Twitter using Google Analytics by defining a campaign identifier here."
|
289 |
+
msgstr "Puoi tracciare i riscontri su Twitter utilizzando Google Analytics inserendo qui l'identificatore."
|
290 |
+
|
291 |
+
#: wp-to-twitter-manager.php:418
|
292 |
+
msgid "Authors have individual Twitter accounts"
|
293 |
+
msgstr "Gli autori hanno degli account personali su Twitter"
|
294 |
+
|
295 |
+
#: wp-to-twitter-manager.php:418
|
296 |
+
msgid "Each author can set their own Twitter username and password in their user profile. Their posts will be sent to their own Twitter accounts."
|
297 |
+
msgstr "Ogni autore può impostare nel proprio profilo utente il nome utente e la password di Twitter. I loro articoli saranno inviati ai propri account di Twitter."
|
298 |
+
|
299 |
+
#: wp-to-twitter-manager.php:423
|
300 |
+
msgid "Use <strong>Cli.gs</strong> for my URL shortener."
|
301 |
+
msgstr "Usa <strong>Cli.gs</strong> per gli URL brevi"
|
302 |
+
|
303 |
+
#: wp-to-twitter-manager.php:423
|
304 |
+
msgid "Use <strong>Bit.ly</strong> for my URL shortener."
|
305 |
+
msgstr "Usa <strong>Bit.ly</strong> per gli URL brevi"
|
306 |
+
|
307 |
+
#: wp-to-twitter-manager.php:423
|
308 |
+
msgid "Don't shorten URLs."
|
309 |
+
msgstr "Non usare gli URL brevi"
|
310 |
+
|
311 |
+
#: wp-to-twitter-manager.php:428
|
312 |
+
msgid "Save WP->Twitter Options"
|
313 |
+
msgstr "Salva le opzioni WP->Twitter"
|
314 |
+
|
315 |
+
#: wp-to-twitter-manager.php:434
|
316 |
+
msgid "Your Twitter account details"
|
317 |
+
msgstr "Dati account Twitter"
|
318 |
+
|
319 |
+
#: wp-to-twitter-manager.php:441
|
320 |
+
msgid "Your Twitter username:"
|
321 |
+
msgstr "Nome utente Twitter:"
|
322 |
+
|
323 |
+
#: wp-to-twitter-manager.php:445
|
324 |
+
msgid "Your Twitter password:"
|
325 |
+
msgstr "Password Twitter:"
|
326 |
+
|
327 |
+
#: wp-to-twitter-manager.php:445
|
328 |
+
msgid "(<em>Saved</em>)"
|
329 |
+
msgstr "(<em>Salvato</em>)"
|
330 |
+
|
331 |
+
#: wp-to-twitter-manager.php:449
|
332 |
+
msgid "Save Twitter Login Info"
|
333 |
+
msgstr "Salva le impostazioni di login a Twitter"
|
334 |
+
|
335 |
+
#: wp-to-twitter-manager.php:449
|
336 |
+
msgid "» <small>Don't have a Twitter account? <a href='http://www.twitter.com'>Get one for free here</a>"
|
337 |
+
msgstr "» <small>Non hai un account di Twitter? <a href='http://www.twitter.com'>Vai qui</a>"
|
338 |
+
|
339 |
+
#: wp-to-twitter-manager.php:453
|
340 |
+
msgid "Your Cli.gs account details"
|
341 |
+
msgstr "Dati account Cli.gs"
|
342 |
+
|
343 |
+
#: wp-to-twitter-manager.php:460
|
344 |
+
msgid "Your Cli.gs <abbr title='application programming interface'>API</abbr> Key:"
|
345 |
+
msgstr "La tua chiave <abbr title='application programming interface'>API</abbr> di Cli.gs:"
|
346 |
+
|
347 |
+
#: wp-to-twitter-manager.php:466
|
348 |
+
msgid "Don't have a Cli.gs account or Cligs API key? <a href='http://cli.gs/user/api/'>Get one free here</a>!<br />You'll need an API key in order to associate the Cligs you create with your Cligs account."
|
349 |
+
msgstr "Non hai ancora un account oppure una chiave API Cli.gs? <a href='http://cli.gs/user/api/'>Vai qui</a>!<br />E' necessafia una chiave API in modo tale da potere associare i Cligs da te creati con il tuo account di Cligs."
|
350 |
+
|
351 |
+
#: wp-to-twitter-manager.php:471
|
352 |
+
msgid "Your Bit.ly account details"
|
353 |
+
msgstr "Dati account Bit.ly"
|
354 |
+
|
355 |
+
#: wp-to-twitter-manager.php:477
|
356 |
+
msgid "Your Bit.ly username:"
|
357 |
+
msgstr "Nome utente Bit.ly:"
|
358 |
+
|
359 |
+
#: wp-to-twitter-manager.php:481
|
360 |
+
msgid "Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
361 |
+
msgstr "La tua chiave <abbr title='application programming interface'>API</abbr> di Bit.ly:"
|
362 |
+
|
363 |
+
#: wp-to-twitter-manager.php:507
|
364 |
+
msgid "Need help?"
|
365 |
+
msgstr "Serve aiuto?"
|
366 |
+
|
367 |
+
#: wp-to-twitter-manager.php:508
|
368 |
+
msgid "Visit the <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to Twitter plugin page</a>."
|
369 |
+
msgstr "Visita la pagina <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to Twitter</a>."
|
370 |
+
|
371 |
+
#: wp-to-twitter.php:822
|
372 |
+
msgid "Add_new_tag"
|
373 |
+
msgstr "Add_new_tag"
|
374 |
+
|
375 |
+
#. #-#-#-#-# plugin.pot (PACKAGE VERSION) #-#-#-#-#
|
376 |
+
#. Plugin Name of an extension
|
377 |
+
#: wp-to-twitter.php:842
|
378 |
+
msgid "WP to Twitter"
|
379 |
+
msgstr "WP to Twitter"
|
380 |
+
|
381 |
+
#: wp-to-twitter.php:883
|
382 |
+
msgid "Twitter Post"
|
383 |
+
msgstr "Messaggio Twitter"
|
384 |
+
|
385 |
+
#: wp-to-twitter.php:888
|
386 |
+
msgid " characters.<br />Twitter posts are a maximum of 140 characters; if your Cli.gs URL is appended to the end of your document, you have 119 characters available. You can use <code>#url#</code>, <code>#title#</code>, <code>#post#</code> or <code>#blog#</code> to insert the shortened URL, post title, a post excerpt or blog name into the Tweet."
|
387 |
+
msgstr " caratteri.<br />I messaggi di Twitter possono contenere un massimo di 140 caratteri; un URL generato da Cli.gs posto in coda al messaggio, lascerà disponibili 119 caratteri. Puoi utilizzare <code>#url#</code>, <code>#title#</code>, <code>#post#</code> oppure <code>#blog#</code> per inserire nel messaggio l'URL breve, il nome dell'articolo, un estratto dell'articolo oppure il nome del blog."
|
388 |
+
|
389 |
+
#: wp-to-twitter.php:888
|
390 |
+
msgid "Get Support"
|
391 |
+
msgstr "Supporto"
|
392 |
+
|
393 |
+
#: wp-to-twitter.php:891
|
394 |
+
msgid "Don't Tweet this post."
|
395 |
+
msgstr "Non segnalare a Twitter questo articolo."
|
396 |
+
|
397 |
+
#: wp-to-twitter.php:943
|
398 |
+
msgid "WP to Twitter User Settings"
|
399 |
+
msgstr "Impostazioni WP to Twitter User"
|
400 |
+
|
401 |
+
#: wp-to-twitter.php:947
|
402 |
+
msgid "Use My Twitter Account"
|
403 |
+
msgstr "Utilizza il mio account di Twitter"
|
404 |
+
|
405 |
+
#: wp-to-twitter.php:948
|
406 |
+
msgid "Select this option if you would like your posts to be Tweeted into your own Twitter account with no @ references."
|
407 |
+
msgstr "Seleziona questa opzione qualora gradissi che i tuoi articoli siano segnalati al tuo account personale di Twitter senza nessun riferimento @."
|
408 |
+
|
409 |
+
#: wp-to-twitter.php:949
|
410 |
+
msgid "Tweet my posts into my Twitter account with an @ reference to the site's main Twitter account."
|
411 |
+
msgstr "Segnala i miei articoli nel mio account di Twitter con un riferimento @ correlato al sito principale dell'account su Twitter."
|
412 |
+
|
413 |
+
#: wp-to-twitter.php:950
|
414 |
+
msgid "Tweet my posts into the main site Twitter account with an @ reference to my username. (Password not required with this option.)"
|
415 |
+
msgstr "Segnala i miei articoli al sito principale dell'account su Twitter con un riferimento @ al mio nome utente. (per questa opzione non sarà necessaria la password)"
|
416 |
+
|
417 |
+
#: wp-to-twitter.php:953
|
418 |
+
msgid "Your Twitter Username"
|
419 |
+
msgstr "Nome utente Twitter"
|
420 |
+
|
421 |
+
#: wp-to-twitter.php:954
|
422 |
+
msgid "Enter your own Twitter username."
|
423 |
+
msgstr "Inserisci il tuo nome utente Twitter"
|
424 |
+
|
425 |
+
#: wp-to-twitter.php:957
|
426 |
+
msgid "Your Twitter Password"
|
427 |
+
msgstr "Twitter Password"
|
428 |
+
|
429 |
+
#: wp-to-twitter.php:958
|
430 |
+
msgid "Enter your own Twitter password."
|
431 |
+
msgstr "Inserisci la tua password di Twitter"
|
432 |
+
|
433 |
+
#: wp-to-twitter.php:1036
|
434 |
+
msgid "Settings"
|
435 |
+
msgstr "Impostazioni"
|
436 |
+
|
437 |
+
#. Plugin URI of an extension
|
438 |
+
msgid "http://www.joedolson.com/articles/wp-to-twitter/"
|
439 |
+
msgstr "http://www.joedolson.com/articles/wp-to-twitter/"
|
440 |
+
|
441 |
+
#. Description of an extension
|
442 |
+
msgid "Updates Twitter when you create a new blog post or add to your blogroll using Cli.gs. With a Cli.gs API key, creates a clig in your Cli.gs account with the name of your post as the title."
|
443 |
+
msgstr "Aggiorna Twitter quando crei un nuovo articolo oppure aggiungi al tuo blogroll utilizzando Cli.gs. Con una chiave API Cli.gs, crea un clig nel tuo account di Cli.gs con il nome del tuo articolo come titolo."
|
444 |
+
|
445 |
+
#. Author of an extension
|
446 |
+
msgid "Joseph Dolson"
|
447 |
+
msgstr "Joseph Dolson"
|
448 |
+
|
449 |
+
#. Author URI of an extension
|
450 |
+
msgid "http://www.joedolson.com/"
|
451 |
+
msgstr "http://www.joedolson.com/"
|
452 |
+
|
wp-to-twitter-manager.php
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
<?php
|
2 |
-
//update_option( 'twitterInitialised', '0' );
|
3 |
// FUNCTION to see if checkboxes should be checked
|
4 |
-
|
5 |
function jd_checkCheckbox( $theFieldname ) {
|
6 |
if( get_option( $theFieldname ) == '1'){
|
7 |
echo 'checked="checked"';
|
@@ -11,7 +9,7 @@
|
|
11 |
$wp_cligs_error = FALSE;
|
12 |
$message = "";
|
13 |
//SETS DEFAULT OPTIONS
|
14 |
-
if( get_option( 'twitterInitialised') != '1' ) {
|
15 |
update_option( 'newpost-published-update', '1' );
|
16 |
update_option( 'newpost-published-text', 'New post: #title# (#url#)' );
|
17 |
update_option( 'newpost-published-showlink', '1' );
|
@@ -27,7 +25,7 @@
|
|
27 |
update_option( 'jd_twit_edited_pages','0' );
|
28 |
|
29 |
update_option( 'jd_twit_remote', '0' );
|
30 |
-
|
31 |
// Use Google Analytics with Twitter
|
32 |
update_option( 'twitter-analytics-campaign', '' );
|
33 |
update_option( 'use-twitter-analytics', '0' );
|
@@ -54,36 +52,39 @@
|
|
54 |
// Note that default options are set.
|
55 |
update_option( 'twitterInitialised', '1' );
|
56 |
|
57 |
-
$message = __("Set your Twitter login information and URL shortener API information to use this plugin!");
|
|
|
|
|
|
|
58 |
}
|
59 |
-
if( get_option( 'twitterInitialised') == '1' && get_option( 'twitterpw' ) == "" ) {
|
60 |
-
$message .= __("Please add your Twitter password. ");
|
61 |
}
|
62 |
|
63 |
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'clear-error' ) {
|
64 |
update_option( 'wp_twitter_failure','0' );
|
65 |
update_option( 'wp_url_failure','0' );
|
66 |
-
$message = __("WP to Twitter Errors Cleared");
|
67 |
}
|
68 |
|
69 |
-
// Error messages on failures
|
70 |
-
if ( get_option( 'wp_twitter_failure' ) == '1' || get_option( 'wp_url_failure' ) == '1' ) {
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
}
|
84 |
|
85 |
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'options' ) {
|
86 |
-
//UPDATE OPTIONS
|
87 |
update_option( 'newpost-published-update', $_POST['newpost-published-update'] );
|
88 |
update_option( 'newpost-published-text', $_POST['newpost-published-text'] );
|
89 |
update_option( 'newpost-published-showlink', $_POST['newpost-published-showlink'] );
|
@@ -100,38 +101,42 @@ if ( get_option( 'wp_twitter_failure' ) == '1' || get_option( 'wp_url_failure' )
|
|
100 |
update_option( 'jd_twit_prepend', $_POST['jd_twit_prepend'] );
|
101 |
update_option( 'jd_twit_append', $_POST['jd_twit_append'] );
|
102 |
update_option( 'jd_shortener', $_POST['jd_shortener'] );
|
103 |
-
|
104 |
|
105 |
if ( $_POST['jd-use-link-field'] == '2' ) {
|
106 |
update_option( 'jd-use-link-description', '1' );
|
107 |
update_option( 'jd-use-link-title', '0' );
|
108 |
-
|
109 |
} else if ( $_POST['jd-use-link-field'] == '1' ) {
|
110 |
update_option( 'jd-use-link-title', '1' );
|
111 |
update_option( 'jd-use-link-description', '0' );
|
112 |
}
|
|
|
113 |
switch ($_POST['jd_shortener']) {
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
}
|
134 |
|
|
|
|
|
|
|
|
|
135 |
update_option( 'newlink-published-text', $_POST['newlink-published-text'] );
|
136 |
update_option( 'jd_twit_blogroll',$_POST['jd_twit_blogroll'] );
|
137 |
|
@@ -140,147 +145,180 @@ if ( get_option( 'wp_twitter_failure' ) == '1' || get_option( 'wp_url_failure' )
|
|
140 |
|
141 |
update_option( 'jd_individual_twitter_users', $_POST['jd_individual_twitter_users'] );
|
142 |
|
143 |
-
$message =
|
144 |
|
145 |
-
}
|
|
|
|
|
146 |
//UPDATE LOGIN
|
147 |
if( ( $_POST['twitterlogin'] != '' ) && ( $_POST['twitterpw'] != '' ) ) {
|
148 |
update_option( 'twitterlogin', $_POST['twitterlogin'] );
|
149 |
update_option( 'twitterpw', $_POST['twitterpw'] );
|
150 |
update_option( 'twitterlogin_encrypted', base64_encode( $_POST['twitterlogin'].':'.$_POST['twitterpw'] ) );
|
151 |
-
$message = __("Twitter login and password updated. ");
|
152 |
} else {
|
153 |
-
$message = __("You need to provide your twitter login and password! ");
|
154 |
}
|
155 |
-
}
|
|
|
|
|
156 |
if ( $_POST['cligsapi'] != '' && isset( $_POST['submit'] ) ) {
|
157 |
update_option( 'cligsapi',$_POST['cligsapi'] );
|
158 |
-
$message = __("Cligs API Key Updated");
|
159 |
} else if ( isset( $_POST['clear'] ) ) {
|
160 |
update_option( 'cligsapi','' );
|
161 |
-
$message = __("Cli.gs API Key deleted. Cli.gs created by WP to Twitter will no longer be associated with your account. ");
|
162 |
} else {
|
163 |
-
$message = __("Cli.gs API Key not added - <a href='http://cli.gs/user/api/'>get one here</a>! ");
|
164 |
}
|
165 |
-
}
|
|
|
166 |
if ( $_POST['bitlyapi'] != '' && isset( $_POST['submit'] ) ) {
|
167 |
update_option( 'bitlyapi',trim($_POST['bitlyapi']) );
|
168 |
-
$message = __("Bit.ly API Key Updated.");
|
169 |
} else if ( isset( $_POST['clear'] ) ) {
|
170 |
update_option( 'bitlyapi','' );
|
171 |
-
$message = __("Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. ");
|
172 |
} else {
|
173 |
-
$message = __("Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</a>! ");
|
174 |
}
|
175 |
if ( $_POST['bitlylogin'] != '' && isset( $_POST['submit'] ) ) {
|
176 |
update_option( 'bitlylogin',$_POST['bitlylogin'] );
|
177 |
-
$message .= __(" Bit.ly User Login Updated.");
|
178 |
} else if ( isset( $_POST['clear'] ) ) {
|
179 |
update_option( 'bitlylogin','' );
|
180 |
-
$message = __("Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. ");
|
181 |
} else {
|
182 |
-
$message = __("Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! ");
|
183 |
}
|
184 |
}
|
185 |
-
|
186 |
// Check whether the server has supported for needed functions.
|
187 |
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'check-support' ) {
|
188 |
update_option('jd-functions-checked', '0');
|
189 |
}
|
190 |
// If you're attempting to solve the "settings page doesn't display" problem, begin your comment here.
|
|
|
191 |
if ( get_option('jd-functions-checked') == '0') {
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
$bitly_checker->fetch( "http://api.bit.ly/shorten?version=2.0.1&longUrl=".$testurl."&login=".$bitlylogin."&apiKey=".$bitlyapi."&history=1" );
|
201 |
-
$twit_checker->fetch( "http://twitter.com/help/test.json" );
|
202 |
$wp_twitter_error = TRUE;
|
203 |
$wp_cligs_error = TRUE;
|
204 |
$wp_bitly_error = TRUE;
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
} else {
|
210 |
-
$message .=__("
|
|
|
211 |
}
|
|
|
212 |
$decoded = json_decode($bitly_checker->results,TRUE);
|
213 |
-
$bitly_decoded = $decoded['statusCode'];
|
|
|
214 |
if ( $bitly_decoded == "OK" ) {
|
215 |
$wp_bitly_error = FALSE;
|
216 |
-
$message .= __("Successfully contacted the Bit.ly API
|
217 |
-
//$message .= "Bit.ly: $bitly_decoded";
|
218 |
-
//$message .= $bitly_decoded;
|
219 |
} else {
|
220 |
-
$message .=__("Failed to contact the Bit.ly API
|
221 |
-
//$message .= "Bit.ly: $bitly_decoded";
|
222 |
-
$message .= "<pre>http://api.bit.ly/shorten?version=2.0.1&longUrl=".$testurl."&login=".$bitlylogin."&apiKey=".$bitlyapi."&history=1</pre>";
|
223 |
-
//echo "<pre>";
|
224 |
-
//print_r($decoded);
|
225 |
-
//echo "</pre>";
|
226 |
}
|
227 |
-
if ( $twit_checker->results == "\"ok\""
|
228 |
$wp_twitter_error = FALSE;
|
229 |
-
$message .= __("Successfully contacted the Twitter API
|
230 |
} else {
|
231 |
-
$message .= __("Failed to contact the Twitter API
|
232 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
// If everything's OK, there's no reason to do this again.
|
234 |
-
if ($wp_twitter_error == FALSE && $wp_cligs_error == FALSE) {
|
235 |
-
$message .= __("Your server
|
236 |
update_option( 'jd-functions-checked','1' );
|
237 |
} else {
|
238 |
if ( !function_exists( 'fputs' ) ) {
|
239 |
$wp_function_error = TRUE;
|
240 |
-
$message .= __("Your server does not support <code>fputs</code
|
241 |
}
|
242 |
if ( !function_exists( 'curl_init' ) || !function_exists( 'file_get_contents' ) ) {
|
243 |
$wp_function_error = TRUE;
|
244 |
-
$message .= __("Your server does not support <code>file_get_contents</code> or <code>cURL</code> functions
|
245 |
}
|
246 |
if ( !class_exists( 'Snoopy' ) ) {
|
247 |
$wp_function_error = TRUE;
|
248 |
-
$message .= __("Your server does not support <code>Snoopy</code
|
249 |
}
|
250 |
-
|
251 |
-
$message .= __("Your server does not appear to support the required PHP functions and classes for WP to Twitter to function
|
252 |
-
|
253 |
-
|
254 |
}
|
255 |
-
}
|
256 |
// CLOSE BUG FIX COMMENT HERE
|
257 |
?>
|
258 |
-
<?php if ( $wp_twitter_error == TRUE || $wp_cligs_error == TRUE ) {
|
259 |
echo "<div class='error'><p>";
|
260 |
-
_e("This plugin may not work in your server environment.");
|
261 |
echo "</p></div>";
|
262 |
}
|
263 |
?>
|
264 |
-
<?php if ($message) { ?>
|
265 |
-
<div id="message" class="updated fade"
|
266 |
<?php } ?>
|
267 |
<div id="dropmessage" class="updated" style="display:none;"></div>
|
268 |
|
269 |
<div class="wrap" id="wp-to-twitter">
|
270 |
|
271 |
-
<h2><?php _e("WP to Twitter Options"); ?></h2>
|
272 |
<p>
|
273 |
-
<?php _e("For any update field, you can use the codes <code>#title#</code> for the title of your blog post, <code>#blog#</code> for the title of your blog,
|
274 |
</p>
|
275 |
|
276 |
<?php if ( get_option( 'wp_twitter_failure' ) == '1' || get_option( 'wp_url_failure' ) == '1' ) { ?>
|
277 |
<div class="error">
|
278 |
<p>
|
279 |
<?php if ( get_option( 'wp_twitter_failure' ) == '1' ) {
|
280 |
-
_e("One or more of your last posts has failed to send it's status update to Twitter. Your Tweet has been saved in the custom meta data for your post, and you can re-Tweet it at your leisure.");
|
281 |
}
|
282 |
if ( get_option( 'wp_url_failure' ) == '1' ) {
|
283 |
-
_e("The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet.");
|
284 |
}
|
285 |
echo $wp_to_twitter_failure;
|
286 |
?>
|
@@ -292,7 +330,7 @@ echo "</p></div>";
|
|
292 |
<div>
|
293 |
<input type="hidden" name="submit-type" value="clear-error" />
|
294 |
</div>
|
295 |
-
<p><input type="submit" name="submit" value="<?php _e("Clear 'WP to Twitter' Error Messages"); ?>" />
|
296 |
</p>
|
297 |
</form>
|
298 |
<?php
|
@@ -304,138 +342,143 @@ echo "</p></div>";
|
|
304 |
|
305 |
<div>
|
306 |
<fieldset>
|
307 |
-
<legend><?php _e("Wordpress to Twitter Publishing Options"); ?></legend>
|
308 |
-
|
309 |
-
<input type="checkbox" name="jd_twit_pages" id="jd_twit_pages" value="1" <?php jd_checkCheckbox('jd_twit_pages')?> />
|
310 |
-
<label for="jd_twit_pages"><strong><?php _e("Update Twitter when new Wordpress Pages are published"); ?></strong></label>
|
311 |
-
</p>
|
312 |
-
<p>
|
313 |
-
<input type="checkbox" name="jd_twit_edited_pages" id="jd_twit_edited_pages" value="1" <?php jd_checkCheckbox('jd_twit_edited_pages')?> />
|
314 |
-
<label for="jd_twit_edited_pages"><strong><?php _e("Update Twitter when WordPress Pages are edited"); ?></strong></label>
|
315 |
-
</p>
|
316 |
<p>
|
317 |
<input type="checkbox" name="newpost-published-update" id="newpost-published-update" value="1" <?php jd_checkCheckbox('newpost-published-update')?> />
|
318 |
-
<label for="newpost-published-update"><strong><?php _e("Update when a post is published"); ?></strong></label> <label for="newpost-published-text"><br /><?php _e("Text for new post updates:"); ?></label> <input type="text" name="newpost-published-text" id="newpost-published-text" size="60" maxlength="120" value="<?php echo( attribute_escape( get_option( 'newpost-published-text' ) ) ) ?>" />
|
319 |
|
320 |
<input type="checkbox" name="newpost-published-showlink" id="newpost-published-showlink" value="1" <?php jd_checkCheckbox('newpost-published-showlink')?> />
|
321 |
-
<label for="newpost-published-showlink"><?php _e("Provide link to blog?"); ?></label>
|
322 |
</p>
|
323 |
|
324 |
<p>
|
325 |
<input type="checkbox" name="oldpost-edited-update" id="oldpost-edited-update" value="1" <?php jd_checkCheckbox('oldpost-edited-update')?> />
|
326 |
-
<label for="oldpost-edited-update"><strong><?php _e("Update when a post is edited"); ?></strong></label><br /><label for="oldpost-edited-text"><?php _e("Text for editing updates:"); ?></label> <input type="text" name="oldpost-edited-text" id="oldpost-edited-text" size="60" maxlength="120" value="<?php echo( attribute_escape( get_option('oldpost-edited-text' ) ) ) ?>" />
|
327 |
|
328 |
<input type="checkbox" name="oldpost-edited-showlink" id="oldpost-edited-showlink" value="1" <?php jd_checkCheckbox('oldpost-edited-showlink')?> />
|
329 |
-
<label for="oldpost-edited-showlink"><?php _e("Provide link to blog?"); ?></label>
|
330 |
-
</p>
|
331 |
<p>
|
332 |
<input type="checkbox" name="use_tags_as_hashtags" id="use_tags_as_hashtags" value="1" <?php jd_checkCheckbox('use_tags_as_hashtags')?> />
|
333 |
-
<label for="use_tags_as_hashtags"><strong><?php _e("Add tags as hashtags on Tweets"); ?></strong></label>
|
|
|
|
|
|
|
|
|
334 |
</p>
|
|
|
|
|
|
|
|
|
335 |
<p>
|
336 |
<input type="checkbox" name="jd_twit_blogroll" id="jd_twit_blogroll" value="1" <?php jd_checkCheckbox('jd_twit_blogroll')?> />
|
337 |
-
<label for="oldpost-edited-update"><strong><?php _e("Update Twitter when you post a Blogroll link"); ?></strong></label><br /><input type="radio" name="jd-use-link-field" id="jd-use-link-title" value="1" <?php jd_checkCheckbox('jd-use-link-title')?> /> <label for="jd-use-link-title"><?php _e("Use <strong>link title</strong> for Twitter updates"); ?></label> <input type="radio" name="jd-use-link-field" id="jd-use-link-description" value="2" <?php jd_checkCheckbox('jd-use-link-description')?> /> <label for="jd-use-link-description"><?php _e("Use <strong>link description</strong> for Twitter updates"); ?></label><br /><label for="newlink-published-text"><?php _e("Text for new link updates (used if title/description isn't available.):"); ?></label> <input type="text" name="newlink-published-text" id="newlink-published-text" size="60" maxlength="120" value="<?php echo ( attribute_escape( get_option( 'newlink-published-text' ) ) ) ?>" />
|
338 |
</p>
|
339 |
|
340 |
<p>
|
341 |
<input type="checkbox" name="jd_tweet_default" id="jd_tweet_default" value="1" <?php jd_checkCheckbox('jd_tweet_default')?> />
|
342 |
-
<label for="jd_tweet_default"><strong><?php _e("Set default Tweet status to 'No.'"); ?></strong></label><br />
|
343 |
-
<small><?php _e("Twitter updates can be set on a post by post basis. By default, posts WILL be posted to Twitter. Check this to change the default to NO."); ?></small>
|
344 |
</p>
|
345 |
<p>
|
346 |
<input type="checkbox" name="jd_twit_remote" id="jd_twit_remote" value="1" <?php jd_checkCheckbox('jd_twit_remote')?> />
|
347 |
-
<label for="jd_twit_remote"><strong><?php _e("Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"); ?></strong></label>
|
348 |
</p>
|
349 |
<p>
|
350 |
<input type="checkbox" name="jd_twit_quickpress" id="jd_twit_quickpress" value="1" <?php jd_checkCheckbox('jd_twit_quickpress')?> />
|
351 |
-
<label for="jd_twit_quickpress"><strong><?php _e("Update Twitter when a post is published using QuickPress"); ?></strong></label>
|
352 |
</p>
|
353 |
|
354 |
<p>
|
355 |
-
<label for="
|
356 |
-
</p>
|
357 |
-
|
|
|
|
|
|
|
|
|
358 |
<p>
|
359 |
-
<label for="jd_twit_append"><?php _e("Custom text appended to Tweets:"); ?></label> <input type="text" name="jd_twit_append" id="jd_twit_append" size="20" maxlength="20" value="<?php echo ( attribute_escape( get_option( 'jd_twit_append' ) ) ) ?>" />
|
360 |
</p>
|
361 |
|
362 |
<p>
|
363 |
-
<label for="jd_twit_custom_url"><?php _e("Custom field for an alternate URL to be shortened and Tweeted:"); ?></label> <input type="text" name="jd_twit_custom_url" id="jd_twit_custom_url" size="40" maxlength="120" value="<?php echo ( attribute_escape( get_option( 'jd_twit_custom_url' ) ) ) ?>" /><br />
|
364 |
-
<small><?php _e("You can use a custom field to send Cli.gs and Twitter an alternate URL from the permalink provided by WordPress. The value is the name of the custom field you're using to add an external URL."); ?></small>
|
365 |
</p>
|
366 |
<p>
|
367 |
<input type="checkbox" name="use-twitter-analytics" id="use-twitter-analytics" value="1" <?php jd_checkCheckbox('use-twitter-analytics')?> />
|
368 |
-
<label for="use-twitter-analytics"><strong><?php _e("Use Google Analytics with WP-to-Twitter"); ?></strong></label><br />
|
369 |
-
<label for="twitter-analytics-campaign"><?php _e("Campaign identifier for Google Analytics:"); ?></label> <input type="text" name="twitter-analytics-campaign" id="twitter-analytics-campaign" size="40" maxlength="120" value="<?php echo ( attribute_escape( get_option( 'twitter-analytics-campaign' ) ) ) ?>" /><br />
|
370 |
-
<small><?php _e("You can track the response from Twitter using Google Analytics by defining a campaign identifier here."); ?></small>
|
371 |
</p>
|
372 |
|
373 |
<p>
|
374 |
<input type="checkbox" name="jd_individual_twitter_users" id="jd_individual_twitter_users" value="1" <?php jd_checkCheckbox('jd_individual_twitter_users')?> />
|
375 |
-
<label for="jd_individual_twitter_users"><strong><?php _e("Authors have individual Twitter accounts"); ?></strong></label><br /><small><?php _e('Each author can set their own Twitter username and password in their user profile. Their posts will be sent to their own Twitter accounts.'); ?></small>
|
376 |
</p>
|
377 |
|
378 |
|
379 |
<p>
|
380 |
-
<input type="radio" name="jd_shortener" id="jd_shortener_cligs" value="1" <?php jd_checkCheckbox('jd-use-cligs')?>/> <label for="jd_shortener_cligs"><?php _e("Use <strong>Cli.gs</strong> for my URL shortener."); ?></label> <input type="radio" name="jd_shortener" id="jd_shortener_bitly" value="2" <?php jd_checkCheckbox('jd-use-bitly')?> /> <label for="jd_shortener_bitly"><?php _e("Use <strong>Bit.ly</strong> for my URL shortener."); ?></label> <input type="radio" name="jd_shortener" id="jd_shortener_none" value="3" <?php jd_checkCheckbox('jd-use-none')?> /> <label for="jd_shortener_none"><?php _e("Don't shorten URLs."); ?></label>
|
381 |
</p>
|
382 |
<div>
|
383 |
<input type="hidden" name="submit-type" value="options" />
|
384 |
</div>
|
385 |
-
<input type="submit" name="submit" value="<?php _e("Save WP->Twitter Options"); ?>" class="button-primary" />
|
386 |
</fieldset>
|
387 |
|
388 |
</div>
|
389 |
</form>
|
390 |
|
391 |
-
<h2 class="twitter"><?php _e("Your Twitter account details"); ?></h2>
|
392 |
|
393 |
<form method="post" action="" >
|
394 |
|
395 |
|
396 |
<div>
|
397 |
<p>
|
398 |
-
<label for="twitterlogin"><?php _e("Your Twitter username:"); ?></label>
|
399 |
<input type="text" name="twitterlogin" id="twitterlogin" value="<?php echo ( attribute_escape( get_option( 'twitterlogin' ) ) ) ?>" />
|
400 |
</p>
|
401 |
<p>
|
402 |
-
<label for="twitterpw"><?php _e("Your Twitter password:"); ?></label>
|
403 |
<input type="password" name="twitterpw" id="twitterpw" value="" />
|
404 |
</p>
|
405 |
<input type="hidden" name="submit-type" value="login" />
|
406 |
-
<p><input type="submit" name="submit" value="<?php _e("Save Twitter Login Info"); ?>" class="button-primary" /> <?php _e("» <small>Don't have a Twitter account? <a href='http://www.twitter.com'>Get one for free here</a>"); ?></small></p>
|
407 |
</div>
|
408 |
</form>
|
409 |
|
410 |
-
<h2 class="cligs"><?php _e("Your Cli.gs account details"); ?></h2>
|
411 |
|
412 |
<form method="post" action="">
|
413 |
|
414 |
|
415 |
<div>
|
416 |
<p>
|
417 |
-
<label for="cligsapi"><?php _e("Your Cli.gs <abbr title='application programming interface'>API</abbr> Key:"); ?></label>
|
418 |
<input type="text" name="cligsapi" id="cligsapi" size="40" value="<?php echo ( attribute_escape( get_option( 'cligsapi' ) ) ) ?>" />
|
419 |
</p>
|
420 |
<div>
|
421 |
<input type="hidden" name="submit-type" value="cligsapi" />
|
422 |
</div>
|
423 |
-
<p><input type="submit" name="submit" value="Save Cli.gs API Key" class="button-primary" /> <input type="submit" name="clear" value="Clear Cli.gs API Key" />» <small><?php _e("Don't have a Cli.gs account or Cligs API key? <a href='http://cli.gs/user/api/'>Get one free here</a>!<br />You'll need an API key in order to associate the Cligs you create with your Cligs account."); ?></small></p>
|
424 |
</div>
|
425 |
</form>
|
426 |
|
427 |
|
428 |
-
<h2 class="bitly"><?php _e("Your Bit.ly account details"); ?></h2>
|
429 |
|
430 |
<form method="post" action="">
|
431 |
|
432 |
<div>
|
433 |
<p>
|
434 |
-
<label for="bitlylogin"><?php _e("Your Bit.ly username:"); ?></label>
|
435 |
<input type="text" name="bitlylogin" id="bitlylogin" value="<?php echo ( attribute_escape( get_option( 'bitlylogin' ) ) ) ?>" />
|
436 |
</p>
|
437 |
<p>
|
438 |
-
<label for="bitlyapi"><?php _e("Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"); ?></label>
|
439 |
<input type="text" name="bitlyapi" id="bitlyapi" size="40" value="<?php echo ( attribute_escape( get_option( 'bitlyapi' ) ) ) ?>" />
|
440 |
</p>
|
441 |
|
@@ -461,7 +504,7 @@ echo "</p></div>";
|
|
461 |
|
462 |
|
463 |
<div class="wrap">
|
464 |
-
<h3><?php _e("Need help?"); ?></h3>
|
465 |
-
<p><?php _e("Visit the <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to Twitter plugin page</a>."); ?></p>
|
466 |
|
467 |
</div>
|
1 |
<?php
|
|
|
2 |
// FUNCTION to see if checkboxes should be checked
|
|
|
3 |
function jd_checkCheckbox( $theFieldname ) {
|
4 |
if( get_option( $theFieldname ) == '1'){
|
5 |
echo 'checked="checked"';
|
9 |
$wp_cligs_error = FALSE;
|
10 |
$message = "";
|
11 |
//SETS DEFAULT OPTIONS
|
12 |
+
if ( get_option( 'twitterInitialised') != '1' ) {
|
13 |
update_option( 'newpost-published-update', '1' );
|
14 |
update_option( 'newpost-published-text', 'New post: #title# (#url#)' );
|
15 |
update_option( 'newpost-published-showlink', '1' );
|
25 |
update_option( 'jd_twit_edited_pages','0' );
|
26 |
|
27 |
update_option( 'jd_twit_remote', '0' );
|
28 |
+
update_option( 'jd_post_excerpt', 30 );
|
29 |
// Use Google Analytics with Twitter
|
30 |
update_option( 'twitter-analytics-campaign', '' );
|
31 |
update_option( 'use-twitter-analytics', '0' );
|
52 |
// Note that default options are set.
|
53 |
update_option( 'twitterInitialised', '1' );
|
54 |
|
55 |
+
$message = __("Set your Twitter login information and URL shortener API information to use this plugin!", 'wp-to-twitter');
|
56 |
+
}
|
57 |
+
if ( get_option( 'twitterInitialised') == '1' && get_option( 'jd_post_excerpt' ) == "" ) {
|
58 |
+
update_option( 'jd_post_excerpt', 30 );
|
59 |
}
|
60 |
+
if ( get_option( 'twitterInitialised') == '1' && get_option( 'twitterpw' ) == "" ) {
|
61 |
+
$message .= __("Please add your Twitter password. ", 'wp-to-twitter');
|
62 |
}
|
63 |
|
64 |
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'clear-error' ) {
|
65 |
update_option( 'wp_twitter_failure','0' );
|
66 |
update_option( 'wp_url_failure','0' );
|
67 |
+
$message = __("WP to Twitter Errors Cleared", 'wp-to-twitter');
|
68 |
}
|
69 |
|
70 |
+
// Error messages on status update or url shortener failures
|
71 |
+
if ( get_option( 'wp_twitter_failure' ) == '1' || get_option( 'wp_url_failure' ) == '1' ) {
|
72 |
+
if ( get_option( 'wp_url_failure' ) == '1' ) {
|
73 |
+
$wp_to_twitter_failure .= "<p>" . __("URL shortener request failed! We couldn't shrink that URL, so we attached the normal URL to your Tweet. Check with your URL shortening provider to see if there are any known issues. [<a href=\"http://blog.cli.gs\">Cli.gs Blog</a>] [<a href=\"http://blog.bit.ly\">Bit.ly Blog</a>]", 'wp-to-twitter') . "</p>";
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( get_option( 'wp_twitter_failure' ) == '1' ) {
|
77 |
+
$wp_to_twitter_failure .= "<p>" . __("Sorry! I couldn't get in touch with the Twitter servers to post your new blog post. Your tweet has been stored in a custom field attached to the post, so you can Tweet it manually if you wish! ", 'wp-to-twitter') . "</p>";
|
78 |
+
} else if ( get_option( 'wp_twitter_failure' ) == '2') {
|
79 |
+
$wp_to_twitter_failure .= "<p>" . __("Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. ", 'wp-to-twitter') . "</p>";
|
80 |
+
}
|
81 |
+
|
82 |
+
} else {
|
83 |
+
$wp_to_twitter_failure = '';
|
84 |
+
}
|
85 |
|
86 |
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'options' ) {
|
87 |
+
// UPDATE OPTIONS
|
88 |
update_option( 'newpost-published-update', $_POST['newpost-published-update'] );
|
89 |
update_option( 'newpost-published-text', $_POST['newpost-published-text'] );
|
90 |
update_option( 'newpost-published-showlink', $_POST['newpost-published-showlink'] );
|
101 |
update_option( 'jd_twit_prepend', $_POST['jd_twit_prepend'] );
|
102 |
update_option( 'jd_twit_append', $_POST['jd_twit_append'] );
|
103 |
update_option( 'jd_shortener', $_POST['jd_shortener'] );
|
104 |
+
update_option( 'jd_post_excerpt', $_POST['jd_post_excerpt'] );
|
105 |
|
106 |
if ( $_POST['jd-use-link-field'] == '2' ) {
|
107 |
update_option( 'jd-use-link-description', '1' );
|
108 |
update_option( 'jd-use-link-title', '0' );
|
|
|
109 |
} else if ( $_POST['jd-use-link-field'] == '1' ) {
|
110 |
update_option( 'jd-use-link-title', '1' );
|
111 |
update_option( 'jd-use-link-description', '0' );
|
112 |
}
|
113 |
+
|
114 |
switch ($_POST['jd_shortener']) {
|
115 |
+
case 1:
|
116 |
+
update_option( 'jd-use-cligs', '1' );
|
117 |
+
update_option( 'jd-use-bitly', '0' );
|
118 |
+
update_option( 'jd-use-none', '0' );
|
119 |
+
break;
|
120 |
+
case 2:
|
121 |
+
update_option( 'jd-use-cligs', '0' );
|
122 |
+
update_option( 'jd-use-bitly', '1' );
|
123 |
+
update_option( 'jd-use-none', '0' );
|
124 |
+
break;
|
125 |
+
case 3:
|
126 |
+
update_option( 'jd-use-cligs', '0' );
|
127 |
+
update_option( 'jd-use-bitly', '0' );
|
128 |
+
update_option( 'jd-use-none', '1' );
|
129 |
+
break;
|
130 |
+
default:
|
131 |
+
update_option( 'jd-use-cligs', '1' );
|
132 |
+
update_option( 'jd-use-bitly', '0' );
|
133 |
+
update_option( 'jd-use-none', '0' );
|
134 |
}
|
135 |
|
136 |
+
if ( get_option( 'jd-use-bitly' ) == 1 && ( get_option( 'bitlylogin' ) == "" || get_option( 'bitlyapi' ) == "" ) ) {
|
137 |
+
$message .= __( 'You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly.' , 'wp-to-twitter');
|
138 |
+
}
|
139 |
+
|
140 |
update_option( 'newlink-published-text', $_POST['newlink-published-text'] );
|
141 |
update_option( 'jd_twit_blogroll',$_POST['jd_twit_blogroll'] );
|
142 |
|
145 |
|
146 |
update_option( 'jd_individual_twitter_users', $_POST['jd_individual_twitter_users'] );
|
147 |
|
148 |
+
$message = __( 'WP to Twitter Options Updated' , 'wp-to-twitter');
|
149 |
|
150 |
+
}
|
151 |
+
|
152 |
+
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'login' ) {
|
153 |
//UPDATE LOGIN
|
154 |
if( ( $_POST['twitterlogin'] != '' ) && ( $_POST['twitterpw'] != '' ) ) {
|
155 |
update_option( 'twitterlogin', $_POST['twitterlogin'] );
|
156 |
update_option( 'twitterpw', $_POST['twitterpw'] );
|
157 |
update_option( 'twitterlogin_encrypted', base64_encode( $_POST['twitterlogin'].':'.$_POST['twitterpw'] ) );
|
158 |
+
$message = __("Twitter login and password updated. ", 'wp-to-twitter');
|
159 |
} else {
|
160 |
+
$message = __("You need to provide your twitter login and password! ", 'wp-to-twitter');
|
161 |
}
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'cligsapi' ) {
|
165 |
if ( $_POST['cligsapi'] != '' && isset( $_POST['submit'] ) ) {
|
166 |
update_option( 'cligsapi',$_POST['cligsapi'] );
|
167 |
+
$message = __("Cligs API Key Updated", 'wp-to-twitter');
|
168 |
} else if ( isset( $_POST['clear'] ) ) {
|
169 |
update_option( 'cligsapi','' );
|
170 |
+
$message = __("Cli.gs API Key deleted. Cli.gs created by WP to Twitter will no longer be associated with your account. ", 'wp-to-twitter');
|
171 |
} else {
|
172 |
+
$message = __("Cli.gs API Key not added - <a href='http://cli.gs/user/api/'>get one here</a>! ", 'wp-to-twitter');
|
173 |
}
|
174 |
+
}
|
175 |
+
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'bitlyapi' ) {
|
176 |
if ( $_POST['bitlyapi'] != '' && isset( $_POST['submit'] ) ) {
|
177 |
update_option( 'bitlyapi',trim($_POST['bitlyapi']) );
|
178 |
+
$message = __("Bit.ly API Key Updated.", 'wp-to-twitter');
|
179 |
} else if ( isset( $_POST['clear'] ) ) {
|
180 |
update_option( 'bitlyapi','' );
|
181 |
+
$message = __("Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. ", 'wp-to-twitter');
|
182 |
} else {
|
183 |
+
$message = __("Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</a>! ", 'wp-to-twitter');
|
184 |
}
|
185 |
if ( $_POST['bitlylogin'] != '' && isset( $_POST['submit'] ) ) {
|
186 |
update_option( 'bitlylogin',$_POST['bitlylogin'] );
|
187 |
+
$message .= __(" Bit.ly User Login Updated.", 'wp-to-twitter');
|
188 |
} else if ( isset( $_POST['clear'] ) ) {
|
189 |
update_option( 'bitlylogin','' );
|
190 |
+
$message = __("Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. ", 'wp-to-twitter');
|
191 |
} else {
|
192 |
+
$message = __("Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! ", 'wp-to-twitter');
|
193 |
}
|
194 |
}
|
195 |
+
///*
|
196 |
// Check whether the server has supported for needed functions.
|
197 |
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'check-support' ) {
|
198 |
update_option('jd-functions-checked', '0');
|
199 |
}
|
200 |
// If you're attempting to solve the "settings page doesn't display" problem, begin your comment here.
|
201 |
+
|
202 |
if ( get_option('jd-functions-checked') == '0') {
|
203 |
+
$message = "<ul>";
|
204 |
+
if ( class_exists( 'Snoopy' ) ) {
|
205 |
+
$cligs_checker = new Snoopy;
|
206 |
+
$twit_checker = new Snoopy;
|
207 |
+
$bitly_checker = new Snoopy;
|
208 |
+
$run_Snoopy_test = TRUE;
|
209 |
+
}
|
210 |
+
// grab or set necessary variables
|
|
|
|
|
211 |
$wp_twitter_error = TRUE;
|
212 |
$wp_cligs_error = TRUE;
|
213 |
$wp_bitly_error = TRUE;
|
214 |
+
$testurl = urlencode("http://www.joedolson.com/articles/wp-to-twitter/");
|
215 |
+
$bitlylogin = get_option( 'bitlylogin' );
|
216 |
+
$bitlyapi = get_option( 'bitlyapi' );
|
217 |
+
|
218 |
+
if ( $run_Snoopy_test == TRUE ) {
|
219 |
+
$cligs_checker->fetchtext( "http://cli.gs/api/v1/cligs/create?url=$testurl&appid=WP-to-Twitter&key=" );
|
220 |
+
$bitly_checker->fetch( "http://api.bit.ly/shorten?version=2.0.1&longUrl=".$testurl."&login=".$bitlylogin."&apiKey=".$bitlyapi."&history=1" );
|
221 |
+
$twit_checker->fetch( "http://twitter.com/help/test.json" );
|
222 |
+
|
223 |
+
if ( trim($cligs_checker->results) == "Please specify a valid URL to shorten.") {
|
224 |
+
$message .= __("<li>Successfully contacted the Cli.gs API via Snoopy, but the URL creation failed.</li>", 'wp-to-twitter');
|
225 |
+
} elseif ( trim($cligs_checker->results) == "There was a server problem creating the clig." ) {
|
226 |
+
$message .= __("<li>Successfully contacted the Cli.gs API via Snoopy, but a Cli.gs server error prevented the URL from being shrotened.</li>", 'wp-to-twitter');
|
227 |
} else {
|
228 |
+
$message .=__("<li>Successfully contacted the Cli.gs API via Snoopy and created a shortened link.</li>", 'wp-to-twitter');
|
229 |
+
$wp_cligs_error = FALSE;
|
230 |
}
|
231 |
+
|
232 |
$decoded = json_decode($bitly_checker->results,TRUE);
|
233 |
+
$bitly_decoded = $decoded['statusCode'];
|
234 |
+
|
235 |
if ( $bitly_decoded == "OK" ) {
|
236 |
$wp_bitly_error = FALSE;
|
237 |
+
$message .= __("<li>Successfully contacted the Bit.ly API via Snoopy.</li>", 'wp-to-twitter');
|
|
|
|
|
238 |
} else {
|
239 |
+
$message .=__("<li>Failed to contact the Bit.ly API via Snoopy.</li>", 'wp-to-twitter');
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
241 |
+
if ( $twit_checker->results == "\"ok\"" ) {
|
242 |
$wp_twitter_error = FALSE;
|
243 |
+
$message .= __("<li>Successfully contacted the Twitter API via Snoopy.</li>", 'wp-to-twitter');
|
244 |
} else {
|
245 |
+
$message .= __("<li>Failed to contact the Twitter API via Snoopy.</li>", 'wp-to-twitter');
|
246 |
}
|
247 |
+
} else {
|
248 |
+
// check non-snoopy methods
|
249 |
+
if ( getfilefromurl("http://twitter.com/help/test.xml") == "<ok>true</ok>" ) {
|
250 |
+
$wp_twitter_error = FALSE;
|
251 |
+
$message .= __("<li>Successfully contacted the Twitter API via cURL.</li>", 'wp-to-twitter');
|
252 |
+
} else {
|
253 |
+
$message .= __("<li>Failed to contact the Twitter API via cURL.</li>", 'wp-to-twitter');
|
254 |
+
}
|
255 |
+
$decoded = json_decode( getfilefromurl( "http://api.bit.ly/shorten?version=2.0.1&longUrl=".$testurl."&login=".$bitlylogin."&apiKey=".$bitlyapi."&history=1") );
|
256 |
+
$bitly_decoded = $decoded['statusCode'];
|
257 |
+
if ( $bitly_decoded == "OK" ) {
|
258 |
+
$wp_bitly_error = FALSE;
|
259 |
+
$message .= __("<li>Successfully contacted the Bit.ly API via Snoopy.</li>", 'wp-to-twitter');
|
260 |
+
} else {
|
261 |
+
$message .=__("<li>Failed to contact the Bit.ly API via Snoopy.</li>", 'wp-to-twitter');
|
262 |
+
}
|
263 |
+
if ( strlen(getfilefromurl("http://cli.gs/api/v2/cligs/create?url=$testurl&appid=WP-to-Twitter&key=&output=&test=1")) == 20 ) {
|
264 |
+
$wp_cligs_error = FALSE;
|
265 |
+
$message .= __("<li>Successfully contacted the Cli.gs API via Snoopy.</li>", 'wp-to-twitter');
|
266 |
+
//$message .= "Twit: " . $twit_checker->results;
|
267 |
+
} else {
|
268 |
+
$message .=__("<li>Failed to contact the Cli.gs API via Snoopy.</li>", 'wp-to-twitter');
|
269 |
+
}
|
270 |
+
}
|
271 |
// If everything's OK, there's no reason to do this again.
|
272 |
+
if ($wp_twitter_error == FALSE && ($wp_cligs_error == FALSE || $wp_bitly_error == FALSE) ) {
|
273 |
+
$message .= __("<li><strong>Your server should run WP to Twitter successfully.</strong></li>", 'wp-to-twitter');
|
274 |
update_option( 'jd-functions-checked','1' );
|
275 |
} else {
|
276 |
if ( !function_exists( 'fputs' ) ) {
|
277 |
$wp_function_error = TRUE;
|
278 |
+
$message .= __("<li>Your server does not support <code>fputs</code>.</li>", 'wp-to-twitter');
|
279 |
}
|
280 |
if ( !function_exists( 'curl_init' ) || !function_exists( 'file_get_contents' ) ) {
|
281 |
$wp_function_error = TRUE;
|
282 |
+
$message .= __("<li>Your server does not support <code>file_get_contents</code> or <code>cURL</code> functions.</li>", 'wp-to-twitter');
|
283 |
}
|
284 |
if ( !class_exists( 'Snoopy' ) ) {
|
285 |
$wp_function_error = TRUE;
|
286 |
+
$message .= __("<li>Your server does not support <code>Snoopy</code>.</li>", 'wp-to-twitter');
|
287 |
}
|
288 |
+
|
289 |
+
$message .= __("<li><strong>Your server does not appear to support the required PHP functions and classes for WP to Twitter to function.</strong> You can try it anyway - these tests aren't perfect - but no guarantees.</li>", 'wp-to-twitter');
|
290 |
+
$message .= "</ul>";
|
291 |
+
update_option( 'jd-functions-checked','1' );
|
292 |
}
|
293 |
+
}
|
294 |
// CLOSE BUG FIX COMMENT HERE
|
295 |
?>
|
296 |
+
<?php if ( $wp_twitter_error == TRUE || ( $wp_cligs_error == TRUE && $wp_bitly_error == TRUE ) ) {
|
297 |
echo "<div class='error'><p>";
|
298 |
+
_e("This plugin may not work in your server environment.", 'wp-to-twitter');
|
299 |
echo "</p></div>";
|
300 |
}
|
301 |
?>
|
302 |
+
<?php if ( $message ) { ?>
|
303 |
+
<div id="message" class="updated fade"><?php echo $message; ?></div>
|
304 |
<?php } ?>
|
305 |
<div id="dropmessage" class="updated" style="display:none;"></div>
|
306 |
|
307 |
<div class="wrap" id="wp-to-twitter">
|
308 |
|
309 |
+
<h2><?php _e("WP to Twitter Options", 'wp-to-twitter'); ?></h2>
|
310 |
<p>
|
311 |
+
<?php _e("For any update field, you can use the codes <code>#title#</code> for the title of your blog post, <code>#blog#</code> for the title of your blog, <code>#post#</code> for a short excerpt of the post content or <code>#url#</code> for the post URL (shortened or not, depending on your preferences.)", 'wp-to-twitter'); ?>
|
312 |
</p>
|
313 |
|
314 |
<?php if ( get_option( 'wp_twitter_failure' ) == '1' || get_option( 'wp_url_failure' ) == '1' ) { ?>
|
315 |
<div class="error">
|
316 |
<p>
|
317 |
<?php if ( get_option( 'wp_twitter_failure' ) == '1' ) {
|
318 |
+
_e("One or more of your last posts has failed to send it's status update to Twitter. Your Tweet has been saved in the custom meta data for your post, and you can re-Tweet it at your leisure.", 'wp-to-twitter');
|
319 |
}
|
320 |
if ( get_option( 'wp_url_failure' ) == '1' ) {
|
321 |
+
_e("The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet.", 'wp-to-twitter');
|
322 |
}
|
323 |
echo $wp_to_twitter_failure;
|
324 |
?>
|
330 |
<div>
|
331 |
<input type="hidden" name="submit-type" value="clear-error" />
|
332 |
</div>
|
333 |
+
<p><input type="submit" name="submit" value="<?php _e("Clear 'WP to Twitter' Error Messages", 'wp-to-twitter'); ?>" />
|
334 |
</p>
|
335 |
</form>
|
336 |
<?php
|
342 |
|
343 |
<div>
|
344 |
<fieldset>
|
345 |
+
<legend><?php _e("Wordpress to Twitter Publishing Options", 'wp-to-twitter'); ?></legend>
|
346 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
<p>
|
348 |
<input type="checkbox" name="newpost-published-update" id="newpost-published-update" value="1" <?php jd_checkCheckbox('newpost-published-update')?> />
|
349 |
+
<label for="newpost-published-update"><strong><?php _e("Update when a post is published", 'wp-to-twitter'); ?></strong></label> <label for="newpost-published-text"><br /><?php _e("Text for new post updates:", 'wp-to-twitter'); ?></label> <input type="text" name="newpost-published-text" id="newpost-published-text" size="60" maxlength="120" value="<?php echo( attribute_escape( get_option( 'newpost-published-text' ) ) ) ?>" />
|
350 |
|
351 |
<input type="checkbox" name="newpost-published-showlink" id="newpost-published-showlink" value="1" <?php jd_checkCheckbox('newpost-published-showlink')?> />
|
352 |
+
<label for="newpost-published-showlink"><?php _e("Provide link to blog?", 'wp-to-twitter'); ?></label>
|
353 |
</p>
|
354 |
|
355 |
<p>
|
356 |
<input type="checkbox" name="oldpost-edited-update" id="oldpost-edited-update" value="1" <?php jd_checkCheckbox('oldpost-edited-update')?> />
|
357 |
+
<label for="oldpost-edited-update"><strong><?php _e("Update when a post is edited", 'wp-to-twitter'); ?></strong></label><br /><label for="oldpost-edited-text"><?php _e("Text for editing updates:", 'wp-to-twitter'); ?></label> <input type="text" name="oldpost-edited-text" id="oldpost-edited-text" size="60" maxlength="120" value="<?php echo( attribute_escape( get_option('oldpost-edited-text' ) ) ) ?>" />
|
358 |
|
359 |
<input type="checkbox" name="oldpost-edited-showlink" id="oldpost-edited-showlink" value="1" <?php jd_checkCheckbox('oldpost-edited-showlink')?> />
|
360 |
+
<label for="oldpost-edited-showlink"><?php _e("Provide link to blog?", 'wp-to-twitter'); ?></label>
|
361 |
+
</p>
|
362 |
<p>
|
363 |
<input type="checkbox" name="use_tags_as_hashtags" id="use_tags_as_hashtags" value="1" <?php jd_checkCheckbox('use_tags_as_hashtags')?> />
|
364 |
+
<label for="use_tags_as_hashtags"><strong><?php _e("Add tags as hashtags on Tweets", 'wp-to-twitter'); ?></strong></label>
|
365 |
+
</p>
|
366 |
+
<p>
|
367 |
+
<input type="checkbox" name="jd_twit_pages" id="jd_twit_pages" value="1" <?php jd_checkCheckbox('jd_twit_pages')?> />
|
368 |
+
<label for="jd_twit_pages"><strong><?php _e("Update Twitter when new Wordpress Pages are published", 'wp-to-twitter'); ?></strong></label>
|
369 |
</p>
|
370 |
+
<p>
|
371 |
+
<input type="checkbox" name="jd_twit_edited_pages" id="jd_twit_edited_pages" value="1" <?php jd_checkCheckbox('jd_twit_edited_pages')?> />
|
372 |
+
<label for="jd_twit_edited_pages"><strong><?php _e("Update Twitter when WordPress Pages are edited", 'wp-to-twitter'); ?></strong></label>
|
373 |
+
</p>
|
374 |
<p>
|
375 |
<input type="checkbox" name="jd_twit_blogroll" id="jd_twit_blogroll" value="1" <?php jd_checkCheckbox('jd_twit_blogroll')?> />
|
376 |
+
<label for="oldpost-edited-update"><strong><?php _e("Update Twitter when you post a Blogroll link", 'wp-to-twitter'); ?></strong></label><br /><input type="radio" name="jd-use-link-field" id="jd-use-link-title" value="1" <?php jd_checkCheckbox('jd-use-link-title')?> /> <label for="jd-use-link-title"><?php _e("Use <strong>link title</strong> for Twitter updates", 'wp-to-twitter'); ?></label> <input type="radio" name="jd-use-link-field" id="jd-use-link-description" value="2" <?php jd_checkCheckbox('jd-use-link-description')?> /> <label for="jd-use-link-description"><?php _e("Use <strong>link description</strong> for Twitter updates", 'wp-to-twitter'); ?></label><br /><label for="newlink-published-text"><?php _e("Text for new link updates (used if title/description isn't available.):", 'wp-to-twitter'); ?></label> <input type="text" name="newlink-published-text" id="newlink-published-text" size="60" maxlength="120" value="<?php echo ( attribute_escape( get_option( 'newlink-published-text' ) ) ) ?>" />
|
377 |
</p>
|
378 |
|
379 |
<p>
|
380 |
<input type="checkbox" name="jd_tweet_default" id="jd_tweet_default" value="1" <?php jd_checkCheckbox('jd_tweet_default')?> />
|
381 |
+
<label for="jd_tweet_default"><strong><?php _e("Set default Tweet status to 'No.'", 'wp-to-twitter'); ?></strong></label><br />
|
382 |
+
<small><?php _e("Twitter updates can be set on a post by post basis. By default, posts WILL be posted to Twitter. Check this to change the default to NO.", 'wp-to-twitter'); ?></small>
|
383 |
</p>
|
384 |
<p>
|
385 |
<input type="checkbox" name="jd_twit_remote" id="jd_twit_remote" value="1" <?php jd_checkCheckbox('jd_twit_remote')?> />
|
386 |
+
<label for="jd_twit_remote"><strong><?php _e("Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)", 'wp-to-twitter'); ?></strong></label>
|
387 |
</p>
|
388 |
<p>
|
389 |
<input type="checkbox" name="jd_twit_quickpress" id="jd_twit_quickpress" value="1" <?php jd_checkCheckbox('jd_twit_quickpress')?> />
|
390 |
+
<label for="jd_twit_quickpress"><strong><?php _e("Update Twitter when a post is published using QuickPress", 'wp-to-twitter'); ?></strong></label>
|
391 |
</p>
|
392 |
|
393 |
<p>
|
394 |
+
<label for="jd_post_excerpt"><?php _e("Length of post excerpt (in characters):", 'wp-to-twitter'); ?></label> <input type="text" name="jd_post_excerpt" id="jd_post_excerpt" size="3" maxlength="3" value="<?php echo ( attribute_escape( get_option( 'jd_post_excerpt' ) ) ) ?>" /> <small><?php _e("By default, extracted from the post itself. If you use the 'Excerpt' field, that will be used instead.", 'wp-to-twitter'); ?></small>
|
395 |
+
</p>
|
396 |
+
|
397 |
+
<p>
|
398 |
+
<label for="jd_twit_prepend"><?php _e("Custom text prepended to Tweets:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_twit_prepend" id="jd_twit_prepend" size="20" maxlength="20" value="<?php echo ( attribute_escape( get_option( 'jd_twit_prepend' ) ) ) ?>" />
|
399 |
+
</p>
|
400 |
+
|
401 |
<p>
|
402 |
+
<label for="jd_twit_append"><?php _e("Custom text appended to Tweets:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_twit_append" id="jd_twit_append" size="20" maxlength="20" value="<?php echo ( attribute_escape( get_option( 'jd_twit_append' ) ) ) ?>" />
|
403 |
</p>
|
404 |
|
405 |
<p>
|
406 |
+
<label for="jd_twit_custom_url"><?php _e("Custom field for an alternate URL to be shortened and Tweeted:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_twit_custom_url" id="jd_twit_custom_url" size="40" maxlength="120" value="<?php echo ( attribute_escape( get_option( 'jd_twit_custom_url' ) ) ) ?>" /><br />
|
407 |
+
<small><?php _e("You can use a custom field to send Cli.gs and Twitter an alternate URL from the permalink provided by WordPress. The value is the name of the custom field you're using to add an external URL.", 'wp-to-twitter'); ?></small>
|
408 |
</p>
|
409 |
<p>
|
410 |
<input type="checkbox" name="use-twitter-analytics" id="use-twitter-analytics" value="1" <?php jd_checkCheckbox('use-twitter-analytics')?> />
|
411 |
+
<label for="use-twitter-analytics"><strong><?php _e("Use Google Analytics with WP-to-Twitter", 'wp-to-twitter'); ?></strong></label><br />
|
412 |
+
<label for="twitter-analytics-campaign"><?php _e("Campaign identifier for Google Analytics:", 'wp-to-twitter'); ?></label> <input type="text" name="twitter-analytics-campaign" id="twitter-analytics-campaign" size="40" maxlength="120" value="<?php echo ( attribute_escape( get_option( 'twitter-analytics-campaign' ) ) ) ?>" /><br />
|
413 |
+
<small><?php _e("You can track the response from Twitter using Google Analytics by defining a campaign identifier here.", 'wp-to-twitter'); ?></small>
|
414 |
</p>
|
415 |
|
416 |
<p>
|
417 |
<input type="checkbox" name="jd_individual_twitter_users" id="jd_individual_twitter_users" value="1" <?php jd_checkCheckbox('jd_individual_twitter_users')?> />
|
418 |
+
<label for="jd_individual_twitter_users"><strong><?php _e("Authors have individual Twitter accounts", 'wp-to-twitter'); ?></strong></label><br /><small><?php _e('Each author can set their own Twitter username and password in their user profile. Their posts will be sent to their own Twitter accounts.', 'wp-to-twitter'); ?></small>
|
419 |
</p>
|
420 |
|
421 |
|
422 |
<p>
|
423 |
+
<input type="radio" name="jd_shortener" id="jd_shortener_cligs" value="1" <?php jd_checkCheckbox('jd-use-cligs')?>/> <label for="jd_shortener_cligs"><?php _e("Use <strong>Cli.gs</strong> for my URL shortener.", 'wp-to-twitter'); ?></label> <input type="radio" name="jd_shortener" id="jd_shortener_bitly" value="2" <?php jd_checkCheckbox('jd-use-bitly')?> /> <label for="jd_shortener_bitly"><?php _e("Use <strong>Bit.ly</strong> for my URL shortener.", 'wp-to-twitter'); ?></label> <input type="radio" name="jd_shortener" id="jd_shortener_none" value="3" <?php jd_checkCheckbox('jd-use-none')?> /> <label for="jd_shortener_none"><?php _e("Don't shorten URLs.", 'wp-to-twitter'); ?></label>
|
424 |
</p>
|
425 |
<div>
|
426 |
<input type="hidden" name="submit-type" value="options" />
|
427 |
</div>
|
428 |
+
<input type="submit" name="submit" value="<?php _e("Save WP->Twitter Options", 'wp-to-twitter'); ?>" class="button-primary" />
|
429 |
</fieldset>
|
430 |
|
431 |
</div>
|
432 |
</form>
|
433 |
|
434 |
+
<h2 class="twitter"><?php _e("Your Twitter account details", 'wp-to-twitter'); ?></h2>
|
435 |
|
436 |
<form method="post" action="" >
|
437 |
|
438 |
|
439 |
<div>
|
440 |
<p>
|
441 |
+
<label for="twitterlogin"><?php _e("Your Twitter username:", 'wp-to-twitter'); ?></label>
|
442 |
<input type="text" name="twitterlogin" id="twitterlogin" value="<?php echo ( attribute_escape( get_option( 'twitterlogin' ) ) ) ?>" />
|
443 |
</p>
|
444 |
<p>
|
445 |
+
<label for="twitterpw"><?php _e("Your Twitter password:", 'wp-to-twitter'); ?><?php if ( get_option( 'twitterpw' ) != "" ) { _e('(<em>Saved</em>)' , 'wp-to-twitter'); } ?></label>
|
446 |
<input type="password" name="twitterpw" id="twitterpw" value="" />
|
447 |
</p>
|
448 |
<input type="hidden" name="submit-type" value="login" />
|
449 |
+
<p><input type="submit" name="submit" value="<?php _e("Save Twitter Login Info", 'wp-to-twitter'); ?>" class="button-primary" /> <?php _e("» <small>Don't have a Twitter account? <a href='http://www.twitter.com'>Get one for free here</a>", 'wp-to-twitter'); ?></small></p>
|
450 |
</div>
|
451 |
</form>
|
452 |
|
453 |
+
<h2 class="cligs"><?php _e("Your Cli.gs account details", 'wp-to-twitter'); ?></h2>
|
454 |
|
455 |
<form method="post" action="">
|
456 |
|
457 |
|
458 |
<div>
|
459 |
<p>
|
460 |
+
<label for="cligsapi"><?php _e("Your Cli.gs <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label>
|
461 |
<input type="text" name="cligsapi" id="cligsapi" size="40" value="<?php echo ( attribute_escape( get_option( 'cligsapi' ) ) ) ?>" />
|
462 |
</p>
|
463 |
<div>
|
464 |
<input type="hidden" name="submit-type" value="cligsapi" />
|
465 |
</div>
|
466 |
+
<p><input type="submit" name="submit" value="Save Cli.gs API Key" class="button-primary" /> <input type="submit" name="clear" value="Clear Cli.gs API Key" />» <small><?php _e("Don't have a Cli.gs account or Cligs API key? <a href='http://cli.gs/user/api/'>Get one free here</a>!<br />You'll need an API key in order to associate the Cligs you create with your Cligs account.", 'wp-to-twitter'); ?></small></p>
|
467 |
</div>
|
468 |
</form>
|
469 |
|
470 |
|
471 |
+
<h2 class="bitly"><?php _e("Your Bit.ly account details", 'wp-to-twitter'); ?></h2>
|
472 |
|
473 |
<form method="post" action="">
|
474 |
|
475 |
<div>
|
476 |
<p>
|
477 |
+
<label for="bitlylogin"><?php _e("Your Bit.ly username:", 'wp-to-twitter'); ?></label>
|
478 |
<input type="text" name="bitlylogin" id="bitlylogin" value="<?php echo ( attribute_escape( get_option( 'bitlylogin' ) ) ) ?>" />
|
479 |
</p>
|
480 |
<p>
|
481 |
+
<label for="bitlyapi"><?php _e("Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label>
|
482 |
<input type="text" name="bitlyapi" id="bitlyapi" size="40" value="<?php echo ( attribute_escape( get_option( 'bitlyapi' ) ) ) ?>" />
|
483 |
</p>
|
484 |
|
504 |
|
505 |
|
506 |
<div class="wrap">
|
507 |
+
<h3><?php _e("Need help?", 'wp-to-twitter'); ?></h3>
|
508 |
+
<p><?php _e("Visit the <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to Twitter plugin page</a>.", 'wp-to-twitter'); ?></p>
|
509 |
|
510 |
</div>
|
wp-to-twitter.jpg
ADDED
Binary file
|
wp-to-twitter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP to Twitter
|
4 |
Plugin URI: http://www.joedolson.com/articles/wp-to-twitter/
|
5 |
Description: Updates Twitter when you create a new blog post or add to your blogroll using Cli.gs. With a Cli.gs API key, creates a clig in your Cli.gs account with the name of your post as the title.
|
6 |
-
Version: 1.4.
|
7 |
Author: Joseph Dolson
|
8 |
Author URI: http://www.joedolson.com/
|
9 |
*/
|
@@ -28,19 +28,47 @@ Author URI: http://www.joedolson.com/
|
|
28 |
|
29 |
global $wp_version,$version,$jd_plugin_url;
|
30 |
|
|
|
|
|
|
|
|
|
31 |
define('JDWP_API_POST_STATUS', 'http://twitter.com/statuses/update.json');
|
32 |
|
33 |
-
$version = "1.4.
|
34 |
$jd_plugin_url = "http://www.joedolson.com/articles/wp-to-twitter/";
|
35 |
|
|
|
|
|
|
|
36 |
require_once( ABSPATH.WPINC.'/class-snoopy.php' );
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
$exit_msg='WP to Twitter requires WordPress 2.5 or a more recent version. <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update your WordPress version!</a>';
|
39 |
|
40 |
if ( version_compare( $wp_version,"2.5","<" )) {
|
41 |
exit ($exit_msg);
|
42 |
}
|
43 |
-
|
44 |
// Function checks for an alternate URL to be tweeted. Contribution by Bill Berry.
|
45 |
function external_or_permalink( $post_ID ) {
|
46 |
$wtb_extlink_custom_field = get_option('jd_twit_custom_url');
|
@@ -48,6 +76,39 @@ function external_or_permalink( $post_ID ) {
|
|
48 |
$ex_link = get_post_meta($post_ID, $wtb_extlink_custom_field, true);
|
49 |
return ( $ex_link ) ? $ex_link : $perma_link;
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
// This function used to perform the API post to Twitter and now serves as a fallback.
|
53 |
function jd_old_doTwitterAPIPost( $twit, $authID=FALSE, $twitterURI="/statuses/update.xml" ) {
|
@@ -78,7 +139,7 @@ function jd_old_doTwitterAPIPost( $twit, $authID=FALSE, $twitterURI="/statuses/u
|
|
78 |
fputs( $fp, "User-Agent: ".$agent."\n" );
|
79 |
fputs( $fp, "Host: $host\n" );
|
80 |
fputs( $fp, "Content-type: application/x-www-form-urlencoded\n" );
|
81 |
-
fputs( $fp, "Content-length: ".
|
82 |
fputs( $fp, "Connection: close\n\n" );
|
83 |
fputs( $fp, $twit );
|
84 |
for ( $i = 1; $i < 10; $i++ ) {
|
@@ -153,6 +214,7 @@ function jd_doTwitterAPIPost( $twit, $authID=FALSE ) {
|
|
153 |
|
154 |
// cURL query contributed by Thor Erik (http://thorerik.net)
|
155 |
function getfilefromurl($url) {
|
|
|
156 |
$ch = curl_init();
|
157 |
curl_setopt( $ch, CURLOPT_HEADER, 0 );
|
158 |
curl_setopt( $ch, CURLOPT_VERBOSE, 0 );
|
@@ -161,9 +223,22 @@ function getfilefromurl($url) {
|
|
161 |
$output = curl_exec( $ch );
|
162 |
curl_close( $ch );
|
163 |
return $output;
|
|
|
|
|
|
|
164 |
}
|
165 |
|
166 |
-
function jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $authID=FALSE ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
if ( get_usermeta( $authID, 'wp-to-twitter-enable-user' ) == 'userAtTwitter' ) {
|
169 |
$at_append = "@" . get_option('twitterlogin');
|
@@ -179,25 +254,39 @@ $at_append = "";
|
|
179 |
if ( get_option( 'jd_twit_append' ) != "" ) {
|
180 |
$sentence = $sentence . " " . get_option( 'jd_twit_append' );
|
181 |
}
|
182 |
-
|
183 |
-
$
|
184 |
-
|
185 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
if ( ( ( $twit_length + $title_length ) - 7 ) < 140 ) {
|
187 |
$sentence = str_ireplace( '#title#', $thisposttitle, $sentence );
|
188 |
-
$twit_length =
|
|
|
189 |
} else {
|
190 |
-
$thisposttitle =
|
191 |
$sentence = str_ireplace ( '#title#', $thisposttitle, $sentence );
|
192 |
-
$twit_length =
|
193 |
}
|
194 |
if ( ( ( $twit_length + $blog_length ) - 6 ) < 140 ) {
|
195 |
$sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence );
|
196 |
-
$twit_length =
|
197 |
} else {
|
198 |
-
$thisblogtitle =
|
199 |
$sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence );
|
200 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
return $sentence;
|
202 |
}
|
203 |
|
@@ -218,6 +307,7 @@ function jd_shorten_link( $thispostlink, $thisposttitle ) {
|
|
218 |
}
|
219 |
$thispostlink .= urlencode("utm_campaign=$this_campaign&utm_medium=twitter&utm_source=twitter");
|
220 |
}
|
|
|
221 |
// Generate and grab the clig using the Cli.gs API
|
222 |
// cURL alternative contributed by Thor Erik (http://thorerik.net)
|
223 |
switch ( get_option( 'jd_shortener' ) ) {
|
@@ -226,7 +316,7 @@ function jd_shorten_link( $thispostlink, $thisposttitle ) {
|
|
226 |
if ( $snoopy->fetchtext( "http://cli.gs/api/v1/cligs/create?t=snoopy&appid=WP-to-Twitter&url=".$thispostlink."&title=".$thisposttitle."&key=".$cligsapi ) ) {
|
227 |
$shrink = trim($snoopy->results);
|
228 |
} else {
|
229 |
-
$shrink = @file_get_contents( "http://cli.gs/api/v1/cligs/create?t=fgc&appid=WP-to-Twitter&url=".$thispostlink."&title=".$thisposttitle."&key=".$cligsapi);
|
230 |
}
|
231 |
if ( $shrink === FALSE ) {
|
232 |
$shrink = getfilefromurl( "http://cli.gs/api/v1/cligs/create?t=gffu&appid=WP-to-Twitter&url=".$thispostlink."&title=".$thisposttitle."&key=".$cligsapi);
|
@@ -256,13 +346,28 @@ function jd_shorten_link( $thispostlink, $thisposttitle ) {
|
|
256 |
return $shrink;
|
257 |
}
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
-
|
261 |
-
|
262 |
$jd_tweet_this = get_post_meta( $post_ID, 'jd_tweet_this', TRUE);
|
263 |
if ( $jd_tweet_this == "yes" ) {
|
264 |
$get_post_info = get_post( $post_ID );
|
265 |
$authID = $get_post_info->post_author;
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
$thisposttitle = urlencode( stripcslashes( strip_tags( $_POST['post_title'] ) ) );
|
267 |
if ($thisposttitle == "") {
|
268 |
$thisposttitle = urlencode( stripcslashes( strip_tags( $_POST['title'] ) ) );
|
@@ -273,7 +378,7 @@ function jd_twit( $post_ID ) {
|
|
273 |
$sentence = '';
|
274 |
$customTweet = stripcslashes( $_POST['jd_twitter'] );
|
275 |
$oldClig = get_post_meta( $post_ID, 'wp_jd_clig', TRUE );
|
276 |
-
if (
|
277 |
// publish new post
|
278 |
if ( get_option( 'newpost-published-update' ) == '1' ) {
|
279 |
$sentence = stripcslashes( get_option( 'newpost-published-text' ) );
|
@@ -302,18 +407,18 @@ if (($get_post_info->post_status == 'publish' || $_POST['publish'] == 'Publish')
|
|
302 |
$sentence = $customTweet;
|
303 |
}
|
304 |
}
|
305 |
-
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $authID );
|
306 |
// Stores the posts CLIG in a custom field for later use as needed.
|
307 |
store_url( $post_ID, $shrink );
|
308 |
|
309 |
} else {
|
310 |
-
|
|
|
311 |
}
|
312 |
}
|
313 |
-
} else if ( (( $_POST['originalaction'] == "editpost" ) && ( ( $_POST['prev_status'] == 'publish' ) || ($_POST['original_post_status'] == 'publish') ) ) && $get_post_info->post_status == 'publish') {
|
314 |
// if this is an old post and editing updates are enabled
|
315 |
-
|
316 |
-
$sentence = stripcslashes( get_option( 'oldpost-edited-text' ) );
|
317 |
if ( get_option( 'oldpost-edited-showlink') == '1') {
|
318 |
if ( $oldClig != '' ) {
|
319 |
$old_post_link = $oldClig;
|
@@ -339,16 +444,127 @@ if (($get_post_info->post_status == 'publish' || $_POST['publish'] == 'Publish')
|
|
339 |
$sentence = $customTweet;
|
340 |
}
|
341 |
}
|
342 |
-
|
343 |
-
}
|
344 |
-
|
345 |
-
|
|
|
346 |
}
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
if ( $sentence != '' ) {
|
|
|
|
|
|
|
352 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
353 |
if ( $sendToTwitter === FALSE ) {
|
354 |
add_post_meta( $post_ID,'jd_wp_twitter',urldecode( $sentence ) );
|
@@ -357,7 +573,7 @@ if (($get_post_info->post_status == 'publish' || $_POST['publish'] == 'Publish')
|
|
357 |
}
|
358 |
}
|
359 |
return $post_ID;
|
360 |
-
}
|
361 |
|
362 |
// Add Tweets on links in Blogroll
|
363 |
function jd_twit_link( $link_ID ) {
|
@@ -379,8 +595,8 @@ global $version;
|
|
379 |
$sentence = $thislinkname;
|
380 |
}
|
381 |
}
|
382 |
-
if (
|
383 |
-
$sentence =
|
384 |
}
|
385 |
// Generate and grab the clig using the Cli.gs API
|
386 |
// cURL alternative contributed by Thor Erik (http://thorerik.net)
|
@@ -396,8 +612,7 @@ global $version;
|
|
396 |
if ($sendToTwitter === FALSE) {
|
397 |
update_option('wp_twitter_failure','2');
|
398 |
}
|
399 |
-
}
|
400 |
-
|
401 |
return $link_ID;
|
402 |
} else {
|
403 |
return '';
|
@@ -412,12 +627,17 @@ function jd_twit_future( $post_ID ) {
|
|
412 |
$jd_tweet_this = get_post_meta( $post_ID, 'jd_tweet_this', TRUE );
|
413 |
$post_status = $get_post_info->post_status;
|
414 |
|
415 |
-
if ( $jd_tweet_this == "yes" ) {
|
416 |
-
|
417 |
$thispostlink = urlencode( external_or_permalink( $post_ID ) );
|
418 |
$thisposttitle = urlencode( strip_tags( $get_post_info->post_title ) );
|
419 |
$authID = $get_post_info->post_author;
|
420 |
$thisblogtitle = urlencode( get_bloginfo( 'name' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
$sentence = '';
|
422 |
$customTweet = get_post_meta( $post_ID, 'jd_twitter', TRUE );
|
423 |
$sentence = stripcslashes(get_option( 'newpost-published-text' ));
|
@@ -431,12 +651,12 @@ function jd_twit_future( $post_ID ) {
|
|
431 |
if ( $customTweet != "" ) {
|
432 |
// Get the custom Tweet message if it's been supplied. Truncate it to fit if necessary.
|
433 |
if ( get_option( 'newpost-published-showlink' ) == '1' ) {
|
434 |
-
if ( (
|
435 |
-
$customTweet =
|
436 |
}
|
437 |
} else {
|
438 |
-
if (
|
439 |
-
$customTweet =
|
440 |
}
|
441 |
}
|
442 |
if ( get_option( 'newpost-published-showlink' ) == '1' ) {
|
@@ -449,16 +669,19 @@ function jd_twit_future( $post_ID ) {
|
|
449 |
$sentence = $customTweet;
|
450 |
}
|
451 |
}
|
452 |
-
|
453 |
// Stores the post's short URL in a custom field for later use as needed.
|
454 |
store_url($post_ID, $shrink);
|
455 |
} else {
|
456 |
-
|
|
|
|
|
457 |
}
|
458 |
-
|
459 |
-
$sentence = $sentence . " " . generate_hash_tags( $post_ID );
|
460 |
-
}
|
461 |
if ( $sentence != '' ) {
|
|
|
|
|
|
|
462 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
463 |
if ($sendToTwitter === FALSE) {
|
464 |
add_post_meta( $post_ID,'jd_wp_twitter',urldecode($sentence) );
|
@@ -479,6 +702,12 @@ function jd_twit_quickpress( $post_ID ) {
|
|
479 |
$thispostlink = urlencode( external_or_permalink( $post_ID ) );
|
480 |
$thisposttitle = urlencode( strip_tags( $get_post_info->post_title ) );
|
481 |
$authID = $get_post_info->post_author;
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
$thisblogtitle = urlencode( get_bloginfo( 'name' ) );
|
483 |
$sentence = '';
|
484 |
$customTweet = get_post_meta( $post_ID, 'jd_twitter', TRUE );
|
@@ -490,16 +719,18 @@ function jd_twit_quickpress( $post_ID ) {
|
|
490 |
} else {
|
491 |
$sentence = str_ireplace("#url#",$shrink,$sentence);
|
492 |
}
|
493 |
-
|
494 |
// Stores the posts CLIG in a custom field for later use as needed.
|
495 |
store_url($post_ID, $shrink);
|
496 |
} else {
|
497 |
-
|
|
|
498 |
}
|
499 |
-
|
500 |
-
$sentence = $sentence . " " . generate_hash_tags( $post_ID );
|
501 |
-
}
|
502 |
if ( $sentence != '' ) {
|
|
|
|
|
|
|
503 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
504 |
if ($sendToTwitter === FALSE) {
|
505 |
add_post_meta( $post_ID,'jd_wp_twitter',urldecode($sentence) );
|
@@ -520,7 +751,13 @@ function jd_twit_xmlrpc( $post_ID ) {
|
|
520 |
if ( get_option('jd_tweet_default') != '1' && get_option('jd_twit_remote') == '1' ) {
|
521 |
$authID = $get_post_info->post_author;
|
522 |
$thispostlink = urlencode( external_or_permalink( $post_ID ) );
|
523 |
-
$thisposttitle = urlencode( strip_tags( $get_post_info->post_title ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
524 |
$thisblogtitle = urlencode( get_bloginfo( 'name' ) );
|
525 |
$sentence = '';
|
526 |
$sentence = stripcslashes(get_option( 'newpost-published-text' ));
|
@@ -532,16 +769,18 @@ function jd_twit_xmlrpc( $post_ID ) {
|
|
532 |
$sentence = str_ireplace("#url#",$shrink,$sentence);
|
533 |
}
|
534 |
// Check the length of the tweet and truncate parts as necessary.
|
535 |
-
|
536 |
// Stores the posts CLIG in a custom field for later use as needed.
|
537 |
store_url($post_ID, $shrink);
|
538 |
} else {
|
539 |
-
|
|
|
540 |
}
|
541 |
-
|
542 |
-
$sentence = $sentence . " " . generate_hash_tags( $post_ID );
|
543 |
-
}
|
544 |
if ( $sentence != '' ) {
|
|
|
|
|
|
|
545 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
546 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
547 |
if ($sendToTwitter === FALSE) {
|
@@ -566,22 +805,29 @@ function store_url($post_ID, $url) {
|
|
566 |
add_post_meta ( $post_ID, 'wp_jd_bitly', $url );
|
567 |
}
|
568 |
}
|
|
|
|
|
569 |
}
|
570 |
|
571 |
-
function generate_hash_tags($
|
572 |
-
|
573 |
-
|
|
|
574 |
} else {
|
575 |
-
$tags = $
|
576 |
}
|
577 |
-
$tags = explode(",",$tags);
|
578 |
-
foreach ($tags as $value) {
|
579 |
-
$value = trim($value);
|
580 |
-
if ($value != "
|
581 |
-
$
|
|
|
|
|
|
|
582 |
}
|
583 |
}
|
584 |
-
|
|
|
585 |
$hashtags = "";
|
586 |
}
|
587 |
return $hashtags;
|
@@ -593,7 +839,7 @@ function jd_add_twitter_old_box() {
|
|
593 |
<div class="dbx-b-ox-wrapper">
|
594 |
<fieldset id="twitdiv" class="dbx-box">
|
595 |
<div class="dbx-h-andle-wrapper">
|
596 |
-
<h3 class="dbx-handle"><?php _e('WP to Twitter', 'wp-to-twitter') ?></h3>
|
597 |
</div>
|
598 |
<div class="dbx-c-ontent-wrapper">
|
599 |
<div class="dbx-content">
|
@@ -613,12 +859,18 @@ global $post, $jd_plugin_url;
|
|
613 |
if (is_object($post_id)) {
|
614 |
$post_id = $post_id->ID;
|
615 |
}
|
616 |
-
$jd_twitter = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'jd_twitter', true)));
|
617 |
-
$jd_tweet_this = get_post_meta($post_id, 'jd_tweet_this', true);
|
618 |
-
if ($jd_tweet_this == 'no' || get_option( 'jd_tweet_default' ) == '1' ) {
|
619 |
$jd_selected = ' checked="checked"';
|
620 |
}
|
621 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
?>
|
623 |
<script type="text/javascript">
|
624 |
<!-- Begin
|
@@ -628,24 +880,24 @@ cntfield.value = field.value.length;
|
|
628 |
// End -->
|
629 |
</script>
|
630 |
<p>
|
631 |
-
<label for="jd_twitter"><?php _e('Twitter Post', 'wp-to-twitter') ?></label><br /><textarea style="width:95%;" name="jd_twitter" id="jd_twitter" rows="2" cols="60"
|
632 |
onKeyDown="countChars(document.post.jd_twitter,document.post.twitlength)"
|
633 |
onKeyUp="countChars(document.post.jd_twitter,document.post.twitlength)"><?php echo attribute_escape( $jd_twitter ); ?></textarea>
|
634 |
</p>
|
635 |
-
<p><input readonly type="text" name="twitlength" size="3" maxlength="3" value="<?php echo attribute_escape(
|
636 |
-
<?php _e(' characters.<br />Twitter posts are a maximum of 140 characters; if your Cli.gs URL is appended to the end of your document, you have 119 characters available. You can use <code>#url#</code>, <code>#title#</code>, or <code>#blog#</code> to insert the shortened URL, post title, or blog name into the Tweet.', 'wp-to-twitter') ?> <a target="__blank" href="<?php echo $jd_plugin_url; ?>"><?php _e('Get Support', 'wp-to-twitter') ?></a> »
|
637 |
</p>
|
638 |
<p>
|
639 |
-
<input type="checkbox" name="jd_tweet_this" value="no"<?php echo attribute_escape( $jd_selected ); ?> id="jd_tweet_this" /> <label for="jd_tweet_this"><?php _e("Don't Tweet this post."); ?></label>
|
640 |
</p>
|
641 |
-
<?php if ($jd_clig != "") { ?>
|
642 |
<p>
|
643 |
<?php
|
644 |
-
|
|
|
|
|
645 |
?>
|
646 |
</p>
|
647 |
<?php }
|
648 |
-
}
|
649 |
function jd_add_twitter_outer_box() {
|
650 |
if ( function_exists( 'add_meta_box' )) {
|
651 |
add_meta_box( 'wptotwitter_div','WP to Twitter', 'jd_add_twitter_inner_box', 'post', 'advanced' );
|
@@ -688,22 +940,22 @@ function jd_twitter_profile() {
|
|
688 |
$twitter_password = get_usermeta( $user_ID, 'wp-to-twitter-user-password' );
|
689 |
|
690 |
?>
|
691 |
-
<h3><?php _e('WP to Twitter User Settings'); ?></h3>
|
692 |
|
693 |
<table class="form-table">
|
694 |
<tr>
|
695 |
-
<th scope="row"><?php _e('Use My Twitter Account'); ?></th>
|
696 |
-
<td><input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user" value="userTwitter"<?php if ($is_enabled == "userTwitter" || $is_enabled == "true" ) { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user"><?php _e('Select this option if you would like your posts to be Tweeted into your own Twitter account with no @ references.'); ?></label><br />
|
697 |
-
<input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-2" value="userAtTwitter"<?php if ($is_enabled == "userAtTwitter") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-2"><?php _e('Tweet my posts into my Twitter account with an @ reference to the site\'s main Twitter account.'); ?></label><br />
|
698 |
-
<input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-3" value="mainAtTwitter"<?php if ($is_enabled == "mainAtTwitter") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e('Tweet my posts into the main site Twitter account with an @ reference to my username. (Password not required with this option.)'); ?></label></td>
|
699 |
</tr>
|
700 |
<tr>
|
701 |
-
<th scope="row"><label for="wp-to-twitter-user-username"><?php _e('Your Twitter Username'); ?></label></th>
|
702 |
-
<td><input type="text" name="wp-to-twitter-user-username" id="wp-to-twitter-user-username" value="<?php echo attribute_escape( $twitter_username ); ?>" /> <?php _e('Enter your own Twitter username.'); ?></td>
|
703 |
</tr>
|
704 |
<tr>
|
705 |
-
<th scope="row"><label for="wp-to-twitter-user-password"><?php _e('Your Twitter Password'); ?></label></th>
|
706 |
-
<td><input type="password" name="wp-to-twitter-user-password" id="wp-to-twitter-user-password" value="" /> <?php _e('Enter your own Twitter password.'); ?></td>
|
707 |
</tr>
|
708 |
</table>
|
709 |
<?php
|
@@ -781,7 +1033,7 @@ function jd_wp_Twitter_manage_page() {
|
|
781 |
}
|
782 |
function plugin_action($links, $file) {
|
783 |
if ($file == plugin_basename(dirname(__FILE__).'/wp-to-twitter.php'))
|
784 |
-
$links[] = "<a href='options-general.php?page=wp-to-twitter/wp-to-twitter.php'>" . __('Settings', 'wp-to-twitter') . "</a>";
|
785 |
return $links;
|
786 |
}
|
787 |
|
@@ -799,10 +1051,10 @@ if ( get_option( 'wp_twitter_failure' ) == '1' || get_option( 'wp_cligs_failure'
|
|
799 |
add_action('admin_notices', create_function( '', "echo '<div class=\"error\"><p>';_e('There\'s been an error posting your Twitter status! <a href=\"".get_bloginfo('wpurl')."/wp-admin/options-general.php?page=wp-to-twitter/wp-to-twitter.php\">Visit your WP to Twitter settings page</a> to get more information and to clear this error message.'); echo '</p></div>';" ) );
|
800 |
}
|
801 |
if ( get_option( 'jd_twit_pages' )=='1' ) {
|
802 |
-
add_action( 'publish_page', '
|
803 |
}
|
804 |
if ( get_option( 'jd_twit_edited_pages' )=='1' ) {
|
805 |
-
add_action( 'publish_page', '
|
806 |
}
|
807 |
if ( get_option( 'jd_twit_blogroll' ) == '1' ) {
|
808 |
add_action( 'add_link', 'jd_twit_link' );
|
3 |
Plugin Name: WP to Twitter
|
4 |
Plugin URI: http://www.joedolson.com/articles/wp-to-twitter/
|
5 |
Description: Updates Twitter when you create a new blog post or add to your blogroll using Cli.gs. With a Cli.gs API key, creates a clig in your Cli.gs account with the name of your post as the title.
|
6 |
+
Version: 1.4.11
|
7 |
Author: Joseph Dolson
|
8 |
Author URI: http://www.joedolson.com/
|
9 |
*/
|
28 |
|
29 |
global $wp_version,$version,$jd_plugin_url;
|
30 |
|
31 |
+
$plugin_dir = basename(dirname(__FILE__));
|
32 |
+
load_plugin_textdomain( 'wp-to-twitter', 'wp-content/plugins/' . $plugin_dir, $plugin_dir );
|
33 |
+
|
34 |
+
|
35 |
define('JDWP_API_POST_STATUS', 'http://twitter.com/statuses/update.json');
|
36 |
|
37 |
+
$version = "1.4.11";
|
38 |
$jd_plugin_url = "http://www.joedolson.com/articles/wp-to-twitter/";
|
39 |
|
40 |
+
if ( !defined( 'WP_PLUGIN_DIR' ) ) {
|
41 |
+
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
|
42 |
+
}
|
43 |
require_once( ABSPATH.WPINC.'/class-snoopy.php' );
|
44 |
|
45 |
+
if ( !class_exists('SERVICES_JSON') ) {
|
46 |
+
require_once( WP_PLUGIN_DIR.'/wp-to-twitter/json.class.php' );
|
47 |
+
}
|
48 |
+
if (!function_exists('json_encode')) {
|
49 |
+
function json_encode($data) {
|
50 |
+
$json = new Services_JSON();
|
51 |
+
return( $json->encode($data) );
|
52 |
+
}
|
53 |
+
}
|
54 |
+
if (!function_exists('json_decode')) {
|
55 |
+
function json_decode($data) {
|
56 |
+
$json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE );
|
57 |
+
return( $json->decode($data) );
|
58 |
+
}
|
59 |
+
}
|
60 |
+
if (!function_exists('mb_strlen')) {
|
61 |
+
function mb_strlen($data) {
|
62 |
+
return strlen($data);
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
$exit_msg='WP to Twitter requires WordPress 2.5 or a more recent version. <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update your WordPress version!</a>';
|
67 |
|
68 |
if ( version_compare( $wp_version,"2.5","<" )) {
|
69 |
exit ($exit_msg);
|
70 |
}
|
71 |
+
|
72 |
// Function checks for an alternate URL to be tweeted. Contribution by Bill Berry.
|
73 |
function external_or_permalink( $post_ID ) {
|
74 |
$wtb_extlink_custom_field = get_option('jd_twit_custom_url');
|
76 |
$ex_link = get_post_meta($post_ID, $wtb_extlink_custom_field, true);
|
77 |
return ( $ex_link ) ? $ex_link : $perma_link;
|
78 |
}
|
79 |
+
|
80 |
+
if ( !function_exists( 'str_ireplace' ) ) {
|
81 |
+
function str_ireplace( $needle, $str, $haystack ) {
|
82 |
+
$needle = preg_quote( $needle, '/' );
|
83 |
+
return preg_replace( "/$needle/i", $str, $haystack );
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( function_exists( 'mb_substr_replace' ) === false ) {
|
88 |
+
function mb_substr_replace( $string, $replacement, $start, $length = null, $encoding = null ) {
|
89 |
+
if ( extension_loaded( 'mbstring' ) === true ) {
|
90 |
+
$string_length = (is_null($encoding) === true) ? mb_strlen($string) : mb_strlen($string, $encoding);
|
91 |
+
if ( $start < 0 ) {
|
92 |
+
$start = max(0, $string_length + $start);
|
93 |
+
} else if ( $start > $string_length ) {
|
94 |
+
$start = $string_length;
|
95 |
+
}
|
96 |
+
if ( $length < 0 ) {
|
97 |
+
$length = max( 0, $string_length - $start + $length );
|
98 |
+
} else if ( ( is_null( $length ) === true ) || ( $length > $string_length ) ) {
|
99 |
+
$length = $string_length;
|
100 |
+
}
|
101 |
+
if ( ( $start + $length ) > $string_length) {
|
102 |
+
$length = $string_length - $start;
|
103 |
+
}
|
104 |
+
if ( is_null( $encoding ) === true) {
|
105 |
+
return mb_substr( $string, 0, $start ) . $replacement . mb_substr( $string, $start + $length, $string_length - $start - $length );
|
106 |
+
}
|
107 |
+
return mb_substr( $string, 0, $start, $encoding ) . $replacement . mb_substr( $string, $start + $length, $string_length - $start - $length, $encoding );
|
108 |
+
}
|
109 |
+
return ( is_null( $length ) === true ) ? substr_replace( $string, $replacement, $start ) : substr_replace( $string, $replacement, $start, $length );
|
110 |
+
}
|
111 |
+
}
|
112 |
|
113 |
// This function used to perform the API post to Twitter and now serves as a fallback.
|
114 |
function jd_old_doTwitterAPIPost( $twit, $authID=FALSE, $twitterURI="/statuses/update.xml" ) {
|
139 |
fputs( $fp, "User-Agent: ".$agent."\n" );
|
140 |
fputs( $fp, "Host: $host\n" );
|
141 |
fputs( $fp, "Content-type: application/x-www-form-urlencoded\n" );
|
142 |
+
fputs( $fp, "Content-length: ".mb_strlen( $twit )."\n" );
|
143 |
fputs( $fp, "Connection: close\n\n" );
|
144 |
fputs( $fp, $twit );
|
145 |
for ( $i = 1; $i < 10; $i++ ) {
|
214 |
|
215 |
// cURL query contributed by Thor Erik (http://thorerik.net)
|
216 |
function getfilefromurl($url) {
|
217 |
+
if ( function_exists( 'curl_init' ) ) {
|
218 |
$ch = curl_init();
|
219 |
curl_setopt( $ch, CURLOPT_HEADER, 0 );
|
220 |
curl_setopt( $ch, CURLOPT_VERBOSE, 0 );
|
223 |
$output = curl_exec( $ch );
|
224 |
curl_close( $ch );
|
225 |
return $output;
|
226 |
+
} else {
|
227 |
+
return FALSE;
|
228 |
+
}
|
229 |
}
|
230 |
|
231 |
+
function jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID=FALSE ) {
|
232 |
+
|
233 |
+
$sentence = trim($sentence);
|
234 |
+
$thisposttitle = trim($thisposttitle);
|
235 |
+
$thisblogtitle = trim($thisblogtitle);
|
236 |
+
$thispostexcerpt = trim($thispostexcerpt);
|
237 |
+
// Rewrite this function.
|
238 |
+
|
239 |
+
/* Logic: assemble tweet, check length. If under 140, return.
|
240 |
+
If over 140, check each element in tweet according to the user-selected priority list (least important first.) After each element is checked, re-assemble and check length. If OK, return; if still too long, truncate next element, until tweet is appropriate length. Much simpler process...
|
241 |
+
*/
|
242 |
|
243 |
if ( get_usermeta( $authID, 'wp-to-twitter-enable-user' ) == 'userAtTwitter' ) {
|
244 |
$at_append = "@" . get_option('twitterlogin');
|
254 |
if ( get_option( 'jd_twit_append' ) != "" ) {
|
255 |
$sentence = $sentence . " " . get_option( 'jd_twit_append' );
|
256 |
}
|
257 |
+
if ( mb_substr( $thispostexcerpt, -1 ) == ";" || mb_substr( $thispostexcerpt, -1 ) == "," || mb_substr( $thispostexcerpt, -1 ) == ":" ) {
|
258 |
+
$thispostexcerpt = mb_substr_replace( $thispostexcerpt,"",-1, 1 );
|
259 |
+
}
|
260 |
+
if ( mb_substr( $thispostexcerpt, -1 ) != "." && mb_substr( $thispostexcerpt, -1 ) != "?" && mb_substr( $thispostexcerpt, -1 ) != "!" ) {
|
261 |
+
$thispostexcerpt = $thispostexcerpt . "...";
|
262 |
+
}
|
263 |
+
$twit_length = mb_strlen( $sentence );
|
264 |
+
$title_length = mb_strlen( $thisposttitle );
|
265 |
+
$blog_length = mb_strlen( $thisblogtitle );
|
266 |
+
$excerpt_length = mb_strlen( $thispostexcerpt );
|
267 |
if ( ( ( $twit_length + $title_length ) - 7 ) < 140 ) {
|
268 |
$sentence = str_ireplace( '#title#', $thisposttitle, $sentence );
|
269 |
+
$twit_length = mb_strlen( $sentence );
|
270 |
+
$twit_length = mb_strlen( $sentence );
|
271 |
} else {
|
272 |
+
$thisposttitle = mb_substr( $thisposttitle, 0, ( 140- ( $twit_length-3 ) ) ) . "...";
|
273 |
$sentence = str_ireplace ( '#title#', $thisposttitle, $sentence );
|
274 |
+
$twit_length = mb_strlen( $sentence );
|
275 |
}
|
276 |
if ( ( ( $twit_length + $blog_length ) - 6 ) < 140 ) {
|
277 |
$sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence );
|
278 |
+
$twit_length = mb_strlen( $sentence );
|
279 |
} else {
|
280 |
+
$thisblogtitle = mb_substr( $thisblogtitle, 0, ( 140-( $twit_length-3 ) ) ) . "...";
|
281 |
$sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence );
|
282 |
}
|
283 |
+
if ( ( ( $twit_length + $excerpt_length ) - 6 ) < 140 ) {
|
284 |
+
$sentence = str_ireplace ( '#post#',$thispostexcerpt,$sentence );
|
285 |
+
$twit_length = mb_strlen( $sentence );
|
286 |
+
} else {
|
287 |
+
$thispostexcerpt = mb_substr( $thispostexcerpt, 0, ( 140-( $twit_length-3 ) ) ) . "...";
|
288 |
+
$sentence = str_ireplace ( '#post#',$thispostexcerpt,$sentence );
|
289 |
+
}
|
290 |
return $sentence;
|
291 |
}
|
292 |
|
307 |
}
|
308 |
$thispostlink .= urlencode("utm_campaign=$this_campaign&utm_medium=twitter&utm_source=twitter");
|
309 |
}
|
310 |
+
|
311 |
// Generate and grab the clig using the Cli.gs API
|
312 |
// cURL alternative contributed by Thor Erik (http://thorerik.net)
|
313 |
switch ( get_option( 'jd_shortener' ) ) {
|
316 |
if ( $snoopy->fetchtext( "http://cli.gs/api/v1/cligs/create?t=snoopy&appid=WP-to-Twitter&url=".$thispostlink."&title=".$thisposttitle."&key=".$cligsapi ) ) {
|
317 |
$shrink = trim($snoopy->results);
|
318 |
} else {
|
319 |
+
$shrink = @file_get_contents( "http://cli.gs/api/v1/cligs/create?t=fgc&appid=WP-to-Twitter&url=".$thispostlink."&title=".$thisposttitle."&key=".$cligsapi );
|
320 |
}
|
321 |
if ( $shrink === FALSE ) {
|
322 |
$shrink = getfilefromurl( "http://cli.gs/api/v1/cligs/create?t=gffu&appid=WP-to-Twitter&url=".$thispostlink."&title=".$thisposttitle."&key=".$cligsapi);
|
346 |
return $shrink;
|
347 |
}
|
348 |
|
349 |
+
function jd_expand_url( $short_url ) {
|
350 |
+
$short_url = urlencode( $short_url );
|
351 |
+
$snoopy = new Snoopy;
|
352 |
+
$snoopy->fetch( "http://api.longurl.org/v2/expand?format=json&url=" . $short_url );
|
353 |
+
$longurl = $snoopy->results;
|
354 |
+
$decoded = json_decode( $longurl, TRUE );
|
355 |
+
$url = $decoded['long-url'];
|
356 |
+
return $url;
|
357 |
+
}
|
358 |
|
359 |
+
|
360 |
+
function jd_twit( $post_ID ) {
|
361 |
$jd_tweet_this = get_post_meta( $post_ID, 'jd_tweet_this', TRUE);
|
362 |
if ( $jd_tweet_this == "yes" ) {
|
363 |
$get_post_info = get_post( $post_ID );
|
364 |
$authID = $get_post_info->post_author;
|
365 |
+
$excerpt_length = get_option( 'jd_post_excerpt' );
|
366 |
+
if ( trim( $get_post_info->post_excerpt ) == "" ) {
|
367 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_content), 0, $excerpt_length );
|
368 |
+
} else {
|
369 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_excerpt), 0, $excerpt_length );
|
370 |
+
}
|
371 |
$thisposttitle = urlencode( stripcslashes( strip_tags( $_POST['post_title'] ) ) );
|
372 |
if ($thisposttitle == "") {
|
373 |
$thisposttitle = urlencode( stripcslashes( strip_tags( $_POST['title'] ) ) );
|
378 |
$sentence = '';
|
379 |
$customTweet = stripcslashes( $_POST['jd_twitter'] );
|
380 |
$oldClig = get_post_meta( $post_ID, 'wp_jd_clig', TRUE );
|
381 |
+
if ( $_POST['originalaction'] == 'post' ) {
|
382 |
// publish new post
|
383 |
if ( get_option( 'newpost-published-update' ) == '1' ) {
|
384 |
$sentence = stripcslashes( get_option( 'newpost-published-text' ) );
|
407 |
$sentence = $customTweet;
|
408 |
}
|
409 |
}
|
410 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
411 |
// Stores the posts CLIG in a custom field for later use as needed.
|
412 |
store_url( $post_ID, $shrink );
|
413 |
|
414 |
} else {
|
415 |
+
$sentence = str_ireplace( "#url#", "", $sentence );
|
416 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
417 |
}
|
418 |
}
|
419 |
+
} else if ( (( $_POST['originalaction'] == "editpost" ) && ( ( $_POST['prev_status'] == 'publish' ) || ($_POST['original_post_status'] == 'publish') ) ) && $get_post_info->post_status == 'publish' && ( get_option( 'oldpost-edited-update') == '1' ) ) {
|
420 |
// if this is an old post and editing updates are enabled
|
421 |
+
$sentence = stripcslashes( get_option( 'oldpost-edited-text' ) );
|
|
|
422 |
if ( get_option( 'oldpost-edited-showlink') == '1') {
|
423 |
if ( $oldClig != '' ) {
|
424 |
$old_post_link = $oldClig;
|
444 |
$sentence = $customTweet;
|
445 |
}
|
446 |
}
|
447 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
448 |
+
} else {
|
449 |
+
$sentence = str_ireplace( "#url#", "", $sentence );
|
450 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
451 |
+
}
|
452 |
}
|
453 |
+
|
454 |
+
if ( $sentence != '' ) {
|
455 |
+
if ( get_option( 'use_tags_as_hashtags' ) == '1' ) {
|
456 |
+
$sentence = $sentence . " " . generate_hash_tags( $_POST );
|
457 |
+
}
|
458 |
+
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
459 |
+
if ( $sendToTwitter === FALSE ) {
|
460 |
+
add_post_meta( $post_ID,'jd_wp_twitter',urldecode( $sentence ) );
|
461 |
+
update_option( 'wp_twitter_failure','1' );
|
462 |
+
}
|
463 |
}
|
464 |
+
}
|
465 |
+
return $post_ID;
|
466 |
+
}
|
467 |
+
|
468 |
+
function jd_twit_page( $post_ID ) {
|
469 |
|
470 |
+
$jd_tweet_this = get_post_meta( $post_ID, 'jd_tweet_this', TRUE);
|
471 |
+
if ( $jd_tweet_this == "yes" ) {
|
472 |
+
$get_post_info = get_post( $post_ID );
|
473 |
+
$authID = $get_post_info->post_author;
|
474 |
+
$excerpt_length = get_option( 'jd_post_excerpt' );
|
475 |
+
if ( trim( $get_post_info->post_excerpt ) == "" ) {
|
476 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_content), 0, $excerpt_length );
|
477 |
+
} else {
|
478 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_excerpt), 0, $excerpt_length );
|
479 |
+
}
|
480 |
+
$thisposttitle = urlencode( stripcslashes( strip_tags( $_POST['post_title'] ) ) );
|
481 |
+
if ($thisposttitle == "") {
|
482 |
+
$thisposttitle = urlencode( stripcslashes( strip_tags( $_POST['title'] ) ) );
|
483 |
+
}
|
484 |
+
$thispostlink = urlencode( external_or_permalink( $post_ID ) );
|
485 |
+
$thisblogtitle = urlencode( get_bloginfo( 'name' ) );
|
486 |
+
$cligsapi = get_option( 'cligsapi' );
|
487 |
+
$sentence = '';
|
488 |
+
$customTweet = stripcslashes( $_POST['jd_twitter'] );
|
489 |
+
$oldClig = get_post_meta( $post_ID, 'wp_jd_clig', TRUE );
|
490 |
+
//if ( ($get_post_info->post_status == 'publish' || $_POST['publish'] == 'Publish') && ($_POST['prev_status'] == 'draft' || $_POST['original_post_status'] == 'draft') ) {
|
491 |
+
if ( $_POST['originalaction'] == 'post' ) {
|
492 |
+
// publish new post
|
493 |
+
if ( get_option( 'jd_twit_pages' ) == '1' ) {
|
494 |
+
$sentence = stripcslashes( get_option( 'newpost-published-text' ) );
|
495 |
+
if ( get_option( 'newpost-published-showlink' ) == '1' ) {
|
496 |
+
if ($oldClig != '') {
|
497 |
+
$shrink = $oldClig;
|
498 |
+
} else {
|
499 |
+
$shrink = jd_shorten_link( $thispostlink, $thisposttitle, $cligsapi );
|
500 |
+
}
|
501 |
+
|
502 |
+
//$sentence = $sentence . " " . $shrink;
|
503 |
+
if ( stripos( $sentence, "#url#" ) === FALSE ) {
|
504 |
+
$sentence = $sentence . " " . $shrink;
|
505 |
+
} else {
|
506 |
+
$sentence = str_ireplace( "#url#", $shrink, $sentence );
|
507 |
+
}
|
508 |
+
|
509 |
+
if ( $customTweet != "" ) {
|
510 |
+
if ( get_option( 'newpost-published-showlink' ) == '1' ) {
|
511 |
+
if ( stripos( $customTweet, "#url#" ) === FALSE ) {
|
512 |
+
$sentence = $customTweet . " " . $shrink;
|
513 |
+
} else {
|
514 |
+
$sentence = str_ireplace( "#url#", $shrink, $customTweet );
|
515 |
+
}
|
516 |
+
} else {
|
517 |
+
$sentence = $customTweet;
|
518 |
+
}
|
519 |
+
}
|
520 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
521 |
+
// Stores the posts CLIG in a custom field for later use as needed.
|
522 |
+
store_url( $post_ID, $shrink );
|
523 |
+
|
524 |
+
} else {
|
525 |
+
$sentence = str_ireplace( "#url#", "", $sentence );
|
526 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
527 |
+
}
|
528 |
+
}
|
529 |
+
} else if ( (( $_POST['originalaction'] == "editpost" ) && ( ( $_POST['prev_status'] == 'publish' ) || ($_POST['original_post_status'] == 'publish') ) ) && $get_post_info->post_status == 'publish' && ( get_option( 'jd_twit_edited_pages') == '1' ) ) {
|
530 |
+
// if this is an old post and editing updates are enabled
|
531 |
+
$sentence = stripcslashes( get_option( 'oldpost-edited-text' ) );
|
532 |
+
if ( get_option( 'oldpost-edited-showlink') == '1') {
|
533 |
+
if ( $oldClig != '' ) {
|
534 |
+
$old_post_link = $oldClig;
|
535 |
+
} else {
|
536 |
+
$old_post_link = jd_shorten_link( $thispostlink, $thisposttitle );
|
537 |
+
}
|
538 |
+
store_url( $post_ID, $old_post_link );
|
539 |
+
|
540 |
+
if ( stripos( $sentence, "#url#" ) === FALSE ) {
|
541 |
+
$sentence = $sentence . " " . $old_post_link;
|
542 |
+
} else {
|
543 |
+
$sentence = str_ireplace( "#url#", $old_post_link, $sentence );
|
544 |
+
}
|
545 |
+
|
546 |
+
if ( $customTweet != "" ) {
|
547 |
+
if ( get_option( 'oldpost-edited-showlink') == '1' ) {
|
548 |
+
if ( stripos( $customTweet, "#url#" ) === FALSE ) {
|
549 |
+
$sentence = $customTweet . " " . $old_post_link;
|
550 |
+
} else {
|
551 |
+
$sentence = str_ireplace( "#url#", $old_post_link, $customTweet );
|
552 |
+
}
|
553 |
+
} else {
|
554 |
+
$sentence = $customTweet;
|
555 |
+
}
|
556 |
+
}
|
557 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
558 |
+
} else {
|
559 |
+
$sentence = str_ireplace( "#url#", "", $sentence );
|
560 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
561 |
+
}
|
562 |
+
}
|
563 |
+
|
564 |
if ( $sentence != '' ) {
|
565 |
+
if ( get_option( 'use_tags_as_hashtags' ) == '1' ) {
|
566 |
+
$sentence = $sentence . " " . generate_hash_tags( $_POST );
|
567 |
+
}
|
568 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
569 |
if ( $sendToTwitter === FALSE ) {
|
570 |
add_post_meta( $post_ID,'jd_wp_twitter',urldecode( $sentence ) );
|
573 |
}
|
574 |
}
|
575 |
return $post_ID;
|
576 |
+
} // end twit pages
|
577 |
|
578 |
// Add Tweets on links in Blogroll
|
579 |
function jd_twit_link( $link_ID ) {
|
595 |
$sentence = $thislinkname;
|
596 |
}
|
597 |
}
|
598 |
+
if (mb_strlen( $sentence ) > 120) {
|
599 |
+
$sentence = mb_substr($sentence,0,116) . '...';
|
600 |
}
|
601 |
// Generate and grab the clig using the Cli.gs API
|
602 |
// cURL alternative contributed by Thor Erik (http://thorerik.net)
|
612 |
if ($sendToTwitter === FALSE) {
|
613 |
update_option('wp_twitter_failure','2');
|
614 |
}
|
615 |
+
}
|
|
|
616 |
return $link_ID;
|
617 |
} else {
|
618 |
return '';
|
627 |
$jd_tweet_this = get_post_meta( $post_ID, 'jd_tweet_this', TRUE );
|
628 |
$post_status = $get_post_info->post_status;
|
629 |
|
630 |
+
if ( $jd_tweet_this == "yes" ) {
|
|
|
631 |
$thispostlink = urlencode( external_or_permalink( $post_ID ) );
|
632 |
$thisposttitle = urlencode( strip_tags( $get_post_info->post_title ) );
|
633 |
$authID = $get_post_info->post_author;
|
634 |
$thisblogtitle = urlencode( get_bloginfo( 'name' ) );
|
635 |
+
$excerpt_length = get_option( 'jd_post_excerpt' );
|
636 |
+
if ( trim( $get_post_info->post_excerpt ) == "" ) {
|
637 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_content), 0, $excerpt_length );
|
638 |
+
} else {
|
639 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_excerpt), 0, $excerpt_length );
|
640 |
+
}
|
641 |
$sentence = '';
|
642 |
$customTweet = get_post_meta( $post_ID, 'jd_twitter', TRUE );
|
643 |
$sentence = stripcslashes(get_option( 'newpost-published-text' ));
|
651 |
if ( $customTweet != "" ) {
|
652 |
// Get the custom Tweet message if it's been supplied. Truncate it to fit if necessary.
|
653 |
if ( get_option( 'newpost-published-showlink' ) == '1' ) {
|
654 |
+
if ( ( mb_strlen( $customTweet ) + 21) > 140 ) {
|
655 |
+
$customTweet = mb_substr( $customTweet, 0, 119 );
|
656 |
}
|
657 |
} else {
|
658 |
+
if ( mb_strlen( $customTweet ) > 140 ) {
|
659 |
+
$customTweet = mb_substr( $customTweet, 0, 140 );
|
660 |
}
|
661 |
}
|
662 |
if ( get_option( 'newpost-published-showlink' ) == '1' ) {
|
669 |
$sentence = $customTweet;
|
670 |
}
|
671 |
}
|
672 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
673 |
// Stores the post's short URL in a custom field for later use as needed.
|
674 |
store_url($post_ID, $shrink);
|
675 |
} else {
|
676 |
+
$sentence = str_ireplace( "#url#", "", $sentence );
|
677 |
+
|
678 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
679 |
}
|
680 |
+
|
|
|
|
|
681 |
if ( $sentence != '' ) {
|
682 |
+
if ( get_option( 'use_tags_as_hashtags' ) == '1' ) {
|
683 |
+
$sentence = $sentence . " " . generate_hash_tags( $_POST );
|
684 |
+
}
|
685 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
686 |
if ($sendToTwitter === FALSE) {
|
687 |
add_post_meta( $post_ID,'jd_wp_twitter',urldecode($sentence) );
|
702 |
$thispostlink = urlencode( external_or_permalink( $post_ID ) );
|
703 |
$thisposttitle = urlencode( strip_tags( $get_post_info->post_title ) );
|
704 |
$authID = $get_post_info->post_author;
|
705 |
+
$excerpt_length = get_option( 'jd_post_excerpt' );
|
706 |
+
if ( trim( $get_post_info->post_excerpt ) == "" ) {
|
707 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_content), 0, $excerpt_length );
|
708 |
+
} else {
|
709 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_excerpt), 0, $excerpt_length );
|
710 |
+
}
|
711 |
$thisblogtitle = urlencode( get_bloginfo( 'name' ) );
|
712 |
$sentence = '';
|
713 |
$customTweet = get_post_meta( $post_ID, 'jd_twitter', TRUE );
|
719 |
} else {
|
720 |
$sentence = str_ireplace("#url#",$shrink,$sentence);
|
721 |
}
|
722 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
723 |
// Stores the posts CLIG in a custom field for later use as needed.
|
724 |
store_url($post_ID, $shrink);
|
725 |
} else {
|
726 |
+
$sentence = str_ireplace( "#url#", "", $sentence );
|
727 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
728 |
}
|
729 |
+
|
|
|
|
|
730 |
if ( $sentence != '' ) {
|
731 |
+
if ( get_option( 'use_tags_as_hashtags' ) == '1' ) {
|
732 |
+
$sentence = $sentence . " " . generate_hash_tags( $_POST );
|
733 |
+
}
|
734 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
735 |
if ($sendToTwitter === FALSE) {
|
736 |
add_post_meta( $post_ID,'jd_wp_twitter',urldecode($sentence) );
|
751 |
if ( get_option('jd_tweet_default') != '1' && get_option('jd_twit_remote') == '1' ) {
|
752 |
$authID = $get_post_info->post_author;
|
753 |
$thispostlink = urlencode( external_or_permalink( $post_ID ) );
|
754 |
+
$thisposttitle = urlencode( strip_tags( $get_post_info->post_title ) );
|
755 |
+
$excerpt_length = get_option( 'jd_post_excerpt' );
|
756 |
+
if ( trim( $get_post_info->post_excerpt ) == "" ) {
|
757 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_content), 0, $excerpt_length );
|
758 |
+
} else {
|
759 |
+
$thispostexcerpt = @mb_substr( strip_tags($get_post_info->post_excerpt), 0, $excerpt_length );
|
760 |
+
}
|
761 |
$thisblogtitle = urlencode( get_bloginfo( 'name' ) );
|
762 |
$sentence = '';
|
763 |
$sentence = stripcslashes(get_option( 'newpost-published-text' ));
|
769 |
$sentence = str_ireplace("#url#",$shrink,$sentence);
|
770 |
}
|
771 |
// Check the length of the tweet and truncate parts as necessary.
|
772 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
773 |
// Stores the posts CLIG in a custom field for later use as needed.
|
774 |
store_url($post_ID, $shrink);
|
775 |
} else {
|
776 |
+
$sentence = str_ireplace( "#url#", "", $sentence );
|
777 |
+
$sentence = jd_truncate_tweet( $sentence, $thisposttitle, $thisblogtitle, $thispostexcerpt, $authID );
|
778 |
}
|
779 |
+
|
|
|
|
|
780 |
if ( $sentence != '' ) {
|
781 |
+
if ( get_option( 'use_tags_as_hashtags' ) == '1' ) {
|
782 |
+
$sentence = $sentence . " " . generate_hash_tags( $_POST );
|
783 |
+
}
|
784 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
785 |
$sendToTwitter = jd_doTwitterAPIPost( $sentence, $authID );
|
786 |
if ($sendToTwitter === FALSE) {
|
805 |
add_post_meta ( $post_ID, 'wp_jd_bitly', $url );
|
806 |
}
|
807 |
}
|
808 |
+
$target = jd_expand_url( $url );
|
809 |
+
add_post_meta( $post_ID, 'wp_jd_target', $target );
|
810 |
}
|
811 |
|
812 |
+
function generate_hash_tags( $post ) {
|
813 |
+
global $wp_version;
|
814 |
+
if ( version_compare( $wp_version,"2.8",">=" ) ) {
|
815 |
+
$tags = $post['tax_input']['post_tag'] . "," . $post['newtag']['post_tag'];
|
816 |
} else {
|
817 |
+
$tags = $post['tags_input'];
|
818 |
}
|
819 |
+
$tags = explode( ",",$tags );
|
820 |
+
foreach ( $tags as $value ) {
|
821 |
+
$value = str_ireplace( " ","_",trim( $value ) );
|
822 |
+
if ( $value != __( "Add_new_tag" , 'wp-to-twitter') && $value != "" ) {
|
823 |
+
$newtag = "#$value";
|
824 |
+
if ( mb_strlen( $newtag ) > 2 ) {
|
825 |
+
$hashtags .= "$newtag ";
|
826 |
+
}
|
827 |
}
|
828 |
}
|
829 |
+
$hashtags = trim( $hashtags );
|
830 |
+
if ( mb_strlen( $hashtags ) <= 1 ) {
|
831 |
$hashtags = "";
|
832 |
}
|
833 |
return $hashtags;
|
839 |
<div class="dbx-b-ox-wrapper">
|
840 |
<fieldset id="twitdiv" class="dbx-box">
|
841 |
<div class="dbx-h-andle-wrapper">
|
842 |
+
<h3 class="dbx-handle"><?php _e('WP to Twitter', 'wp-to-twitter', 'wp-to-twitter') ?></h3>
|
843 |
</div>
|
844 |
<div class="dbx-c-ontent-wrapper">
|
845 |
<div class="dbx-content">
|
859 |
if (is_object($post_id)) {
|
860 |
$post_id = $post_id->ID;
|
861 |
}
|
862 |
+
$jd_twitter = htmlspecialchars( stripcslashes( get_post_meta($post_id, 'jd_twitter', true ) ) );
|
863 |
+
$jd_tweet_this = get_post_meta( $post_id, 'jd_tweet_this', true );
|
864 |
+
if ( $jd_tweet_this == 'no' || get_option( 'jd_tweet_default' ) == '1' ) {
|
865 |
$jd_selected = ' checked="checked"';
|
866 |
}
|
867 |
+
$jd_short = get_post_meta( $post_id, 'wp_jd_clig', true );
|
868 |
+
$shortener = "Cli.gs";
|
869 |
+
if ( $jd_short == "" ) {
|
870 |
+
$jd_short = get_post_meta( $post_id, 'wp_jd_bitly', true );
|
871 |
+
$shortener = "Bit.ly";
|
872 |
+
}
|
873 |
+
$jd_expansion = get_post_meta( $post_id, 'wp_jd_target', true );
|
874 |
?>
|
875 |
<script type="text/javascript">
|
876 |
<!-- Begin
|
880 |
// End -->
|
881 |
</script>
|
882 |
<p>
|
883 |
+
<label for="jd_twitter"><?php _e('Twitter Post', 'wp-to-twitter', 'wp-to-twitter') ?></label><br /><textarea style="width:95%;" name="jd_twitter" id="jd_twitter" rows="2" cols="60"
|
884 |
onKeyDown="countChars(document.post.jd_twitter,document.post.twitlength)"
|
885 |
onKeyUp="countChars(document.post.jd_twitter,document.post.twitlength)"><?php echo attribute_escape( $jd_twitter ); ?></textarea>
|
886 |
</p>
|
887 |
+
<p><input readonly type="text" name="twitlength" size="3" maxlength="3" value="<?php echo attribute_escape( mb_strlen( $description) ); ?>" />
|
888 |
+
<?php _e(' characters.<br />Twitter posts are a maximum of 140 characters; if your Cli.gs URL is appended to the end of your document, you have 119 characters available. You can use <code>#url#</code>, <code>#title#</code>, <code>#post#</code> or <code>#blog#</code> to insert the shortened URL, post title, a post excerpt or blog name into the Tweet.', 'wp-to-twitter', 'wp-to-twitter') ?> <a target="__blank" href="<?php echo $jd_plugin_url; ?>"><?php _e('Get Support', 'wp-to-twitter', 'wp-to-twitter') ?></a> »
|
889 |
</p>
|
890 |
<p>
|
891 |
+
<input type="checkbox" name="jd_tweet_this" value="no"<?php echo attribute_escape( $jd_selected ); ?> id="jd_tweet_this" /> <label for="jd_tweet_this"><?php _e("Don't Tweet this post.", 'wp-to-twitter'); ?></label>
|
892 |
</p>
|
|
|
893 |
<p>
|
894 |
<?php
|
895 |
+
if ( $jd_short != "" ) {
|
896 |
+
_e("The previously-posted $shortener URL for this post is <code>$jd_short</code>, which points to <code>$jd_expansion</code>.", 'wp-to-twitter');
|
897 |
+
}
|
898 |
?>
|
899 |
</p>
|
900 |
<?php }
|
|
|
901 |
function jd_add_twitter_outer_box() {
|
902 |
if ( function_exists( 'add_meta_box' )) {
|
903 |
add_meta_box( 'wptotwitter_div','WP to Twitter', 'jd_add_twitter_inner_box', 'post', 'advanced' );
|
940 |
$twitter_password = get_usermeta( $user_ID, 'wp-to-twitter-user-password' );
|
941 |
|
942 |
?>
|
943 |
+
<h3><?php _e('WP to Twitter User Settings', 'wp-to-twitter'); ?></h3>
|
944 |
|
945 |
<table class="form-table">
|
946 |
<tr>
|
947 |
+
<th scope="row"><?php _e('Use My Twitter Account', 'wp-to-twitter'); ?></th>
|
948 |
+
<td><input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user" value="userTwitter"<?php if ($is_enabled == "userTwitter" || $is_enabled == "true" ) { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user"><?php _e('Select this option if you would like your posts to be Tweeted into your own Twitter account with no @ references.', 'wp-to-twitter'); ?></label><br />
|
949 |
+
<input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-2" value="userAtTwitter"<?php if ($is_enabled == "userAtTwitter") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-2"><?php _e('Tweet my posts into my Twitter account with an @ reference to the site\'s main Twitter account.', 'wp-to-twitter'); ?></label><br />
|
950 |
+
<input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-3" value="mainAtTwitter"<?php if ($is_enabled == "mainAtTwitter") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e('Tweet my posts into the main site Twitter account with an @ reference to my username. (Password not required with this option.)', 'wp-to-twitter'); ?></label></td>
|
951 |
</tr>
|
952 |
<tr>
|
953 |
+
<th scope="row"><label for="wp-to-twitter-user-username"><?php _e('Your Twitter Username', 'wp-to-twitter'); ?></label></th>
|
954 |
+
<td><input type="text" name="wp-to-twitter-user-username" id="wp-to-twitter-user-username" value="<?php echo attribute_escape( $twitter_username ); ?>" /> <?php _e('Enter your own Twitter username.', 'wp-to-twitter'); ?></td>
|
955 |
</tr>
|
956 |
<tr>
|
957 |
+
<th scope="row"><label for="wp-to-twitter-user-password"><?php _e('Your Twitter Password', 'wp-to-twitter'); ?></label></th>
|
958 |
+
<td><input type="password" name="wp-to-twitter-user-password" id="wp-to-twitter-user-password" value="" /> <?php _e('Enter your own Twitter password.', 'wp-to-twitter'); ?></td>
|
959 |
</tr>
|
960 |
</table>
|
961 |
<?php
|
1033 |
}
|
1034 |
function plugin_action($links, $file) {
|
1035 |
if ($file == plugin_basename(dirname(__FILE__).'/wp-to-twitter.php'))
|
1036 |
+
$links[] = "<a href='options-general.php?page=wp-to-twitter/wp-to-twitter.php'>" . __('Settings', 'wp-to-twitter', 'wp-to-twitter') . "</a>";
|
1037 |
return $links;
|
1038 |
}
|
1039 |
|
1051 |
add_action('admin_notices', create_function( '', "echo '<div class=\"error\"><p>';_e('There\'s been an error posting your Twitter status! <a href=\"".get_bloginfo('wpurl')."/wp-admin/options-general.php?page=wp-to-twitter/wp-to-twitter.php\">Visit your WP to Twitter settings page</a> to get more information and to clear this error message.'); echo '</p></div>';" ) );
|
1052 |
}
|
1053 |
if ( get_option( 'jd_twit_pages' )=='1' ) {
|
1054 |
+
add_action( 'publish_page', 'jd_twit_page' );
|
1055 |
}
|
1056 |
if ( get_option( 'jd_twit_edited_pages' )=='1' ) {
|
1057 |
+
add_action( 'publish_page', 'jd_twit_page' );
|
1058 |
}
|
1059 |
if ( get_option( 'jd_twit_blogroll' ) == '1' ) {
|
1060 |
add_action( 'add_link', 'jd_twit_link' );
|
wp-to-twitter.pot
CHANGED
@@ -8,7 +8,7 @@ msgid ""
|
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: PACKAGE VERSION\n"
|
10 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n"
|
11 |
-
"POT-Creation-Date: 2009-
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -16,21 +16,21 @@ msgstr ""
|
|
16 |
"Content-Type: text/plain; charset=CHARSET\n"
|
17 |
"Content-Transfer-Encoding: 8bit\n"
|
18 |
|
19 |
-
#: wp-to-twitter-manager.php:
|
20 |
msgid ""
|
21 |
"Set your Twitter login information and URL shortener API information to use "
|
22 |
"this plugin!"
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: wp-to-twitter-manager.php:
|
26 |
msgid "Please add your Twitter password. "
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: wp-to-twitter-manager.php:
|
30 |
msgid "WP to Twitter Errors Cleared"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: wp-to-twitter-manager.php:
|
34 |
msgid ""
|
35 |
"URL shortener request failed! We couldn't shrink that URL, so we attached "
|
36 |
"the normal URL to your Tweet. Check with your URL shortening provider to see "
|
@@ -38,418 +38,471 @@ msgid ""
|
|
38 |
"a>] [<a href=\"http://blog.bit.ly\">Bit.ly Blog</a>]"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: wp-to-twitter-manager.php:
|
42 |
msgid ""
|
43 |
"Sorry! I couldn't get in touch with the Twitter servers to post your new "
|
44 |
"blog post. Your tweet has been stored in a custom field attached to the "
|
45 |
"post, so you can Tweet it manually if you wish! "
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: wp-to-twitter-manager.php:
|
49 |
msgid ""
|
50 |
"Sorry! I couldn't get in touch with the Twitter servers to post your "
|
51 |
"<strong>new link</strong>! You'll have to post it manually, I'm afraid. "
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: wp-to-twitter-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
msgid "Twitter login and password updated. "
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: wp-to-twitter-manager.php:
|
59 |
msgid "You need to provide your twitter login and password! "
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: wp-to-twitter-manager.php:
|
63 |
msgid "Cligs API Key Updated"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: wp-to-twitter-manager.php:
|
67 |
msgid ""
|
68 |
"Cli.gs API Key deleted. Cli.gs created by WP to Twitter will no longer be "
|
69 |
"associated with your account. "
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: wp-to-twitter-manager.php:
|
73 |
msgid ""
|
74 |
"Cli.gs API Key not added - <a href='http://cli.gs/user/api/'>get one here</"
|
75 |
"a>! "
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: wp-to-twitter-manager.php:
|
79 |
msgid "Bit.ly API Key Updated."
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: wp-to-twitter-manager.php:
|
83 |
msgid ""
|
84 |
"Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: wp-to-twitter-manager.php:
|
88 |
msgid ""
|
89 |
"Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</"
|
90 |
"a>! "
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: wp-to-twitter-manager.php:
|
94 |
msgid " Bit.ly User Login Updated."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: wp-to-twitter-manager.php:
|
98 |
msgid ""
|
99 |
"Bit.ly User Login deleted. You cannot use the Bit.ly API without providing "
|
100 |
"your username. "
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: wp-to-twitter-manager.php:
|
104 |
msgid ""
|
105 |
"Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: wp-to-twitter-manager.php:
|
109 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: wp-to-twitter-manager.php:
|
113 |
-
msgid "
|
|
|
|
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: wp-to-twitter-manager.php:
|
117 |
-
msgid "Successfully contacted the Bit.ly API
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: wp-to-twitter-manager.php:
|
121 |
-
msgid "Failed to contact the Bit.ly API
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: wp-to-twitter-manager.php:
|
125 |
-
msgid "Successfully contacted the Twitter API
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: wp-to-twitter-manager.php:
|
129 |
-
msgid "Failed to contact the Twitter API
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: wp-to-twitter-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
msgid ""
|
134 |
-
"Your server
|
135 |
-
"to Twitter to function."
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: wp-to-twitter-manager.php:
|
139 |
-
msgid "Your server does not support <code>fputs</code
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: wp-to-twitter-manager.php:
|
143 |
msgid ""
|
144 |
-
"Your server does not support <code>file_get_contents</code> or
|
145 |
-
"code> functions
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: wp-to-twitter-manager.php:
|
149 |
-
msgid "Your server does not support <code>Snoopy</code
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: wp-to-twitter-manager.php:
|
153 |
msgid ""
|
154 |
-
"Your server does not appear to support the required PHP
|
155 |
-
"classes for WP to Twitter to function
|
156 |
-
"aren't perfect - but no guarantees
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: wp-to-twitter-manager.php:
|
160 |
msgid "This plugin may not work in your server environment."
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: wp-to-twitter-manager.php:
|
164 |
msgid "WP to Twitter Options"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: wp-to-twitter-manager.php:
|
168 |
msgid ""
|
169 |
"For any update field, you can use the codes <code>#title#</code> for the "
|
170 |
-
"title of your blog post, <code>#blog#</code> for the title of your blog,
|
171 |
-
"<code>#
|
172 |
-
"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: wp-to-twitter-manager.php:
|
176 |
msgid ""
|
177 |
"One or more of your last posts has failed to send it's status update to "
|
178 |
"Twitter. Your Tweet has been saved in the custom meta data for your post, "
|
179 |
"and you can re-Tweet it at your leisure."
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: wp-to-twitter-manager.php:
|
183 |
msgid ""
|
184 |
"The query to the URL shortener API failed, and your URL was not shrunk. The "
|
185 |
"full post URL was attached to your Tweet."
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: wp-to-twitter-manager.php:
|
189 |
msgid "Clear 'WP to Twitter' Error Messages"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: wp-to-twitter-manager.php:
|
193 |
msgid "Wordpress to Twitter Publishing Options"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: wp-to-twitter-manager.php:
|
197 |
-
msgid "Update Twitter when new Wordpress Pages are published"
|
198 |
-
msgstr ""
|
199 |
-
|
200 |
-
#: wp-to-twitter-manager.php:314
|
201 |
-
msgid "Update Twitter when WordPress Pages are edited"
|
202 |
-
msgstr ""
|
203 |
-
|
204 |
-
#: wp-to-twitter-manager.php:318
|
205 |
msgid "Update when a post is published"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: wp-to-twitter-manager.php:
|
209 |
msgid "Text for new post updates:"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: wp-to-twitter-manager.php:
|
213 |
msgid "Provide link to blog?"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: wp-to-twitter-manager.php:
|
217 |
msgid "Update when a post is edited"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: wp-to-twitter-manager.php:
|
221 |
msgid "Text for editing updates:"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: wp-to-twitter-manager.php:
|
225 |
msgid "Add tags as hashtags on Tweets"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: wp-to-twitter-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
msgid "Update Twitter when you post a Blogroll link"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: wp-to-twitter-manager.php:
|
233 |
msgid "Use <strong>link title</strong> for Twitter updates"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: wp-to-twitter-manager.php:
|
237 |
msgid "Use <strong>link description</strong> for Twitter updates"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: wp-to-twitter-manager.php:
|
241 |
msgid "Text for new link updates (used if title/description isn't available.):"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: wp-to-twitter-manager.php:
|
245 |
msgid "Set default Tweet status to 'No.'"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: wp-to-twitter-manager.php:
|
249 |
msgid ""
|
250 |
"Twitter updates can be set on a post by post basis. By default, posts WILL "
|
251 |
"be posted to Twitter. Check this to change the default to NO."
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: wp-to-twitter-manager.php:
|
255 |
msgid ""
|
256 |
"Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: wp-to-twitter-manager.php:
|
260 |
msgid "Update Twitter when a post is published using QuickPress"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: wp-to-twitter-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
msgid "Custom text prepended to Tweets:"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: wp-to-twitter-manager.php:
|
268 |
msgid "Custom text appended to Tweets:"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: wp-to-twitter-manager.php:
|
272 |
msgid "Custom field for an alternate URL to be shortened and Tweeted:"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: wp-to-twitter-manager.php:
|
276 |
msgid ""
|
277 |
"You can use a custom field to send Cli.gs and Twitter an alternate URL from "
|
278 |
"the permalink provided by WordPress. The value is the name of the custom "
|
279 |
"field you're using to add an external URL."
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: wp-to-twitter-manager.php:
|
283 |
msgid "Use Google Analytics with WP-to-Twitter"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: wp-to-twitter-manager.php:
|
287 |
msgid "Campaign identifier for Google Analytics:"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: wp-to-twitter-manager.php:
|
291 |
msgid ""
|
292 |
"You can track the response from Twitter using Google Analytics by defining a "
|
293 |
"campaign identifier here."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: wp-to-twitter-manager.php:
|
297 |
msgid "Authors have individual Twitter accounts"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: wp-to-twitter-manager.php:
|
301 |
msgid ""
|
302 |
"Each author can set their own Twitter username and password in their user "
|
303 |
"profile. Their posts will be sent to their own Twitter accounts."
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: wp-to-twitter-manager.php:
|
307 |
msgid "Use <strong>Cli.gs</strong> for my URL shortener."
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: wp-to-twitter-manager.php:
|
311 |
msgid "Use <strong>Bit.ly</strong> for my URL shortener."
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: wp-to-twitter-manager.php:
|
315 |
msgid "Don't shorten URLs."
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: wp-to-twitter-manager.php:
|
319 |
msgid "Save WP->Twitter Options"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: wp-to-twitter-manager.php:
|
323 |
msgid "Your Twitter account details"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: wp-to-twitter-manager.php:
|
327 |
msgid "Your Twitter username:"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: wp-to-twitter-manager.php:
|
331 |
msgid "Your Twitter password:"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: wp-to-twitter-manager.php:
|
|
|
|
|
|
|
|
|
335 |
msgid "Save Twitter Login Info"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: wp-to-twitter-manager.php:
|
339 |
msgid ""
|
340 |
"» <small>Don't have a Twitter account? <a href='http://www.twitter."
|
341 |
"com'>Get one for free here</a>"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: wp-to-twitter-manager.php:
|
345 |
msgid "Your Cli.gs account details"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: wp-to-twitter-manager.php:
|
349 |
msgid ""
|
350 |
"Your Cli.gs <abbr title='application programming interface'>API</abbr> Key:"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: wp-to-twitter-manager.php:
|
354 |
msgid ""
|
355 |
"Don't have a Cli.gs account or Cligs API key? <a href='http://cli.gs/user/"
|
356 |
"api/'>Get one free here</a>!<br />You'll need an API key in order to "
|
357 |
"associate the Cligs you create with your Cligs account."
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: wp-to-twitter-manager.php:
|
361 |
msgid "Your Bit.ly account details"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: wp-to-twitter-manager.php:
|
365 |
msgid "Your Bit.ly username:"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: wp-to-twitter-manager.php:
|
369 |
msgid ""
|
370 |
"Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: wp-to-twitter-manager.php:
|
374 |
msgid "Need help?"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: wp-to-twitter-manager.php:
|
378 |
msgid ""
|
379 |
"Visit the <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to "
|
380 |
"Twitter plugin page</a>."
|
381 |
msgstr ""
|
382 |
|
|
|
|
|
|
|
|
|
383 |
#. #-#-#-#-# plugin.pot (PACKAGE VERSION) #-#-#-#-#
|
384 |
#. Plugin Name of an extension
|
385 |
-
#: wp-to-twitter.php:
|
386 |
msgid "WP to Twitter"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: wp-to-twitter.php:
|
390 |
msgid "Twitter Post"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: wp-to-twitter.php:
|
394 |
msgid ""
|
395 |
" characters.<br />Twitter posts are a maximum of 140 characters; if your Cli."
|
396 |
"gs URL is appended to the end of your document, you have 119 characters "
|
397 |
-
"available. You can use <code>#url#</code>, <code>#title#</code>,
|
398 |
-
"<code>#blog#</code> to insert the shortened URL, post
|
399 |
-
"into the Tweet."
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: wp-to-twitter.php:
|
403 |
msgid "Get Support"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: wp-to-twitter.php:
|
407 |
msgid "Don't Tweet this post."
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: wp-to-twitter.php:
|
411 |
msgid "WP to Twitter User Settings"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: wp-to-twitter.php:
|
415 |
msgid "Use My Twitter Account"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: wp-to-twitter.php:
|
419 |
msgid ""
|
420 |
"Select this option if you would like your posts to be Tweeted into your own "
|
421 |
"Twitter account with no @ references."
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: wp-to-twitter.php:
|
425 |
msgid ""
|
426 |
"Tweet my posts into my Twitter account with an @ reference to the site's "
|
427 |
"main Twitter account."
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: wp-to-twitter.php:
|
431 |
msgid ""
|
432 |
"Tweet my posts into the main site Twitter account with an @ reference to my "
|
433 |
"username. (Password not required with this option.)"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: wp-to-twitter.php:
|
437 |
msgid "Your Twitter Username"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: wp-to-twitter.php:
|
441 |
msgid "Enter your own Twitter username."
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: wp-to-twitter.php:
|
445 |
msgid "Your Twitter Password"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: wp-to-twitter.php:
|
449 |
msgid "Enter your own Twitter password."
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: wp-to-twitter.php:
|
453 |
msgid "Settings"
|
454 |
msgstr ""
|
455 |
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: PACKAGE VERSION\n"
|
10 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n"
|
11 |
+
"POT-Creation-Date: 2009-09-16 18:42+0000\n"
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
16 |
"Content-Type: text/plain; charset=CHARSET\n"
|
17 |
"Content-Transfer-Encoding: 8bit\n"
|
18 |
|
19 |
+
#: wp-to-twitter-manager.php:55
|
20 |
msgid ""
|
21 |
"Set your Twitter login information and URL shortener API information to use "
|
22 |
"this plugin!"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: wp-to-twitter-manager.php:61
|
26 |
msgid "Please add your Twitter password. "
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: wp-to-twitter-manager.php:67
|
30 |
msgid "WP to Twitter Errors Cleared"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: wp-to-twitter-manager.php:73
|
34 |
msgid ""
|
35 |
"URL shortener request failed! We couldn't shrink that URL, so we attached "
|
36 |
"the normal URL to your Tweet. Check with your URL shortening provider to see "
|
38 |
"a>] [<a href=\"http://blog.bit.ly\">Bit.ly Blog</a>]"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: wp-to-twitter-manager.php:77
|
42 |
msgid ""
|
43 |
"Sorry! I couldn't get in touch with the Twitter servers to post your new "
|
44 |
"blog post. Your tweet has been stored in a custom field attached to the "
|
45 |
"post, so you can Tweet it manually if you wish! "
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: wp-to-twitter-manager.php:79
|
49 |
msgid ""
|
50 |
"Sorry! I couldn't get in touch with the Twitter servers to post your "
|
51 |
"<strong>new link</strong>! You'll have to post it manually, I'm afraid. "
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: wp-to-twitter-manager.php:137
|
55 |
+
msgid ""
|
56 |
+
"You must add your Bit.ly login and API key in order to shorten URLs with Bit."
|
57 |
+
"ly."
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: wp-to-twitter-manager.php:148
|
61 |
+
msgid "WP to Twitter Options Updated"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: wp-to-twitter-manager.php:158
|
65 |
msgid "Twitter login and password updated. "
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: wp-to-twitter-manager.php:160
|
69 |
msgid "You need to provide your twitter login and password! "
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: wp-to-twitter-manager.php:167
|
73 |
msgid "Cligs API Key Updated"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: wp-to-twitter-manager.php:170
|
77 |
msgid ""
|
78 |
"Cli.gs API Key deleted. Cli.gs created by WP to Twitter will no longer be "
|
79 |
"associated with your account. "
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: wp-to-twitter-manager.php:172
|
83 |
msgid ""
|
84 |
"Cli.gs API Key not added - <a href='http://cli.gs/user/api/'>get one here</"
|
85 |
"a>! "
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: wp-to-twitter-manager.php:178
|
89 |
msgid "Bit.ly API Key Updated."
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: wp-to-twitter-manager.php:181
|
93 |
msgid ""
|
94 |
"Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: wp-to-twitter-manager.php:183
|
98 |
msgid ""
|
99 |
"Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</"
|
100 |
"a>! "
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: wp-to-twitter-manager.php:187
|
104 |
msgid " Bit.ly User Login Updated."
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: wp-to-twitter-manager.php:190
|
108 |
msgid ""
|
109 |
"Bit.ly User Login deleted. You cannot use the Bit.ly API without providing "
|
110 |
"your username. "
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: wp-to-twitter-manager.php:192
|
114 |
msgid ""
|
115 |
"Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: wp-to-twitter-manager.php:224
|
119 |
+
msgid ""
|
120 |
+
"<li>Successfully contacted the Cli.gs API via Snoopy, but the URL creation "
|
121 |
+
"failed.</li>"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: wp-to-twitter-manager.php:226
|
125 |
+
msgid ""
|
126 |
+
"<li>Successfully contacted the Cli.gs API via Snoopy, but a Cli.gs server "
|
127 |
+
"error prevented the URL from being shrotened.</li>"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: wp-to-twitter-manager.php:228
|
131 |
+
msgid ""
|
132 |
+
"<li>Successfully contacted the Cli.gs API via Snoopy and created a shortened "
|
133 |
+
"link.</li>"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: wp-to-twitter-manager.php:237 wp-to-twitter-manager.php:259
|
137 |
+
msgid "<li>Successfully contacted the Bit.ly API via Snoopy.</li>"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: wp-to-twitter-manager.php:239 wp-to-twitter-manager.php:261
|
141 |
+
msgid "<li>Failed to contact the Bit.ly API via Snoopy.</li>"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: wp-to-twitter-manager.php:243
|
145 |
+
msgid "<li>Successfully contacted the Twitter API via Snoopy.</li>"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: wp-to-twitter-manager.php:245
|
149 |
+
msgid "<li>Failed to contact the Twitter API via Snoopy.</li>"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: wp-to-twitter-manager.php:251
|
153 |
+
msgid "<li>Successfully contacted the Twitter API via cURL.</li>"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: wp-to-twitter-manager.php:253
|
157 |
+
msgid "<li>Failed to contact the Twitter API via cURL.</li>"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: wp-to-twitter-manager.php:265
|
161 |
+
msgid "<li>Successfully contacted the Cli.gs API via Snoopy.</li>"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#: wp-to-twitter-manager.php:268
|
165 |
+
msgid "<li>Failed to contact the Cli.gs API via Snoopy.</li>"
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: wp-to-twitter-manager.php:273
|
169 |
msgid ""
|
170 |
+
"<li><strong>Your server should run WP to Twitter successfully.</strong></li>"
|
|
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: wp-to-twitter-manager.php:278
|
174 |
+
msgid "<li>Your server does not support <code>fputs</code>.</li>"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: wp-to-twitter-manager.php:282
|
178 |
msgid ""
|
179 |
+
"<li>Your server does not support <code>file_get_contents</code> or "
|
180 |
+
"<code>cURL</code> functions.</li>"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: wp-to-twitter-manager.php:286
|
184 |
+
msgid "<li>Your server does not support <code>Snoopy</code>.</li>"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: wp-to-twitter-manager.php:289
|
188 |
msgid ""
|
189 |
+
"<li><strong>Your server does not appear to support the required PHP "
|
190 |
+
"functions and classes for WP to Twitter to function.</strong> You can try it "
|
191 |
+
"anyway - these tests aren't perfect - but no guarantees.</li>"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: wp-to-twitter-manager.php:298
|
195 |
msgid "This plugin may not work in your server environment."
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: wp-to-twitter-manager.php:309
|
199 |
msgid "WP to Twitter Options"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: wp-to-twitter-manager.php:311
|
203 |
msgid ""
|
204 |
"For any update field, you can use the codes <code>#title#</code> for the "
|
205 |
+
"title of your blog post, <code>#blog#</code> for the title of your blog, "
|
206 |
+
"<code>#post#</code> for a short excerpt of the post content or <code>#url#</"
|
207 |
+
"code> for the post URL (shortened or not, depending on your preferences.)"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: wp-to-twitter-manager.php:318
|
211 |
msgid ""
|
212 |
"One or more of your last posts has failed to send it's status update to "
|
213 |
"Twitter. Your Tweet has been saved in the custom meta data for your post, "
|
214 |
"and you can re-Tweet it at your leisure."
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: wp-to-twitter-manager.php:321
|
218 |
msgid ""
|
219 |
"The query to the URL shortener API failed, and your URL was not shrunk. The "
|
220 |
"full post URL was attached to your Tweet."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: wp-to-twitter-manager.php:333
|
224 |
msgid "Clear 'WP to Twitter' Error Messages"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: wp-to-twitter-manager.php:345
|
228 |
msgid "Wordpress to Twitter Publishing Options"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: wp-to-twitter-manager.php:349
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
msgid "Update when a post is published"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: wp-to-twitter-manager.php:349
|
236 |
msgid "Text for new post updates:"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: wp-to-twitter-manager.php:352 wp-to-twitter-manager.php:360
|
240 |
msgid "Provide link to blog?"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: wp-to-twitter-manager.php:357
|
244 |
msgid "Update when a post is edited"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: wp-to-twitter-manager.php:357
|
248 |
msgid "Text for editing updates:"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: wp-to-twitter-manager.php:364
|
252 |
msgid "Add tags as hashtags on Tweets"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: wp-to-twitter-manager.php:368
|
256 |
+
msgid "Update Twitter when new Wordpress Pages are published"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: wp-to-twitter-manager.php:372
|
260 |
+
msgid "Update Twitter when WordPress Pages are edited"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: wp-to-twitter-manager.php:376
|
264 |
msgid "Update Twitter when you post a Blogroll link"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: wp-to-twitter-manager.php:376
|
268 |
msgid "Use <strong>link title</strong> for Twitter updates"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: wp-to-twitter-manager.php:376
|
272 |
msgid "Use <strong>link description</strong> for Twitter updates"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: wp-to-twitter-manager.php:376
|
276 |
msgid "Text for new link updates (used if title/description isn't available.):"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: wp-to-twitter-manager.php:381
|
280 |
msgid "Set default Tweet status to 'No.'"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: wp-to-twitter-manager.php:382
|
284 |
msgid ""
|
285 |
"Twitter updates can be set on a post by post basis. By default, posts WILL "
|
286 |
"be posted to Twitter. Check this to change the default to NO."
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: wp-to-twitter-manager.php:386
|
290 |
msgid ""
|
291 |
"Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: wp-to-twitter-manager.php:390
|
295 |
msgid "Update Twitter when a post is published using QuickPress"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: wp-to-twitter-manager.php:394
|
299 |
+
msgid "Length of post excerpt (in characters):"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: wp-to-twitter-manager.php:394
|
303 |
+
msgid ""
|
304 |
+
"By default, extracted from the post itself. If you use the 'Excerpt' field, "
|
305 |
+
"that will be used instead."
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: wp-to-twitter-manager.php:398
|
309 |
msgid "Custom text prepended to Tweets:"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: wp-to-twitter-manager.php:402
|
313 |
msgid "Custom text appended to Tweets:"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: wp-to-twitter-manager.php:406
|
317 |
msgid "Custom field for an alternate URL to be shortened and Tweeted:"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: wp-to-twitter-manager.php:407
|
321 |
msgid ""
|
322 |
"You can use a custom field to send Cli.gs and Twitter an alternate URL from "
|
323 |
"the permalink provided by WordPress. The value is the name of the custom "
|
324 |
"field you're using to add an external URL."
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: wp-to-twitter-manager.php:411
|
328 |
msgid "Use Google Analytics with WP-to-Twitter"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: wp-to-twitter-manager.php:412
|
332 |
msgid "Campaign identifier for Google Analytics:"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: wp-to-twitter-manager.php:413
|
336 |
msgid ""
|
337 |
"You can track the response from Twitter using Google Analytics by defining a "
|
338 |
"campaign identifier here."
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: wp-to-twitter-manager.php:418
|
342 |
msgid "Authors have individual Twitter accounts"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: wp-to-twitter-manager.php:418
|
346 |
msgid ""
|
347 |
"Each author can set their own Twitter username and password in their user "
|
348 |
"profile. Their posts will be sent to their own Twitter accounts."
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: wp-to-twitter-manager.php:423
|
352 |
msgid "Use <strong>Cli.gs</strong> for my URL shortener."
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: wp-to-twitter-manager.php:423
|
356 |
msgid "Use <strong>Bit.ly</strong> for my URL shortener."
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: wp-to-twitter-manager.php:423
|
360 |
msgid "Don't shorten URLs."
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: wp-to-twitter-manager.php:428
|
364 |
msgid "Save WP->Twitter Options"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: wp-to-twitter-manager.php:434
|
368 |
msgid "Your Twitter account details"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: wp-to-twitter-manager.php:441
|
372 |
msgid "Your Twitter username:"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: wp-to-twitter-manager.php:445
|
376 |
msgid "Your Twitter password:"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: wp-to-twitter-manager.php:445
|
380 |
+
msgid "(<em>Saved</em>)"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: wp-to-twitter-manager.php:449
|
384 |
msgid "Save Twitter Login Info"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: wp-to-twitter-manager.php:449
|
388 |
msgid ""
|
389 |
"» <small>Don't have a Twitter account? <a href='http://www.twitter."
|
390 |
"com'>Get one for free here</a>"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: wp-to-twitter-manager.php:453
|
394 |
msgid "Your Cli.gs account details"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: wp-to-twitter-manager.php:460
|
398 |
msgid ""
|
399 |
"Your Cli.gs <abbr title='application programming interface'>API</abbr> Key:"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: wp-to-twitter-manager.php:466
|
403 |
msgid ""
|
404 |
"Don't have a Cli.gs account or Cligs API key? <a href='http://cli.gs/user/"
|
405 |
"api/'>Get one free here</a>!<br />You'll need an API key in order to "
|
406 |
"associate the Cligs you create with your Cligs account."
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: wp-to-twitter-manager.php:471
|
410 |
msgid "Your Bit.ly account details"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: wp-to-twitter-manager.php:477
|
414 |
msgid "Your Bit.ly username:"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: wp-to-twitter-manager.php:481
|
418 |
msgid ""
|
419 |
"Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: wp-to-twitter-manager.php:507
|
423 |
msgid "Need help?"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: wp-to-twitter-manager.php:508
|
427 |
msgid ""
|
428 |
"Visit the <a href='http://www.joedolson.com/articles/wp-to-twitter/'>WP to "
|
429 |
"Twitter plugin page</a>."
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: wp-to-twitter.php:822
|
433 |
+
msgid "Add_new_tag"
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
#. #-#-#-#-# plugin.pot (PACKAGE VERSION) #-#-#-#-#
|
437 |
#. Plugin Name of an extension
|
438 |
+
#: wp-to-twitter.php:842
|
439 |
msgid "WP to Twitter"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: wp-to-twitter.php:883
|
443 |
msgid "Twitter Post"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: wp-to-twitter.php:888
|
447 |
msgid ""
|
448 |
" characters.<br />Twitter posts are a maximum of 140 characters; if your Cli."
|
449 |
"gs URL is appended to the end of your document, you have 119 characters "
|
450 |
+
"available. You can use <code>#url#</code>, <code>#title#</code>, "
|
451 |
+
"<code>#post#</code> or <code>#blog#</code> to insert the shortened URL, post "
|
452 |
+
"title, a post excerpt or blog name into the Tweet."
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: wp-to-twitter.php:888
|
456 |
msgid "Get Support"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: wp-to-twitter.php:891
|
460 |
msgid "Don't Tweet this post."
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: wp-to-twitter.php:943
|
464 |
msgid "WP to Twitter User Settings"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: wp-to-twitter.php:947
|
468 |
msgid "Use My Twitter Account"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: wp-to-twitter.php:948
|
472 |
msgid ""
|
473 |
"Select this option if you would like your posts to be Tweeted into your own "
|
474 |
"Twitter account with no @ references."
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: wp-to-twitter.php:949
|
478 |
msgid ""
|
479 |
"Tweet my posts into my Twitter account with an @ reference to the site's "
|
480 |
"main Twitter account."
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: wp-to-twitter.php:950
|
484 |
msgid ""
|
485 |
"Tweet my posts into the main site Twitter account with an @ reference to my "
|
486 |
"username. (Password not required with this option.)"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: wp-to-twitter.php:953
|
490 |
msgid "Your Twitter Username"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: wp-to-twitter.php:954
|
494 |
msgid "Enter your own Twitter username."
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: wp-to-twitter.php:957
|
498 |
msgid "Your Twitter Password"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: wp-to-twitter.php:958
|
502 |
msgid "Enter your own Twitter password."
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: wp-to-twitter.php:1036
|
506 |
msgid "Settings"
|
507 |
msgstr ""
|
508 |
|