diff --git a/README.md b/README.md index 04635711..27fe15ee 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Social Networks - [Twitter](https://twitter.com/bludit) - [Facebook](https://www.facebook.com/bluditcms) -- [Google+](https://plus.google.com/+Bluditcms) - [Youtube](https://www.youtube.com/channel/UCuLu0Z_CHBsTiYTDz129x9Q?view_as=subscriber) Requirements diff --git a/bl-languages/ar_MA.json b/bl-languages/ar_MA.json index f0537604..8402f7a2 100644 --- a/bl-languages/ar_MA.json +++ b/bl-languages/ar_MA.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/bg_BG.json b/bl-languages/bg_BG.json index 3ca25cd4..e4ba72d4 100644 --- a/bl-languages/bg_BG.json +++ b/bl-languages/bg_BG.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/cs_CZ.json b/bl-languages/cs_CZ.json index ecbc44de..89d82c08 100644 --- a/bl-languages/cs_CZ.json +++ b/bl-languages/cs_CZ.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/de_CH.json b/bl-languages/de_CH.json index aff6481e..6a754460 100644 --- a/bl-languages/de_CH.json +++ b/bl-languages/de_CH.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hallo", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/de_DE.json b/bl-languages/de_DE.json index 9d0edd32..6b14f299 100644 --- a/bl-languages/de_DE.json +++ b/bl-languages/de_DE.json @@ -363,5 +363,6 @@ "good-night": "Gute Nacht", "hello": "Hallo", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/en.json b/bl-languages/en.json index 27d2981b..66b5f959 100644 --- a/bl-languages/en.json +++ b/bl-languages/en.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/es.json b/bl-languages/es.json index ed925fa2..3add85f4 100644 --- a/bl-languages/es.json +++ b/bl-languages/es.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hola", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/fa_IR.json b/bl-languages/fa_IR.json index b8968c72..8ff05bed 100644 --- a/bl-languages/fa_IR.json +++ b/bl-languages/fa_IR.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/fi_FI.json b/bl-languages/fi_FI.json index 1546b773..fc42bc72 100644 --- a/bl-languages/fi_FI.json +++ b/bl-languages/fi_FI.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/fr_FR.json b/bl-languages/fr_FR.json index 8c7c4eb4..56cf4009 100644 --- a/bl-languages/fr_FR.json +++ b/bl-languages/fr_FR.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Salut", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/gr.json b/bl-languages/gr.json index d2db7cdc..4ae1297e 100644 --- a/bl-languages/gr.json +++ b/bl-languages/gr.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/he_IL.json b/bl-languages/he_IL.json index a081513e..2338a11f 100644 --- a/bl-languages/he_IL.json +++ b/bl-languages/he_IL.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/hu_HU.json b/bl-languages/hu_HU.json index a5e4c133..82dfadec 100644 --- a/bl-languages/hu_HU.json +++ b/bl-languages/hu_HU.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/it_IT.json b/bl-languages/it_IT.json index adc976f3..8ac4e260 100644 --- a/bl-languages/it_IT.json +++ b/bl-languages/it_IT.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/ja_JP.json b/bl-languages/ja_JP.json index 1f95229f..d1e4765c 100644 --- a/bl-languages/ja_JP.json +++ b/bl-languages/ja_JP.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/ms_MY.json b/bl-languages/ms_MY.json index f77f04ae..7edb4410 100644 --- a/bl-languages/ms_MY.json +++ b/bl-languages/ms_MY.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/nl_NL.json b/bl-languages/nl_NL.json index c6a221ef..ae645f4d 100644 --- a/bl-languages/nl_NL.json +++ b/bl-languages/nl_NL.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/pl_PL.json b/bl-languages/pl_PL.json index aed12c5a..3f7eb7f1 100644 --- a/bl-languages/pl_PL.json +++ b/bl-languages/pl_PL.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Cześć", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/pt_BR.json b/bl-languages/pt_BR.json index 93f3dae7..21176ff2 100644 --- a/bl-languages/pt_BR.json +++ b/bl-languages/pt_BR.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/pt_PT.json b/bl-languages/pt_PT.json index 028aedda..56773482 100644 --- a/bl-languages/pt_PT.json +++ b/bl-languages/pt_PT.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/ro_RO.json b/bl-languages/ro_RO.json index da316a99..7fe7855d 100644 --- a/bl-languages/ro_RO.json +++ b/bl-languages/ro_RO.json @@ -359,5 +359,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/ru_RU.json b/bl-languages/ru_RU.json index 3077a0ba..6ffdf3cf 100644 --- a/bl-languages/ru_RU.json +++ b/bl-languages/ru_RU.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Привет", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/tr_TR.json b/bl-languages/tr_TR.json index 59ea72d6..d55bc122 100644 --- a/bl-languages/tr_TR.json +++ b/bl-languages/tr_TR.json @@ -364,5 +364,6 @@ "good-night": "Good night", "hello": "Merhaba", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/uk_UA.json b/bl-languages/uk_UA.json index 5a759a2f..e91d01c9 100644 --- a/bl-languages/uk_UA.json +++ b/bl-languages/uk_UA.json @@ -363,5 +363,6 @@ "good-night": "Good night", "hello": "Вітаю", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/vi_VN.json b/bl-languages/vi_VN.json index 7903805a..38a08f0c 100644 --- a/bl-languages/vi_VN.json +++ b/bl-languages/vi_VN.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/zh_CN.json b/bl-languages/zh_CN.json index 8cf2ecac..4b4ff87e 100644 --- a/bl-languages/zh_CN.json +++ b/bl-languages/zh_CN.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-languages/zh_TW.json b/bl-languages/zh_TW.json index b78d09a3..7b5bc3f2 100644 --- a/bl-languages/zh_TW.json +++ b/bl-languages/zh_TW.json @@ -362,5 +362,6 @@ "good-night": "Good night", "hello": "Hello", "there-are-no-images-for-the-page": "There are no images for the page.", - "select-cover-image": "Select cover image" + "select-cover-image": "Select cover image", + "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins." } \ No newline at end of file diff --git a/bl-plugins/hit-counter/languages/en.json b/bl-plugins/hit-counter/languages/en.json new file mode 100644 index 00000000..c5928e12 --- /dev/null +++ b/bl-plugins/hit-counter/languages/en.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "Hit Counter", + "description": "Show the number of visits or unique visitors in the sidebar of your site." + } +} \ No newline at end of file diff --git a/bl-plugins/hit-counter/metadata.json b/bl-plugins/hit-counter/metadata.json new file mode 100644 index 00000000..27679fc2 --- /dev/null +++ b/bl-plugins/hit-counter/metadata.json @@ -0,0 +1,10 @@ +{ + "author": "Bludit", + "email": "", + "website": "https://plugins.bludit.com", + "version": "3.2", + "releaseDate": "2018-10-20", + "license": "MIT", + "compatible": "3.2", + "notes": "" +} \ No newline at end of file diff --git a/bl-plugins/hit-counter/plugin.php b/bl-plugins/hit-counter/plugin.php new file mode 100644 index 00000000..b0e77a81 --- /dev/null +++ b/bl-plugins/hit-counter/plugin.php @@ -0,0 +1,85 @@ +dbFields = array( + 'label'=>'Hit Counter', + 'showUniqueVisitors'=>false + ); + } + + public function form() + { + global $L; + + // Check if the plugin Simple Stats is activated + if (!pluginActivated('pluginSimpleStats')) { + // Show an alert about the dependency of the plugin + $html = ''; + + // Hidden form buttons. Save and Cancel buttons. + $this->formButtons = false; + return $html; + } + + // Show the description of the plugin in the settings + $html = ''; + + // Label of the plugin to show in the sidebar + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= ''.$L->get('This title is almost always used in the sidebar of the site').''; + $html .= '
'; + + // Form "select" element for enable or disable Unique visitors properties + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + + return $html; + } + + public function siteSidebar() + { + // Init counter to 0 + $counter = 0; + + // Check if the plugin Simple Stats is activated + if (pluginActivated('pluginSimpleStats')) { + // Get the object of the plugin Simple Stats + global $plugins; + $simpleStats = $plugins['all']['pluginSimpleStats']; + $currentDate = Date::current('Y-m-d'); + + if ($this->getValue('showUniqueVisitors')) { + // Get the unique visitors from today + $counter = $simpleStats->uniqueVisitors($currentDate); + } else { + // Get the visits from today + $counter = $simpleStats->visits($currentDate); + } + } + + // Show in the sidebar the number of visitors + $html = '
'; + $html .= '

'.$this->getValue('label').'

'; + $html .= '
'; + $html .= '
'.$counter.'
'; + $html .= '
'; + $html .= '
'; + + return $html; + } +} \ No newline at end of file