Merge lp:~edb/quam-plures/twitter_plugin_v2 into lp:quam-plures

Proposed by EdB
Status: Merged
Approved by: Tilman Blumenbach
Approved revision: 7604
Merged at revision: 7607
Proposed branch: lp:~edb/quam-plures/twitter_plugin_v2
Merge into: lp:quam-plures
Diff against target: 40 lines (+10/-2)
2 files modified
qp_plugins/twitter_plugin/README.html (+2/-1)
qp_plugins/twitter_plugin/_twitter.plugin.php (+8/-1)
To merge this branch: bzr merge lp:~edb/quam-plures/twitter_plugin_v2
Reviewer Review Type Date Requested Status
Tilman Blumenbach (community) Approve
Yabs (community) Approve
Review via email: mp+65106@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Yabs (yabs) wrote :

easy one

¥

review: Approve
7603. By EdB

adding dracones branch

7604. By EdB

clean up posting and validating XHTML

Revision history for this message
EdB (edb) wrote :

bump?

Revision history for this message
Tilman Blumenbach (tblue) wrote :

Looks fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qp_plugins/twitter_plugin/README.html'
2--- qp_plugins/twitter_plugin/README.html 2010-12-20 18:06:43 +0000
3+++ qp_plugins/twitter_plugin/README.html 2011-06-25 14:51:05 +0000
4@@ -47,7 +47,7 @@
5 <dt>User Settings:</dt>
6 <dd><ul>
7 <li><span class="settings">Twitter account status</span>: IF the user has not connected to their twitter account they will see a button to connect, else they will see the twitter account they are connected to.</li>
8-<li><span class="settings">Message format</span>: This is the message that will be tweeted when posting. Each user can put plain text in here, or you can use some codes to make a fancy tweet. <strong>$twitcerpt$</strong> (default) provides an excerpt and link that totals 140 characters. <strong>$title$</strong> provides the post title, <strong>$excerpt$</strong> provides the same excerpt that might be used in feeds and appears under your post in edit mode, and <strong>$url$</strong> provides a permalink to the posted item.</li>
9+<li><span class="settings">Message format</span>: This is the message that will be tweeted when posting. Each user can put plain text in here, or you can use some codes to make a fancy tweet. <strong>$twitcerpt$</strong> (default) provides an excerpt (or title if there is no content excerpt) and link that totals 140 characters. <strong>$title$</strong> provides the post title, <strong>$excerpt$</strong> provides the same excerpt that might be used in feeds and appears under your post in edit mode, and <strong>$url$</strong> provides a permalink to the posted item.</li>
10 </ul></dd>
11 <dt>Blog Settings:</dt>
12 <dd><ul>
13@@ -87,6 +87,7 @@
14 <h2>Release History:</h2>
15 <div id="log">
16 <dl>
17+<dt>0.2</dt><dd>use title if no excerpt for $twitcerpt$ (18-Jun-11)</dd>
18 <dt>0.1</dt><dd>initial release (1-Jan-11)</dd>
19 </dl>
20 </div>
21
22=== modified file 'qp_plugins/twitter_plugin/_twitter.plugin.php'
23--- qp_plugins/twitter_plugin/_twitter.plugin.php 2010-12-31 12:12:03 +0000
24+++ qp_plugins/twitter_plugin/_twitter.plugin.php 2011-06-25 14:51:05 +0000
25@@ -441,7 +441,14 @@
26 $url = $params['Item']->get_permanent_url();
27 $short_url = $params['Item']->Blog->gen_blogurl().'?p='.$params['Item']->ID;
28 $clip_to = 140 - ( evo_strlen( $short_url ) + 4 );
29- $twitcerpt = trim( evo_substr( $excerpt, 0, $clip_to ) ).'... '.$short_url;
30+ if( $excerpt != '' )
31+ { // if we have an excerpt then use it
32+ $twitcerpt = trim( evo_substr( $excerpt, 0, $clip_to ) ).'... '.$short_url;
33+ }
34+ else
35+ { // no excerpt? use the title
36+ $twitcerpt = trim( evo_substr( $title, 0, $clip_to ) ).'... '.$short_url;
37+ }
38
39 $msg = str_replace( '$title$', $title, $msg );
40 $msg = str_replace( '$excerpt$', $excerpt, $msg );

Subscribers

People subscribed via source and target branches