diff --git a/src/administrator/manifests/packages/pkg_weblinks.xml b/src/administrator/manifests/packages/pkg_weblinks.xml index 88d01fe..13588c5 100644 --- a/src/administrator/manifests/packages/pkg_weblinks.xml +++ b/src/administrator/manifests/packages/pkg_weblinks.xml @@ -19,6 +19,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/pkg_weblinks.xml b/src/pkg_weblinks.xml index 353e0ee..92308d3 100644 --- a/src/pkg_weblinks.xml +++ b/src/pkg_weblinks.xml @@ -19,6 +19,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..5582ea3 --- /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..c6c10eb --- /dev/null +++ b/src/plugins/system/weblinks/weblinks.php @@ -0,0 +1,66 @@ +getQuery(true) + ->select('COUNT(id) AS count_links') + ->from('#__weblinks') + ->where('state = 1'); + $links = $db->setQuery($query)->loadResult(); + + if (!$links) + { + return array(); + } + + // Link to web links component page. + $adminLink = JUri::root() . 'administrator/index.php?option=com_weblinks&view=weblinks&filter[published]=1'; + + return array(array( + 'title' => JText::sprintf('PLG_SYSTEM_WEBLINKS_STATISTICS', $adminLink), + 'icon' => 'out-2', + 'data' => $links, + )); + } +} diff --git a/src/plugins/system/weblinks/weblinks.xml b/src/plugins/system/weblinks/weblinks.xml new file mode 100644 index 0000000..75d6326 --- /dev/null +++ b/src/plugins/system/weblinks/weblinks.xml @@ -0,0 +1,19 @@ + + + plg_system_weblinks + Joomla! Project + 2016-12-19 + (C) 2005 - 2016 Open Source Matters. All rights reserved. + GNU General Public License version 2 or later; see LICENSE.txt + admin@joomla.org + www.joomla.org + 3.6.0-beta + PLG_SYSTEM_WEBLINKS_XML_DESCRIPTION + + weblinks.xml + language + weblinks.php + + + +