2012-03-30 12:35:55 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Name: NameThingy
|
|
|
|
* Description: The Ultimate Random Name Generator
|
|
|
|
* Version: 1.0
|
|
|
|
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
2018-02-08 05:40:21 +00:00
|
|
|
* Status: Unsupported
|
2012-03-30 12:35:55 +00:00
|
|
|
*/
|
2022-06-23 05:16:22 +00:00
|
|
|
|
|
|
|
use Friendica\App;
|
2018-12-26 07:28:16 +00:00
|
|
|
use Friendica\Core\Hook;
|
2019-12-30 02:55:10 +00:00
|
|
|
use Friendica\DI;
|
2012-03-30 12:35:55 +00:00
|
|
|
|
2022-06-23 05:16:22 +00:00
|
|
|
function namethingy_install()
|
|
|
|
{
|
|
|
|
Hook::register('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
|
2012-03-30 12:35:55 +00:00
|
|
|
}
|
|
|
|
|
2022-06-23 05:16:22 +00:00
|
|
|
function namethingy_app_menu(App $a, array &$b)
|
|
|
|
{
|
|
|
|
$b['app_menu'][] = '<div class="app-title"><a href="namethingy">NameThingy</a></div>';
|
2012-03-30 12:35:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-06-24 21:27:58 +00:00
|
|
|
/**
|
|
|
|
* This is a statement rather than an actual function definition. The simple
|
|
|
|
* existence of this method is checked to figure out if the addon offers a
|
|
|
|
* module.
|
|
|
|
*/
|
|
|
|
function namethingy_module() {}
|
2012-03-30 12:35:55 +00:00
|
|
|
|
2022-06-23 05:16:22 +00:00
|
|
|
function namethingy_content(App $a)
|
|
|
|
{
|
|
|
|
$baseurl = DI::baseUrl()->get() . '/addon/namethingy';
|
2012-03-30 12:35:55 +00:00
|
|
|
|
2022-06-23 05:16:22 +00:00
|
|
|
$o .= <<< EOT
|
2012-03-30 12:35:55 +00:00
|
|
|
<iframe src="http://namethingy.com" width="900" height="700" />
|
|
|
|
EOT;
|
|
|
|
|
2022-06-23 05:16:22 +00:00
|
|
|
return $o;
|
2012-03-30 12:35:55 +00:00
|
|
|
}
|