diff --git a/addon/calc/calc.php b/addon/calc/calc.php index 8c079dc7a5..47fb22d339 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'] .= '
Calculator
'; + $b['app_menu'][] = Array('url'=>'calc', 'name'=>'Calculator'); } diff --git a/addon/convert/convert.php b/addon/convert/convert.php index 7a4c90a530..aaa56a43e0 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'] .= '
Units Conversion
'; + $b['app_menu'][] = Array('url'=>'convert', 'name'=>'Units Conversion'); } diff --git a/addon/sniper/sniper.php b/addon/sniper/sniper.php index d431a24666..c7d29cfdff 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'] .= '
Hot Shot Sniper
'; + $b['app_menu'][] = Array('url'=>'sniper', 'name'=>'Hot Shot Sniper'); } diff --git a/addon/tictac/tictac.php b/addon/tictac/tictac.php index d6cec08a06..cc2701f8b3 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'] .= '
' . t('Three Dimensional Tic-Tac-Toe') . '
'; + $b['app_menu'][] = Array('url'=>'tictac', 'name'=>'Three Dimensional Tic-Tac-Toe'); } diff --git a/boot.php b/boot.php index 4baa37309c..42a0f72077 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 7a0a3f59ea..8049b45fb3 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 0000000000..61ea9ee5fc --- /dev/null +++ b/view/apps.tpl @@ -0,0 +1,7 @@ +

$title

+ +