Commit 3b3827d9 authored by friendica's avatar friendica
parents 10a45a73 b11dfbc3
No preview for this file type
......@@ -11,18 +11,20 @@
*/
function flattrwidget_load() {
register_hook('channel_mod_aside', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_channel_mod_aside');
register_hook('construct_page', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_construct_page');
register_hook('feature_settings', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_settings');
register_hook('feature_settings_post', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_settings_post');
}
function flattrwidget_unload() {
unregister_hook('channel_mod_aside', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_channel_mod_aside');
unregister_hook('construct_page', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_construct_page');
unregister_hook('feature_settings', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_settings');
unregister_hook('feature_settings_post', 'addon/flattrwidget/flattrwidget.php', 'flattrwidget_settings_post');
}
function flattrwidget_channel_mod_aside(&$a,&$b) {
function flattrwidget_construct_page(&$a,&$b) {
if (! $b['module']=='channel')
return;
$id = $a->profile['profile_uid'];
$enable = intval(get_pconfig($id,'flattrwidget','enable'));
if (! $enable)
......@@ -54,7 +56,11 @@ function flattrwidget_channel_mod_aside(&$a,&$b) {
// put the widget content together
$flattrwidget = '<div id="flattr-widget">'.$code.'</div>';
// place the widget into the selected aside area
$a->set_widget( $title, $flattrwidget, $lr);
if ($lr=='right_aside') {
$b['layout']['region_right_aside'] = $flattrwidget . $b['layout']['region_right_aside'];
} else {
$b['layout']['region_aside'] = $flattrwidget . $b['layout']['region_aside'];
}
}
function flattrwidget_settings_post($a,$s) {
if(! local_user() || (! x($_POST,'flattrwidget-settings-submit')))
......
smiley_pack/icons/drink/tea.gif

9.68 KB | W: | H:

smiley_pack/icons/drink/tea.gif

9.68 KB | W: | H:

smiley_pack/icons/drink/tea.gif
smiley_pack/icons/drink/tea.gif
smiley_pack/icons/drink/tea.gif
smiley_pack/icons/drink/tea.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -89,7 +89,6 @@ function show_button($a, &$b) {
':facepalm',
':like',
':dislike',
'~friendica',
'red#'
);
......@@ -116,7 +115,6 @@ function show_button($a, &$b) {
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/rhash-16.png" alt="red" />'
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment