aboutsummaryrefslogtreecommitdiffstats
path: root/addon/sniper/sniper.php
blob: c7d29cfdff727871aa6dcd074056e90f513b8973 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
 * Name: Sniper App
 * Description: Example of flash game application
 * Version: 1.0
 * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
 */

/**
 * Demo plugin for adding various types of Flash games to Friendika.
 * In this case we're using "Hot Shot Sniper" by FlashGames247
 */


function sniper_install() {
    register_hook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
}

function sniper_uninstall() {
    unregister_hook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');

}

function sniper_app_menu($a,&$b) {
	$b['app_menu'][] = Array('url'=>'sniper', 'name'=>'Hot Shot Sniper'); 
}


function sniper_module() {}

function sniper_content(&$a) {

$baseurl = $a->get_baseurl() . '/addon/sniper';

$o .= <<< EOT
<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">
<param name="allowScriptAccess" value="sameDomain" />
<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" />
</object>
EOT;

return $o;
}