mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-16 14:53:54 +00:00
3ab46781b1
- if a <addon>_module() function is empty, it is more a statement and not a real function
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Name: Infinite Improbability Drive
|
|
* Description: Infinitely Improbably Find A Random User
|
|
* Version: 1.0
|
|
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
|
*/
|
|
|
|
use Friendica\App;
|
|
use Friendica\Core\Hook;
|
|
use Friendica\DI;
|
|
|
|
function infiniteimprobabilitydrive_install()
|
|
{
|
|
Hook::register('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
|
}
|
|
|
|
function infiniteimprobabilitydrive_app_menu(App $a, array &$b)
|
|
{
|
|
$b['app_menu'][] = '<div class="app-title"><a href="infiniteimprobabilitydrive">' . DI::l10n()->t('Infinite Improbability Drive') . '</a></div>';
|
|
}
|
|
|
|
/**
|
|
* 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 infiniteimprobabilitydrive_module() {}
|
|
|
|
|
|
function infiniteimprobabilitydrive_content(App $a)
|
|
{
|
|
$baseurl = DI::baseUrl()->get() . '/addon/infiniteimprobabilitydrive';
|
|
$o = '';
|
|
|
|
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.css"/>';
|
|
|
|
|
|
$baseurl = DI::baseUrl()->get();
|
|
|
|
$o .= <<< EOT
|
|
|
|
<br><br>
|
|
<p>Try another destination with the <a href="$baseurl/infiniteimprobabilitydrive">Infinite Improbability Drive</a>
|
|
<iframe src ="$baseurl/randprof" height="1200" width="1024">
|
|
|
|
EOT;
|
|
return $o;
|
|
}
|