1 && argv(1) == 'show' && $_REQUEST['addr']) { header("Content-Type: image/png"); $im = ImageCreateFromPng('addon/likebanner/like_banner.png'); $black = ImageColorAllocate($im, 0,0,0); $start_x = 18; $start_y = 110; $fontsize=(($_REQUEST['size'])? intval($_REQUEST['size']) : 28); imagettftext($im,$fontsize,0,$start_x,$start_y,$black, 'addon/likebanner/FreeSansBold.ttf',$_REQUEST['addr']); imagepng($im); ImageDestroy($im); killme(); } } function likebanner_content(&$a) { if(local_channel()) { $channel = $a->get_channel(); } else $channel = null; $o = '

Like Banner

'; $def = $_REQUEST['addr']; if($channel && (! $def)) { $def = $channel['xchan_addr']; } $o .= '
'; $o .= t('Your Webbie:'); $o .= '

'; $o .= ''; $o .= '

' . t('Fontsize (px):'); $o .= '

'; $o .= '

'; $o .= '


'; if($_REQUEST['addr']) { $o .= 'banner'; if($channel) { $p = q("select profile_guid from profile where uid = %d and is_default = 1 limit 1", intval($channel['channel_id']) ); if($p) { $link = z_root() . '/like/profile/' . $p[0]['profile_guid'] . '?f=&verb=like&interactive=1'; $o .= EOL . EOL . t('Link:') . EOL . ''; $html = '' . t('Like us on Hubzilla') . ''; $o .= EOL . EOL . t('Embed:') . EOL . ''; } } } return $o; }