From b181a7dbb5eab8972fdfaf50b0272595ac014ac1 Mon Sep 17 00:00:00 2001 From: Lodder Date: Wed, 8 Apr 2015 18:57:28 +0100 Subject: [PATCH] Added Joomla version detection on install --- plg_custom_assets/custom_assets.xml | 2 + .../en-GB.plg_system_custom_assets.sys.ini | 4 +- plg_custom_assets/script.php | 43 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 plg_custom_assets/script.php diff --git a/plg_custom_assets/custom_assets.xml b/plg_custom_assets/custom_assets.xml index e217164..2b7956d 100644 --- a/plg_custom_assets/custom_assets.xml +++ b/plg_custom_assets/custom_assets.xml @@ -10,6 +10,8 @@ 1.0.0 JJ_CUSTOM_ASSETS_DESC + script.php + language/en-GB/en-GB.plg_system_custom_assets.ini language/en-GB/en-GB.plg_system_custom_assets.sys.ini diff --git a/plg_custom_assets/language/en-GB/en-GB.plg_system_custom_assets.sys.ini b/plg_custom_assets/language/en-GB/en-GB.plg_system_custom_assets.sys.ini index a8285b7..b8732d0 100644 --- a/plg_custom_assets/language/en-GB/en-GB.plg_system_custom_assets.sys.ini +++ b/plg_custom_assets/language/en-GB/en-GB.plg_system_custom_assets.sys.ini @@ -4,4 +4,6 @@ ; @ Released under GNU/GPL 3.0 License ; Note : All ini files need to be saved as UTF-8 -JJ_CUSTOM_ASSETS_DESC="

JJ Custom Assets

Brought to you by JoomJunk

Copyright (C) 2015 JoomJunk

Released under GNU/GPL 3.0 License

Website: www.joomjunk.co.uk

A plugin allowing you to inject CSS and JS files on your site without having to core hack files

" \ No newline at end of file +JJ_CUSTOM_ASSETS_DESC="

JJ Custom Assets

Brought to you by JoomJunk

Copyright (C) 2015 JoomJunk

Released under GNU/GPL 3.0 License

Website: www.joomjunk.co.uk

A plugin allowing you to inject CSS and JS files on your site without having to core hack files

" + +JJ_CUSTOM_ASSETS_JOOMLA_VERSION_OUTDATED="This module requires Joomla 3.4.0 or higher." \ No newline at end of file diff --git a/plg_custom_assets/script.php b/plg_custom_assets/script.php new file mode 100644 index 0000000..0e2067e --- /dev/null +++ b/plg_custom_assets/script.php @@ -0,0 +1,43 @@ +isCompatible('3.4.0')) + { + JFactory::getApplication()->enqueueMessage(JText::_('JJ_CUSTOM_ASSETS_JOOMLA_VERSION_OUTDATED'), 'error'); + + return false; + } + } + +} + +?>