2013-01-31 23:59:39 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Name: Mah Jongg
|
|
|
|
* Description: Ancient Chinese puzzle game that never gets old.
|
|
|
|
* Version: 1.0
|
|
|
|
* Author: Holger Froese
|
|
|
|
*/
|
2018-12-26 02:28:16 -05:00
|
|
|
use Friendica\Core\Hook;
|
2013-01-31 23:59:39 -05:00
|
|
|
|
|
|
|
function mahjongg_install() {
|
2018-12-26 02:28:16 -05:00
|
|
|
Hook::register('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
|
2013-01-31 23:59:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
function mahjongg_uninstall() {
|
2018-12-26 02:28:16 -05:00
|
|
|
Hook::unregister('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
|
2013-01-31 23:59:39 -05:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function mahjongg_app_menu($a,&$b) {
|
2013-02-01 00:01:35 -05:00
|
|
|
$b['app_menu'][] = '<div class="app-title"><a href="mahjongg">Mahjongg</a></div>';
|
2013-01-31 23:59:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function mahjongg_module() {}
|
|
|
|
|
|
|
|
function mahjongg_content(&$a) {
|
|
|
|
|
2018-10-09 14:13:22 -04:00
|
|
|
$baseurl = $a->getBaseURL() . '/addon/mahjongg';
|
2013-01-31 23:59:39 -05:00
|
|
|
|
|
|
|
$o .= <<< EOT
|
|
|
|
<br><br>
|
|
|
|
<p align="left">
|
|
|
|
<embed src="addon/mahjongg/mahjongg.swf" quality="high" bgcolor="#FFFFFF" width="800" height="600" name="mahjongg" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
|
|
|
<br><br>
|
|
|
|
<b>Simply locate the matching tiles and find a way to clear them from the board as quickly as possible.
|
|
|
|
A timer at the top of the screen keeps track of how you are doing.</b><br>
|
|
|
|
</p>
|
|
|
|
EOT;
|
|
|
|
|
|
|
|
return $o;
|
2013-02-01 00:01:35 -05:00
|
|
|
}
|