]> git.mxchange.org Git - friendica-addons.git/blob - sniper/sniper.php
Merge pull request #778 from MrPetovan/task/move-config-to-php-array
[friendica-addons.git] / sniper / sniper.php
1 <?php
2
3 /**
4  * Demo addon for adding various types of Flash games to Friendica.
5  * In this case we're using "Hot Shot Sniper" by FlashGames247
6  *
7  * Name: Sniper
8  * Description: Basic demonstration of flash game addons for Friendica
9  * Version: 1.0
10  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
11  */
12 use Friendica\Core\Addon;
13
14 function sniper_install() {
15     Addon::registerHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
16 }
17
18 function sniper_uninstall() {
19     Addon::unregisterHook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
20
21 }
22
23 function sniper_app_menu($a,&$b) {
24     $b['app_menu'][] = '<div class="app-title"><a href="sniper">Hot Shot Sniper</a></div>';
25 }
26
27
28 function sniper_module() {}
29
30 function sniper_content(&$a) {
31
32 $baseurl = $a->getBaseURL() . '/addon/sniper';
33
34 $o .= <<< EOT
35 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="620" height="480" id="hotshotsniper" align="middle">
36 <param name="allowScriptAccess" value="sameDomain" />
37 <param name="movie" value="$baseurl/hotshotsniper.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="$baseurl/hotshotsniper.swf" quality="high" bgcolor="#000000" width="620" height="480" name="hotshotsniper" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
38 </object>
39 EOT;
40
41 return $o;
42 }