From 4683d2682d91a5e7428be8fc53c29964f93bea9a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 3 Feb 2015 10:10:12 +0100 Subject: [PATCH 1/6] Updated following the J3 MVC guide. --- admin/helloworld.php | 1 - helloworld.xml | 17 ++++++++-------- site/controller.php | 13 ++++++++++--- site/helloworld.php | 11 ++++++++--- site/views/helloworld/tmpl/default.php | 8 ++++++++ site/views/helloworld/view.html.php | 27 +++++++++++++++++++------- 6 files changed, 54 insertions(+), 23 deletions(-) diff --git a/admin/helloworld.php b/admin/helloworld.php index 84e4380..e69de29 100644 --- a/admin/helloworld.php +++ b/admin/helloworld.php @@ -1 +0,0 @@ -Hello World administration \ No newline at end of file diff --git a/helloworld.xml b/helloworld.xml index c40417d..f56e6cf 100644 --- a/helloworld.xml +++ b/helloworld.xml @@ -1,10 +1,9 @@ - + + Hello World! - November 2009 + January 2014 John Doe john.doe@example.org http://www.example.org @@ -15,7 +14,7 @@ Description of the Hello World component ... - + sql/updates/mysql @@ -23,8 +22,8 @@ + to copy FROM in the package to install therefore files copied + in this section are copied from /site/ in the package --> index.html helloworld.php @@ -37,8 +36,8 @@ Hello World! + to copy FROM in the package to install therefore files copied + in this section are copied from /admin/ in the package --> index.html diff --git a/site/controller.php b/site/controller.php index 64bef6d..eef0516 100644 --- a/site/controller.php +++ b/site/controller.php @@ -1,12 +1,19 @@ diff --git a/site/views/helloworld/view.html.php b/site/views/helloworld/view.html.php index fe7753a..059c1e2 100644 --- a/site/views/helloworld/view.html.php +++ b/site/views/helloworld/view.html.php @@ -1,17 +1,30 @@ msg = 'Hello World'; From 05e920b2a4fd513050e8d42232be64d278a95519 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 3 Feb 2015 10:27:32 +0100 Subject: [PATCH 2/6] Fix for menu J >= 3.2 --- helloworld.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helloworld.xml b/helloworld.xml index f56e6cf..828979b 100644 --- a/helloworld.xml +++ b/helloworld.xml @@ -33,7 +33,7 @@ - Hello World! + Hello World! diff --git a/site/controller.php b/site/controller.php index eef0516..8044f8d 100644 --- a/site/controller.php +++ b/site/controller.php @@ -1,11 +1,11 @@ execute($input->getCmd('task')); // Redirect if set by the controller -$controller->redirect(); \ No newline at end of file +$controller->redirect(); diff --git a/site/views/helloworld/tmpl/default.php b/site/views/helloworld/tmpl/default.php index 98f2c6e..77c6170 100644 --- a/site/views/helloworld/tmpl/default.php +++ b/site/views/helloworld/tmpl/default.php @@ -1,13 +1,13 @@ -

msg; ?>

\ No newline at end of file +

msg; ?>

diff --git a/site/views/helloworld/tmpl/default.xml b/site/views/helloworld/tmpl/default.xml index 4f15edd..98b1da7 100644 --- a/site/views/helloworld/tmpl/default.xml +++ b/site/views/helloworld/tmpl/default.xml @@ -1,8 +1,6 @@ - - - + COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC \ No newline at end of file diff --git a/site/views/helloworld/view.html.php b/site/views/helloworld/view.html.php index d5c99c2..a204d41 100644 --- a/site/views/helloworld/view.html.php +++ b/site/views/helloworld/view.html.php @@ -1,20 +1,20 @@ msg = 'Hello World'; @@ -32,4 +32,4 @@ public function display($tpl = null) // Display the view parent::display($tpl); } -} \ No newline at end of file +}