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
|
|
|
*/
|
2018-01-17 01:51:12 +01:00
|
|
|
use Friendica\Core\Addon;
|
2018-01-22 20:03:11 +01:00
|
|
|
use Friendica\Core\L10n;
|
2012-06-03 22:01:39 +02:00
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
function infiniteimprobabilitydrive_install()
|
|
|
|
{
|
|
|
|
Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
2012-06-03 22:01:39 +02:00
|
|
|
}
|
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
function infiniteimprobabilitydrive_uninstall()
|
|
|
|
{
|
|
|
|
Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
|
2012-06-03 22:01:39 +02:00
|
|
|
}
|
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
function infiniteimprobabilitydrive_app_menu($a, &$b)
|
|
|
|
{
|
|
|
|
$b['app_menu'][] = '<div class="app-title"><a href="infiniteimprobabilitydrive">' . L10n::t('Infinite Improbability Drive') . '</a></div>';
|
2012-06-03 22:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
function infiniteimprobabilitydrive_module()
|
|
|
|
{
|
|
|
|
return;
|
2012-06-03 22:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
function infiniteimprobabilitydrive_content(&$a)
|
|
|
|
{
|
|
|
|
$baseurl = $a->get_baseurl() . '/addon/infiniteimprobabilitydrive';
|
|
|
|
$o = '';
|
2012-06-03 22:01:39 +02:00
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.css"/>';
|
2012-06-03 22:01:39 +02:00
|
|
|
|
|
|
|
|
2018-01-22 20:03:11 +01:00
|
|
|
$baseurl = $a->get_baseurl();
|
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;
|
|
|
|
}
|