friendica-addons/buglink/buglink.php

27 lines
782 B
PHP
Raw Normal View History

2011-11-10 23:14:00 -05:00
<?php
/**
* Name: BugLink
* Description: Show link to Friendica bug site at bottom of page
* Version: 1.0
* Author: Mike Macgirvin <mike@macgirvin.com>
*/
2018-07-29 16:22:50 -04:00
use Friendica\App;
use Friendica\Core\Addon;
2018-01-22 17:19:53 -05:00
use Friendica\Core\L10n;
2011-11-10 23:14:00 -05:00
2018-01-22 14:03:11 -05:00
function buglink_install()
{
Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
2011-11-10 23:14:00 -05:00
2018-01-22 14:03:11 -05:00
function buglink_uninstall()
{
Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
2011-11-10 23:14:00 -05:00
2018-07-29 16:22:50 -04:00
function buglink_active(App $a, &$b)
2018-01-22 14:03:11 -05:00
{
$b .= '<div id="buglink_wrapper" style="position: fixed; bottom: 5px; left: 5px;"><a href="https://github.com/friendica/friendica/issues" target="_blank" title="' . L10n::t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . L10n::t('Report Bug') . '" /></a></div>';
}