Index: trunk/extensions/AddThis/AddThis.body.php |
— | — | @@ -22,9 +22,9 @@ |
23 | 23 | # Output AddThis widget |
24 | 24 | $output ='<!-- AddThis Button BEGIN --> |
25 | 25 | <div class="addthis_toolbox addthis_default_style" id="addthistoolbar" style="background:'.$wgAddThisBackground.'; border-color:'.$wgAddThisBorder.';"> |
26 | | - <a href="http://www.addthis.com/bookmark.php?v=250&pubid=ra-4eb75def4ec6488b" class="addthis_button_compact"> ' . $share . '</a><span class="addthis_separator"> </span>'; |
| 26 | + <a href="http://www.addthis.com/bookmark.php?v=250&pubid='.$wgAddThispubid.'" class="addthis_button_compact"> ' . $share . '</a><span class="addthis_separator"> </span>'; |
27 | 27 | |
28 | | - $output = self::makeLinks( $wgAddThisHServ ); |
| 28 | + $output .= self::makeLinks( $wgAddThisHServ ); |
29 | 29 | $output .='</div> |
30 | 30 | <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid='.$wgAddThispubid.'"></script> |
31 | 31 | <!-- AddThis Button END -->'; |
— | — | @@ -33,36 +33,6 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | | - * Function for sidebar portlet |
38 | | - * |
39 | | - * @param $skin |
40 | | - * @param $bar |
41 | | - * @return array|bool|string |
42 | | - */ |
43 | | - public static function AddThisSidebar( $skin, &$bar ) { |
44 | | - global $wgOut, $wgAddThispubid, $wgAddThisSidebar, $wgAddThisSBServ; |
45 | | - |
46 | | - # Load css stylesheet |
47 | | - $wgOut->addModuleStyles( 'ext.addThis' ); |
48 | | - # Check setting to enable/disable sidebar portlet |
49 | | - if ( $wgAddThisSidebar ) { |
50 | | - # Output AddThis widget |
51 | | - $bar['addthis'] = '<!-- AddThis Button BEGIN --> |
52 | | - <div class="addthis_toolbox addthis_default_style" id="addthissidebar">'; |
53 | | - |
54 | | - $bar['addthis'] .= self::makeLinks( $wgAddThisSBServ ); |
55 | | - |
56 | | - $bar['addthis'] .= '</div> |
57 | | - <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid='.$wgAddThispubid.'"></script> |
58 | | - <!-- AddThis Button END -->'; |
59 | | - |
60 | | - // FIXME: This is a hook, should we really be returning a string here? |
61 | | - return $bar; |
62 | | - } |
63 | | - return true; |
64 | | - } |
65 | | - |
66 | | - /** |
67 | 37 | * Function for article header toolbar |
68 | 38 | * |
69 | 39 | * @param $article Article |
— | — | @@ -93,7 +63,7 @@ |
94 | 64 | # Output AddThis widget |
95 | 65 | $wgOut->addHTML('<!-- AddThis Button BEGIN --> |
96 | 66 | <div class="addthis_toolbox addthis_default_style" id="addthistoolbar" style="background:'.$wgAddThisBackground.'; border-color:'.$wgAddThisBorder.';"> |
97 | | - <a href="http://www.addthis.com/bookmark.php?v=250&pubid=ra-4eb75def4ec6488b" class="addthis_button_compact"> ' . $share . '</a><span class="addthis_separator"> </span>'); |
| 67 | + <a href="http://www.addthis.com/bookmark.php?v=250&pubid='.$wgAddThispubid.'" class="addthis_button_compact"> ' . $share . '</a><span class="addthis_separator"> </span>'); |
98 | 68 | |
99 | 69 | $wgOut->addHTML( self::makeLinks( $wgAddThisHServ ) ); |
100 | 70 | |
— | — | @@ -107,6 +77,36 @@ |
108 | 78 | } |
109 | 79 | |
110 | 80 | /** |
| 81 | + * Function for sidebar portlet |
| 82 | + * |
| 83 | + * @param $skin |
| 84 | + * @param $bar |
| 85 | + * @return array|bool|string |
| 86 | + */ |
| 87 | + public static function AddThisSidebar( $skin, &$bar ) { |
| 88 | + global $wgOut, $wgAddThispubid, $wgAddThisSidebar, $wgAddThisSBServ; |
| 89 | + |
| 90 | + # Load css stylesheet |
| 91 | + $wgOut->addModuleStyles( 'ext.addThis' ); |
| 92 | + # Check setting to enable/disable sidebar portlet |
| 93 | + if ( $wgAddThisSidebar ) { |
| 94 | + # Output AddThis widget |
| 95 | + $bar['addthis'] = '<!-- AddThis Button BEGIN --> |
| 96 | + <div class="addthis_toolbox addthis_default_style" id="addthissidebar">'; |
| 97 | + |
| 98 | + $bar['addthis'] .= self::makeLinks( $wgAddThisSBServ ); |
| 99 | + |
| 100 | + $bar['addthis'] .= '</div> |
| 101 | + <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid='.$wgAddThispubid.'"></script> |
| 102 | + <!-- AddThis Button END -->'; |
| 103 | + |
| 104 | + // FIXME: This is a hook, should we really be returning a string here? |
| 105 | + return $bar; |
| 106 | + } |
| 107 | + return true; |
| 108 | + } |
| 109 | + |
| 110 | + /** |
111 | 111 | * Converts an array definition of links into HTML tags |
112 | 112 | * |
113 | 113 | * @param $links array |
Index: trunk/extensions/AddThis/AddThis.i18n.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | */ |
15 | 15 | $messages['en'] = array( |
16 | 16 | 'addthis' => 'Share', |
17 | | - 'addthis-desc' => 'Adds [http://www.addthis.com AddThis widget] to the sidebar and creates toolbar displayed on page header or by using <nowiki><addthis /></nowiki> tag', |
| 17 | + 'addthis-desc' => 'Adds [http://www.addthis.com AddThis widget] to the sidebar and displays a toolbar on page headers which can be reproduced anywhere by inserting the <nowiki><addthis /></nowiki> tag', |
18 | 18 | ); |
19 | 19 | |
20 | 20 | /** German (Deutsch) |
Index: trunk/extensions/AddThis/AddThis.php |
— | — | @@ -11,6 +11,8 @@ |
12 | 12 | * Loosely based on the Google Translator extension by Joachim De Schrijver |
13 | 13 | * Thank you to Unikum111 for Russian translation, bug reporting and feedback |
14 | 14 | * Thank you to Johnduhart for feedback and cleaning up code |
| 15 | + * Thank you to Raymond, Kghbln, Michawiki, Toliño, McDutchie, Bjankuloski06, SPQRobin, Gucci Mane Burrr, |
| 16 | + * and others mentioned in AddThis.i18n.php for translation work |
15 | 17 | */ |
16 | 18 | |
17 | 19 | /** |