diff --git a/src/administrator/manifests/packages/pkg_weblinks.xml b/src/administrator/manifests/packages/pkg_weblinks.xml index e3f75f7..7fcc815 100644 --- a/src/administrator/manifests/packages/pkg_weblinks.xml +++ b/src/administrator/manifests/packages/pkg_weblinks.xml @@ -20,6 +20,7 @@ mod_weblinks.zip plg_finder_weblinks.zip plg_search_weblinks.zip + plg_system_weblinks.zip en-GB/en-GB.pkg_weblinks.sys.ini diff --git a/src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.ini b/src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.ini new file mode 100644 index 0000000..a2b402d --- /dev/null +++ b/src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.ini @@ -0,0 +1,8 @@ +; Joomla! Project +; Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. +; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php +; Note : All ini files need to be saved as UTF-8 + +PLG_SYSTEM_WEBLINKS="System - Web Links" +PLG_SYSTEM_WEBLINKS_STATISTICS="Web Links" +PLG_SYSTEM_WEBLINKS_XML_DESCRIPTION="This plugin returns statistical information about Joomla! Web Links." diff --git a/src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.sys.ini b/src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.sys.ini new file mode 100644 index 0000000..f9e4af1 --- /dev/null +++ b/src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.sys.ini @@ -0,0 +1,7 @@ +; Joomla! Project +; Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. +; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php +; Note : All ini files need to be saved as UTF-8 + +PLG_SYSTEM_WEBLINKS="System - Web Links" +PLG_SYSTEM_WEBLINKS_XML_DESCRIPTION="This plugin returns statistical information about Joomla! Web Links." diff --git a/src/plugins/system/weblinks/weblinks.php b/src/plugins/system/weblinks/weblinks.php new file mode 100644 index 0000000..7f2ea59 --- /dev/null +++ b/src/plugins/system/weblinks/weblinks.php @@ -0,0 +1,61 @@ +getQuery(true) + ->select('COUNT(id) AS count_links') + ->from('#__weblinks') + ->where('state = 1'); + $webLinks = $db->setQuery($query)->loadResult(); + + if (!$webLinks) + { + return array(); + } + + return array(array( + 'title' => JText::_('PLG_SYSTEM_WEBLINKS_STATISTICS'), + 'icon' => 'out-2', + 'data' => $webLinks + )); + } +} diff --git a/src/plugins/system/weblinks/weblinks.xml b/src/plugins/system/weblinks/weblinks.xml new file mode 100644 index 0000000..a5e250b --- /dev/null +++ b/src/plugins/system/weblinks/weblinks.xml @@ -0,0 +1,18 @@ + + + plg_system_weblinks + Joomla! Project + ##DATE## + (C) 2005 - ##YEAR## Open Source Matters. All rights reserved. + GNU General Public License version 2 or later; see LICENSE.txt + admin@joomla.org + www.joomla.org + ##VERSION## + PLG_SYSTEM_WEBLINKS_XML_DESCRIPTION + + ##FILES## + + + ##LANGUAGE_FILES## + +