2012-06-03 22:01:39 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Name: Infinite Improbability Drive
|
|
|
|
* Description: Infinitely Improbably Find A Random User
|
|
|
|
* Version: 1.0
|
2012-07-28 01:26:14 +02:00
|
|
|
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
|
2012-06-03 22:01:39 +02:00
|
|
|
*/
|
2022-06-23 07:16:22 +02:00
|
|
|
|
|
|
|
use Friendica\App;
|
2018-12-26 08:28:16 +01:00
|
|
|
use Friendica\Core\Hook;
|
2019-12-30 03:55:10 +01:00
|
|
|
use Friendica\DI;
|
2012-06-03 22:01:39 +02:00
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
function infiniteimprobabilitydrive_install()
|
|
|
|
{
|
2018-12-26 08:28:16 +01:00
|
|
|
Hook::register('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
2012-06-03 22:01:39 +02:00
|
|
|
}
|
|
|
|
|
2023-01-14 03:16:09 +01:00
|
|
|
function infiniteimprobabilitydrive_app_menu(array &$b)
|
2018-01-22 20:03:11 +01:00
|
|
|
{
|
2020-01-18 20:52:33 +01:00
|
|
|
$b['app_menu'][] = '<div class="app-title"><a href="infiniteimprobabilitydrive">' . DI::l10n()->t('Infinite Improbability Drive') . '</a></div>';
|
2012-06-03 22:01:39 +02:00
|
|
|
}
|
|
|
|
|
2022-06-24 23:27:58 +02: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 infiniteimprobabilitydrive_module() {}
|
2012-06-03 22:01:39 +02:00
|
|
|
|
|
|
|
|
2023-01-14 03:16:09 +01:00
|
|
|
function infiniteimprobabilitydrive_content()
|
2018-01-22 20:03:11 +01:00
|
|
|
{
|
2019-12-30 03:55:10 +01:00
|
|
|
$baseurl = DI::baseUrl()->get() . '/addon/infiniteimprobabilitydrive';
|
2018-01-22 20:03:11 +01:00
|
|
|
$o = '';
|
2012-06-03 22:01:39 +02:00
|
|
|
|
2019-12-30 21:53:43 +01:00
|
|
|
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.css"/>';
|
2012-06-03 22:01:39 +02:00
|
|
|
|
|
|
|
|
2019-12-30 03:55:10 +01:00
|
|
|
$baseurl = DI::baseUrl()->get();
|
2012-06-03 22:01:39 +02:00
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
$o .= <<< EOT
|
2012-06-03 22:01:39 +02:00
|
|
|
|
|
|
|
<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;
|
2018-01-22 20:03:11 +01:00
|
|
|
return $o;
|
|
|
|
}
|