diff --git a/addon/calc/calc.php b/addon/calc/calc.php index 8c079dc7a..47fb22d33 100644 --- a/addon/calc/calc.php +++ b/addon/calc/calc.php @@ -17,7 +17,7 @@ function calc_uninstall() { } function calc_app_menu($a,&$b) { - $b['app_menu'] .= '
'; + $b['app_menu'][] = Array('url'=>'calc', 'name'=>'Calculator'); } diff --git a/addon/convert/convert.php b/addon/convert/convert.php index 7a4c90a53..aaa56a43e 100644 --- a/addon/convert/convert.php +++ b/addon/convert/convert.php @@ -15,7 +15,7 @@ function convert_uninstall() { } function convert_app_menu($a,&$b) { - $b['app_menu'] .= ''; + $b['app_menu'][] = Array('url'=>'convert', 'name'=>'Units Conversion'); } diff --git a/addon/sniper/sniper.php b/addon/sniper/sniper.php index d431a2466..c7d29cfdf 100644 --- a/addon/sniper/sniper.php +++ b/addon/sniper/sniper.php @@ -22,7 +22,7 @@ function sniper_uninstall() { } function sniper_app_menu($a,&$b) { - $b['app_menu'] .= ''; + $b['app_menu'][] = Array('url'=>'sniper', 'name'=>'Hot Shot Sniper'); } diff --git a/addon/tictac/tictac.php b/addon/tictac/tictac.php index d6cec08a0..cc2701f8b 100644 --- a/addon/tictac/tictac.php +++ b/addon/tictac/tictac.php @@ -17,7 +17,7 @@ function tictac_uninstall() { } function tictac_app_menu($a,&$b) { - $b['app_menu'] .= ''; + $b['app_menu'][] = Array('url'=>'tictac', 'name'=>'Three Dimensional Tic-Tac-Toe'); } diff --git a/boot.php b/boot.php index 4baa37309..42a0f7207 100644 --- a/boot.php +++ b/boot.php @@ -246,7 +246,7 @@ class App { public $timezone; public $interactive = true; public $plugins; - public $apps; + public $apps = Array(); public $identities; private $scheme; diff --git a/mod/apps.php b/mod/apps.php index 7a0a3f59e..8049b45fb 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,15 +1,18 @@ ' . t('Applications') . ''; - - if($a->apps) - $o .= $a->apps; - else + if(count($a->apps)==0) notice( t('No installed applications.') . EOL); - return $o; -} \ No newline at end of file + $tpl = get_markup_template("apps.tpl"); + return replace_macros($tpl, array( + '$title' => $title, + '$apps' => $a->apps, + )); + + + +} diff --git a/view/apps.tpl b/view/apps.tpl new file mode 100644 index 000000000..61ea9ee5f --- /dev/null +++ b/view/apps.tpl @@ -0,0 +1,7 @@ +