From 4359f5616ad97e7e7c563a0fca86a96ae615db92 Mon Sep 17 00:00:00 2001 From: pafnuty Date: Sat, 29 Feb 2020 01:51:39 +0400 Subject: [PATCH 01/12] =?UTF-8?q?3.0.0=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=81=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 247 +++++++++++++ README.md | 12 +- {upload => engine}/engine/ajax/ymaps/all.php | 0 {upload => engine}/engine/ajax/ymaps/cat.php | 0 .../engine/ajax/ymaps/check_status.php | 0 .../engine/ajax/ymaps/check_updates.php | 0 .../engine/ajax/ymaps/editmarker.php | 0 .../engine/ajax/ymaps/editnews.php | 0 .../engine/ajax/ymaps/saveconfig.php | 0 .../engine/ajax/ymaps/xfields.php | 0 .../engine/data/ymaps_config.json | 0 .../engine/data/ymaps_icons.json | 0 {upload => engine}/engine/inc/ymaps.php | 0 .../engine/modules/ymaps/.htaccess | 0 .../engine/modules/ymaps/addnews-inline.php | 0 .../engine/modules/ymaps/addnews.php | 0 .../engine/modules/ymaps/admin/.htaccess | 0 .../modules/ymaps/admin/classes/.htaccess | 0 .../modules/ymaps/admin/classes/xfields.php | 0 .../modules/ymaps/admin/mapsettings.php | 0 .../modules/ymaps/admin/pointersettings.php | 0 .../engine/modules/ymaps/admin/support.php | 0 .../engine/modules/ymaps/css/.htaccess | 0 .../engine/modules/ymaps/css/style.css | 0 .../modules/ymaps/css/ymaps_editnews.css | 0 .../engine/modules/ymaps/detail.php | 0 .../engine/modules/ymaps/images/.htaccess | 0 .../engine/modules/ymaps/images/black.png | Bin .../ymaps/images/blackCircleDotIcon.png | Bin .../modules/ymaps/images/blackCircleIcon.png | Bin .../modules/ymaps/images/blackDotIcon.png | Bin .../engine/modules/ymaps/images/blackIcon.png | Bin .../modules/ymaps/images/blackInverted.png | Bin .../engine/modules/ymaps/images/blackStr.png | Bin .../engine/modules/ymaps/images/blue.png | Bin .../ymaps/images/blueCircleDotIcon.png | Bin .../modules/ymaps/images/blueCircleIcon.png | Bin .../modules/ymaps/images/blueDotIcon.png | Bin .../engine/modules/ymaps/images/blueIcon.png | Bin .../modules/ymaps/images/blueInverted.png | Bin .../engine/modules/ymaps/images/blueStr.png | Bin .../engine/modules/ymaps/images/brown.png | Bin .../ymaps/images/brownCircleDotIcon.png | Bin .../modules/ymaps/images/brownCircleIcon.png | Bin .../modules/ymaps/images/brownDotIcon.png | Bin .../engine/modules/ymaps/images/brownIcon.png | Bin .../modules/ymaps/images/brownInverted.png | Bin .../engine/modules/ymaps/images/brownStr.png | Bin .../modules/ymaps/images/circleDotIcon.png | Bin .../modules/ymaps/images/circleIcon.png | Bin .../engine/modules/ymaps/images/cluster.png | Bin .../engine/modules/ymaps/images/darkBlue.png | Bin .../ymaps/images/darkBlueCircleDotIcon.png | Bin .../ymaps/images/darkBlueCircleIcon.png | Bin .../modules/ymaps/images/darkBlueDotIcon.png | Bin .../modules/ymaps/images/darkBlueIcon.png | Bin .../modules/ymaps/images/darkBlueInverted.png | Bin .../modules/ymaps/images/darkBlueStr.png | Bin .../engine/modules/ymaps/images/darkGreen.png | Bin .../ymaps/images/darkGreenCircleDotIcon.png | Bin .../ymaps/images/darkGreenCircleIcon.png | Bin .../modules/ymaps/images/darkGreenDotIcon.png | Bin .../modules/ymaps/images/darkGreenIcon.png | Bin .../ymaps/images/darkGreenInverted.png | Bin .../modules/ymaps/images/darkGreenStr.png | Bin .../modules/ymaps/images/darkOrange.png | Bin .../ymaps/images/darkOrangeCircleDotIcon.png | Bin .../ymaps/images/darkOrangeCircleIcon.png | Bin .../ymaps/images/darkOrangeDotIcon.png | Bin .../modules/ymaps/images/darkOrangeIcon.png | Bin .../ymaps/images/darkOrangeInverted.png | Bin .../modules/ymaps/images/darkOrangeStr.png | Bin .../engine/modules/ymaps/images/dotIcon.png | Bin .../modules/ymaps/images/geolocation.png | Bin .../engine/modules/ymaps/images/gray.png | Bin .../ymaps/images/grayCircleDotIcon.png | Bin .../modules/ymaps/images/grayCircleIcon.png | Bin .../modules/ymaps/images/grayDotIcon.png | Bin .../engine/modules/ymaps/images/grayIcon.png | Bin .../modules/ymaps/images/grayInverted.png | Bin .../engine/modules/ymaps/images/grayStr.png | Bin .../engine/modules/ymaps/images/green.png | Bin .../ymaps/images/greenCircleDotIcon.png | Bin .../modules/ymaps/images/greenCircleIcon.png | Bin .../modules/ymaps/images/greenDotIcon.png | Bin .../engine/modules/ymaps/images/greenIcon.png | Bin .../modules/ymaps/images/greenInverted.png | Bin .../engine/modules/ymaps/images/greenStr.png | Bin .../engine/modules/ymaps/images/icon.png | Bin .../engine/modules/ymaps/images/inverted.png | Bin .../engine/modules/ymaps/images/lightBlue.png | Bin .../ymaps/images/lightBlueCircleDotIcon.png | Bin .../ymaps/images/lightBlueCircleIcon.png | Bin .../modules/ymaps/images/lightBlueDotIcon.png | Bin .../modules/ymaps/images/lightBlueIcon.png | Bin .../ymaps/images/lightBlueInverted.png | Bin .../modules/ymaps/images/lightBlueStr.png | Bin .../engine/modules/ymaps/images/night.png | Bin .../ymaps/images/nightCircleDotIcon.png | Bin .../modules/ymaps/images/nightCircleIcon.png | Bin .../modules/ymaps/images/nightDotIcon.png | Bin .../engine/modules/ymaps/images/nightIcon.png | Bin .../modules/ymaps/images/nightInverted.png | Bin .../engine/modules/ymaps/images/nightStr.png | Bin .../engine/modules/ymaps/images/olive.png | Bin .../ymaps/images/oliveCircleDotIcon.png | Bin .../modules/ymaps/images/oliveCircleIcon.png | Bin .../modules/ymaps/images/oliveDotIcon.png | Bin .../engine/modules/ymaps/images/oliveIcon.png | Bin .../modules/ymaps/images/oliveInverted.png | Bin .../engine/modules/ymaps/images/oliveStr.png | Bin .../engine/modules/ymaps/images/orange.png | Bin .../ymaps/images/orangeCircleDotIcon.png | Bin .../modules/ymaps/images/orangeCircleIcon.png | Bin .../modules/ymaps/images/orangeDotIcon.png | Bin .../modules/ymaps/images/orangeIcon.png | Bin .../modules/ymaps/images/orangeInverted.png | Bin .../engine/modules/ymaps/images/orangeStr.png | Bin .../engine/modules/ymaps/images/pink.png | Bin .../ymaps/images/pinkCircleDotIcon.png | Bin .../modules/ymaps/images/pinkCircleIcon.png | Bin .../modules/ymaps/images/pinkDotIcon.png | Bin .../engine/modules/ymaps/images/pinkIcon.png | Bin .../modules/ymaps/images/pinkInverted.png | Bin .../engine/modules/ymaps/images/pinkStr.png | Bin .../engine/modules/ymaps/images/red.png | Bin .../modules/ymaps/images/redCircleDotIcon.png | Bin .../modules/ymaps/images/redCircleIcon.png | Bin .../modules/ymaps/images/redDotIcon.png | Bin .../engine/modules/ymaps/images/redIcon.png | Bin .../modules/ymaps/images/redInverted.png | Bin .../engine/modules/ymaps/images/redStr.png | Bin .../engine/modules/ymaps/images/violet.png | Bin .../ymaps/images/violetCircleDotIcon.png | Bin .../modules/ymaps/images/violetCircleIcon.png | Bin .../modules/ymaps/images/violetDotIcon.png | Bin .../modules/ymaps/images/violetIcon.png | Bin .../modules/ymaps/images/violetInverted.png | Bin .../engine/modules/ymaps/images/violetStr.png | Bin .../engine/modules/ymaps/images/yellow.png | Bin .../ymaps/images/yellowCircleDotIcon.png | Bin .../modules/ymaps/images/yellowCircleIcon.png | Bin .../modules/ymaps/images/yellowDotIcon.png | Bin .../modules/ymaps/images/yellowIcon.png | Bin .../modules/ymaps/images/yellowInverted.png | Bin .../engine/modules/ymaps/images/yellowStr.png | Bin .../engine/modules/ymaps/js/.htaccess | 0 .../ymaps/js/jquery.easyResponsiveTabs.min.js | 0 .../modules/ymaps/js/jquery.form.min.js | 0 .../modules/ymaps/js/jquery.formstyler.min.js | 0 .../modules/ymaps/js/jquery.ladda.min.js | 0 .../ymaps/js/jquery.magnificpopup.min.js | 0 .../engine/modules/ymaps/js/main.js | 0 .../engine/modules/ymaps/js/ymaps_editnews.js | 0 .../engine/modules/ymaps/language/.htaccess | 0 .../engine/modules/ymaps/language/English.lng | 0 .../engine/modules/ymaps/language/Russian.lng | 0 .../modules/ymaps/language/Ukrainian.lng | 0 .../engine/skins/images/ymaps.png | Bin engine/skins/images/ymaps.png | Bin 0 -> 3172 bytes .../{THEME}}/ymaps/.htaccess | 0 .../{THEME}}/ymaps/all/.htaccess | 0 .../{THEME}}/ymaps/all/default.tpl | 0 .../{THEME}}/ymaps/all/index.htm | 0 .../{THEME}}/ymaps/default.tpl | 0 .../{THEME}}/ymaps/icons/.htaccess | 0 .../{THEME}}/ymaps/icons/blue1.png | Bin .../{THEME}}/ymaps/icons/blue2.png | Bin .../{THEME}}/ymaps/icons/blue3.png | Bin .../{THEME}}/ymaps/icons/human.png | Bin .../{THEME}}/ymaps/icons/index.htm | 0 .../{THEME}}/ymaps/index.htm | 0 .../{THEME}}/ymaps/simple.tpl | 0 .../{THEME}}/ymaps/ymaps.css | 0 .../{THEME}}/ymaps/ymaps.js | 0 .../{THEME}}/ymaps/ymaps_public.js | 0 .../{THEME}}/ymaps/ymaps_quickedit.js | 0 upload/engine/plugins/.htaccess | 2 - upload/engine/plugins/loader/loader.php | 13 - upload/ymaps_install.php | 324 ------------------ 180 files changed, 255 insertions(+), 343 deletions(-) create mode 100644 .gitignore rename {upload => engine}/engine/ajax/ymaps/all.php (100%) rename {upload => engine}/engine/ajax/ymaps/cat.php (100%) rename {upload => engine}/engine/ajax/ymaps/check_status.php (100%) rename {upload => engine}/engine/ajax/ymaps/check_updates.php (100%) rename {upload => engine}/engine/ajax/ymaps/editmarker.php (100%) rename {upload => engine}/engine/ajax/ymaps/editnews.php (100%) rename {upload => engine}/engine/ajax/ymaps/saveconfig.php (100%) rename {upload => engine}/engine/ajax/ymaps/xfields.php (100%) rename {upload => engine}/engine/data/ymaps_config.json (100%) rename {upload => engine}/engine/data/ymaps_icons.json (100%) rename {upload => engine}/engine/inc/ymaps.php (100%) rename {upload => engine}/engine/modules/ymaps/.htaccess (100%) rename {upload => engine}/engine/modules/ymaps/addnews-inline.php (100%) rename {upload => engine}/engine/modules/ymaps/addnews.php (100%) rename {upload => engine}/engine/modules/ymaps/admin/.htaccess (100%) rename {upload => engine}/engine/modules/ymaps/admin/classes/.htaccess (100%) rename {upload => engine}/engine/modules/ymaps/admin/classes/xfields.php (100%) rename {upload => engine}/engine/modules/ymaps/admin/mapsettings.php (100%) rename {upload => engine}/engine/modules/ymaps/admin/pointersettings.php (100%) rename {upload => engine}/engine/modules/ymaps/admin/support.php (100%) rename {upload => engine}/engine/modules/ymaps/css/.htaccess (100%) rename {upload => engine}/engine/modules/ymaps/css/style.css (100%) rename {upload => engine}/engine/modules/ymaps/css/ymaps_editnews.css (100%) rename {upload => engine}/engine/modules/ymaps/detail.php (100%) rename {upload => engine}/engine/modules/ymaps/images/.htaccess (100%) rename {upload => engine}/engine/modules/ymaps/images/black.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blackCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blackCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blackDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blackIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blackInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blackStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blue.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blueCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blueCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blueDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blueIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blueInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/blueStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/brown.png (100%) rename {upload => engine}/engine/modules/ymaps/images/brownCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/brownCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/brownDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/brownIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/brownInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/brownStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/circleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/circleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/cluster.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkBlue.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkBlueCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkBlueCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkBlueDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkBlueIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkBlueInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkBlueStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkGreen.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkGreenCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkGreenCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkGreenDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkGreenIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkGreenInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkGreenStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkOrange.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkOrangeCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkOrangeCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkOrangeDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkOrangeIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkOrangeInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/darkOrangeStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/dotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/geolocation.png (100%) rename {upload => engine}/engine/modules/ymaps/images/gray.png (100%) rename {upload => engine}/engine/modules/ymaps/images/grayCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/grayCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/grayDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/grayIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/grayInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/grayStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/green.png (100%) rename {upload => engine}/engine/modules/ymaps/images/greenCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/greenCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/greenDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/greenIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/greenInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/greenStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/icon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/inverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/lightBlue.png (100%) rename {upload => engine}/engine/modules/ymaps/images/lightBlueCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/lightBlueCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/lightBlueDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/lightBlueIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/lightBlueInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/lightBlueStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/night.png (100%) rename {upload => engine}/engine/modules/ymaps/images/nightCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/nightCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/nightDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/nightIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/nightInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/nightStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/olive.png (100%) rename {upload => engine}/engine/modules/ymaps/images/oliveCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/oliveCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/oliveDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/oliveIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/oliveInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/oliveStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/orange.png (100%) rename {upload => engine}/engine/modules/ymaps/images/orangeCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/orangeCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/orangeDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/orangeIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/orangeInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/orangeStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/pink.png (100%) rename {upload => engine}/engine/modules/ymaps/images/pinkCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/pinkCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/pinkDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/pinkIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/pinkInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/pinkStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/red.png (100%) rename {upload => engine}/engine/modules/ymaps/images/redCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/redCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/redDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/redIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/redInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/redStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/violet.png (100%) rename {upload => engine}/engine/modules/ymaps/images/violetCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/violetCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/violetDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/violetIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/violetInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/violetStr.png (100%) rename {upload => engine}/engine/modules/ymaps/images/yellow.png (100%) rename {upload => engine}/engine/modules/ymaps/images/yellowCircleDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/yellowCircleIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/yellowDotIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/yellowIcon.png (100%) rename {upload => engine}/engine/modules/ymaps/images/yellowInverted.png (100%) rename {upload => engine}/engine/modules/ymaps/images/yellowStr.png (100%) rename {upload => engine}/engine/modules/ymaps/js/.htaccess (100%) rename {upload => engine}/engine/modules/ymaps/js/jquery.easyResponsiveTabs.min.js (100%) rename {upload => engine}/engine/modules/ymaps/js/jquery.form.min.js (100%) rename {upload => engine}/engine/modules/ymaps/js/jquery.formstyler.min.js (100%) rename {upload => engine}/engine/modules/ymaps/js/jquery.ladda.min.js (100%) rename {upload => engine}/engine/modules/ymaps/js/jquery.magnificpopup.min.js (100%) rename {upload => engine}/engine/modules/ymaps/js/main.js (100%) rename {upload => engine}/engine/modules/ymaps/js/ymaps_editnews.js (100%) rename {upload => engine}/engine/modules/ymaps/language/.htaccess (100%) rename {upload => engine}/engine/modules/ymaps/language/English.lng (100%) rename {upload => engine}/engine/modules/ymaps/language/Russian.lng (100%) rename {upload => engine}/engine/modules/ymaps/language/Ukrainian.lng (100%) rename {upload => engine}/engine/skins/images/ymaps.png (100%) create mode 100644 engine/skins/images/ymaps.png rename {upload/templates/Default => templates/{THEME}}/ymaps/.htaccess (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/all/.htaccess (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/all/default.tpl (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/all/index.htm (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/default.tpl (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/icons/.htaccess (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/icons/blue1.png (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/icons/blue2.png (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/icons/blue3.png (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/icons/human.png (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/icons/index.htm (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/index.htm (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/simple.tpl (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/ymaps.css (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/ymaps.js (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/ymaps_public.js (100%) rename {upload/templates/Default => templates/{THEME}}/ymaps/ymaps_quickedit.js (100%) delete mode 100644 upload/engine/plugins/.htaccess delete mode 100644 upload/engine/plugins/loader/loader.php delete mode 100644 upload/ymaps_install.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d02a9b --- /dev/null +++ b/.gitignore @@ -0,0 +1,247 @@ +# Redactors +/.idea/ + + +# Installed DLE +/engine/cache/*.tmp +/engine/cache/system/*.php +/engine/data/*.txt +/engine/data/*.php + +# DLE 11.1 sources +/.htaccess +/admin.php +/backup/.htaccess +/backup/index.html +/cron.php +/engine/ajax/addcomments.php +/engine/ajax/adminfunction.php +/engine/ajax/allvotes.php +/engine/ajax/antivirus.php +/engine/ajax/bbcode.php +/engine/ajax/calendar.php +/engine/ajax/clean.php +/engine/ajax/comments.php +/engine/ajax/complaint.php +/engine/ajax/deletecomments.php +/engine/ajax/editcomments.php +/engine/ajax/editnews.php +/engine/ajax/favorites.php +/engine/ajax/feedback.php +/engine/ajax/find_relates.php +/engine/ajax/find_tags.php +/engine/ajax/keywords.php +/engine/ajax/message.php +/engine/ajax/newsletter.php +/engine/ajax/pm.php +/engine/ajax/poll.php +/engine/ajax/profile.php +/engine/ajax/quote.php +/engine/ajax/rating.php +/engine/ajax/ratingcomments.php +/engine/ajax/rebuild.php +/engine/ajax/registration.php +/engine/ajax/replycomments.php +/engine/ajax/rss.php +/engine/ajax/search.php +/engine/ajax/sitemap.php +/engine/ajax/templates.php +/engine/ajax/typograf.php +/engine/ajax/updates.php +/engine/ajax/upload.php +/engine/ajax/vote.php +/engine/api/ +/engine/cache/* +/engine/cache/system/* +/engine/classes/.htaccess +/engine/classes/antivirus.class.php +/engine/classes/calendar/calendar.css +/engine/classes/calendar/calendar.js +/engine/classes/comments.class.php +/engine/classes/download.class.php +/engine/classes/flashplayer/* +/engine/classes/google.class.php +/engine/classes/highlight/ +/engine/classes/highslide/ +/engine/classes/html5player/* +/engine/classes/js/* +/engine/classes/mail.class.php +/engine/classes/mail/class.phpmailer.php +/engine/classes/masha/* +/engine/classes/min/* +/engine/classes/mobiledetect.class.php +/engine/classes/mysql.php +/engine/classes/parse.class.php +/engine/classes/recaptcha.php +/engine/classes/rss.class.php +/engine/classes/social.class.php +/engine/classes/stopspam.class.php +/engine/classes/templates.class.php +/engine/classes/thumb.class.php +/engine/classes/typograf.class.php +/engine/classes/uploads/* +/engine/data/.htaccess +/engine/data/emoticons/* +/engine/download.php +/engine/editor/* +/engine/engine.php +/engine/go.php +/engine/inc/.htaccess +/engine/inc/addnews.php +/engine/inc/banners.php +/engine/inc/blockip.php +/engine/inc/categories.php +/engine/inc/check.php +/engine/inc/clean.php +/engine/inc/cmoderation.php +/engine/inc/comments.php +/engine/inc/complaint.php +/engine/inc/dboption.php +/engine/inc/dumper.php +/engine/inc/editnews.php +/engine/inc/editusers.php +/engine/inc/editvote.php +/engine/inc/email.php +/engine/inc/files.php +/engine/inc/googlemap.php +/engine/inc/help.php +/engine/inc/include/.htaccess +/engine/inc/include/functions.inc.php +/engine/inc/include/init.php +/engine/inc/include/inserttag.php +/engine/inc/iptools.php +/engine/inc/links.php +/engine/inc/logs.php +/engine/inc/main.php +/engine/inc/mass_static_actions.php +/engine/inc/mass_user_actions.php +/engine/inc/massactions.php +/engine/inc/newsletter.php +/engine/inc/options.php +/engine/inc/preview.php +/engine/inc/question.php +/engine/inc/rebuild.php +/engine/inc/rss.php +/engine/inc/rssinform.php +/engine/inc/search.php +/engine/inc/social.php +/engine/inc/static.php +/engine/inc/tagscloud.php +/engine/inc/templates.php +/engine/inc/userfields.php +/engine/inc/usergroup.php +/engine/inc/videoconfig.php +/engine/inc/wordfilter.php +/engine/inc/xfields.php +/engine/init.php +/engine/modules/.htaccess +/engine/modules/addcomments.php +/engine/modules/addnews.php +/engine/modules/antibot/* +/engine/modules/banned.php +/engine/modules/banners.php +/engine/modules/bbcode.php +/engine/modules/calendar.php +/engine/modules/changemail.php +/engine/modules/comments.php +/engine/modules/cron.php +/engine/modules/deletenews.php +/engine/modules/favorites.php +/engine/modules/feedback.php +/engine/modules/functions.php +/engine/modules/lastcomments.php +/engine/modules/links.php +/engine/modules/lostpassword.php +/engine/modules/main.php +/engine/modules/offline.php +/engine/modules/pm.php +/engine/modules/pm_alert.php +/engine/modules/poll.php +/engine/modules/profile.php +/engine/modules/register.php +/engine/modules/rssinform.php +/engine/modules/search.php +/engine/modules/show.custom.php +/engine/modules/show.full.php +/engine/modules/show.short.php +/engine/modules/sitelogin.php +/engine/modules/social.php +/engine/modules/static.php +/engine/modules/stats.php +/engine/modules/tagscloud.php +/engine/modules/topnews.php +/engine/modules/vote.php +/engine/opensearch.php +/engine/preview.php +/engine/print.php +/engine/rss.php +/engine/skins/.htaccess +/engine/skins/codemirror/css/default.css +/engine/skins/codemirror/js/LICENSE +/engine/skins/codemirror/js/code.js +/engine/skins/default.skin.php +/engine/skins/fonts/* +/engine/skins/images/* +/engine/skins/javascripts/application.js +/engine/skins/stylesheets/application.css +/engine/skins/stylesheets/frame.css +/index.php +/install.php +/language/.htaccess +/language/Russian/admincheck.lng +/language/Russian/adminlogs.lng +/language/Russian/adminpanel.lng +/language/Russian/help.lng +/language/Russian/website.lng +/robots.txt +/templates/.htaccess +/templates/Default/* +/templates/Gemini/* +/templates/Green/* +/templates/Pisces/* +/templates/Red/* +/templates/banned.tpl +/templates/opensearch.tpl +/templates/rss.tpl +/templates/smartphone/* +/upgrade/* +/uploads/* + +# DLE 11.3 sources +/engine/ajax/commentssubscribe.php +/engine/ajax/twofactor.php +/engine/classes/htmlpurifier/* +/engine/classes/memcache.class.php +/engine/inc/lostpassword.php +/engine/inc/redirects.php +/engine/inc/twofactor.php + +# DLE 12 sources +/engine/inc/metatags.php +/language/English/admincheck.lng +/language/English/adminlogs.lng +/language/English/adminpanel.lng +/language/English/help.lng +/language/English/website.lng + +# DLE 13 sources +/engine/ajax/controller.php +/engine/ajax/plugins.php +/engine/classes/plugins.class.php +/engine/classes/zipextract.class.php +/engine/inc/plugins.php +/engine/inc/upgrade.php +/engine/inc/upgrade + +# DLE 14 sources +/engine/classes/tinify/ + +# YandexMaps +!/engine/ajax/ymaps/ +!/engine/skins/images/ymaps.png +!/CHANGELOG.md +!/engine/data/ymaps_icons.json +!/engine/data/ymaps_config.json +!/engine/inc/ymaps.php +!/engine/modules/ymaps/ +!/templates/{THEME}/ diff --git a/README.md b/README.md index 0376249..dabe055 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,21 @@ # Yandex Maps - модуль Яндекс карт для DLE -![version](https://img.shields.io/badge/version-2.0.1-red.svg?style=flat-square "Version") -![DLE](https://img.shields.io/badge/DLE-10.X-green.svg?style=flat-square "DLE Version") +![version](https://img.shields.io/badge/version-3.0.0-red.svg?style=flat-square "Version") +![DLE](https://img.shields.io/badge/DLE-13.X-green.svg?style=flat-square "DLE Version") [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/dle-modules/DLE-YandexMaps/blob/master/LICENSE) **Модуль DLE Yandex Maps** предназначен для вывода в полной новости блока с Яндекс.Картой и точкой на ней, координаты и зум которой хранятся в дополнительном поле новости, а так же вывода, отфильтрованного по параметрам, JSON-массива с информацией о координатах точек с привязкой этих точек к соответсвующим новостям, для последующего размещения на Яндекс.Карте. ## Требования к системе -- Версия DLE: **10.X и выше** +- Версия DLE: **13.X и выше** - Поддерживаемая кодировка: **UTF-8** - Версия php: **5.4 и выше** -## [Установка модуля](http://maps.pafnuty.name/documentation/#install) +## Установка модуля +Устанавливаем как обычный плагин, файл ymaps_plugin.zip содержит всё необходимое для автоматической установки. + +## Настройка модуля +http://maps.pafnuty.name/documentation/#setup ## [Документация](http://maps.pafnuty.name) diff --git a/upload/engine/ajax/ymaps/all.php b/engine/engine/ajax/ymaps/all.php similarity index 100% rename from upload/engine/ajax/ymaps/all.php rename to engine/engine/ajax/ymaps/all.php diff --git a/upload/engine/ajax/ymaps/cat.php b/engine/engine/ajax/ymaps/cat.php similarity index 100% rename from upload/engine/ajax/ymaps/cat.php rename to engine/engine/ajax/ymaps/cat.php diff --git a/upload/engine/ajax/ymaps/check_status.php b/engine/engine/ajax/ymaps/check_status.php similarity index 100% rename from upload/engine/ajax/ymaps/check_status.php rename to engine/engine/ajax/ymaps/check_status.php diff --git a/upload/engine/ajax/ymaps/check_updates.php b/engine/engine/ajax/ymaps/check_updates.php similarity index 100% rename from upload/engine/ajax/ymaps/check_updates.php rename to engine/engine/ajax/ymaps/check_updates.php diff --git a/upload/engine/ajax/ymaps/editmarker.php b/engine/engine/ajax/ymaps/editmarker.php similarity index 100% rename from upload/engine/ajax/ymaps/editmarker.php rename to engine/engine/ajax/ymaps/editmarker.php diff --git a/upload/engine/ajax/ymaps/editnews.php b/engine/engine/ajax/ymaps/editnews.php similarity index 100% rename from upload/engine/ajax/ymaps/editnews.php rename to engine/engine/ajax/ymaps/editnews.php diff --git a/upload/engine/ajax/ymaps/saveconfig.php b/engine/engine/ajax/ymaps/saveconfig.php similarity index 100% rename from upload/engine/ajax/ymaps/saveconfig.php rename to engine/engine/ajax/ymaps/saveconfig.php diff --git a/upload/engine/ajax/ymaps/xfields.php b/engine/engine/ajax/ymaps/xfields.php similarity index 100% rename from upload/engine/ajax/ymaps/xfields.php rename to engine/engine/ajax/ymaps/xfields.php diff --git a/upload/engine/data/ymaps_config.json b/engine/engine/data/ymaps_config.json similarity index 100% rename from upload/engine/data/ymaps_config.json rename to engine/engine/data/ymaps_config.json diff --git a/upload/engine/data/ymaps_icons.json b/engine/engine/data/ymaps_icons.json similarity index 100% rename from upload/engine/data/ymaps_icons.json rename to engine/engine/data/ymaps_icons.json diff --git a/upload/engine/inc/ymaps.php b/engine/engine/inc/ymaps.php similarity index 100% rename from upload/engine/inc/ymaps.php rename to engine/engine/inc/ymaps.php diff --git a/upload/engine/modules/ymaps/.htaccess b/engine/engine/modules/ymaps/.htaccess similarity index 100% rename from upload/engine/modules/ymaps/.htaccess rename to engine/engine/modules/ymaps/.htaccess diff --git a/upload/engine/modules/ymaps/addnews-inline.php b/engine/engine/modules/ymaps/addnews-inline.php similarity index 100% rename from upload/engine/modules/ymaps/addnews-inline.php rename to engine/engine/modules/ymaps/addnews-inline.php diff --git a/upload/engine/modules/ymaps/addnews.php b/engine/engine/modules/ymaps/addnews.php similarity index 100% rename from upload/engine/modules/ymaps/addnews.php rename to engine/engine/modules/ymaps/addnews.php diff --git a/upload/engine/modules/ymaps/admin/.htaccess b/engine/engine/modules/ymaps/admin/.htaccess similarity index 100% rename from upload/engine/modules/ymaps/admin/.htaccess rename to engine/engine/modules/ymaps/admin/.htaccess diff --git a/upload/engine/modules/ymaps/admin/classes/.htaccess b/engine/engine/modules/ymaps/admin/classes/.htaccess similarity index 100% rename from upload/engine/modules/ymaps/admin/classes/.htaccess rename to engine/engine/modules/ymaps/admin/classes/.htaccess diff --git a/upload/engine/modules/ymaps/admin/classes/xfields.php b/engine/engine/modules/ymaps/admin/classes/xfields.php similarity index 100% rename from upload/engine/modules/ymaps/admin/classes/xfields.php rename to engine/engine/modules/ymaps/admin/classes/xfields.php diff --git a/upload/engine/modules/ymaps/admin/mapsettings.php b/engine/engine/modules/ymaps/admin/mapsettings.php similarity index 100% rename from upload/engine/modules/ymaps/admin/mapsettings.php rename to engine/engine/modules/ymaps/admin/mapsettings.php diff --git a/upload/engine/modules/ymaps/admin/pointersettings.php b/engine/engine/modules/ymaps/admin/pointersettings.php similarity index 100% rename from upload/engine/modules/ymaps/admin/pointersettings.php rename to engine/engine/modules/ymaps/admin/pointersettings.php diff --git a/upload/engine/modules/ymaps/admin/support.php b/engine/engine/modules/ymaps/admin/support.php similarity index 100% rename from upload/engine/modules/ymaps/admin/support.php rename to engine/engine/modules/ymaps/admin/support.php diff --git a/upload/engine/modules/ymaps/css/.htaccess b/engine/engine/modules/ymaps/css/.htaccess similarity index 100% rename from upload/engine/modules/ymaps/css/.htaccess rename to engine/engine/modules/ymaps/css/.htaccess diff --git a/upload/engine/modules/ymaps/css/style.css b/engine/engine/modules/ymaps/css/style.css similarity index 100% rename from upload/engine/modules/ymaps/css/style.css rename to engine/engine/modules/ymaps/css/style.css diff --git a/upload/engine/modules/ymaps/css/ymaps_editnews.css b/engine/engine/modules/ymaps/css/ymaps_editnews.css similarity index 100% rename from upload/engine/modules/ymaps/css/ymaps_editnews.css rename to engine/engine/modules/ymaps/css/ymaps_editnews.css diff --git a/upload/engine/modules/ymaps/detail.php b/engine/engine/modules/ymaps/detail.php similarity index 100% rename from upload/engine/modules/ymaps/detail.php rename to engine/engine/modules/ymaps/detail.php diff --git a/upload/engine/modules/ymaps/images/.htaccess b/engine/engine/modules/ymaps/images/.htaccess similarity index 100% rename from upload/engine/modules/ymaps/images/.htaccess rename to engine/engine/modules/ymaps/images/.htaccess diff --git a/upload/engine/modules/ymaps/images/black.png b/engine/engine/modules/ymaps/images/black.png similarity index 100% rename from upload/engine/modules/ymaps/images/black.png rename to engine/engine/modules/ymaps/images/black.png diff --git a/upload/engine/modules/ymaps/images/blackCircleDotIcon.png b/engine/engine/modules/ymaps/images/blackCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blackCircleDotIcon.png rename to engine/engine/modules/ymaps/images/blackCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/blackCircleIcon.png b/engine/engine/modules/ymaps/images/blackCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blackCircleIcon.png rename to engine/engine/modules/ymaps/images/blackCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/blackDotIcon.png b/engine/engine/modules/ymaps/images/blackDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blackDotIcon.png rename to engine/engine/modules/ymaps/images/blackDotIcon.png diff --git a/upload/engine/modules/ymaps/images/blackIcon.png b/engine/engine/modules/ymaps/images/blackIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blackIcon.png rename to engine/engine/modules/ymaps/images/blackIcon.png diff --git a/upload/engine/modules/ymaps/images/blackInverted.png b/engine/engine/modules/ymaps/images/blackInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/blackInverted.png rename to engine/engine/modules/ymaps/images/blackInverted.png diff --git a/upload/engine/modules/ymaps/images/blackStr.png b/engine/engine/modules/ymaps/images/blackStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/blackStr.png rename to engine/engine/modules/ymaps/images/blackStr.png diff --git a/upload/engine/modules/ymaps/images/blue.png b/engine/engine/modules/ymaps/images/blue.png similarity index 100% rename from upload/engine/modules/ymaps/images/blue.png rename to engine/engine/modules/ymaps/images/blue.png diff --git a/upload/engine/modules/ymaps/images/blueCircleDotIcon.png b/engine/engine/modules/ymaps/images/blueCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blueCircleDotIcon.png rename to engine/engine/modules/ymaps/images/blueCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/blueCircleIcon.png b/engine/engine/modules/ymaps/images/blueCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blueCircleIcon.png rename to engine/engine/modules/ymaps/images/blueCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/blueDotIcon.png b/engine/engine/modules/ymaps/images/blueDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blueDotIcon.png rename to engine/engine/modules/ymaps/images/blueDotIcon.png diff --git a/upload/engine/modules/ymaps/images/blueIcon.png b/engine/engine/modules/ymaps/images/blueIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/blueIcon.png rename to engine/engine/modules/ymaps/images/blueIcon.png diff --git a/upload/engine/modules/ymaps/images/blueInverted.png b/engine/engine/modules/ymaps/images/blueInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/blueInverted.png rename to engine/engine/modules/ymaps/images/blueInverted.png diff --git a/upload/engine/modules/ymaps/images/blueStr.png b/engine/engine/modules/ymaps/images/blueStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/blueStr.png rename to engine/engine/modules/ymaps/images/blueStr.png diff --git a/upload/engine/modules/ymaps/images/brown.png b/engine/engine/modules/ymaps/images/brown.png similarity index 100% rename from upload/engine/modules/ymaps/images/brown.png rename to engine/engine/modules/ymaps/images/brown.png diff --git a/upload/engine/modules/ymaps/images/brownCircleDotIcon.png b/engine/engine/modules/ymaps/images/brownCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/brownCircleDotIcon.png rename to engine/engine/modules/ymaps/images/brownCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/brownCircleIcon.png b/engine/engine/modules/ymaps/images/brownCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/brownCircleIcon.png rename to engine/engine/modules/ymaps/images/brownCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/brownDotIcon.png b/engine/engine/modules/ymaps/images/brownDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/brownDotIcon.png rename to engine/engine/modules/ymaps/images/brownDotIcon.png diff --git a/upload/engine/modules/ymaps/images/brownIcon.png b/engine/engine/modules/ymaps/images/brownIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/brownIcon.png rename to engine/engine/modules/ymaps/images/brownIcon.png diff --git a/upload/engine/modules/ymaps/images/brownInverted.png b/engine/engine/modules/ymaps/images/brownInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/brownInverted.png rename to engine/engine/modules/ymaps/images/brownInverted.png diff --git a/upload/engine/modules/ymaps/images/brownStr.png b/engine/engine/modules/ymaps/images/brownStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/brownStr.png rename to engine/engine/modules/ymaps/images/brownStr.png diff --git a/upload/engine/modules/ymaps/images/circleDotIcon.png b/engine/engine/modules/ymaps/images/circleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/circleDotIcon.png rename to engine/engine/modules/ymaps/images/circleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/circleIcon.png b/engine/engine/modules/ymaps/images/circleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/circleIcon.png rename to engine/engine/modules/ymaps/images/circleIcon.png diff --git a/upload/engine/modules/ymaps/images/cluster.png b/engine/engine/modules/ymaps/images/cluster.png similarity index 100% rename from upload/engine/modules/ymaps/images/cluster.png rename to engine/engine/modules/ymaps/images/cluster.png diff --git a/upload/engine/modules/ymaps/images/darkBlue.png b/engine/engine/modules/ymaps/images/darkBlue.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkBlue.png rename to engine/engine/modules/ymaps/images/darkBlue.png diff --git a/upload/engine/modules/ymaps/images/darkBlueCircleDotIcon.png b/engine/engine/modules/ymaps/images/darkBlueCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkBlueCircleDotIcon.png rename to engine/engine/modules/ymaps/images/darkBlueCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/darkBlueCircleIcon.png b/engine/engine/modules/ymaps/images/darkBlueCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkBlueCircleIcon.png rename to engine/engine/modules/ymaps/images/darkBlueCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/darkBlueDotIcon.png b/engine/engine/modules/ymaps/images/darkBlueDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkBlueDotIcon.png rename to engine/engine/modules/ymaps/images/darkBlueDotIcon.png diff --git a/upload/engine/modules/ymaps/images/darkBlueIcon.png b/engine/engine/modules/ymaps/images/darkBlueIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkBlueIcon.png rename to engine/engine/modules/ymaps/images/darkBlueIcon.png diff --git a/upload/engine/modules/ymaps/images/darkBlueInverted.png b/engine/engine/modules/ymaps/images/darkBlueInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkBlueInverted.png rename to engine/engine/modules/ymaps/images/darkBlueInverted.png diff --git a/upload/engine/modules/ymaps/images/darkBlueStr.png b/engine/engine/modules/ymaps/images/darkBlueStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkBlueStr.png rename to engine/engine/modules/ymaps/images/darkBlueStr.png diff --git a/upload/engine/modules/ymaps/images/darkGreen.png b/engine/engine/modules/ymaps/images/darkGreen.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkGreen.png rename to engine/engine/modules/ymaps/images/darkGreen.png diff --git a/upload/engine/modules/ymaps/images/darkGreenCircleDotIcon.png b/engine/engine/modules/ymaps/images/darkGreenCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkGreenCircleDotIcon.png rename to engine/engine/modules/ymaps/images/darkGreenCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/darkGreenCircleIcon.png b/engine/engine/modules/ymaps/images/darkGreenCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkGreenCircleIcon.png rename to engine/engine/modules/ymaps/images/darkGreenCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/darkGreenDotIcon.png b/engine/engine/modules/ymaps/images/darkGreenDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkGreenDotIcon.png rename to engine/engine/modules/ymaps/images/darkGreenDotIcon.png diff --git a/upload/engine/modules/ymaps/images/darkGreenIcon.png b/engine/engine/modules/ymaps/images/darkGreenIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkGreenIcon.png rename to engine/engine/modules/ymaps/images/darkGreenIcon.png diff --git a/upload/engine/modules/ymaps/images/darkGreenInverted.png b/engine/engine/modules/ymaps/images/darkGreenInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkGreenInverted.png rename to engine/engine/modules/ymaps/images/darkGreenInverted.png diff --git a/upload/engine/modules/ymaps/images/darkGreenStr.png b/engine/engine/modules/ymaps/images/darkGreenStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkGreenStr.png rename to engine/engine/modules/ymaps/images/darkGreenStr.png diff --git a/upload/engine/modules/ymaps/images/darkOrange.png b/engine/engine/modules/ymaps/images/darkOrange.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkOrange.png rename to engine/engine/modules/ymaps/images/darkOrange.png diff --git a/upload/engine/modules/ymaps/images/darkOrangeCircleDotIcon.png b/engine/engine/modules/ymaps/images/darkOrangeCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkOrangeCircleDotIcon.png rename to engine/engine/modules/ymaps/images/darkOrangeCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/darkOrangeCircleIcon.png b/engine/engine/modules/ymaps/images/darkOrangeCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkOrangeCircleIcon.png rename to engine/engine/modules/ymaps/images/darkOrangeCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/darkOrangeDotIcon.png b/engine/engine/modules/ymaps/images/darkOrangeDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkOrangeDotIcon.png rename to engine/engine/modules/ymaps/images/darkOrangeDotIcon.png diff --git a/upload/engine/modules/ymaps/images/darkOrangeIcon.png b/engine/engine/modules/ymaps/images/darkOrangeIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkOrangeIcon.png rename to engine/engine/modules/ymaps/images/darkOrangeIcon.png diff --git a/upload/engine/modules/ymaps/images/darkOrangeInverted.png b/engine/engine/modules/ymaps/images/darkOrangeInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkOrangeInverted.png rename to engine/engine/modules/ymaps/images/darkOrangeInverted.png diff --git a/upload/engine/modules/ymaps/images/darkOrangeStr.png b/engine/engine/modules/ymaps/images/darkOrangeStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/darkOrangeStr.png rename to engine/engine/modules/ymaps/images/darkOrangeStr.png diff --git a/upload/engine/modules/ymaps/images/dotIcon.png b/engine/engine/modules/ymaps/images/dotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/dotIcon.png rename to engine/engine/modules/ymaps/images/dotIcon.png diff --git a/upload/engine/modules/ymaps/images/geolocation.png b/engine/engine/modules/ymaps/images/geolocation.png similarity index 100% rename from upload/engine/modules/ymaps/images/geolocation.png rename to engine/engine/modules/ymaps/images/geolocation.png diff --git a/upload/engine/modules/ymaps/images/gray.png b/engine/engine/modules/ymaps/images/gray.png similarity index 100% rename from upload/engine/modules/ymaps/images/gray.png rename to engine/engine/modules/ymaps/images/gray.png diff --git a/upload/engine/modules/ymaps/images/grayCircleDotIcon.png b/engine/engine/modules/ymaps/images/grayCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/grayCircleDotIcon.png rename to engine/engine/modules/ymaps/images/grayCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/grayCircleIcon.png b/engine/engine/modules/ymaps/images/grayCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/grayCircleIcon.png rename to engine/engine/modules/ymaps/images/grayCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/grayDotIcon.png b/engine/engine/modules/ymaps/images/grayDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/grayDotIcon.png rename to engine/engine/modules/ymaps/images/grayDotIcon.png diff --git a/upload/engine/modules/ymaps/images/grayIcon.png b/engine/engine/modules/ymaps/images/grayIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/grayIcon.png rename to engine/engine/modules/ymaps/images/grayIcon.png diff --git a/upload/engine/modules/ymaps/images/grayInverted.png b/engine/engine/modules/ymaps/images/grayInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/grayInverted.png rename to engine/engine/modules/ymaps/images/grayInverted.png diff --git a/upload/engine/modules/ymaps/images/grayStr.png b/engine/engine/modules/ymaps/images/grayStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/grayStr.png rename to engine/engine/modules/ymaps/images/grayStr.png diff --git a/upload/engine/modules/ymaps/images/green.png b/engine/engine/modules/ymaps/images/green.png similarity index 100% rename from upload/engine/modules/ymaps/images/green.png rename to engine/engine/modules/ymaps/images/green.png diff --git a/upload/engine/modules/ymaps/images/greenCircleDotIcon.png b/engine/engine/modules/ymaps/images/greenCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/greenCircleDotIcon.png rename to engine/engine/modules/ymaps/images/greenCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/greenCircleIcon.png b/engine/engine/modules/ymaps/images/greenCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/greenCircleIcon.png rename to engine/engine/modules/ymaps/images/greenCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/greenDotIcon.png b/engine/engine/modules/ymaps/images/greenDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/greenDotIcon.png rename to engine/engine/modules/ymaps/images/greenDotIcon.png diff --git a/upload/engine/modules/ymaps/images/greenIcon.png b/engine/engine/modules/ymaps/images/greenIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/greenIcon.png rename to engine/engine/modules/ymaps/images/greenIcon.png diff --git a/upload/engine/modules/ymaps/images/greenInverted.png b/engine/engine/modules/ymaps/images/greenInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/greenInverted.png rename to engine/engine/modules/ymaps/images/greenInverted.png diff --git a/upload/engine/modules/ymaps/images/greenStr.png b/engine/engine/modules/ymaps/images/greenStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/greenStr.png rename to engine/engine/modules/ymaps/images/greenStr.png diff --git a/upload/engine/modules/ymaps/images/icon.png b/engine/engine/modules/ymaps/images/icon.png similarity index 100% rename from upload/engine/modules/ymaps/images/icon.png rename to engine/engine/modules/ymaps/images/icon.png diff --git a/upload/engine/modules/ymaps/images/inverted.png b/engine/engine/modules/ymaps/images/inverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/inverted.png rename to engine/engine/modules/ymaps/images/inverted.png diff --git a/upload/engine/modules/ymaps/images/lightBlue.png b/engine/engine/modules/ymaps/images/lightBlue.png similarity index 100% rename from upload/engine/modules/ymaps/images/lightBlue.png rename to engine/engine/modules/ymaps/images/lightBlue.png diff --git a/upload/engine/modules/ymaps/images/lightBlueCircleDotIcon.png b/engine/engine/modules/ymaps/images/lightBlueCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/lightBlueCircleDotIcon.png rename to engine/engine/modules/ymaps/images/lightBlueCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/lightBlueCircleIcon.png b/engine/engine/modules/ymaps/images/lightBlueCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/lightBlueCircleIcon.png rename to engine/engine/modules/ymaps/images/lightBlueCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/lightBlueDotIcon.png b/engine/engine/modules/ymaps/images/lightBlueDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/lightBlueDotIcon.png rename to engine/engine/modules/ymaps/images/lightBlueDotIcon.png diff --git a/upload/engine/modules/ymaps/images/lightBlueIcon.png b/engine/engine/modules/ymaps/images/lightBlueIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/lightBlueIcon.png rename to engine/engine/modules/ymaps/images/lightBlueIcon.png diff --git a/upload/engine/modules/ymaps/images/lightBlueInverted.png b/engine/engine/modules/ymaps/images/lightBlueInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/lightBlueInverted.png rename to engine/engine/modules/ymaps/images/lightBlueInverted.png diff --git a/upload/engine/modules/ymaps/images/lightBlueStr.png b/engine/engine/modules/ymaps/images/lightBlueStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/lightBlueStr.png rename to engine/engine/modules/ymaps/images/lightBlueStr.png diff --git a/upload/engine/modules/ymaps/images/night.png b/engine/engine/modules/ymaps/images/night.png similarity index 100% rename from upload/engine/modules/ymaps/images/night.png rename to engine/engine/modules/ymaps/images/night.png diff --git a/upload/engine/modules/ymaps/images/nightCircleDotIcon.png b/engine/engine/modules/ymaps/images/nightCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/nightCircleDotIcon.png rename to engine/engine/modules/ymaps/images/nightCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/nightCircleIcon.png b/engine/engine/modules/ymaps/images/nightCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/nightCircleIcon.png rename to engine/engine/modules/ymaps/images/nightCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/nightDotIcon.png b/engine/engine/modules/ymaps/images/nightDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/nightDotIcon.png rename to engine/engine/modules/ymaps/images/nightDotIcon.png diff --git a/upload/engine/modules/ymaps/images/nightIcon.png b/engine/engine/modules/ymaps/images/nightIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/nightIcon.png rename to engine/engine/modules/ymaps/images/nightIcon.png diff --git a/upload/engine/modules/ymaps/images/nightInverted.png b/engine/engine/modules/ymaps/images/nightInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/nightInverted.png rename to engine/engine/modules/ymaps/images/nightInverted.png diff --git a/upload/engine/modules/ymaps/images/nightStr.png b/engine/engine/modules/ymaps/images/nightStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/nightStr.png rename to engine/engine/modules/ymaps/images/nightStr.png diff --git a/upload/engine/modules/ymaps/images/olive.png b/engine/engine/modules/ymaps/images/olive.png similarity index 100% rename from upload/engine/modules/ymaps/images/olive.png rename to engine/engine/modules/ymaps/images/olive.png diff --git a/upload/engine/modules/ymaps/images/oliveCircleDotIcon.png b/engine/engine/modules/ymaps/images/oliveCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/oliveCircleDotIcon.png rename to engine/engine/modules/ymaps/images/oliveCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/oliveCircleIcon.png b/engine/engine/modules/ymaps/images/oliveCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/oliveCircleIcon.png rename to engine/engine/modules/ymaps/images/oliveCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/oliveDotIcon.png b/engine/engine/modules/ymaps/images/oliveDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/oliveDotIcon.png rename to engine/engine/modules/ymaps/images/oliveDotIcon.png diff --git a/upload/engine/modules/ymaps/images/oliveIcon.png b/engine/engine/modules/ymaps/images/oliveIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/oliveIcon.png rename to engine/engine/modules/ymaps/images/oliveIcon.png diff --git a/upload/engine/modules/ymaps/images/oliveInverted.png b/engine/engine/modules/ymaps/images/oliveInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/oliveInverted.png rename to engine/engine/modules/ymaps/images/oliveInverted.png diff --git a/upload/engine/modules/ymaps/images/oliveStr.png b/engine/engine/modules/ymaps/images/oliveStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/oliveStr.png rename to engine/engine/modules/ymaps/images/oliveStr.png diff --git a/upload/engine/modules/ymaps/images/orange.png b/engine/engine/modules/ymaps/images/orange.png similarity index 100% rename from upload/engine/modules/ymaps/images/orange.png rename to engine/engine/modules/ymaps/images/orange.png diff --git a/upload/engine/modules/ymaps/images/orangeCircleDotIcon.png b/engine/engine/modules/ymaps/images/orangeCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/orangeCircleDotIcon.png rename to engine/engine/modules/ymaps/images/orangeCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/orangeCircleIcon.png b/engine/engine/modules/ymaps/images/orangeCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/orangeCircleIcon.png rename to engine/engine/modules/ymaps/images/orangeCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/orangeDotIcon.png b/engine/engine/modules/ymaps/images/orangeDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/orangeDotIcon.png rename to engine/engine/modules/ymaps/images/orangeDotIcon.png diff --git a/upload/engine/modules/ymaps/images/orangeIcon.png b/engine/engine/modules/ymaps/images/orangeIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/orangeIcon.png rename to engine/engine/modules/ymaps/images/orangeIcon.png diff --git a/upload/engine/modules/ymaps/images/orangeInverted.png b/engine/engine/modules/ymaps/images/orangeInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/orangeInverted.png rename to engine/engine/modules/ymaps/images/orangeInverted.png diff --git a/upload/engine/modules/ymaps/images/orangeStr.png b/engine/engine/modules/ymaps/images/orangeStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/orangeStr.png rename to engine/engine/modules/ymaps/images/orangeStr.png diff --git a/upload/engine/modules/ymaps/images/pink.png b/engine/engine/modules/ymaps/images/pink.png similarity index 100% rename from upload/engine/modules/ymaps/images/pink.png rename to engine/engine/modules/ymaps/images/pink.png diff --git a/upload/engine/modules/ymaps/images/pinkCircleDotIcon.png b/engine/engine/modules/ymaps/images/pinkCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/pinkCircleDotIcon.png rename to engine/engine/modules/ymaps/images/pinkCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/pinkCircleIcon.png b/engine/engine/modules/ymaps/images/pinkCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/pinkCircleIcon.png rename to engine/engine/modules/ymaps/images/pinkCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/pinkDotIcon.png b/engine/engine/modules/ymaps/images/pinkDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/pinkDotIcon.png rename to engine/engine/modules/ymaps/images/pinkDotIcon.png diff --git a/upload/engine/modules/ymaps/images/pinkIcon.png b/engine/engine/modules/ymaps/images/pinkIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/pinkIcon.png rename to engine/engine/modules/ymaps/images/pinkIcon.png diff --git a/upload/engine/modules/ymaps/images/pinkInverted.png b/engine/engine/modules/ymaps/images/pinkInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/pinkInverted.png rename to engine/engine/modules/ymaps/images/pinkInverted.png diff --git a/upload/engine/modules/ymaps/images/pinkStr.png b/engine/engine/modules/ymaps/images/pinkStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/pinkStr.png rename to engine/engine/modules/ymaps/images/pinkStr.png diff --git a/upload/engine/modules/ymaps/images/red.png b/engine/engine/modules/ymaps/images/red.png similarity index 100% rename from upload/engine/modules/ymaps/images/red.png rename to engine/engine/modules/ymaps/images/red.png diff --git a/upload/engine/modules/ymaps/images/redCircleDotIcon.png b/engine/engine/modules/ymaps/images/redCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/redCircleDotIcon.png rename to engine/engine/modules/ymaps/images/redCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/redCircleIcon.png b/engine/engine/modules/ymaps/images/redCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/redCircleIcon.png rename to engine/engine/modules/ymaps/images/redCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/redDotIcon.png b/engine/engine/modules/ymaps/images/redDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/redDotIcon.png rename to engine/engine/modules/ymaps/images/redDotIcon.png diff --git a/upload/engine/modules/ymaps/images/redIcon.png b/engine/engine/modules/ymaps/images/redIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/redIcon.png rename to engine/engine/modules/ymaps/images/redIcon.png diff --git a/upload/engine/modules/ymaps/images/redInverted.png b/engine/engine/modules/ymaps/images/redInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/redInverted.png rename to engine/engine/modules/ymaps/images/redInverted.png diff --git a/upload/engine/modules/ymaps/images/redStr.png b/engine/engine/modules/ymaps/images/redStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/redStr.png rename to engine/engine/modules/ymaps/images/redStr.png diff --git a/upload/engine/modules/ymaps/images/violet.png b/engine/engine/modules/ymaps/images/violet.png similarity index 100% rename from upload/engine/modules/ymaps/images/violet.png rename to engine/engine/modules/ymaps/images/violet.png diff --git a/upload/engine/modules/ymaps/images/violetCircleDotIcon.png b/engine/engine/modules/ymaps/images/violetCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/violetCircleDotIcon.png rename to engine/engine/modules/ymaps/images/violetCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/violetCircleIcon.png b/engine/engine/modules/ymaps/images/violetCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/violetCircleIcon.png rename to engine/engine/modules/ymaps/images/violetCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/violetDotIcon.png b/engine/engine/modules/ymaps/images/violetDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/violetDotIcon.png rename to engine/engine/modules/ymaps/images/violetDotIcon.png diff --git a/upload/engine/modules/ymaps/images/violetIcon.png b/engine/engine/modules/ymaps/images/violetIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/violetIcon.png rename to engine/engine/modules/ymaps/images/violetIcon.png diff --git a/upload/engine/modules/ymaps/images/violetInverted.png b/engine/engine/modules/ymaps/images/violetInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/violetInverted.png rename to engine/engine/modules/ymaps/images/violetInverted.png diff --git a/upload/engine/modules/ymaps/images/violetStr.png b/engine/engine/modules/ymaps/images/violetStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/violetStr.png rename to engine/engine/modules/ymaps/images/violetStr.png diff --git a/upload/engine/modules/ymaps/images/yellow.png b/engine/engine/modules/ymaps/images/yellow.png similarity index 100% rename from upload/engine/modules/ymaps/images/yellow.png rename to engine/engine/modules/ymaps/images/yellow.png diff --git a/upload/engine/modules/ymaps/images/yellowCircleDotIcon.png b/engine/engine/modules/ymaps/images/yellowCircleDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/yellowCircleDotIcon.png rename to engine/engine/modules/ymaps/images/yellowCircleDotIcon.png diff --git a/upload/engine/modules/ymaps/images/yellowCircleIcon.png b/engine/engine/modules/ymaps/images/yellowCircleIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/yellowCircleIcon.png rename to engine/engine/modules/ymaps/images/yellowCircleIcon.png diff --git a/upload/engine/modules/ymaps/images/yellowDotIcon.png b/engine/engine/modules/ymaps/images/yellowDotIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/yellowDotIcon.png rename to engine/engine/modules/ymaps/images/yellowDotIcon.png diff --git a/upload/engine/modules/ymaps/images/yellowIcon.png b/engine/engine/modules/ymaps/images/yellowIcon.png similarity index 100% rename from upload/engine/modules/ymaps/images/yellowIcon.png rename to engine/engine/modules/ymaps/images/yellowIcon.png diff --git a/upload/engine/modules/ymaps/images/yellowInverted.png b/engine/engine/modules/ymaps/images/yellowInverted.png similarity index 100% rename from upload/engine/modules/ymaps/images/yellowInverted.png rename to engine/engine/modules/ymaps/images/yellowInverted.png diff --git a/upload/engine/modules/ymaps/images/yellowStr.png b/engine/engine/modules/ymaps/images/yellowStr.png similarity index 100% rename from upload/engine/modules/ymaps/images/yellowStr.png rename to engine/engine/modules/ymaps/images/yellowStr.png diff --git a/upload/engine/modules/ymaps/js/.htaccess b/engine/engine/modules/ymaps/js/.htaccess similarity index 100% rename from upload/engine/modules/ymaps/js/.htaccess rename to engine/engine/modules/ymaps/js/.htaccess diff --git a/upload/engine/modules/ymaps/js/jquery.easyResponsiveTabs.min.js b/engine/engine/modules/ymaps/js/jquery.easyResponsiveTabs.min.js similarity index 100% rename from upload/engine/modules/ymaps/js/jquery.easyResponsiveTabs.min.js rename to engine/engine/modules/ymaps/js/jquery.easyResponsiveTabs.min.js diff --git a/upload/engine/modules/ymaps/js/jquery.form.min.js b/engine/engine/modules/ymaps/js/jquery.form.min.js similarity index 100% rename from upload/engine/modules/ymaps/js/jquery.form.min.js rename to engine/engine/modules/ymaps/js/jquery.form.min.js diff --git a/upload/engine/modules/ymaps/js/jquery.formstyler.min.js b/engine/engine/modules/ymaps/js/jquery.formstyler.min.js similarity index 100% rename from upload/engine/modules/ymaps/js/jquery.formstyler.min.js rename to engine/engine/modules/ymaps/js/jquery.formstyler.min.js diff --git a/upload/engine/modules/ymaps/js/jquery.ladda.min.js b/engine/engine/modules/ymaps/js/jquery.ladda.min.js similarity index 100% rename from upload/engine/modules/ymaps/js/jquery.ladda.min.js rename to engine/engine/modules/ymaps/js/jquery.ladda.min.js diff --git a/upload/engine/modules/ymaps/js/jquery.magnificpopup.min.js b/engine/engine/modules/ymaps/js/jquery.magnificpopup.min.js similarity index 100% rename from upload/engine/modules/ymaps/js/jquery.magnificpopup.min.js rename to engine/engine/modules/ymaps/js/jquery.magnificpopup.min.js diff --git a/upload/engine/modules/ymaps/js/main.js b/engine/engine/modules/ymaps/js/main.js similarity index 100% rename from upload/engine/modules/ymaps/js/main.js rename to engine/engine/modules/ymaps/js/main.js diff --git a/upload/engine/modules/ymaps/js/ymaps_editnews.js b/engine/engine/modules/ymaps/js/ymaps_editnews.js similarity index 100% rename from upload/engine/modules/ymaps/js/ymaps_editnews.js rename to engine/engine/modules/ymaps/js/ymaps_editnews.js diff --git a/upload/engine/modules/ymaps/language/.htaccess b/engine/engine/modules/ymaps/language/.htaccess similarity index 100% rename from upload/engine/modules/ymaps/language/.htaccess rename to engine/engine/modules/ymaps/language/.htaccess diff --git a/upload/engine/modules/ymaps/language/English.lng b/engine/engine/modules/ymaps/language/English.lng similarity index 100% rename from upload/engine/modules/ymaps/language/English.lng rename to engine/engine/modules/ymaps/language/English.lng diff --git a/upload/engine/modules/ymaps/language/Russian.lng b/engine/engine/modules/ymaps/language/Russian.lng similarity index 100% rename from upload/engine/modules/ymaps/language/Russian.lng rename to engine/engine/modules/ymaps/language/Russian.lng diff --git a/upload/engine/modules/ymaps/language/Ukrainian.lng b/engine/engine/modules/ymaps/language/Ukrainian.lng similarity index 100% rename from upload/engine/modules/ymaps/language/Ukrainian.lng rename to engine/engine/modules/ymaps/language/Ukrainian.lng diff --git a/upload/engine/skins/images/ymaps.png b/engine/engine/skins/images/ymaps.png similarity index 100% rename from upload/engine/skins/images/ymaps.png rename to engine/engine/skins/images/ymaps.png diff --git a/engine/skins/images/ymaps.png b/engine/skins/images/ymaps.png new file mode 100644 index 0000000000000000000000000000000000000000..f4cd23fbf5a72c8001938dbf42c4ae91ffd6bd08 GIT binary patch literal 3172 zcmbVOc|6nqA0Nt1CDj};Lyp*CHjK&G92GKTD4A{UZER!CB1eUi(3emllABVIT&XBI zavw{iawL6~tEAubt?%#m$M^C5i{#Vw~u8Q zlWHGk<3JAcBO6e_2aG{RA!r@}jmjp0LTLVU7CHn2{>h8x%{RB9V9-wywjT!kmr+FP zBOo&dlL|sY5ZYuI91cREAaGqI3I*2!>A>JRP#Et1FU<9!-V4kIaxj+lBw*H%#&iWN7UdW&!qyQ)!0)x_Mn|}S2X0Zv>|C;fS z(kzG204kI~Wif)7WL`czm4AbIvHN#Ln}R%R(6&q;UQ$T@I0iY0My0c@a2PP}1VZtl zpmpE|Fr(eD8Egj2 zn-Ksqvqyo{oqXsN28X4wnV!GA#Zj3)!BmPllR*Rhj4#^fAN1o9W@bo)J|3&j^ONT{ z7H*)2HPbi4!}Jh%6cPshg{AyIF@y4qfo>MZ{}jvbEnWp~PX8`_-s11(q0)IB!{oI_ z$ryMJ01!^I!eJdkMm`*Kwv}^|HUc!O zjraz~;^Ky*32B!rV=F1jD()Q~yBR}KGi#8Jj=gW-`;st%5jXZ{!>YU*!aF$)tj?eh z2R4?4s+JbNrVn!JeP?_}Br6(2zspMqx{a>k6)U{zXJ>rnyfLID7ttk#=+* z!u?O_ric?Qld<0c?qjO*HpH5;SghxMK70PcElC=l&@Vy?3JNbj4(xkuDwj4iocqu_ zc6sGe+Q_(?Yp6l`us?;Pf2+FgO0n-;+wf~8p&vJ@tDlQ>xEa~FCW=W*YV}}sGXIo~ z5_q(*({NPUO+=ncNssYeFLM|lRyBDb-6UVB=U;y{Kc~R9#nt%f^3Df$YCqWkTt^3N zUdcr|xY-2;MvDkt_Mt7O1Jt;h$03qCp^kOj7G?in!@Y%sH1yET$mMdCGem!cidzY( zt#N$gzGcd5(KW&Nw*J0|s;FqM(iew&mv7=Ry`LWq)^HMzSFqm}?&s_7T$B=6#P0EZ z4&9)3)mmNk(}M`Y&Ik!fX8`l3zh3#up&rf-%HdAEJyV$j-vV$aGZc~R6ZzevgLfVS zdIBx!^_hFzk*_{LneMCc0;zA%M>Mnh`*hgJ@cVD$G8jGeY6FbhY>3gb;r86fkLy~Go%y9zVJYq=6bYHM zyJwO^Z|=9|d=?$hr)^UZ>m(QigvANxH2%=J9A?od|RCR^OrfjmEi7=fj5DB7{{v3xrtp`XJ(2h(XVwrQTxNT8L<6`z=v)~Zil z=sYsecOglo?dl_qntM-geNVkF^xRCOo`0g?!`=5`6%#cV*Alxn;9FF=!T0V>E0=pM zJiFX^{Jiy*BFYPLr23x_C3)!*zd2ai?2*btM~PT)**K<}4cK>3xX98Sddle$ObR8w^CHdBx(u>Kd#mRk24-Aj^3(enX$sTo5lrQ$@mJ^a)bfd8 z^Qu|-*l+6;6%TD#cvXh^>5sCH=JMuBTn1*1T%TOTh{;8Fq^86Ull#AooOcxyx3rN^ zjS-Y;&C(j{_SJV4dEJwODV|Sqj-6ATN2Ct$D<7!T?6L*qH@5f2j<-)%=~z>}mNTlE zS>-MFq=8?&YF-?cIi9ww$iCTDpv7B2(w^`{C-*=E#C zFSKsuC{ZkFEaUPyeQrrHMz-SmPR{OB#12sl<%xK(!z=Ma(J6izIQ{IJq0~f+K140B zJQbsr6_r*a2Dl>)tmWG^u6s0#eyT*WwciP9Tjp~FH;LAs(@(-r{8@Ss?);6&pCk_k zIXZuuX*t)v-Lbj_sg8DXv*})3J!QJ1gmCRti&;0~2_eBA7zU*Z&TqL9kohKCLcuT5 z@+?}nAZ>?*N@avDvSa%AQlC!9A4d!K^$A@l7kn&b*owaa>i!aT7E60qr#V`Llj+b1 zE7VLJ(jtyx-zDdyQ@N09!W!33NMBeMpHhFxlvVGB(N+`_QVyX~_eXG8iAyss+w&T& z#nj60yyYSmv&(xJ_rn?r_OG+)9ZjJXD}^j|CqDQPfGd1k_x98W}&wXY&*FMn_dl;VYsr$*!II-$(0DUrNFUxd_jT*M3o#bvL=hv`4o#wdrvEU9Vm1uaB#})$r}gtp&#H z*}GK>mu*@nge{H5BMPS#C(5#$J2F(?N&wqV-cj!FC0fDs|4aR!Pt4&%0oc7~J3olM`W3PKhW7TWKB}3_AQ^H?$u6aOIoW`>hUnL%G z3DrGhTKvk6FqG4oC?wwTwExc7x}=S*Z1CFc0kiD5sqHOOJMy^^E^g6SR{N=y2ABD~ zvh6@c!(IbmQdD5Xd51Vxr7**_yY-5h7QIDQXd~g|W*PLexTLi!>Fs+wPzA_R!7fZC zRMb5UY(KcdCGLE`WP^~mycFIbtaz`YVEese_o2?Kf`UO0iSkQLBv0j->h#d9In9L) zqj9`%1z*fb+T16BD3FSk7fn^sT_9E>OUaPm%VCt$BRrGY?l~;P305N)H-DraLmQB&yjH7IQQB|l5$Z6vy1 z6aUmeq0K|Bnzz4{oa)x|7)!~GwDYdk z)^u+r%{*AaHH-8J5}w57e((9CFq?S)Vy;R|%!2&exp0d;z2t9QedMO7q>ZT$OHzJ0pK2*ggS#>)D|u1v 'ymaps', - - // Название модуля - показывается как в установщике, так и в админке. - 'moduleTitle' => 'Yandex Maps', - - // Описание модуля, для установщика и админки. - 'moduleDescr' => 'Модуль Яндекс.Карты для DLE', - - // Версия модуля, для установщика - 'moduleVersion' => '2.0.1', - - // Дата выпуска модуля, для установщика - 'moduleDate' => '16.10.2018', - - // Версии DLE, поддержваемые модулем, для установщика - 'dleVersion' => '10.x', - - // ID групп, для которых доступно управление модулем в админке. - 'allowGroups' => '1', - - // Массив с запросами, которые будут выполняться при установке - 'queries' => array(), - - // Устанавливать админку (true/false). Включает показ кнопки установки и удаления админки. - 'installAdmin' => true, - - // Отображать шаги утановки модуля - 'steps' => true - -); - -// Определяем кодировку. -$fileCharset = chasetConflict($cfg); - -// Шаги установки модуля -$steps = << -

Редактирование файлов

-

Предварительная правка файлов для установки модуля не требуется.

-

Инструкция по настройке модуля находится на странице с документацией: http://maps.pafnuty.name/documentation/#setup

- -HTML; - - -function installer() { - global $config, $dle_api, $cfg, $steps, $fileCharset; - - $output = ''; - - $queries = (count($cfg['queries'])) ? true : false; - - if ($queries) { - foreach ($cfg['queries'] as $qq) { - $queriesTxt .= ''; - } - } - - if ($cfg['installAdmin']) { - $aq = $dle_api->db->super_query("SELECT name FROM " . PREFIX . "_admin_sections WHERE name = '{$cfg['moduleName']}'"); - - $adminInstalled = ($aq['name'] == $cfg['moduleName']) ? true : false; - - } - - // Если через $_POST передаётся параметр install, производим инсталляцию, согласно параметрам - if (!empty($_POST['install'])) { - // Выводим результаты установки модуля - $output .= '
    '; - - if ($queries) { - // Выполняем запросы из массива. - foreach ($cfg['queries'] as $q) { - $query[] = $dle_api->db->query($q); - } - - $output .= '
  • Запросы выполнены!
  • '; - } - - // Установка админки (http://dle-news.ru/extras/online/include_admin.html) - if ($cfg['installAdmin']) { - - $install_admin = $dle_api->install_admin_module($cfg['moduleName'], $cfg['moduleTitle'], $cfg['moduleDescr'], $cfg['moduleName'] . '.png', $cfg['allowGroups']); - - if ($install_admin) { - $output .= '
  • Админчасть модуля установлена
  • '; - } - } - - $output .= '
  • Установка завершена!
'; - $output .= '
Не забудьте удалить файл установщика!
'; - if ($cfg['installAdmin'] && $install_admin) { - $output .= '

Настройка модуля


'; - } - - } - - // Если через $_POST передаётся параметр remove, производим удаление админчасти модуля - elseif (!empty($_POST['remove'])) { - $remove_admin = $dle_api->uninstall_admin_module($cfg['moduleName']); - $output .= '

Админчасть модуля удалена

'; - $output .= '
Не забудьте удалить файл установщика!
'; - } - - // Если через $_POST ничего не передаётся, выводим форму для установки модуля - else { - // Выводим кнопку удаления модуля - if ($cfg['installAdmin'] && $adminInstalled) { - $uninstallForm = << -
-
Удаление админчасти модуля
-
-
- - -
-
-
-HTML; - } - // Выводим кнопку установки модуля с допзпросами - if ($queries) { - $installForm = << -
Установка модуля
-
-
- - - Какие запросы будут выполнены? -
-
- -
- $queriesTxt -
-HTML; - } - // Выводим кнопку установки админчасти модуля - else { - if (!$adminInstalled) { - $installForm = << -
Установка админчасти
-
-
- - -
-
- -HTML; - } - } - - // Вывод - if ($cfg['steps']) { - $output .= $steps; - } - $output .= <<Перед установкой модуля обязательно сделайте бэкап БД!

-
-

Выполнение запросов в БД

- - $installForm - $uninstallForm -
-HTML; - - - } - - // Если руки пользователя кривые, или он просто забыл перекодировать файлы - скажем ему об этом. - if ($fileCharset['conflict']) { - $output = '

Ошибка!

Кодировка файла установщика (' . $fileCharset['charset'] . ') не совпадает с кодировкой сайта (' . $config['charset'] . ').
Установка не возможна.
Перекодируйте все php файлы модуля и запустите установщик ещё раз.


'; - } - - // Функция возвращает то, что должно быть выведено - return $output; -} - -/** - * Отлавливаем данные о кодировке файла (utf-8 или windows-1251); - * @param string $string - строка (или массив), в которой требуется определить кодировку. - * - * @return array - возвращает массив с определением конфликта кодировки строки и сайта, а так же сму кодировку строки. - */ -function chasetConflict($string) { - global $config; - if (is_array($string)) { - $string = implode(' ', $string); - } - $detect = preg_match( - '%(?: - [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte - |\xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs - |[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte - |\xED[\x80-\x9F][\x80-\xBF] # excluding surrogates - |\xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 - |[\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 - |\xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 - )+%xs', - $string - ); - $stringCharset = ($detect == '1') ? 'utf-8' : 'windows-1251'; - $config['charset'] = strtolower($config['charset']); - $return = array(); - $return['conflict'] = ($stringCharset == $config['charset']) ? false : true; - $return['charset'] = $stringCharset; - - return $return; -} - -?> - - - - - <?=$cfg['moduleTitle']?> - - - - - -
-

v. от

-
-
-
- -

Мастер установки модуля для DLE

- - - -
-
- Контакты:
- DLE-YandexMaps — Репозиторий модуля
- Техподдержка -
- - - - - - - - From 0829bf31018ad6fd4485ad3e845845c8c6fc619b Mon Sep 17 00:00:00 2001 From: pafnuty Date: Sat, 29 Feb 2020 01:53:59 +0400 Subject: [PATCH 02/12] =?UTF-8?q?3.0.0=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=81=D1=82=D0=B0,=20=D0=BE=D0=BF=D1=8F=D1=82?= =?UTF-8?q?=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/{engine => }/ajax/ymaps/all.php | 0 engine/{engine => }/ajax/ymaps/cat.php | 0 engine/{engine => }/ajax/ymaps/check_status.php | 0 engine/{engine => }/ajax/ymaps/check_updates.php | 0 engine/{engine => }/ajax/ymaps/editmarker.php | 0 engine/{engine => }/ajax/ymaps/editnews.php | 0 engine/{engine => }/ajax/ymaps/saveconfig.php | 0 engine/{engine => }/ajax/ymaps/xfields.php | 0 engine/{engine => }/data/ymaps_config.json | 0 engine/{engine => }/data/ymaps_icons.json | 0 engine/engine/skins/images/ymaps.png | Bin 3172 -> 0 bytes engine/{engine => }/inc/ymaps.php | 0 engine/{engine => }/modules/ymaps/.htaccess | 0 .../modules/ymaps/addnews-inline.php | 0 engine/{engine => }/modules/ymaps/addnews.php | 0 .../{engine => }/modules/ymaps/admin/.htaccess | 0 .../modules/ymaps/admin/classes/.htaccess | 0 .../modules/ymaps/admin/classes/xfields.php | 0 .../modules/ymaps/admin/mapsettings.php | 0 .../modules/ymaps/admin/pointersettings.php | 0 .../{engine => }/modules/ymaps/admin/support.php | 0 engine/{engine => }/modules/ymaps/css/.htaccess | 0 engine/{engine => }/modules/ymaps/css/style.css | 0 .../modules/ymaps/css/ymaps_editnews.css | 0 engine/{engine => }/modules/ymaps/detail.php | 0 .../{engine => }/modules/ymaps/images/.htaccess | 0 .../{engine => }/modules/ymaps/images/black.png | Bin .../modules/ymaps/images/blackCircleDotIcon.png | Bin .../modules/ymaps/images/blackCircleIcon.png | Bin .../modules/ymaps/images/blackDotIcon.png | Bin .../modules/ymaps/images/blackIcon.png | Bin .../modules/ymaps/images/blackInverted.png | Bin .../modules/ymaps/images/blackStr.png | Bin .../{engine => }/modules/ymaps/images/blue.png | Bin .../modules/ymaps/images/blueCircleDotIcon.png | Bin .../modules/ymaps/images/blueCircleIcon.png | Bin .../modules/ymaps/images/blueDotIcon.png | Bin .../modules/ymaps/images/blueIcon.png | Bin .../modules/ymaps/images/blueInverted.png | Bin .../modules/ymaps/images/blueStr.png | Bin .../{engine => }/modules/ymaps/images/brown.png | Bin .../modules/ymaps/images/brownCircleDotIcon.png | Bin .../modules/ymaps/images/brownCircleIcon.png | Bin .../modules/ymaps/images/brownDotIcon.png | Bin .../modules/ymaps/images/brownIcon.png | Bin .../modules/ymaps/images/brownInverted.png | Bin .../modules/ymaps/images/brownStr.png | Bin .../modules/ymaps/images/circleDotIcon.png | Bin .../modules/ymaps/images/circleIcon.png | Bin .../modules/ymaps/images/cluster.png | Bin .../modules/ymaps/images/darkBlue.png | Bin .../ymaps/images/darkBlueCircleDotIcon.png | Bin .../modules/ymaps/images/darkBlueCircleIcon.png | Bin .../modules/ymaps/images/darkBlueDotIcon.png | Bin .../modules/ymaps/images/darkBlueIcon.png | Bin .../modules/ymaps/images/darkBlueInverted.png | Bin .../modules/ymaps/images/darkBlueStr.png | Bin .../modules/ymaps/images/darkGreen.png | Bin .../ymaps/images/darkGreenCircleDotIcon.png | Bin .../modules/ymaps/images/darkGreenCircleIcon.png | Bin .../modules/ymaps/images/darkGreenDotIcon.png | Bin .../modules/ymaps/images/darkGreenIcon.png | Bin .../modules/ymaps/images/darkGreenInverted.png | Bin .../modules/ymaps/images/darkGreenStr.png | Bin .../modules/ymaps/images/darkOrange.png | Bin .../ymaps/images/darkOrangeCircleDotIcon.png | Bin .../ymaps/images/darkOrangeCircleIcon.png | Bin .../modules/ymaps/images/darkOrangeDotIcon.png | Bin .../modules/ymaps/images/darkOrangeIcon.png | Bin .../modules/ymaps/images/darkOrangeInverted.png | Bin .../modules/ymaps/images/darkOrangeStr.png | Bin .../modules/ymaps/images/dotIcon.png | Bin .../modules/ymaps/images/geolocation.png | Bin .../{engine => }/modules/ymaps/images/gray.png | Bin .../modules/ymaps/images/grayCircleDotIcon.png | Bin .../modules/ymaps/images/grayCircleIcon.png | Bin .../modules/ymaps/images/grayDotIcon.png | Bin .../modules/ymaps/images/grayIcon.png | Bin .../modules/ymaps/images/grayInverted.png | Bin .../modules/ymaps/images/grayStr.png | Bin .../{engine => }/modules/ymaps/images/green.png | Bin .../modules/ymaps/images/greenCircleDotIcon.png | Bin .../modules/ymaps/images/greenCircleIcon.png | Bin .../modules/ymaps/images/greenDotIcon.png | Bin .../modules/ymaps/images/greenIcon.png | Bin .../modules/ymaps/images/greenInverted.png | Bin .../modules/ymaps/images/greenStr.png | Bin .../{engine => }/modules/ymaps/images/icon.png | Bin .../modules/ymaps/images/inverted.png | Bin .../modules/ymaps/images/lightBlue.png | Bin .../ymaps/images/lightBlueCircleDotIcon.png | Bin .../modules/ymaps/images/lightBlueCircleIcon.png | Bin .../modules/ymaps/images/lightBlueDotIcon.png | Bin .../modules/ymaps/images/lightBlueIcon.png | Bin .../modules/ymaps/images/lightBlueInverted.png | Bin .../modules/ymaps/images/lightBlueStr.png | Bin .../{engine => }/modules/ymaps/images/night.png | Bin .../modules/ymaps/images/nightCircleDotIcon.png | Bin .../modules/ymaps/images/nightCircleIcon.png | Bin .../modules/ymaps/images/nightDotIcon.png | Bin .../modules/ymaps/images/nightIcon.png | Bin .../modules/ymaps/images/nightInverted.png | Bin .../modules/ymaps/images/nightStr.png | Bin .../{engine => }/modules/ymaps/images/olive.png | Bin .../modules/ymaps/images/oliveCircleDotIcon.png | Bin .../modules/ymaps/images/oliveCircleIcon.png | Bin .../modules/ymaps/images/oliveDotIcon.png | Bin .../modules/ymaps/images/oliveIcon.png | Bin .../modules/ymaps/images/oliveInverted.png | Bin .../modules/ymaps/images/oliveStr.png | Bin .../{engine => }/modules/ymaps/images/orange.png | Bin .../modules/ymaps/images/orangeCircleDotIcon.png | Bin .../modules/ymaps/images/orangeCircleIcon.png | Bin .../modules/ymaps/images/orangeDotIcon.png | Bin .../modules/ymaps/images/orangeIcon.png | Bin .../modules/ymaps/images/orangeInverted.png | Bin .../modules/ymaps/images/orangeStr.png | Bin .../{engine => }/modules/ymaps/images/pink.png | Bin .../modules/ymaps/images/pinkCircleDotIcon.png | Bin .../modules/ymaps/images/pinkCircleIcon.png | Bin .../modules/ymaps/images/pinkDotIcon.png | Bin .../modules/ymaps/images/pinkIcon.png | Bin .../modules/ymaps/images/pinkInverted.png | Bin .../modules/ymaps/images/pinkStr.png | Bin engine/{engine => }/modules/ymaps/images/red.png | Bin .../modules/ymaps/images/redCircleDotIcon.png | Bin .../modules/ymaps/images/redCircleIcon.png | Bin .../modules/ymaps/images/redDotIcon.png | Bin .../modules/ymaps/images/redIcon.png | Bin .../modules/ymaps/images/redInverted.png | Bin .../{engine => }/modules/ymaps/images/redStr.png | Bin .../{engine => }/modules/ymaps/images/violet.png | Bin .../modules/ymaps/images/violetCircleDotIcon.png | Bin .../modules/ymaps/images/violetCircleIcon.png | Bin .../modules/ymaps/images/violetDotIcon.png | Bin .../modules/ymaps/images/violetIcon.png | Bin .../modules/ymaps/images/violetInverted.png | Bin .../modules/ymaps/images/violetStr.png | Bin .../{engine => }/modules/ymaps/images/yellow.png | Bin .../modules/ymaps/images/yellowCircleDotIcon.png | Bin .../modules/ymaps/images/yellowCircleIcon.png | Bin .../modules/ymaps/images/yellowDotIcon.png | Bin .../modules/ymaps/images/yellowIcon.png | Bin .../modules/ymaps/images/yellowInverted.png | Bin .../modules/ymaps/images/yellowStr.png | Bin engine/{engine => }/modules/ymaps/js/.htaccess | 0 .../ymaps/js/jquery.easyResponsiveTabs.min.js | 0 .../modules/ymaps/js/jquery.form.min.js | 0 .../modules/ymaps/js/jquery.formstyler.min.js | 0 .../modules/ymaps/js/jquery.ladda.min.js | 0 .../modules/ymaps/js/jquery.magnificpopup.min.js | 0 engine/{engine => }/modules/ymaps/js/main.js | 0 .../modules/ymaps/js/ymaps_editnews.js | 0 .../modules/ymaps/language/.htaccess | 0 .../modules/ymaps/language/English.lng | 0 .../modules/ymaps/language/Russian.lng | 0 .../modules/ymaps/language/Ukrainian.lng | 0 157 files changed, 0 insertions(+), 0 deletions(-) rename engine/{engine => }/ajax/ymaps/all.php (100%) rename engine/{engine => }/ajax/ymaps/cat.php (100%) rename engine/{engine => }/ajax/ymaps/check_status.php (100%) rename engine/{engine => }/ajax/ymaps/check_updates.php (100%) rename engine/{engine => }/ajax/ymaps/editmarker.php (100%) rename engine/{engine => }/ajax/ymaps/editnews.php (100%) rename engine/{engine => }/ajax/ymaps/saveconfig.php (100%) rename engine/{engine => }/ajax/ymaps/xfields.php (100%) rename engine/{engine => }/data/ymaps_config.json (100%) rename engine/{engine => }/data/ymaps_icons.json (100%) delete mode 100644 engine/engine/skins/images/ymaps.png rename engine/{engine => }/inc/ymaps.php (100%) rename engine/{engine => }/modules/ymaps/.htaccess (100%) rename engine/{engine => }/modules/ymaps/addnews-inline.php (100%) rename engine/{engine => }/modules/ymaps/addnews.php (100%) rename engine/{engine => }/modules/ymaps/admin/.htaccess (100%) rename engine/{engine => }/modules/ymaps/admin/classes/.htaccess (100%) rename engine/{engine => }/modules/ymaps/admin/classes/xfields.php (100%) rename engine/{engine => }/modules/ymaps/admin/mapsettings.php (100%) rename engine/{engine => }/modules/ymaps/admin/pointersettings.php (100%) rename engine/{engine => }/modules/ymaps/admin/support.php (100%) rename engine/{engine => }/modules/ymaps/css/.htaccess (100%) rename engine/{engine => }/modules/ymaps/css/style.css (100%) rename engine/{engine => }/modules/ymaps/css/ymaps_editnews.css (100%) rename engine/{engine => }/modules/ymaps/detail.php (100%) rename engine/{engine => }/modules/ymaps/images/.htaccess (100%) rename engine/{engine => }/modules/ymaps/images/black.png (100%) rename engine/{engine => }/modules/ymaps/images/blackCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blackCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blackDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blackIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blackInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/blackStr.png (100%) rename engine/{engine => }/modules/ymaps/images/blue.png (100%) rename engine/{engine => }/modules/ymaps/images/blueCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blueCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blueDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blueIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/blueInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/blueStr.png (100%) rename engine/{engine => }/modules/ymaps/images/brown.png (100%) rename engine/{engine => }/modules/ymaps/images/brownCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/brownCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/brownDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/brownIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/brownInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/brownStr.png (100%) rename engine/{engine => }/modules/ymaps/images/circleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/circleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/cluster.png (100%) rename engine/{engine => }/modules/ymaps/images/darkBlue.png (100%) rename engine/{engine => }/modules/ymaps/images/darkBlueCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkBlueCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkBlueDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkBlueIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkBlueInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/darkBlueStr.png (100%) rename engine/{engine => }/modules/ymaps/images/darkGreen.png (100%) rename engine/{engine => }/modules/ymaps/images/darkGreenCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkGreenCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkGreenDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkGreenIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkGreenInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/darkGreenStr.png (100%) rename engine/{engine => }/modules/ymaps/images/darkOrange.png (100%) rename engine/{engine => }/modules/ymaps/images/darkOrangeCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkOrangeCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkOrangeDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkOrangeIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/darkOrangeInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/darkOrangeStr.png (100%) rename engine/{engine => }/modules/ymaps/images/dotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/geolocation.png (100%) rename engine/{engine => }/modules/ymaps/images/gray.png (100%) rename engine/{engine => }/modules/ymaps/images/grayCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/grayCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/grayDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/grayIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/grayInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/grayStr.png (100%) rename engine/{engine => }/modules/ymaps/images/green.png (100%) rename engine/{engine => }/modules/ymaps/images/greenCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/greenCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/greenDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/greenIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/greenInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/greenStr.png (100%) rename engine/{engine => }/modules/ymaps/images/icon.png (100%) rename engine/{engine => }/modules/ymaps/images/inverted.png (100%) rename engine/{engine => }/modules/ymaps/images/lightBlue.png (100%) rename engine/{engine => }/modules/ymaps/images/lightBlueCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/lightBlueCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/lightBlueDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/lightBlueIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/lightBlueInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/lightBlueStr.png (100%) rename engine/{engine => }/modules/ymaps/images/night.png (100%) rename engine/{engine => }/modules/ymaps/images/nightCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/nightCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/nightDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/nightIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/nightInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/nightStr.png (100%) rename engine/{engine => }/modules/ymaps/images/olive.png (100%) rename engine/{engine => }/modules/ymaps/images/oliveCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/oliveCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/oliveDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/oliveIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/oliveInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/oliveStr.png (100%) rename engine/{engine => }/modules/ymaps/images/orange.png (100%) rename engine/{engine => }/modules/ymaps/images/orangeCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/orangeCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/orangeDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/orangeIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/orangeInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/orangeStr.png (100%) rename engine/{engine => }/modules/ymaps/images/pink.png (100%) rename engine/{engine => }/modules/ymaps/images/pinkCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/pinkCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/pinkDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/pinkIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/pinkInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/pinkStr.png (100%) rename engine/{engine => }/modules/ymaps/images/red.png (100%) rename engine/{engine => }/modules/ymaps/images/redCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/redCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/redDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/redIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/redInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/redStr.png (100%) rename engine/{engine => }/modules/ymaps/images/violet.png (100%) rename engine/{engine => }/modules/ymaps/images/violetCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/violetCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/violetDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/violetIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/violetInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/violetStr.png (100%) rename engine/{engine => }/modules/ymaps/images/yellow.png (100%) rename engine/{engine => }/modules/ymaps/images/yellowCircleDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/yellowCircleIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/yellowDotIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/yellowIcon.png (100%) rename engine/{engine => }/modules/ymaps/images/yellowInverted.png (100%) rename engine/{engine => }/modules/ymaps/images/yellowStr.png (100%) rename engine/{engine => }/modules/ymaps/js/.htaccess (100%) rename engine/{engine => }/modules/ymaps/js/jquery.easyResponsiveTabs.min.js (100%) rename engine/{engine => }/modules/ymaps/js/jquery.form.min.js (100%) rename engine/{engine => }/modules/ymaps/js/jquery.formstyler.min.js (100%) rename engine/{engine => }/modules/ymaps/js/jquery.ladda.min.js (100%) rename engine/{engine => }/modules/ymaps/js/jquery.magnificpopup.min.js (100%) rename engine/{engine => }/modules/ymaps/js/main.js (100%) rename engine/{engine => }/modules/ymaps/js/ymaps_editnews.js (100%) rename engine/{engine => }/modules/ymaps/language/.htaccess (100%) rename engine/{engine => }/modules/ymaps/language/English.lng (100%) rename engine/{engine => }/modules/ymaps/language/Russian.lng (100%) rename engine/{engine => }/modules/ymaps/language/Ukrainian.lng (100%) diff --git a/engine/engine/ajax/ymaps/all.php b/engine/ajax/ymaps/all.php similarity index 100% rename from engine/engine/ajax/ymaps/all.php rename to engine/ajax/ymaps/all.php diff --git a/engine/engine/ajax/ymaps/cat.php b/engine/ajax/ymaps/cat.php similarity index 100% rename from engine/engine/ajax/ymaps/cat.php rename to engine/ajax/ymaps/cat.php diff --git a/engine/engine/ajax/ymaps/check_status.php b/engine/ajax/ymaps/check_status.php similarity index 100% rename from engine/engine/ajax/ymaps/check_status.php rename to engine/ajax/ymaps/check_status.php diff --git a/engine/engine/ajax/ymaps/check_updates.php b/engine/ajax/ymaps/check_updates.php similarity index 100% rename from engine/engine/ajax/ymaps/check_updates.php rename to engine/ajax/ymaps/check_updates.php diff --git a/engine/engine/ajax/ymaps/editmarker.php b/engine/ajax/ymaps/editmarker.php similarity index 100% rename from engine/engine/ajax/ymaps/editmarker.php rename to engine/ajax/ymaps/editmarker.php diff --git a/engine/engine/ajax/ymaps/editnews.php b/engine/ajax/ymaps/editnews.php similarity index 100% rename from engine/engine/ajax/ymaps/editnews.php rename to engine/ajax/ymaps/editnews.php diff --git a/engine/engine/ajax/ymaps/saveconfig.php b/engine/ajax/ymaps/saveconfig.php similarity index 100% rename from engine/engine/ajax/ymaps/saveconfig.php rename to engine/ajax/ymaps/saveconfig.php diff --git a/engine/engine/ajax/ymaps/xfields.php b/engine/ajax/ymaps/xfields.php similarity index 100% rename from engine/engine/ajax/ymaps/xfields.php rename to engine/ajax/ymaps/xfields.php diff --git a/engine/engine/data/ymaps_config.json b/engine/data/ymaps_config.json similarity index 100% rename from engine/engine/data/ymaps_config.json rename to engine/data/ymaps_config.json diff --git a/engine/engine/data/ymaps_icons.json b/engine/data/ymaps_icons.json similarity index 100% rename from engine/engine/data/ymaps_icons.json rename to engine/data/ymaps_icons.json diff --git a/engine/engine/skins/images/ymaps.png b/engine/engine/skins/images/ymaps.png deleted file mode 100644 index f4cd23fbf5a72c8001938dbf42c4ae91ffd6bd08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3172 zcmbVOc|6nqA0Nt1CDj};Lyp*CHjK&G92GKTD4A{UZER!CB1eUi(3emllABVIT&XBI zavw{iawL6~tEAubt?%#m$M^C5i{#Vw~u8Q zlWHGk<3JAcBO6e_2aG{RA!r@}jmjp0LTLVU7CHn2{>h8x%{RB9V9-wywjT!kmr+FP zBOo&dlL|sY5ZYuI91cREAaGqI3I*2!>A>JRP#Et1FU<9!-V4kIaxj+lBw*H%#&iWN7UdW&!qyQ)!0)x_Mn|}S2X0Zv>|C;fS z(kzG204kI~Wif)7WL`czm4AbIvHN#Ln}R%R(6&q;UQ$T@I0iY0My0c@a2PP}1VZtl zpmpE|Fr(eD8Egj2 zn-Ksqvqyo{oqXsN28X4wnV!GA#Zj3)!BmPllR*Rhj4#^fAN1o9W@bo)J|3&j^ONT{ z7H*)2HPbi4!}Jh%6cPshg{AyIF@y4qfo>MZ{}jvbEnWp~PX8`_-s11(q0)IB!{oI_ z$ryMJ01!^I!eJdkMm`*Kwv}^|HUc!O zjraz~;^Ky*32B!rV=F1jD()Q~yBR}KGi#8Jj=gW-`;st%5jXZ{!>YU*!aF$)tj?eh z2R4?4s+JbNrVn!JeP?_}Br6(2zspMqx{a>k6)U{zXJ>rnyfLID7ttk#=+* z!u?O_ric?Qld<0c?qjO*HpH5;SghxMK70PcElC=l&@Vy?3JNbj4(xkuDwj4iocqu_ zc6sGe+Q_(?Yp6l`us?;Pf2+FgO0n-;+wf~8p&vJ@tDlQ>xEa~FCW=W*YV}}sGXIo~ z5_q(*({NPUO+=ncNssYeFLM|lRyBDb-6UVB=U;y{Kc~R9#nt%f^3Df$YCqWkTt^3N zUdcr|xY-2;MvDkt_Mt7O1Jt;h$03qCp^kOj7G?in!@Y%sH1yET$mMdCGem!cidzY( zt#N$gzGcd5(KW&Nw*J0|s;FqM(iew&mv7=Ry`LWq)^HMzSFqm}?&s_7T$B=6#P0EZ z4&9)3)mmNk(}M`Y&Ik!fX8`l3zh3#up&rf-%HdAEJyV$j-vV$aGZc~R6ZzevgLfVS zdIBx!^_hFzk*_{LneMCc0;zA%M>Mnh`*hgJ@cVD$G8jGeY6FbhY>3gb;r86fkLy~Go%y9zVJYq=6bYHM zyJwO^Z|=9|d=?$hr)^UZ>m(QigvANxH2%=J9A?od|RCR^OrfjmEi7=fj5DB7{{v3xrtp`XJ(2h(XVwrQTxNT8L<6`z=v)~Zil z=sYsecOglo?dl_qntM-geNVkF^xRCOo`0g?!`=5`6%#cV*Alxn;9FF=!T0V>E0=pM zJiFX^{Jiy*BFYPLr23x_C3)!*zd2ai?2*btM~PT)**K<}4cK>3xX98Sddle$ObR8w^CHdBx(u>Kd#mRk24-Aj^3(enX$sTo5lrQ$@mJ^a)bfd8 z^Qu|-*l+6;6%TD#cvXh^>5sCH=JMuBTn1*1T%TOTh{;8Fq^86Ull#AooOcxyx3rN^ zjS-Y;&C(j{_SJV4dEJwODV|Sqj-6ATN2Ct$D<7!T?6L*qH@5f2j<-)%=~z>}mNTlE zS>-MFq=8?&YF-?cIi9ww$iCTDpv7B2(w^`{C-*=E#C zFSKsuC{ZkFEaUPyeQrrHMz-SmPR{OB#12sl<%xK(!z=Ma(J6izIQ{IJq0~f+K140B zJQbsr6_r*a2Dl>)tmWG^u6s0#eyT*WwciP9Tjp~FH;LAs(@(-r{8@Ss?);6&pCk_k zIXZuuX*t)v-Lbj_sg8DXv*})3J!QJ1gmCRti&;0~2_eBA7zU*Z&TqL9kohKCLcuT5 z@+?}nAZ>?*N@avDvSa%AQlC!9A4d!K^$A@l7kn&b*owaa>i!aT7E60qr#V`Llj+b1 zE7VLJ(jtyx-zDdyQ@N09!W!33NMBeMpHhFxlvVGB(N+`_QVyX~_eXG8iAyss+w&T& z#nj60yyYSmv&(xJ_rn?r_OG+)9ZjJXD}^j|CqDQPfGd1k_x98W}&wXY&*FMn_dl;VYsr$*!II-$(0DUrNFUxd_jT*M3o#bvL=hv`4o#wdrvEU9Vm1uaB#})$r}gtp&#H z*}GK>mu*@nge{H5BMPS#C(5#$J2F(?N&wqV-cj!FC0fDs|4aR!Pt4&%0oc7~J3olM`W3PKhW7TWKB}3_AQ^H?$u6aOIoW`>hUnL%G z3DrGhTKvk6FqG4oC?wwTwExc7x}=S*Z1CFc0kiD5sqHOOJMy^^E^g6SR{N=y2ABD~ zvh6@c!(IbmQdD5Xd51Vxr7**_yY-5h7QIDQXd~g|W*PLexTLi!>Fs+wPzA_R!7fZC zRMb5UY(KcdCGLE`WP^~mycFIbtaz`YVEese_o2?Kf`UO0iSkQLBv0j->h#d9In9L) zqj9`%1z*fb+T16BD3FSk7fn^sT_9E>OUaPm%VCt$BRrGY?l~;P305N)H-DraLmQB&yjH7IQQB|l5$Z6vy1 z6aUmeq0K|Bnzz4{oa)x|7)!~GwDYdk z)^u+r%{*AaHH-8J5}w57e((9CFq?S)Vy;R|%!2&exp0d;z2t9QedMO7q>ZT$OHzJ0pK2*ggS#>)D|u1v Date: Sat, 29 Feb 2020 02:14:26 +0400 Subject: [PATCH 03/12] =?UTF-8?q?3.0.0=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BF=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dle-yandexmaps.xml | 36 ++ engine/ajax/ymaps/all.php | 1 - engine/ajax/ymaps/cat.php | 2 - engine/ajax/ymaps/check_status.php | 9 - engine/ajax/ymaps/check_updates.php | 9 - engine/ajax/ymaps/editmarker.php | 10 +- engine/ajax/ymaps/editnews.php | 251 +++-------- engine/ajax/ymaps/saveconfig.php | 11 +- engine/ajax/ymaps/xfields.php | 10 +- engine/modules/ymaps/addnews-inline.php | 75 ++-- engine/modules/ymaps/addnews.php | 81 ++-- .../modules/ymaps/admin/classes/xfields.php | 3 +- engine/modules/ymaps/admin/mapsettings.php | 9 +- .../modules/ymaps/admin/pointersettings.php | 3 +- engine/modules/ymaps/admin/support.php | 5 +- engine/modules/ymaps/detail.php | 5 +- .../modules/ymaps/js/jquery.autosize.min.js | 7 + engine/modules/ymaps/js/ymaps_editnews.js | 352 +++++++++++++-- engine/modules/ymaps/language/English.lng | 2 +- engine/modules/ymaps/language/Russian.lng | 2 +- templates/{THEME}/ymaps/index.htm | 8 - templates/{THEME}/ymaps/simple.tpl | 20 +- templates/{THEME}/ymaps/ymaps.css | 57 +-- templates/{THEME}/ymaps/ymaps.js | 408 ++++++++++-------- templates/{THEME}/ymaps/ymaps_public.js | 49 +-- templates/{THEME}/ymaps/ymaps_quickedit.js | 52 --- 26 files changed, 770 insertions(+), 707 deletions(-) create mode 100644 dle-yandexmaps.xml delete mode 100644 engine/ajax/ymaps/check_status.php delete mode 100644 engine/ajax/ymaps/check_updates.php create mode 100644 engine/modules/ymaps/js/jquery.autosize.min.js delete mode 100644 templates/{THEME}/ymaps/index.htm delete mode 100644 templates/{THEME}/ymaps/ymaps_quickedit.js diff --git a/dle-yandexmaps.xml b/dle-yandexmaps.xml new file mode 100644 index 0000000..c7b1916 --- /dev/null +++ b/dle-yandexmaps.xml @@ -0,0 +1,36 @@ + + + DLE-YandexMaps + Яндекс карты для DLE + engine/skins/images/ymaps.png + 3.0.0 + 13 + greater + https://updates.pafnuty.name/check-ymaps.php + 0 + + 1 + + + + + + + + + + + Release notes]]> + + + {$lang['header_n_title']}", $lang['addnews'] );]]> + ';]]> + + + + + + ';]]> + + + \ No newline at end of file diff --git a/engine/ajax/ymaps/all.php b/engine/ajax/ymaps/all.php index 3eafbdf..3c9fd61 100644 --- a/engine/ajax/ymaps/all.php +++ b/engine/ajax/ymaps/all.php @@ -22,7 +22,6 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); -include_once ENGINE_DIR . '/plugins/loader/loader.php'; if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); diff --git a/engine/ajax/ymaps/cat.php b/engine/ajax/ymaps/cat.php index 1b5b69d..cd5dd71 100644 --- a/engine/ajax/ymaps/cat.php +++ b/engine/ajax/ymaps/cat.php @@ -22,8 +22,6 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); -include_once ENGINE_DIR . '/plugins/loader/loader.php'; - if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { diff --git a/engine/ajax/ymaps/check_status.php b/engine/ajax/ymaps/check_status.php deleted file mode 100644 index dd2a9d0..0000000 --- a/engine/ajax/ymaps/check_status.php +++ /dev/null @@ -1,9 +0,0 @@ - - * @link https://git.io/v9irg - */ - -die ('License activation is not required'); \ No newline at end of file diff --git a/engine/ajax/ymaps/check_updates.php b/engine/ajax/ymaps/check_updates.php deleted file mode 100644 index 7f14761..0000000 --- a/engine/ajax/ymaps/check_updates.php +++ /dev/null @@ -1,9 +0,0 @@ - - * @link https://git.io/v9irg - */ - -die (''); \ No newline at end of file diff --git a/engine/ajax/ymaps/editmarker.php b/engine/ajax/ymaps/editmarker.php index 8941c06..6c3b2ac 100644 --- a/engine/ajax/ymaps/editmarker.php +++ b/engine/ajax/ymaps/editmarker.php @@ -22,8 +22,6 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); -include_once ENGINE_DIR . '/plugins/loader/loader.php'; - if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { @@ -36,11 +34,9 @@ require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); -if ($config['version_id'] > 9.6) { - dle_session(); -} else { - @session_start(); -} + +dle_session(); + $user_group = get_vars("usergroup"); diff --git a/engine/ajax/ymaps/editnews.php b/engine/ajax/ymaps/editnews.php index b8246b7..7347e9c 100644 --- a/engine/ajax/ymaps/editnews.php +++ b/engine/ajax/ymaps/editnews.php @@ -6,215 +6,84 @@ * @link https://git.io/v9irg */ -// Всякие обязательные штуки для ajax DLE -@error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE); -@ini_set('display_errors', true); -@ini_set('html_errors', false); -@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE); +if (!defined('DATALIFEENGINE')) { + header("HTTP/1.1 403 Forbidden"); + header('Location: ../../../'); + die("Hacking attempt!"); +} -define('DATALIFEENGINE', true); -define('ROOT_DIR', substr(dirname(__FILE__), 0, -18)); +if (!$is_logged) { + die('error'); +} define('ENGINE_DIR', ROOT_DIR . '/engine'); -$cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json'), true); -$icons = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_icons.json'), true); - -define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); +$cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json')); -include_once ENGINE_DIR . '/plugins/loader/loader.php'; +define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg->moduleName . '/'); -if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); +if (@file_exists(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng')) { + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng')); } else { die("Language file not found"); } +$key = ($cfg->main->apiKey) ? '&apikey=' . $cfg->main->apiKey : ''; -include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); - -require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); -require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); -require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); -if ($config['version_id'] > 9.6) { - dle_session(); -} else { - @session_start(); -} - - -$user_group = get_vars("usergroup"); -if (!$user_group) { - $user_group = []; - $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC"); - while ($row = $db->get_row()) { - $user_group[$row['id']] = []; - foreach ($row as $key => $value) $user_group[$row['id']][$key] = stripslashes($value); - } - set_vars("usergroup", $user_group); - $db->free(); -} - -$cat_info = get_vars("category"); - -if (!is_array($cat_info)) { - $cat_info = []; - - $db->query("SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC"); - while ($row = $db->get_row()) { - - $cat_info[$row['id']] = []; - - foreach ($row as $key => $value) { - $cat_info[$row['id']][$key] = stripslashes($value); - } - - } - set_vars("category", $cat_info); - $db->free(); -} - - -$key = ($cfg->apiKey) ? '&key=' . $cfg->apiKey : ''; - -$ymaps = ''; -$ymaps .= ''; -// $ymaps .= ''; - -$mapHeight = ($cfg['main']['mapHeight']) ? $cfg['main']['mapHeight'] : '400'; -$controls = $cfg['main']['controls']; -$controls = array_keys($controls); -$controls = json_encode($controls); -$arPlacemarkStyles = ($cfg['pointSettings']['catPoints']) ? json_encode($cfg['pointSettings']['catPoints']) : '{}'; - - -$ymaps .= << - var pointInput = $('[name="xfield[{$cfg['main']['coordsField']}]"]'), - coor = getCorrsFromInput(pointInput), - coordsFieldText; - - - var lon = coor.lon, - lat = coor.lat, - zoom = coor.zoom, - controls = $.parseJSON('{$controls}'), - height = {$cfg['main']['mapHeight']}; - - - function hideCoordsField() { - if (pointInput.length) { - var editPlacemarkText = (pointInput.val()) ? '{$module_lang['moduleTextEditPlacemark']}' : '{$module_lang['moduleTextAddPlacemark']}' ; - if ($('[data-mfp-src="#addMap"]').length < 1) { - pointInput.hide().after(''+editPlacemarkText+' ×'); - } else { - $('.btn-editmap-modal').text(editPlacemarkText); - } - }; - - - } - - function getCorrsFromInput() { - if (pointInput.val()) { - return $.parseJSON(pointInput.val()); - } else { - return {"lat":"{$cfg['main']['mapCenter']['latitude']}","lon":"{$cfg['main']['mapCenter']['longitude']}","zoom":"{$cfg['main']['mapCenter']['zoom']}"}; - } - } - - function setCenter(coords, zoom) { - var inpText = '{"lat":"'+coords[0].toPrecision(6)+'", "lon" : "'+coords[1].toPrecision(6)+'", "zoom": "'+zoom+'"}'; - coordsFieldText = inpText; - } - function clearPlacemark() { - pointInput.val(''); - } - - function editMapInit() { - var editnewsMap, - myPlacemark; - - $(document) - .on('editMapInit', function() { - - var map = $('#map'), - coor = getCorrsFromInput(), - lon = coor.lon, - lat = coor.lat, - zoom = coor.zoom; - - map.height(height); - - if (editnewsMap) { - myPlacemark = false; - editnewsMap.events.remove(['click','boundschange','dragend']); - editnewsMap.destroy(); - }; - - - editnewsMap = new ymaps.Map('map', { - center: [lat, lon], - zoom: zoom, - controls: controls - }); - - if (pointInput.val()) { - var _coords = $.parseJSON(pointInput.val()); - myPlacemark = createPlacemark([_coords.lat*1, _coords.lon*1]); - - editnewsMap.geoObjects.add(myPlacemark); - }; - - // Слушаем клик на карте - editnewsMap.events - .add('click', function (e) { - var coords = e.get('coords'); - // Если метка уже создана – просто передвигаем ее - if (myPlacemark) { - myPlacemark.geometry.setCoordinates(coords); - } - // Если нет – создаем. - else { - myPlacemark = createPlacemark(coords); - editnewsMap.geoObjects.add(myPlacemark); - - // Слушаем событие окончания перетаскивания на метке. - myPlacemark.events.add('dragend', function () { - setCenter(myPlacemark.geometry.getCoordinates(), editnewsMap.getZoom()); - }); - } - setCenter(coords, editnewsMap.getZoom()); - }) - .add('boundschange', function (e) { - setCenter([lat*1, lon*1], editnewsMap.getZoom()); - }); - - // Создание метки - function createPlacemark(coords) { - var arPlacemarkStyles = '{$arPlacemarkStyles}', - categoryId = ($('#category').length) ? $('#category option:selected').val() : 0, - key = (categoryId > 0) ? categoryId : 'default', - placemarkStyle = $.parseJSON(arPlacemarkStyles); - - return new ymaps.Placemark(coords, {}, - placemarkStyle[key] - ); - } - }); - }; - +$mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; +$controls = (array)$cfg->main->controls; +$controls = array_keys($controls); +$mapSelector = $cfg->moduleName . '-edit-map-container'; +$modalHtml = << - HTML; +$btnHtml = <<editmap + +HTML; + + -echo $ymaps; \ No newline at end of file +$ymapsJson = [ + 'mapSelector' => $mapSelector, + 'mapUrl' => '//api-maps.yandex.ru/2.1/?lang=ru_RU' . $key, + 'scripts' => [ + '/engine/modules/' . $cfg->moduleName . '/js/jquery.magnificpopup.min.js' + ], + 'controls' => $controls, + 'height' => $cfg->main->mapHeight, + 'defaultPos' => [ + 'lat' => $cfg->main->mapCenter->latitude, + 'lon' => $cfg->main->mapCenter->longitude, + 'zoom' => $cfg->main->mapCenter->zoom, + ], + 'arPlacemarkStyles' => $cfg->pointSettings->catPoints, + 'inputSelector' => '[name="xfield[' . $cfg->main->coordsField .']"]', + 'xfHolder' => '#xfield_holder_' . $cfg->main->coordsField, + 'modalHtml' => $modalHtml, + 'btnHtml' => $btnHtml, + 'text' => [ + 'edit' => $module_lang['moduleTextEditPlacemark'], + 'add' => $module_lang['moduleTextAddPlacemark'] + ] +]; + + +header('Content-Type: application/json'); +echo json_encode($ymapsJson); diff --git a/engine/ajax/ymaps/saveconfig.php b/engine/ajax/ymaps/saveconfig.php index 3d101a0..c149eaa 100644 --- a/engine/ajax/ymaps/saveconfig.php +++ b/engine/ajax/ymaps/saveconfig.php @@ -21,18 +21,13 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); -include_once ENGINE_DIR . '/plugins/loader/loader.php'; - include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); -if ($config['version_id'] > 9.6) { - dle_session(); -} else { - @session_start(); -} +dle_session(); + $user_group = get_vars("usergroup"); if (!$user_group) { @@ -74,8 +69,6 @@ unset($_POST['mapsettings']); $cfg['main'] = $_POST; } - // echo "
"; print_r($_POST); echo "
"; - // die (); $jsn = json_encode($cfg); file_put_contents(ENGINE_DIR . '/data/ymaps_config.json', $jsn); diff --git a/engine/ajax/ymaps/xfields.php b/engine/ajax/ymaps/xfields.php index 88ef309..9e4bbef 100644 --- a/engine/ajax/ymaps/xfields.php +++ b/engine/ajax/ymaps/xfields.php @@ -21,8 +21,6 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); -include_once ENGINE_DIR . '/plugins/loader/loader.php'; - if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); } else { @@ -35,11 +33,9 @@ require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); -if ($config['version_id'] > 9.6) { - dle_session(); -} else { - @session_start(); -} + +dle_session(); + $user_group = get_vars("usergroup"); diff --git a/engine/modules/ymaps/addnews-inline.php b/engine/modules/ymaps/addnews-inline.php index d515569..43b214d 100644 --- a/engine/modules/ymaps/addnews-inline.php +++ b/engine/modules/ymaps/addnews-inline.php @@ -7,8 +7,10 @@ */ if (!defined('DATALIFEENGINE')) { - die("Go fuck yourself!"); + header("HTTP/1.1 403 Forbidden"); + die("Hacking attempt!"); } +global $onload_scripts, $js_array; $cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json')); @@ -17,55 +19,42 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg->moduleName . '/'); if (@file_exists(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng')) { - include(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng'); + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng')); } else { die("Language file not found"); } -$key = ($cfg->apiKey) ? '&key=' . $cfg->apiKey : ''; +$key = ($cfg->main->apiKey) ? '&apikey=' . $cfg->main->apiKey : ''; -$ymaps = ''; -$ymaps .= ''; +$js_array[] = '/templates/' . $config['skin'] . '/' . $cfg->moduleName . '/' . $cfg->moduleName . '.js'; $mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; -$controls = (array)$cfg->main->controls; -$controls = array_keys($controls); -$controls = json_encode($controls); - -$ymaps .= << - var arPlacemarkStyles = '{$arPlacemarkStyles}', - inputSelector = '[name="xfield[{$cfg->main->coordsField}]"]', - controls = $.parseJSON('{$controls}'), - height = {$cfg->main->mapHeight}, - coordsFieldText; - - function hideCoordsField(but) { - if ($('#xfield_holder_{$cfg->main->coordsField}').css('display') != 'none') { - $('#xfield_holder_{$cfg->main->coordsField}').hide(); - $(but).show(); - } else { - $(but).hide(); - } - } - - function getCorrsFromInput() { - var pointInput = $(inputSelector); - if (pointInput.val()) { - return $.parseJSON(pointInput.val()); - } else { - return {"lat":"{$cfg->main->mapCenter->latitude}","lon":"{$cfg->main->mapCenter->longitude}","zoom":"{$cfg->main->mapCenter->zoom}"}; - } +$controls = (array)$cfg->main->controls; +$controls = array_keys($controls); +$controls = json_encode($controls); +$arPlacemarkStyles = ($cfg->pointSettings->catPoints) ? json_encode($cfg->pointSettings->catPoints) : '{}'; +$mapSelector = $cfg->moduleName . '-map-container'; + +$onload_scripts[] = <<main->mapHeight}, + coordsFieldText:'', + defaultPos: { + lat: '{$cfg->main->mapCenter->latitude}', + lon: '{$cfg->main->mapCenter->longitude}', + zoom: '{$cfg->main->mapCenter->zoom}', + }, + arPlacemarkStyles: {$arPlacemarkStyles}, + inputSelector: '[name="xfield[{$cfg->main->coordsField}]"]', + xfHolder: '#xfield_holder_{$cfg->main->coordsField}' } - - function setCenter(coords, zoom) { - var inpText = '{"lat":"'+coords[0].toPrecision(6)+'", "lon" : "'+coords[1].toPrecision(6)+'", "zoom": "'+zoom+'"}'; - $('[name="xfield[{$cfg->main->coordsField}]"]').val(inpText); - } - - -
+ if (addNewsMapStart) { + addNewsMapStart(mapConfig); + }; HTML; - -echo $ymaps; \ No newline at end of file +echo '
'; \ No newline at end of file diff --git a/engine/modules/ymaps/addnews.php b/engine/modules/ymaps/addnews.php index 7c02d6d..d911dfc 100644 --- a/engine/modules/ymaps/addnews.php +++ b/engine/modules/ymaps/addnews.php @@ -7,8 +7,10 @@ */ if (!defined('DATALIFEENGINE')) { - die("Go fuck yourself!"); + header("HTTP/1.1 403 Forbidden"); + die("Hacking attempt!"); } +global $onload_scripts, $js_array; $cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json')); @@ -17,73 +19,50 @@ define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg->moduleName . '/'); if (@file_exists(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng')) { - include(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng'); + include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg->main->moduleLang . '.lng')); } else { die("Language file not found"); } -$key = ($cfg->apiKey) ? '&key=' . $cfg->apiKey : ''; +$key = ($cfg->main->apiKey) ? '&apikey=' . $cfg->main->apiKey : ''; -$ymaps = ''; -$ymaps .= ''; -$ymaps .= ''; +$js_array[] = '/engine/modules/' . $cfg->moduleName . '/js/jquery.magnificpopup.min.js'; +$js_array[] = '/templates/' . $config['skin'] . '/' . $cfg->moduleName . '/' . $cfg->moduleName . '.js'; $mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; $controls = (array)$cfg->main->controls; $controls = array_keys($controls); $controls = json_encode($controls); $arPlacemarkStyles = ($cfg->pointSettings->catPoints) ? json_encode($cfg->pointSettings->catPoints) : '{}'; - -$ymaps .= << - var arPlacemarkStyles = '{$arPlacemarkStyles}', - inputSelector = '[name="xfield[{$cfg->main->coordsField}]"]', - controls = $.parseJSON('{$controls}'), - height = {$cfg->main->mapHeight}, - coordsFieldText; - - function hideCoordsField(but) { - if ($('#xfield_holder_{$cfg->main->coordsField}').css('display') != 'none') { - $('#xfield_holder_{$cfg->main->coordsField}').hide(); - $(but).show(); - } else { - $(but).hide(); - } - } - - function getCorrsFromInput() { - var pointInput = $(inputSelector); - if (pointInput.val()) { - return $.parseJSON(pointInput.val()); - } else { - return {"lat":"{$cfg->main->mapCenter->latitude}","lon":"{$cfg->main->mapCenter->longitude}","zoom":"{$cfg->main->mapCenter->zoom}"}; - } - } - - function setCenter(coords, zoom) { - var inpText = '{"lat":"'+coords[0].toPrecision(6)+'", "lon" : "'+coords[1].toPrecision(6)+'", "zoom": "'+zoom+'"}'; - coordsFieldText = inpText; - } - - function applyCoords() { - $(inputSelector).val(coordsFieldText); - } - - function resetCoords() { - $(inputSelector).val(''); +$mapSelector = $cfg->moduleName . '-map-container'; + +$onload_scripts[] = <<main->mapHeight}, + defaultPos: { + lat: '{$cfg->main->mapCenter->latitude}', + lon: '{$cfg->main->mapCenter->longitude}', + zoom: '{$cfg->main->mapCenter->zoom}', + }, + arPlacemarkStyles: {$arPlacemarkStyles}, + inputSelector: '[name="xfield[{$cfg->main->coordsField}]"]', + xfHolder: '#xfield_holder_{$cfg->main->coordsField}' } + if (addNewsMapStart) { + addNewsMapStart(mapConfig); + }; +HTML; - function getInput() { - return $(inputSelector).val(); - } - - - +$ymaps = << - + */ ?>
- +
-
*/ ?> +
diff --git a/engine/modules/ymaps/admin/pointersettings.php b/engine/modules/ymaps/admin/pointersettings.php index 648715f..273f229 100644 --- a/engine/modules/ymaps/admin/pointersettings.php +++ b/engine/modules/ymaps/admin/pointersettings.php @@ -7,7 +7,8 @@ */ if (!defined('DATALIFEENGINE')) { - die("Go fuck yourself!"); + header("HTTP/1.1 403 Forbidden"); + die("Hacking attempt!"); } $icons = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_icons.json'), true); diff --git a/engine/modules/ymaps/admin/support.php b/engine/modules/ymaps/admin/support.php index 265b40b..793fa7f 100644 --- a/engine/modules/ymaps/admin/support.php +++ b/engine/modules/ymaps/admin/support.php @@ -7,7 +7,8 @@ */ if (!defined('DATALIFEENGINE')) { - die("Go fuck yourself!"); + header("HTTP/1.1 403 Forbidden"); + die("Hacking attempt!"); } ?> @@ -20,7 +21,7 @@

diff --git a/engine/modules/ymaps/detail.php b/engine/modules/ymaps/detail.php index 7642b4d..9dca13d 100644 --- a/engine/modules/ymaps/detail.php +++ b/engine/modules/ymaps/detail.php @@ -7,7 +7,8 @@ */ if (!defined('DATALIFEENGINE')) { - die("Go fuck yourself!"); + header("HTTP/1.1 403 Forbidden"); + die("Hacking attempt!"); } $cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json')); @@ -54,7 +55,7 @@ $queryFields = implode(', ', $arQueryFields); // API-key - $key = ($cfg->main->apiKey) ? '&key=' . $cfg->main->apiKey : ''; + $key = ($cfg->main->apiKey) ? '&apikey=' . $cfg->main->apiKey : ''; $mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; diff --git a/engine/modules/ymaps/js/jquery.autosize.min.js b/engine/modules/ymaps/js/jquery.autosize.min.js new file mode 100644 index 0000000..6763b64 --- /dev/null +++ b/engine/modules/ymaps/js/jquery.autosize.min.js @@ -0,0 +1,7 @@ +/*! + Autosize v1.18.1 - 2013-11-05 + Automatically adjust textarea height based on user input. + (c) 2013 Jack Moore - http://www.jacklmoore.com/autosize + license: http://www.opensource.org/licenses/mit-license.php +*/ +(function(e){var t,o={className:"autosizejs",append:"",callback:!1,resizeDelay:10},i='",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0 2) { - $this.next('span').removeClass('disabled'); - } - if (valLen < 1) { - $this.next('span').addClass('disabled'); - } - }) - .on('click', '.code', function () { - $(this).select(); - }) - // Аякс отправка формы с эффектами - .on('submit', '[data-ajax-submit]', function () { - var $this = $(this), - laddaLoad, - options = { - dataType: 'json', - beforeSubmit: processStartNew, - success: processDoneNew - }; - - $this.ajaxSubmit(options); - - return false; - }) - .on('submit', '[data-ladda-submit]', function (e) { - e.preventDefault(); - - var $this = $(this), - progress = 0, - laddaLoadNew = $this.find('.ladda-button').ladda(); - laddaLoadNew.ladda('start'); - - var interval = setInterval(function () { - progress = Math.min(progress + Math.random() * 0.2, 1); - laddaLoadNew.ladda('setProgress', progress); - - if (progress === 1) { - laddaLoadNew.ladda('stop'); - clearInterval(interval); - $this.removeAttr('data-ladda-submit').submit(); - } - }, 100); - }) - .on('click', '[data-point-change]', function () { - var itemData = $(this).data(); - - $.magnificPopup.open({ - type: 'ajax', - gallery: { - enabled: false - }, - items: { - src: 'engine/ajax/ymaps/editmarker.php' - }, - ajax: { - settings: { - data: { - id: itemData.pointChange - } - } - }, - callbacks: { - afterClose: function () { - // $('.map-save').trigger('click'); - // $this.addClass('disabled'); - }, - ajaxContentAdded: function () { - var $styler = $(this.content).find('.styler'); - if ($styler.length) { - $markerSelect = $('select.marker-select'); - $customMarkerSelect = $('.marker-custom-icon-select-wrapper'); - $styler.styler({ - onFormStyled: function () { - showSelectedPoint($styler); - if ($markerSelect.val() == 'custom') { - $customMarkerSelect.show(); - showSelectedPoint($customMarkerSelect.find('select.styler')); - } - - } - }); - } - - } - } - }); - }) - .on('click', '[data-point-delete]', function () { - var $this = $(this), - itemData = $this.data(), - progress = 0, - laddaLoadNew = $this.ladda(); - laddaLoadNew.ladda('start'); - - $.ajax({ - url: 'engine/ajax/ymaps/saveconfig.php', - type: 'POST', - data: { - pointID: itemData.pointDelete, - deletePoint: 'y' - } - }) - .done(function () { - console.log('done'); - }) - .fail(function () { - console.log('error'); - }).always(function () { - var interval = setInterval(function () { - progress = Math.min(progress + Math.random() * 0.2, 1); - laddaLoadNew.ladda('setProgress', progress); - - if (progress === 1) { - laddaLoadNew.ladda('stop'); - clearInterval(interval); - location.reload(); - } - }, 100); - }); - - /* Act on the event */ - }) - .on('change', 'select.marker-select', function () { - var $this = $(this), - $customMarkerSelect = $('.marker-custom-icon-select-wrapper'); - showSelectedPoint($this); - if ($this.val() == 'custom') { - $customMarkerSelect.show().find('.styler').trigger('refresh'); - showSelectedPoint($customMarkerSelect.find('select.styler')); - } else { - if (!$this.hasClass('marker-custom-icon-select')) { - $customMarkerSelect.hide(); - } - } - }) - .on('change', 'select.marker-custom-icon-select', function () { - // var $option = $(this).find('option:selected'), - // $oData = $option.data(); - // console.log($oData); - }) - .on('input keyup', '.set-icon-color-input', function () { - var $this = $(this), - thisVal = $this.val(); - $('.selected-marker').css('background', thisVal); - - }); + .on('click', '.popup-modal-dismiss', function (e) { + e.preventDefault(); + $.magnificPopup.close(); + }) + .on('click', '.modal-close', function () { + $.magnificPopup.close(); + }) + .on('click', '.map-save', function (event) { + $('#' + $(this).data('id')).trigger('submit'); + }) + .on('click', '.mfp-open-ajax-xf', function () { + var $this = $(this), + itemData = $this.data(), + $inp = $('#' + itemData.id); + if ($this.hasClass('disabled')) { + return false; + } else { + $.magnificPopup.open({ + type: 'ajax', + gallery: { + enabled: false + }, + items: { + src: itemData.mfpSrc + }, + ajax: { + settings: { + data: { + name: $inp.val(), + description: itemData.description, + value: '', + fieldType: itemData.fieldType + } + } + }, + callbacks: { + afterClose: function () { + $('.map-save').trigger('click'); + $this.addClass('disabled'); + } + } + }); + } + }) + .on('change input keyup', '.xf-input', function () { + var $this = $(this), + valLen = $this.val().length; + if (valLen > 2) { + $this.next('span').removeClass('disabled'); + } + if (valLen < 1) { + $this.next('span').addClass('disabled'); + } + }) + .on('click', '.code', function () { + $(this).select(); + }) + // Аякс отправка формы с эффектами + .on('submit', '[data-ajax-submit]', function () { + var $this = $(this); + + var options = { + dataType: 'json', + beforeSubmit: processStartNew, + success: processDoneNew + }; + + $this.ajaxSubmit(options); + + return false; + }) + .on('submit', '[data-ladda-submit]', function (e) { + e.preventDefault(); + + var $this = $(this); + var progress = 0; + var laddaLoadNew = $this.find('.ladda-button').ladda(); + laddaLoadNew.ladda('start'); + + var interval = setInterval(function () { + progress = Math.min(progress + Math.random() * 0.2, 1); + laddaLoadNew.ladda('setProgress', progress); + + if (progress === 1) { + laddaLoadNew.ladda('stop'); + clearInterval(interval); + $this.removeAttr('data-ladda-submit').submit(); + } + }, 100); + }) + .on('click', '[data-point-change]', function () { + var itemData = $(this).data(); + + $.magnificPopup.open({ + type: 'ajax', + gallery: { + enabled: false + }, + items: { + src: 'engine/ajax/controller.php' + }, + ajax: { + settings: { + data: { + id: itemData.pointChange, + mod: 'ymaps_editmarker' + } + } + }, + callbacks: { + afterClose: function () { + // $('.map-save').trigger('click'); + // $this.addClass('disabled'); + }, + ajaxContentAdded: function () { + var $styler = $(this.content).find('.styler'); + if ($styler.length) { + $markerSelect = $('select.marker-select'); + $customMarkerSelect = $('.marker-custom-icon-select-wrapper'); + $styler.styler({ + onFormStyled: function () { + showSelectedPoint($styler); + if ($markerSelect.val() === 'custom') { + $customMarkerSelect.show(); + showSelectedPoint($customMarkerSelect.find('select.styler')); + } + + } + }); + } + + } + } + }); + }) + .on('click', '[data-point-delete]', function () { + var $this = $(this); + var itemData = $this.data(); + var progress = 0; + var laddaLoadNew = $this.ladda(); + laddaLoadNew.ladda('start'); + + $.ajax({ + url: 'engine/ajax/ymaps/saveconfig.php', + type: 'POST', + data: { + pointID: itemData.pointDelete, + deletePoint: 'y' + } + }) + .done(function () { + console.log('done'); + }) + .fail(function () { + console.log('error'); + }).always(function () { + var interval = setInterval(function () { + progress = Math.min(progress + Math.random() * 0.2, 1); + laddaLoadNew.ladda('setProgress', progress); + + if (progress === 1) { + laddaLoadNew.ladda('stop'); + clearInterval(interval); + location.reload(); + } + }, 100); + }); + + /* Act on the event */ + }) + .on('change', 'select.marker-select', function () { + var $this = $(this), + $customMarkerSelect = $('.marker-custom-icon-select-wrapper'); + showSelectedPoint($this); + if ($this.val() === 'custom') { + $customMarkerSelect.show().find('.styler').trigger('refresh'); + showSelectedPoint($customMarkerSelect.find('select.styler')); + } else { + if (!$this.hasClass('marker-custom-icon-select')) { + $customMarkerSelect.hide(); + } + } + }) + .on('change', 'select.marker-custom-icon-select', function () { + // var $option = $(this).find('option:selected'), + // $oData = $option.data(); + // console.log($oData); + }) + .on('input keyup', '.set-icon-color-input', function () { + var $this = $(this), + thisVal = $this.val(); + $('.selected-marker').css('background', thisVal); + + }); // pre-submit callback -function processStartNew(formData, jqForm, options) { - laddaLoadNew = jqForm.find('.ladda-button').ladda(); - laddaLoadNew.ladda('start'); +function processStartNew(formData, jqForm) { + laddaProcessObj = jqForm.find('.ladda-button').ladda(); + laddaProcessObj.ladda('start'); - return true; + return true; } // post-submit callback function processDoneNew(responseText, statusText, xhr, $form) { - var formContent = $form.html(), - responseResult = (formContent) ? formContent : responseText; + var formContent = $form.html(); + var responseResult = (formContent) ? formContent : responseText; - var progress = 0; - var interval = setInterval(function () { - progress = Math.min(progress + Math.random() * 0.2, 1); - laddaLoadNew.ladda('setProgress', progress); + var progress = 0; + var interval = setInterval(function () { + progress = Math.min(progress + Math.random() * 0.2, 1); + laddaProcessObj.ladda('setProgress', progress); - if (progress === 1) { - laddaLoadNew.ladda('stop'); - clearInterval(interval); - // Тут что-то делаем с пришедшими данными - if (statusText == 'success') { - if ($form.data('ajaxSubmit') == 'reload') { - location.reload(); - } + if (progress === 1) { + laddaProcessObj.ladda('stop'); + laddaProcessObj = null; + clearInterval(interval); + // Тут что-то делаем с пришедшими данными + if (statusText === 'success') { + if ($form.data('ajaxSubmit') === 'reload') { + location.reload(); + } - if ($form.data('ajaxSubmit') != 'noreload' && $form.data('ajaxSubmit') != 'reload') { - $form.html(responseResult); - } + if ($form.data('ajaxSubmit') !== 'noreload' && $form.data('ajaxSubmit') !== 'reload') { + $form.html(responseResult); + } - } + } - } + } - }, 100); + }, 100); } // Как только будет загружен API и готов DOM, выполняем инициализацию @@ -246,199 +249,199 @@ ymaps.ready(init); // Инициализация карты. function init() { - var demoMap, - myPlacemark, - $lat = $('#mapCenterLat'), - $lon = $('#mapCenterLon'), - $zoom = $('#mapCenterZoom'), - lat = ($lat.val()) ? $lat.val() : '51.5350', - lon = ($lon.val()) ? $lon.val() : '46.0259', - zoom = ($zoom.val()) ? $zoom.val() : '9'; - doc - .on('mapInit', function () { - var controls = [], - height = ($('#mapHeight').val()) ? $('#mapHeight').val() : 400, - $map = $('#map'); - - $map.height(height); - - $.each($('input[name*="controls"]'), function (index, val) { - var $this = $(this), - id = $this.prop('id'); - if ($this.prop('checked')) { - controls.push(id); - } - - }); - if (!demoMap) { - - demoMap = new ymaps.Map('map', { - center: [lat, lon], // Саратов - zoom: zoom, - controls: controls - }); - } - - // Слушаем клик на карте - demoMap.events.add('click', function (e) { - var coords = e.get('coords'); - - // Если метка уже создана – просто передвигаем ее - if (myPlacemark) { - myPlacemark.geometry.setCoordinates(coords); - } - // Если нет – создаем. - else { - myPlacemark = createPlacemark(coords); - demoMap.geoObjects.add(myPlacemark); - // Слушаем событие окончания перетаскивания на метке. - myPlacemark.events.add('dragend', function () { - setCenter(myPlacemark.geometry.getCoordinates(), demoMap.getZoom()); - }); - } - setCenter(coords, demoMap.getZoom()); - }); - - // Создание метки - function createPlacemark(coords) { - return new ymaps.Placemark(coords, - { - preset: 'islands#icon', - draggable: true, - iconColor: '#0095b6' - }); - } - - function setCenter(coords, zoom) { - $lat.val(coords[0].toPrecision(6)); - $lon.val(coords[1].toPrecision(6)); - $zoom.val(zoom); - } - }) - .on('mapDestroy', function () { - /**/ - }); + var demoMap, + myPlacemark, + $lat = $('#mapCenterLat'), + $lon = $('#mapCenterLon'), + $zoom = $('#mapCenterZoom'), + lat = ($lat.val()) ? $lat.val() : '51.5350', + lon = ($lon.val()) ? $lon.val() : '46.0259', + zoom = ($zoom.val()) ? $zoom.val() : '9'; + doc + .on('mapInit', function () { + var mapHeightVal = $('#mapHeight').val(); + var controls = []; + var height = (mapHeightVal) ? mapHeightVal : 400; + var $map = $('#map'); + + $map.height(height); + + $.each($('input[name*="controls"]'), function (index, val) { + var $this = $(this); + var id = $this.prop('id'); + if ($this.prop('checked')) { + controls.push(id); + } + + }); + if (!demoMap) { + + demoMap = new ymaps.Map('map', { + center: [lat, lon], // Саратов + zoom: zoom, + controls: controls + }); + } + + // Слушаем клик на карте + demoMap.events.add('click', function (e) { + var coords = e.get('coords'); + + // Если метка уже создана – просто передвигаем ее + if (myPlacemark) { + myPlacemark.geometry.setCoordinates(coords); + } + // Если нет – создаем. + else { + myPlacemark = createPlacemark(coords); + demoMap.geoObjects.add(myPlacemark); + // Слушаем событие окончания перетаскивания на метке. + myPlacemark.events.add('dragend', function () { + setCenter(myPlacemark.geometry.getCoordinates(), demoMap.getZoom()); + }); + } + setCenter(coords, demoMap.getZoom()); + }); + + // Создание метки + function createPlacemark(coords) { + return new ymaps.Placemark(coords, + { + preset: 'islands#icon', + draggable: true, + iconColor: '#0095b6' + }); + } + + function setCenter(coords, zoom) { + $lat.val(coords[0].toPrecision(6)); + $lon.val(coords[1].toPrecision(6)); + $zoom.val(zoom); + } + }) + .on('mapDestroy', function () { + /**/ + }); } jQuery(document).ready(function ($) { - // Авторазмер для блоков с кодом - $('.code').autosize(); - - // Селекты - $('.styler').styler(); - - // Прячем кнопки создания допполей - $.each($('.xf-input'), function () { - if ($(this).val().length) { - $(this).next('span').addClass('disabled'); - } - - }); - - // Инициализация Ladda - var laddaLoad = $('.ladda-button-old').ladda(); - - // Дефолтные настройки аякс формы - var formOptions = { - dataType: 'json', - beforeSubmit: processStart, - success: processDone - }; - - // Табы настроек - $('#settings').easyResponsiveTabs(); - - // Дефолтные настройки magnificpopup - $.extend(true, $.magnificPopup.defaults, { - tClose: 'Закрыть (Esc)', // Alt text on close button - tLoading: 'Загрузка...', // Text that is displayed during loading. Can contain %curr% and %total% keys - ajax: { - tError: 'Контент не загружен.' // Error message when ajax request failed - } - }); - - // - $('#settingsForm').ajaxForm(formOptions); - - $('.mfp-open').magnificPopup(); - - $('.mfp-open-ajax').magnificPopup({ - type: 'ajax' - }); - - $('.mfp-open-modal-map').magnificPopup({ - type: 'inline', - preloader: false, - // focus: '#username', - modal: true, - callbacks: { - open: function () { - doc.trigger('mapInit'); - }, - afterClose: function () { - doc.trigger('mapDestroy'); - } - } - }); - - /** - * [processStart description] - * @return {[type]} [description] - */ - function processStart() { - laddaLoad.ladda('start') - } - - /** - * [processDone description] - * @param {[type]} data [description] - * @return {[type]} [description] - */ - function processDone(data) { - var progress = 0; - var interval = setInterval(function () { - progress = Math.min(progress + Math.random() * 0.2, 1); - laddaLoad.ladda('setProgress', progress); - - if (progress === 1) { - laddaLoad.ladda('stop'); - clearInterval(interval); - } - }, 100); - } + // Авторазмер для блоков с кодом + $('.code').autosize(); + + // Селекты + $('.styler').styler(); + + // Прячем кнопки создания допполей + $.each($('.xf-input'), function () { + if ($(this).val().length) { + $(this).next('span').addClass('disabled'); + } + + }); + + // Инициализация Ladda + var laddaLoad = $('.ladda-button-old').ladda(); + + // Дефолтные настройки аякс формы + var formOptions = { + dataType: 'json', + beforeSubmit: processStart, + success: processDone + }; + + // Табы настроек + $('#settings').easyResponsiveTabs(); + + // Дефолтные настройки magnificpopup + $.extend(true, $.magnificPopup.defaults, { + tClose: 'Закрыть (Esc)', // Alt text on close button + tLoading: 'Загрузка...', // Text that is displayed during loading. Can contain %curr% and %total% keys + ajax: { + tError: 'Контент не загружен.' // Error message when ajax request failed + } + }); + + // + $('#settingsForm').ajaxForm(formOptions); + + $('.mfp-open').magnificPopup(); + + $('.mfp-open-ajax').magnificPopup({ + type: 'ajax' + }); + + $('.mfp-open-modal-map').magnificPopup({ + type: 'inline', + preloader: false, + // focus: '#username', + modal: true, + callbacks: { + open: function () { + doc.trigger('mapInit'); + }, + afterClose: function () { + doc.trigger('mapDestroy'); + } + } + }); + + /** + * [processStart description] + * @return {[type]} [description] + */ + function processStart() { + laddaLoad.ladda('start') + } + + /** + * [processDone description] + * @param {[type]} data [description] + * @return {[type]} [description] + */ + function processDone(data) { + var progress = 0; + var interval = setInterval(function () { + progress = Math.min(progress + Math.random() * 0.2, 1); + laddaLoad.ladda('setProgress', progress); + + if (progress === 1) { + laddaLoad.ladda('stop'); + clearInterval(interval); + } + }, 100); + } }); function showSelectedPoint(obj) { - var $this = obj, - selectedData = $this.find('option:selected').data(), - $marker = $('.selected-marker'), - $iconLayout = $('.iconLayout'), - $iconImageSize0 = $('.iconImageSize0'), - $iconImageSize1 = $('.iconImageSize1'), - $iconImageOffset0 = $('.iconImageOffset0'), - $iconImageOffset1 = $('.iconImageOffset1'); - - $marker.prop('src', selectedData.selectImg); - $('.set-icon-color-input').remove(); - $('.selected-marker').css('background', 'none'); - - if (selectedData.iconColor) { - $marker.css('background', selectedData.iconColor); - $('.marker-select-wrapper').append(''); - } - - if (selectedData.sizeWidth > 0) { - $iconLayout.val('default#image'); - $iconImageSize0.val(selectedData.sizeWidth); - $iconImageSize1.val(selectedData.sizeHeight); - $iconImageOffset0.val((selectedData.offsetWidth !== '') ? selectedData.offsetWidth : '-' + Math.round(selectedData.sizeWidth / 2)); - $iconImageOffset1.val((selectedData.offsetHeight !== '') ? selectedData.offsetHeight : '-' + Math.round(selectedData.sizeHeight / 2)); - } else { - $iconLayout.val(''); - $iconImageSize0.val(''); - $iconImageSize1.val(''); - $iconImageOffset0.val(''); - $iconImageOffset1.val(''); - } + var selectedData = obj.find('option:selected').data(); + var $marker = $('.selected-marker'); + var $iconLayout = $('.iconLayout'); + var $iconImageSize0 = $('.iconImageSize0'); + var $iconImageSize1 = $('.iconImageSize1'); + var $iconImageOffset0 = $('.iconImageOffset0'); + var $iconImageOffset1 = $('.iconImageOffset1'); + + $marker.prop('src', selectedData.selectImg); + $('.set-icon-color-input').remove(); + $marker.css('background', 'none'); + + if (selectedData.iconColor) { + $marker.css('background', selectedData.iconColor); + $('.marker-select-wrapper').append(''); + } + + if (selectedData.sizeWidth > 0) { + $iconLayout.val('default#image'); + $iconImageSize0.val(selectedData.sizeWidth); + $iconImageSize1.val(selectedData.sizeHeight); + $iconImageOffset0.val((selectedData.offsetWidth !== '') ? selectedData.offsetWidth : '-' + Math.round(selectedData.sizeWidth / 2)); + $iconImageOffset1.val((selectedData.offsetHeight !== '') ? selectedData.offsetHeight : '-' + Math.round(selectedData.sizeHeight / 2)); + } else { + $iconLayout.val(''); + $iconImageSize0.val(''); + $iconImageSize1.val(''); + $iconImageOffset0.val(''); + $iconImageOffset1.val(''); + } } diff --git a/engine/modules/ymaps/language/Russian.lng b/engine/modules/ymaps/language/Russian.lng index 2cd9c7a..3e36c79 100644 --- a/engine/modules/ymaps/language/Russian.lng +++ b/engine/modules/ymaps/language/Russian.lng @@ -1,88 +1,92 @@ 'Russian', - 'moduleLangName' => 'Язык', - 'moduleSettings' => 'Настройки', - 'allmapsSettings' => 'Настройки страницы с метками', - 'mapsHelp' => 'Справка (Rus)', - 'mapsSupport' => 'Справка и техподдержка', - 'moduleOn' => 'Включить модуль', - 'moduleTextManagment' => 'Управление модулем', - 'moduleTextAllSections' => 'Список всех разделов', - 'moduleTextCheckUpdates' => 'Проверить обновления', +$module_lang = [ + 'moduleLang' => 'Russian', + 'moduleLangName' => 'Язык', + 'moduleSettings' => 'Настройки', + 'allmapsSettings' => 'Настройки страницы с метками', + 'mapsHelp' => 'Справка (Rus)', + 'mapsSupport' => 'Справка и техподдержка', + 'moduleOn' => 'Включить модуль', + 'moduleTextManagment' => 'Управление модулем', + 'moduleTextAllSections' => 'Список всех разделов', + 'moduleTextCheckUpdates' => 'Проверить обновления', - 'mapSettings' => 'Настройки карты', - 'mapsSettings' => 'Настройки страницы с метками', + 'mapSettings' => 'Настройки карты', + 'mapsSettings' => 'Настройки страницы с метками', - 'moduleTextApiKey' => 'API Key Яндекс карт', - 'moduleTextApiKeyWhat' => 'Для чего нужен ключ?', - 'moduleTextMapHeight' => 'Высота карты по умолчанию (px)', - 'moduleTextMapControls' => 'Элементы управления картой', - 'moduleTextMapFullScreen' => 'кнопка разворачивания карты на весь экран', - 'moduleTextMapLocation' => 'кнопка определения местоположения пользователя', - 'moduleTextMapRoute' => 'кнопка включения и отключения поведения "редактор маршрута"', - 'moduleTextMapRuler' => 'кнопка включения и отключения поведения "линейка"', - 'moduleTextMapSearchPanel' => 'панель поиска', - 'moduleTextMapProbki' => 'панель пробок', - 'moduleTextMapTypeTrigger' => 'панель переключения типа карты', - 'moduleTextMapZoom' => 'ползунок масштаба', - 'moduleTextMapZoomDefault' => 'Центр карты и зум по умолчанию', - 'moduleTextMapLat' => 'Широта', - 'moduleTextMapLon' => 'Долгота', - 'moduleTextMapZoomPlaceholder' => 'Зум', - 'moduleTextMapSelectOnMap' => 'выбрать на карте', - 'moduleTextMapZoomXf' => 'Имя допполя для информации о точке', - 'moduleTextMapZoomXfPlaceholder' => 'Координаты и зум карты', - 'moduleTextMapZoomXfPlaceholderText' => 'Например coords', - 'moduleTextMapBaloonXf' => 'Имя допполя для содержимого балуна', - 'moduleTextMapBaloonXfPlaceholder' => 'Содержимое балуна карты', - 'moduleTextMapBaloonXfPlaceholderText'=> 'Например balloon', - 'moduleTextEnterPlacemarkText' => 'Введите описание метки', - 'moduleTextMissedTemplateFile' => 'Отсутствует файл шаблона', - 'moduleActionYes' => 'Да', - 'moduleActionNo' => 'Нет', - 'moduleActionClose' => 'Закрыть', - 'moduleActionSave' => 'Сoхранить', - 'moduleActionCancel' => 'Отменить', - 'moduleActionCreateXf' => 'Создать поле', - 'ot' => 'от', - 'field' => 'Поле', - 'successfullyСreated' => 'успешно создано!', - 'xfieldsSetup' => 'управление допполями', - 'contactsForSupport' => 'Контакты для связи и техподдержки:', + 'moduleTextApiKey' => 'API Key Яндекс карт', + 'moduleTextApiKeyWhat' => 'Условия использования карт', + 'moduleTextMapHeight' => 'Высота карты по умолчанию (px)', + 'moduleTextMapControls' => 'Элементы управления картой', + 'moduleTextMapFullScreen' => 'кнопка разворачивания карты на весь экран', + 'moduleTextMapLocation' => 'кнопка определения местоположения пользователя', + 'moduleTextMapRoute' => 'кнопка включения и отключения поведения "редактор маршрута"', + 'moduleTextMapRuler' => 'кнопка включения и отключения поведения "линейка"', + 'moduleTextMapSearchPanel' => 'панель поиска', + 'moduleTextMapProbki' => 'панель пробок', + 'moduleTextMapTypeTrigger' => 'панель переключения типа карты', + 'moduleTextMapZoom' => 'ползунок масштаба', + 'moduleTextMapZoomDefault' => 'Центр карты и зум по умолчанию', + 'moduleTextMapLat' => 'Широта', + 'moduleTextMapLon' => 'Долгота', + 'moduleTextMapZoomPlaceholder' => 'Зум', + 'moduleTextMapSelectOnMap' => 'выбрать на карте', + 'moduleTextMapZoomXf' => 'Имя допполя для информации о точке', + 'moduleTextMapZoomXfPlaceholder' => 'Координаты и зум карты', + 'moduleTextMapZoomXfPlaceholderText' => 'Например coords', + 'moduleTextMapBaloonXf' => 'Имя допполя для содержимого балуна', + 'moduleTextMapBaloonXfPlaceholder' => 'Содержимое балуна карты', + 'moduleTextMapBaloonXfPlaceholderText' => 'Например balloon', + 'moduleTextEnterPlacemarkText' => 'Введите описание метки', + 'moduleTextMissedTemplateFile' => 'Отсутствует файл шаблона', + 'moduleActionYes' => 'Да', + 'moduleActionNo' => 'Нет', + 'moduleActionClose' => 'Закрыть', + 'moduleActionSave' => 'Сoхранить', + 'moduleActionCancel' => 'Отменить', + 'moduleActionCreateXf' => 'Создать поле', + 'ot' => 'от', + 'field' => 'Поле', + 'successfullyСreated' => 'успешно создано!', + 'xfieldsSetup' => 'управление допполями', + 'contactsForSupport' => 'Контакты для связи и техподдержки:', // 1.4 - 'mapsPointSettings' => 'Настройка меток', - 'pointersCat' => 'Метки в категориях: ', - 'pointersCatDefault' => 'Иконка по умолчанию: ', - 'catIdWrong' => 'Категория не существует', - 'moduleActionApply' => 'Применить', - 'markerCustomColor' => ' (свой цвет)', - 'moduleActionChange' => 'Изменить', - 'moduleActionAdd' => 'Добавить', - 'moduleTextMarkerSettingsHeader' => 'Настройка метки для категории: ', - 'moduleTextMarkerWText' => 'Метки с текстом', - 'moduleTextMarkerStrech' => 'Резиновые метки с текстом', - 'moduleTextMarkerWDot' => 'Метки с точкой', - 'moduleTextMarkerRound' => 'Круглые метки', - 'moduleTextMarkerRoundWDot' => 'Круглые метки с точкой', - 'moduleTextMarkerCustom' => 'Собственное изображение', - 'moduleTextIconWidth' => 'Ширина иконки: ', - 'moduleTextIconHeight' => 'Высота иконки: ', - 'moduleTextIconOffWidth' => 'Смещение по гоизонтали: ', - 'moduleTextIconOffHeight' => 'Смещение по вертикали: ', - 'moduleTextExampleLink' => 'Пример позиционирования иконки', - 'moduleTextEditPlacemark' => 'Редактировать метку', - 'moduleTextAddPlacemark' => 'Добавить метку', - 'moduleTextDelPlacemark' => 'Удалить метку', - 'moduleTextHelp' => 'Справка по модулю', - 'moduleLongText1' => 'Справка по модулю находится на официальном сайте поддержки по адресу', - 'moduleTextSupportСond' => 'Техническая поддержка', + 'mapsPointSettings' => 'Настройка меток', + 'pointersCat' => 'Метки в категориях: ', + 'pointersCatDefault' => 'Иконка по умолчанию: ', + 'catIdWrong' => 'Категория не существует', + 'moduleActionApply' => 'Применить', + 'markerCustomColor' => ' (свой цвет)', + 'moduleActionChange' => 'Изменить', + 'moduleActionAdd' => 'Добавить', + 'moduleTextMarkerSettingsHeader' => 'Настройка метки для категории: ', + 'moduleTextMarkerWText' => 'Метки с текстом', + 'moduleTextMarkerStrech' => 'Резиновые метки с текстом', + 'moduleTextMarkerWDot' => 'Метки с точкой', + 'moduleTextMarkerRound' => 'Круглые метки', + 'moduleTextMarkerRoundWDot' => 'Круглые метки с точкой', + 'moduleTextMarkerCustom' => 'Собственное изображение', + 'moduleTextIconWidth' => 'Ширина иконки: ', + 'moduleTextIconHeight' => 'Высота иконки: ', + 'moduleTextIconOffWidth' => 'Смещение по гоизонтали: ', + 'moduleTextIconOffHeight' => 'Смещение по вертикали: ', + 'moduleTextExampleLink' => 'Пример позиционирования иконки', + 'moduleTextEditPlacemark' => 'Редактировать метку', + 'moduleTextAddPlacemark' => 'Добавить метку', + 'moduleTextDelPlacemark' => 'Удалить метку', + 'moduleTextHelp' => 'Справка по модулю', + 'moduleLongText1' => 'Справка по модулю находится на официальном сайте поддержки по адресу', + 'moduleTextSupportСond' => 'Техническая поддержка', // 1.4.3 - 'moduleActionDelete' => 'Удалить', - + 'moduleActionDelete' => 'Удалить', + // 1.4.4 - 'moduleTextDocks' => 'Документация и примеры использования', -); \ No newline at end of file + 'moduleTextDocks' => 'Документация и примеры использования', + + // 3.0.0 + 'moduleTextForWhatApiKey' => 'API-Key нужен для возможности использования поиска по карте и других операций, связанных с геокодингом', + 'moduleTitle' => 'Yandex Maps', +]; \ No newline at end of file From a2cdcf7541b16f4747144b9d73856f405368f337 Mon Sep 17 00:00:00 2001 From: pafnuty Date: Sat, 29 Feb 2020 18:45:20 +0400 Subject: [PATCH 07/12] =?UTF-8?q?3.0.0=20=D0=93=D0=BE=D1=82=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=20=D0=BD=D0=B0=20=D1=81=D0=B0?= =?UTF-8?q?=D0=B9=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 13 +- engine/ajax/ymaps/cat.php | 299 ------ engine/ajax/{ymaps/all.php => ymaps_all.php} | 74 +- engine/ajax/ymaps_cat.php | 263 +++++ engine/modules/ymaps/addnews.php | 32 +- engine/modules/ymaps/detail.php | 1006 +++++++++++------- engine/modules/ymaps/js/ymaps_editnews.js | 5 +- engine/modules/ymaps/language/Russian.lng | 1 + 8 files changed, 949 insertions(+), 744 deletions(-) delete mode 100644 engine/ajax/ymaps/cat.php rename engine/ajax/{ymaps/all.php => ymaps_all.php} (81%) create mode 100644 engine/ajax/ymaps_cat.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 4af1296..9f839c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,16 @@ ## 3.0.0 -- Прекращена поддержка DLE ниже, чем версии 13.x +- Установка в виде плагина. +- Теперь изменения в модуль можно делать самостоятельно через систему плагинов. +- Прекращена поддержка старых версий DLE (ниже, чем версии 13.x). - Убрана Украинская локализация т.к. Яндекс заблокирован на территории Украины. -- Убрана Английская локализация т.к. никто не пользуется этой версией. +- Убрана Английская локализация т.к. никто не пользуется этой версией. +- Обновлена поддержка тегов `[image-X]{image-X}[/image-X]`. +- Обновлена поддержка тегов `[fullimage-X]{fullimage-X}[/fullimage-X]`. +- Добавлена поддержка тегов `[not-image-X]...[/not-image-X]`. +- Добавлена поддержка тегов `[not-fullimage-X]...[/not-fullimage-X]`. +- Добавлено поле для указания apiKey для использования функций геокодинга на карте (поиск, определение позиции пользователя) (fixed #12). +- Исправлено некорректное отображение кнопок в админке DLE 13.X (fixed #10). +- Исправлена некорректная работа JS во время манипуляций с картой при добавлении новости (fixed #8). ## 2.0.1 от 16.10.2018 - Совместимость с DLE 13.X diff --git a/engine/ajax/ymaps/cat.php b/engine/ajax/ymaps/cat.php deleted file mode 100644 index cd5dd71..0000000 --- a/engine/ajax/ymaps/cat.php +++ /dev/null @@ -1,299 +0,0 @@ - - * @link https://git.io/v9irg - */ - -// Всякие обязательные штуки для ajax DLE -@error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE); -@ini_set('display_errors', true); -@ini_set('html_errors', false); -@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE); - -define('DATALIFEENGINE', true); -define('ROOT_DIR', substr(dirname(__FILE__), 0, -18)); - -define('ENGINE_DIR', ROOT_DIR . '/engine'); - -$cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json'), true); -$icons = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_icons.json'), true); - -define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); - -if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); -} else { - die("Language file not found"); -} - - -include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); - -require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); -require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); -require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); -if ($config['version_id'] > 9.6) { - dle_session(); -} else { - @session_start(); -} - - -$user_group = get_vars("usergroup"); -if (!$user_group) { - $user_group = []; - $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC"); - while ($row = $db->get_row()) { - $user_group[$row['id']] = []; - foreach ($row as $key => $value) $user_group[$row['id']][$key] = stripslashes($value); - } - set_vars("usergroup", $user_group); - $db->free(); -} - -$cat_info = get_vars("category"); - -if (!is_array($cat_info)) { - $cat_info = []; - - $db->query("SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC"); - while ($row = $db->get_row()) { - - $cat_info[$row['id']] = []; - - foreach ($row as $key => $value) { - $cat_info[$row['id']][$key] = stripslashes($value); - } - - } - set_vars("category", $cat_info); - $db->free(); -} -$template_dir = ROOT_DIR . '/templates/' . $config['skin']; - -// Пытаемся получить даные из шаблона с настройками -if ($_REQUEST['preset'] && file_exists($template_dir . '/' . $cfg['moduleName'] . '/all/' . $_REQUEST['preset'] . '.tpl')) { - // Если файл существует - берём из него контент с настройками - $preset = file_get_contents($template_dir . '/' . $cfg['moduleName'] . '/all/' . $_REQUEST['preset'] . '.tpl'); - $arConf = []; -} else { - die('error'); -} -// Разбиваем полученные из файла нестройки по строкам -$preset = explode("\n", $preset); - -// Пробегаем по массиву и формируем список настроек -foreach ($preset as $v) { - $_v = explode('=', $v); - if (isset($_v[1])) { - $arConf[trim($_v[0])] = trim($_v[1]); - } -} - -// Конфиг модуля -$yMapCfg = [// 'template' => !empty($template) ? $template : $cfg['moduleName'] . '/all/default', - 'cachePrefix' => !empty($arConf['cachePrefix']) ? $arConf['cachePrefix'] : 'news_ym_all', 'startFrom' => !empty($arConf['startFrom']) ? (int)$arConf['startFrom'] : '0', // C какой новости начать вывод - 'limit' => !empty($arConf['limit']) ? (int)$arConf['limit'] : '1000', // Максимальное количество выводимых точек - 'postId' => !empty($arConf['postId']) ? $arConf['postId'] : '', // ID новостей для вывода в массиве (через запятую, или черточку) - 'notPostId' => !empty($arConf['notPostId']) ? $arConf['notPostId'] : '', // ID игнорируемых новостей (через запятую, или черточку) - 'catId' => !empty($_REQUEST['catId']) ? $_REQUEST['catId'] : (!empty($arConf['catId']) ? $arConf['catId'] : ''), // Категории для показа (id одной категории или this) - 'subcats' => !empty($arConf['subcats']) ? $arConf['subcats'] : false, // Выводить подкатегории указанных категорий (&subcats=y), работает и с диапазонами. - 'notCatId' => !empty($arConf['notCatId']) ? $arConf['notCatId'] : '', // Игнорируемые категории (через запятую, или черточку) - 'notSubcats' => !empty($arConf['notSubcats']) ? $arConf['notSubcats'] : false, // Игнорировать подкатегории игнорируемых категорий (¬Subcats=y), работает и с диапазонами. - 'type' => !empty($arConf['type']) ? $arConf['type'] : 'json', // Тип возвращаемых данных. Пока только json т.к. это наиболее правильный вариант -]; - -if ($yMapCfg['catId'] == 'this' || $yMapCfg['notCatId'] == 'this') { - $url = parse_url($_SERVER['HTTP_REFERER']); - $path = $url['path']; - - $arPath = explode('/', $path); - - $category_id = false; - - foreach ($cat_info as $key => $cat) { - if ($cat['alt_name'] == $arPath[1]) { - $category_id = $cat['id']; - break; - } - } -} - -// Если имеются переменные со значениями this, изменяем значение переменной cacheNameAddon -if ($yMapCfg['catId'] == 'this') { - $yMapCfg['cacheNameAddon'] .= $category_id . 'cId_'; -} -if ($yMapCfg['notCatId'] == 'this') { - $yMapCfg['cacheNameAddon'] .= $category_id . 'nCId_'; -} -if ($yMapCfg['postId'] == 'this') { - $yMapCfg['cacheNameAddon'] .= $_REQUEST["newsid"] . 'pId_'; -} -if ($yMapCfg['notPostId'] == 'this') { - $yMapCfg['cacheNameAddon'] .= $_REQUEST["newsid"] . 'nPId_'; -} - -$cacheName = md5(implode('_', $yMapCfg)) . $config['skin']; -$yMap = false; -$yMap = dle_cache($yMapCfg['cachePrefix'], $cacheName . $config['skin'], $yMapCfg['cacheSuffix']); -if (!$yMap) { - - if (in_array($yMapCfg['catId'], getDiapazone($yMapCfg['notCatId'], $yMapCfg['notSubcats']))) { - die('wrong category'); - } - - $mapHeight = ($cfg['main']['mapHeight']) ? $cfg['main']['mapHeight'] : '400'; - $controls = $cfg['main']['controls']; - $controls = array_keys($controls); - $controls = json_encode($controls); - - $catPoints = $cfg['pointSettings']['catPoints']; - - // Массив с условиями запроса - $wheres = []; - $wheres[] = 'approve'; - - // Фильтрация КАТЕГОРИЙ по их ID - if ($yMapCfg['catId'] == 'this') { - $yMapCfg['catId'] = ($yMapCfg['subcats']) ? get_sub_cats($category_id) : $category_id; - } else { - $yMapCfg['catId'] = ((int)$yMapCfg['catId'] > 0) ? (int)$yMapCfg['catId'] : false; - } - - if ($yMapCfg['notCatId'] == 'this') { - $yMapCfg['notCatId'] = ($yMapCfg['notSubcats']) ? get_sub_cats($category_id) : $category_id; - } - - - if ($yMapCfg['catId'] || $yMapCfg['notCatId']) { - $ignore = ($yMapCfg['notCatId']) ? 'NOT ' : ''; - $catArr = ($yMapCfg['notCatId']) ? getDiapazone($yMapCfg['notCatId'], $yMapCfg['notSubcats']) : ($yMapCfg['subcats']) ? get_sub_cats($yMapCfg['catId']) : $yMapCfg['catId']; - $wheres[] = $ignore . 'category regexp "[[:<:]](' . str_replace(',', '|', $catArr) . ')[[:>:]]"'; - } - - // Фильтрация НОВОСТЕЙ по их ID - if ($yMapCfg['postId'] == 'this') { - $yMapCfg['postId'] = $_REQUEST["newsid"]; - } - if ($yMapCfg['notPostId'] == 'this') { - $yMapCfg['notPostId'] = $_REQUEST["newsid"]; - } - - if (($yMapCfg['postId'] || $yMapCfg['notPostId']) && $yMapCfg['related'] == '') { - $ignorePosts = ($yMapCfg['notPostId']) ? 'NOT ' : ''; - $postsArr = ($yMapCfg['notPostId']) ? getDiapazone($yMapCfg['notPostId']) : getDiapazone($yMapCfg['postId']); - $wheres[] = $ignorePosts . 'id regexp "[[:<:]](' . str_replace(',', '|', $postsArr) . ')[[:>:]]"'; - } - - // Условие для отбора новостей, у которых есть координаты точек - $wheres[] = 'xfields regexp "[[:<:]](' . $cfg['main']['coordsField'] . ')[[:>:]]"'; - - // Складываем условия - $where = (count($wheres)) ? ' WHERE ' . implode(' AND ', $wheres) : ''; - - // Выполняем запрос - $row = $db->super_query("SELECT id, title, category, xfields FROM " . PREFIX . "_post " . $where . " LIMIT " . $yMapCfg['startFrom'] . ", " . $yMapCfg['limit'], true); - - $geoObjects = []; - if (count($row) > 0) { - foreach ($row as $key => $placemark) { - $geoObject = []; - // Определяем ID геообъекта - $geoObject['id'] = (int)$placemark['id']; - - $geoObject['type'] = 'Feature'; - - $_catId = intval($placemark['category']); - $geoObject['category'] = $_catId; - - $catPoint = ($catPoints[$_catId]) ? $_catId : 'default'; - $placemarkStyle = $catPoints[$catPoint]; - - // небольшой костылёк для приведения типов, иначе я.карта не воспринимает. - if ($placemarkStyle['iconImageSize']) { - $placemarkStyle['iconImageSize'][0] = (int)$placemarkStyle['iconImageSize'][0]; - $placemarkStyle['iconImageSize'][1] = (int)$placemarkStyle['iconImageSize'][1]; - } - if ($placemarkStyle['iconImageOffset']) { - $placemarkStyle['iconImageOffset'][0] = (int)$placemarkStyle['iconImageOffset'][0]; - $placemarkStyle['iconImageOffset'][1] = (int)$placemarkStyle['iconImageOffset'][1]; - } - - $geoObject['options'] = $placemarkStyle; - $title = htmlspecialchars(strip_tags(stripslashes($placemark['title'])), ENT_QUOTES, $config['charset']); - $geoObject['properties']['clusterCaption'] = $title; - $geoObject['properties']['hintContent'] = $title; - - $xf = xfieldsdataload($placemark['xfields']); - - $xfCo_ = html_entity_decode($xf[$cfg['main']['coordsField']], ENT_COMPAT); - - $xfCoords = json_decode($xfCo_, true); - - - $geoObject['geometry']['type'] = 'Point'; - $geoObject['geometry']['coordinates'][0] = $xfCoords['lat']; - $geoObject['geometry']['coordinates'][1] = $xfCoords['lon']; - - $geoObjects[] = $geoObject; - } - } - $yMap['type'] = 'FeatureCollection'; - $yMap['features'] = $geoObjects; - - $yMap = json_encode($yMap); - - create_cache($yMapCfg['cachePrefix'], $yMap, $cacheName . $config['skin'], true); -} -die($yMap); - -/** - * Получение диапазона между двумя цифрами, и не только - * - * @param bool $diapazone - * @param bool $subcats - * - * @internal param string $diapasone - * @return string - * @author Elkhan I. Isaev - */ -function getDiapazone($diapazone = false, $subcats = false) { - if ($diapazone !== false) { - $diapazone = str_replace(" ", "", $diapazone); - if (strpos($diapazone, ',') !== false) { - $diapazoneArray = explode(',', $diapazone); - $diapazoneArray = array_diff($diapazoneArray, [null]); - foreach ($diapazoneArray as $v) { - if (strpos($v, '-') !== false) { - preg_match("#(\d+)-(\d+)#i", $v, $test); - $diapazone = !empty($diapazone) && is_array($diapazone) ? array_merge($diapazone, (!empty ($test) ? range($test[1], $test[2]) : [])) : (!empty ($test) ? range($test[1], $test[2]) : []); - } else { - $diapazone = !empty($diapazone) && is_array($diapazone) ? array_merge($diapazone, (!empty ($v) ? [(int)$v] : [])) : (!empty ($v) ? [(int)$v] : []); - } - } - } elseif (strpos($diapazone, '-') !== false) { - preg_match("#(\d+)-(\d+)#i", $diapazone, $test); - $diapazone = !empty ($test) ? range($test[1], $test[2]) : []; - } else { - $diapazone = [(int)$diapazone]; - } - if (!empty($diapazone)) { - if ($subcats && function_exists('get_sub_cats')) { - foreach ($diapazone as $d) { - $_sc = explode('|', get_sub_cats($d)); - foreach ($_sc as $v) { - array_push($diapazone, $v); - } - } - } - $diapazone = array_unique($diapazone); - } else { - $diapazone = []; - } - $diapazone = implode(',', $diapazone); - } - - return $diapazone; -} diff --git a/engine/ajax/ymaps/all.php b/engine/ajax/ymaps_all.php similarity index 81% rename from engine/ajax/ymaps/all.php rename to engine/ajax/ymaps_all.php index 3c9fd61..854dd8a 100644 --- a/engine/ajax/ymaps/all.php +++ b/engine/ajax/ymaps_all.php @@ -6,78 +6,23 @@ * @link https://git.io/v9irg */ -// Всякие обязательные штуки для ajax DLE -@error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE); -@ini_set('display_errors', true); -@ini_set('html_errors', false); -@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE); - -define('DATALIFEENGINE', true); -define('ROOT_DIR', substr(dirname(__FILE__), 0, -18)); - -define('ENGINE_DIR', ROOT_DIR . '/engine'); - -$cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json'), true); -$icons = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_icons.json'), true); - -define('MODULE_DIR', ENGINE_DIR . '/modules/' . $cfg['moduleName'] . '/'); - - -if (@file_exists(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')) { - include(DLEPlugins::Check(MODULE_DIR . '/language/' . $cfg['main']['moduleLang'] . '.lng')); -} else { - die("Language file not found"); +if (!defined('DATALIFEENGINE')) { + header("HTTP/1.1 403 Forbidden"); + header('Location: ../../'); + die("Hacking attempt!"); } -include (DLEPlugins::Check(ENGINE_DIR . '/data/config.php')); - -require_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mysql.php')); -require_once (DLEPlugins::Check(ENGINE_DIR . '/data/dbconfig.php')); -require_once (DLEPlugins::Check(ENGINE_DIR . '/modules/functions.php')); -if ($config['version_id'] > 9.6) { - dle_session(); -} else { - @session_start(); -} - - -$user_group = get_vars("usergroup"); -if (!$user_group) { - $user_group = []; - $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC"); - while ($row = $db->get_row()) { - $user_group[$row['id']] = []; - foreach ($row as $key => $value) $user_group[$row['id']][$key] = stripslashes($value); - } - set_vars("usergroup", $user_group); - $db->free(); -} - -$cat_info = get_vars("category"); - -if (!is_array($cat_info)) { - $cat_info = []; - - $db->query("SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC"); - while ($row = $db->get_row()) { - - $cat_info[$row['id']] = []; +$cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json'), true); - foreach ($row as $key => $value) { - $cat_info[$row['id']][$key] = stripslashes($value); - } +include(DLEPlugins::Check(ENGINE_DIR . '/modules/ymaps/language/Russian.lng')); - } - set_vars("category", $cat_info); - $db->free(); -} $template_dir = ROOT_DIR . '/templates/' . $config['skin']; // Пытаемся получить даные из шаблона с настройками -if ($_REQUEST['preset'] && file_exists($template_dir . '/' . $cfg['moduleName'] . '/all/' . $_REQUEST['preset'] . '.tpl')) { +if ($_REQUEST['preset'] && file_exists($template_dir . '/ymaps/all/' . (string)$_REQUEST['preset'] . '.tpl')) { // Если файл существует - берём из него контент с настройками - $preset = file_get_contents($template_dir . '/' . $cfg['moduleName'] . '/all/' . $_REQUEST['preset'] . '.tpl'); + $preset = file_get_contents($template_dir . '/ymaps/all/' . (string)$_REQUEST['preset'] . '.tpl'); $arConf = []; } else { die('error'); @@ -94,7 +39,8 @@ } // Конфиг модуля -$yMapCfg = [// 'template' => !empty($template) ? $template : $cfg['moduleName'] . '/all/default', +$yMapCfg = [// + 'template' => !empty($template) ? $template : $cfg['moduleName'] . '/all/default', 'cachePrefix' => !empty($arConf['cachePrefix']) ? $arConf['cachePrefix'] : 'news_ym_all', 'startFrom' => !empty($arConf['startFrom']) ? (int)$arConf['startFrom'] : '0', // C какой новости начать вывод 'limit' => !empty($arConf['limit']) ? (int)$arConf['limit'] : '1000', // Максимальное количество выводимых точек 'postId' => !empty($arConf['postId']) ? $arConf['postId'] : '', // ID новостей для вывода в массиве (через запятую, или черточку) diff --git a/engine/ajax/ymaps_cat.php b/engine/ajax/ymaps_cat.php new file mode 100644 index 0000000..6f7e864 --- /dev/null +++ b/engine/ajax/ymaps_cat.php @@ -0,0 +1,263 @@ + + * @link https://git.io/v9irg + */ + +if (!defined('DATALIFEENGINE')) { + header("HTTP/1.1 403 Forbidden"); + header('Location: ../../'); + die("Hacking attempt!"); +} + + +$cfg = json_decode(file_get_contents(ENGINE_DIR.'/data/ymaps_config.json'), true); +$icons = json_decode(file_get_contents(ENGINE_DIR.'/data/ymaps_icons.json'), true); + +include(DLEPlugins::Check(ENGINE_DIR.'/modules/ymaps/language/Russian.lng')); + +$template_dir = ROOT_DIR.'/templates/'.$config['skin']; + +// Пытаемся получить даные из шаблона с настройками +if ($_REQUEST['preset'] && file_exists($template_dir.'/ymaps/all/'.(string)$_REQUEST['preset'].'.tpl')) { + // Если файл существует - берём из него контент с настройками + $preset = file_get_contents($template_dir.'/ymaps/all/'.(string)$_REQUEST['preset'].'.tpl'); + $arConf = []; +} else { + die('error'); +} +// Разбиваем полученные из файла нестройки по строкам +$preset = explode("\n", $preset); + +// Пробегаем по массиву и формируем список настроек +foreach ($preset as $v) { + $_v = explode('=', $v); + if (isset($_v[1])) { + $arConf[trim($_v[0])] = trim($_v[1]); + } +} + +// Конфиг модуля +$yMapCfg = [ + 'cachePrefix' => !empty($arConf['cachePrefix']) ? $arConf['cachePrefix'] : 'news_ym_cat', + 'startFrom' => !empty($arConf['startFrom']) ? (int)$arConf['startFrom'] : '0', + // C какой новости начать вывод + 'limit' => !empty($arConf['limit']) ? (int)$arConf['limit'] : '1000', + // Максимальное количество выводимых точек + 'postId' => !empty($arConf['postId']) ? $arConf['postId'] : '', + // ID новостей для вывода в массиве (через запятую, или черточку) + 'notPostId' => !empty($arConf['notPostId']) ? $arConf['notPostId'] : '', + // ID игнорируемых новостей (через запятую, или черточку) + 'catId' => !empty($_REQUEST['catId']) ? $_REQUEST['catId'] + : (!empty($arConf['catId']) ? $arConf['catId'] : ''), + // Категории для показа (id одной категории или this) + 'subcats' => !empty($arConf['subcats']) ? $arConf['subcats'] : false, + // Выводить подкатегории указанных категорий (&subcats=y), работает и с диапазонами. + 'notCatId' => !empty($arConf['notCatId']) ? $arConf['notCatId'] : '', + // Игнорируемые категории (через запятую, или черточку) + 'notSubcats' => !empty($arConf['notSubcats']) ? $arConf['notSubcats'] : false, + // Игнорировать подкатегории игнорируемых категорий (¬Subcats=y), работает и с диапазонами. + 'type' => !empty($arConf['type']) ? $arConf['type'] : 'json', + // Тип возвращаемых данных. Пока только json т.к. это наиболее правильный вариант +]; + +if ($yMapCfg['catId'] == 'this' || $yMapCfg['notCatId'] == 'this') { + $url = parse_url($_SERVER['HTTP_REFERER']); + $path = $url['path']; + + $arPath = explode('/', $path); + + $category_id = false; + + foreach ($cat_info as $key => $cat) { + if ($cat['alt_name'] == $arPath[1]) { + $category_id = $cat['id']; + break; + } + } +} + +// Если имеются переменные со значениями this, изменяем значение переменной cacheNameAddon +if ($yMapCfg['catId'] == 'this') { + $yMapCfg['cacheNameAddon'] .= $category_id.'cId_'; +} +if ($yMapCfg['notCatId'] == 'this') { + $yMapCfg['cacheNameAddon'] .= $category_id.'nCId_'; +} +if ($yMapCfg['postId'] == 'this') { + $yMapCfg['cacheNameAddon'] .= $_REQUEST["newsid"].'pId_'; +} +if ($yMapCfg['notPostId'] == 'this') { + $yMapCfg['cacheNameAddon'] .= $_REQUEST["newsid"].'nPId_'; +} + +$cacheName = md5(implode('_', $yMapCfg)).$config['skin']; +$yMap = false; +$yMap = dle_cache($yMapCfg['cachePrefix'], $cacheName.$config['skin'], $yMapCfg['cacheSuffix']); +if (!$yMap) { + + if (in_array($yMapCfg['catId'], getDiapazone($yMapCfg['notCatId'], $yMapCfg['notSubcats']))) { + die('wrong category'); + } + + $mapHeight = ($cfg['main']['mapHeight']) ? $cfg['main']['mapHeight'] : '400'; + $controls = $cfg['main']['controls']; + $controls = array_keys($controls); + $controls = json_encode($controls); + + $catPoints = $cfg['pointSettings']['catPoints']; + + // Массив с условиями запроса + $wheres = []; + $wheres[] = 'approve'; + + // Фильтрация КАТЕГОРИЙ по их ID + if ($yMapCfg['catId'] == 'this') { + $yMapCfg['catId'] = ($yMapCfg['subcats']) ? get_sub_cats($category_id) : $category_id; + } else { + $yMapCfg['catId'] = ((int)$yMapCfg['catId'] > 0) ? (int)$yMapCfg['catId'] : false; + } + + if ($yMapCfg['notCatId'] == 'this') { + $yMapCfg['notCatId'] = ($yMapCfg['notSubcats']) ? get_sub_cats($category_id) : $category_id; + } + + + if ($yMapCfg['catId'] || $yMapCfg['notCatId']) { + $ignore = ($yMapCfg['notCatId']) ? 'NOT ' : ''; + $catArr = ($yMapCfg['notCatId']) ? getDiapazone($yMapCfg['notCatId'], $yMapCfg['notSubcats']) + : ($yMapCfg['subcats']) ? get_sub_cats($yMapCfg['catId']) : $yMapCfg['catId']; + $wheres[] = $ignore.'category regexp "[[:<:]]('.str_replace(',', '|', $catArr).')[[:>:]]"'; + } + + // Фильтрация НОВОСТЕЙ по их ID + if ($yMapCfg['postId'] == 'this') { + $yMapCfg['postId'] = $_REQUEST["newsid"]; + } + if ($yMapCfg['notPostId'] == 'this') { + $yMapCfg['notPostId'] = $_REQUEST["newsid"]; + } + + if (($yMapCfg['postId'] || $yMapCfg['notPostId']) && $yMapCfg['related'] == '') { + $ignorePosts = ($yMapCfg['notPostId']) ? 'NOT ' : ''; + $postsArr = ($yMapCfg['notPostId']) ? getDiapazone($yMapCfg['notPostId']) : getDiapazone($yMapCfg['postId']); + $wheres[] = $ignorePosts.'id regexp "[[:<:]]('.str_replace(',', '|', $postsArr).')[[:>:]]"'; + } + + // Условие для отбора новостей, у которых есть координаты точек + $wheres[] = 'xfields regexp "[[:<:]]('.$cfg['main']['coordsField'].')[[:>:]]"'; + + // Складываем условия + $where = (count($wheres)) ? ' WHERE '.implode(' AND ', $wheres) : ''; + + // Выполняем запрос + $row = $db->super_query("SELECT id, title, category, xfields FROM ".PREFIX."_post ".$where." LIMIT " + .$yMapCfg['startFrom'].", ".$yMapCfg['limit'], true); + + $geoObjects = []; + if (count($row) > 0) { + foreach ($row as $key => $placemark) { + $geoObject = []; + // Определяем ID геообъекта + $geoObject['id'] = (int)$placemark['id']; + + $geoObject['type'] = 'Feature'; + + $_catId = intval($placemark['category']); + $geoObject['category'] = $_catId; + + $catPoint = ($catPoints[$_catId]) ? $_catId : 'default'; + $placemarkStyle = $catPoints[$catPoint]; + + // небольшой костылёк для приведения типов, иначе я.карта не воспринимает. + if ($placemarkStyle['iconImageSize']) { + $placemarkStyle['iconImageSize'][0] = (int)$placemarkStyle['iconImageSize'][0]; + $placemarkStyle['iconImageSize'][1] = (int)$placemarkStyle['iconImageSize'][1]; + } + if ($placemarkStyle['iconImageOffset']) { + $placemarkStyle['iconImageOffset'][0] = (int)$placemarkStyle['iconImageOffset'][0]; + $placemarkStyle['iconImageOffset'][1] = (int)$placemarkStyle['iconImageOffset'][1]; + } + + $geoObject['options'] = $placemarkStyle; + $title = htmlspecialchars(strip_tags(stripslashes($placemark['title'])), + ENT_QUOTES, $config['charset']); + $geoObject['properties']['clusterCaption'] = $title; + $geoObject['properties']['hintContent'] = $title; + + $xf = xfieldsdataload($placemark['xfields']); + + $xfCo_ = html_entity_decode($xf[$cfg['main']['coordsField']], ENT_COMPAT); + + $xfCoords = json_decode($xfCo_, true); + + + $geoObject['geometry']['type'] = 'Point'; + $geoObject['geometry']['coordinates'][0] = $xfCoords['lat']; + $geoObject['geometry']['coordinates'][1] = $xfCoords['lon']; + + $geoObjects[] = $geoObject; + } + } + $yMap['type'] = 'FeatureCollection'; + $yMap['features'] = $geoObjects; + + $yMap = json_encode($yMap); + + create_cache($yMapCfg['cachePrefix'], $yMap, $cacheName.$config['skin'], true); +} +die($yMap); + +/** + * Получение диапазона между двумя цифрами, и не только + * + * @param bool $diapazone + * @param bool $subcats + * + * @return string + * @internal param string $diapasone + * @author Elkhan I. Isaev + */ +function getDiapazone($diapazone = false, $subcats = false) { + if ($diapazone !== false) { + $diapazone = str_replace(" ", "", $diapazone); + if (strpos($diapazone, ',') !== false) { + $diapazoneArray = explode(',', $diapazone); + $diapazoneArray = array_diff($diapazoneArray, [null]); + foreach ($diapazoneArray as $v) { + if (strpos($v, '-') !== false) { + preg_match("#(\d+)-(\d+)#i", $v, $test); + $diapazone = !empty($diapazone) && is_array($diapazone) ? array_merge($diapazone, + (!empty ($test) ? range($test[1], $test[2]) : [])) + : (!empty ($test) ? range($test[1], $test[2]) : []); + } else { + $diapazone = !empty($diapazone) && is_array($diapazone) ? array_merge($diapazone, + (!empty ($v) ? [(int)$v] : [])) : (!empty ($v) ? [(int)$v] : []); + } + } + } elseif (strpos($diapazone, '-') !== false) { + preg_match("#(\d+)-(\d+)#i", $diapazone, $test); + $diapazone = !empty ($test) ? range($test[1], $test[2]) : []; + } else { + $diapazone = [(int)$diapazone]; + } + if (!empty($diapazone)) { + if ($subcats && function_exists('get_sub_cats')) { + foreach ($diapazone as $d) { + $_sc = explode('|', get_sub_cats($d)); + foreach ($_sc as $v) { + array_push($diapazone, $v); + } + } + } + $diapazone = array_unique($diapazone); + } else { + $diapazone = []; + } + $diapazone = implode(',', $diapazone); + } + + return $diapazone; +} diff --git a/engine/modules/ymaps/addnews.php b/engine/modules/ymaps/addnews.php index cbf81bf..bf1be8b 100644 --- a/engine/modules/ymaps/addnews.php +++ b/engine/modules/ymaps/addnews.php @@ -7,34 +7,26 @@ */ if (!defined('DATALIFEENGINE')) { - header("HTTP/1.1 403 Forbidden"); - die("Hacking attempt!"); + header("HTTP/1.1 403 Forbidden"); + die("Hacking attempt!"); } global $onload_scripts, $js_array; -$cfg = json_decode(file_get_contents(ENGINE_DIR . '/data/ymaps_config.json')); +$cfg = json_decode(file_get_contents(ENGINE_DIR.'/data/ymaps_config.json')); -define('MODULE_DIR', ENGINE_DIR . '/modules/ymaps/'); +include(DLEPlugins::Check(ENGINE_DIR.'/modules/ymaps/language/Russian.lng')); -define('MODULE_DIR', ENGINE_DIR . '/modules/ymaps/'); +$key = ($cfg->main->apiKey) ? '&apikey='.$cfg->main->apiKey : ''; -if (@file_exists(MODULE_DIR . '/language/Russian.lng')) { - include(DLEPlugins::Check(MODULE_DIR . '/language/Russian.lng')); -} else { - die("Language file not found"); -} - -$key = ($cfg->main->apiKey) ? '&apikey=' . $cfg->main->apiKey : ''; - -$js_array[] = '/engine/modules/ymaps/js/jquery.magnificpopup.min.js'; -$js_array[] = '/templates/' . $config['skin'] . '/ymaps/ymaps.js'; +$js_array[] = 'engine/modules/ymaps/js/jquery.magnificpopup.min.js'; +$js_array[] = 'templates/'.$config['skin'].'/ymaps/ymaps.js'; -$mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; -$controls = (array)$cfg->main->controls; -$controls = array_keys($controls); -$controls = json_encode($controls); +$mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; +$controls = (array)$cfg->main->controls; +$controls = array_keys($controls); +$controls = json_encode($controls); $arPlacemarkStyles = ($cfg->pointSettings->catPoints) ? json_encode($cfg->pointSettings->catPoints) : '{}'; -$mapSelector = 'ymaps-map-container'; +$mapSelector = 'ymaps-map-container'; $onload_scripts[] = << !empty($arConf['cachePrefix']) ? $arConf['cachePrefix'] : 'full_' . (int)$_REQUEST['newsid'] . '_ym', 'id' => (!empty($id)) ? (int)$id : false, 'template' => !empty($template) ? $template : 'ymaps/default', 'fields' => $fields]; -$cacheName = md5(implode('_', $yMapCfg)) . $config['skin']; -$yMap = false; -$yMap = dle_cache($yMapCfg['cachePrefix'], $cacheName . $config['skin'], true); +$yMapCfg = [ + 'cachePrefix' => !empty($arConf['cachePrefix']) ? $arConf['cachePrefix'] : 'full_'.(int)$_REQUEST['newsid'].'_ym', + 'id' => (!empty($id)) ? (int)$id : false, + 'template' => !empty($template) ? $template : 'ymaps/default', + 'fields' => !empty($fields) ? $fields : '', +]; +$cacheName = md5(implode('_', $yMapCfg)).$config['skin']; +$yMap = false; +$yMap = dle_cache($yMapCfg['cachePrefix'], $cacheName.$config['skin'], true); if (!$yMap) { - // Поля, которые отбираются из БД в любом случае - $_queryFields = ['id', 'category', 'xfields', 'approve']; - - // убираем пробелы, на всякий случай - $fields = str_replace(' ', '', $fields); - - // Разбиваем поля на массив - $_fields = explode(',', $fields); - - // Сравниваем со списком разрешенных полей - foreach ($_fields as $key => $field) { - if (!in_array($field, $existFields)) { - // Удаляем лишние поля из массива - unset($_fields[$key]); - } - } - - // Объединяем массивы - $arQueryFields = array_merge($_queryFields, $_fields); - - // И опять разбиваем, для вставки в запрос. - $queryFields = implode(', ', $arQueryFields); - - // API-key - $key = ($cfg->main->apiKey) ? '&apikey=' . $cfg->main->apiKey : ''; - - - $mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; - $controls = (array)$cfg->main->controls; - $controls = array_keys($controls); - $controls = json_encode($controls); - - if (file_exists(TEMPLATE_DIR . '/' . $yMapCfg['template'] . '.tpl')) { - - $tpl->load_template($yMapCfg['template'] . '.tpl'); - - if ($yMapCfg['id'] > 0) { - $row = $db->super_query("SELECT " . $queryFields . " FROM " . PREFIX . "_post WHERE id = " . $yMapCfg['id']); - - $catPoints = $cfg->pointSettings->catPoints; - $_catId = intval($row['category']); - - $catPoint = ($catPoints->$_catId) ? $_catId : 'default'; - $placemarkStyle = (array)$catPoints->$catPoint; - // небольшой костылёк для приведения типов, иначе я.карта не воспринимает. - if ($placemarkStyle['iconImageSize']) { - $placemarkStyle['iconImageSize'][0] = (int)$placemarkStyle['iconImageSize'][0]; - $placemarkStyle['iconImageSize'][1] = (int)$placemarkStyle['iconImageSize'][1]; - } - if ($placemarkStyle['iconImageOffset']) { - $placemarkStyle['iconImageOffset'][0] = (int)$placemarkStyle['iconImageOffset'][0]; - $placemarkStyle['iconImageOffset'][1] = (int)$placemarkStyle['iconImageOffset'][1]; - } - - $placemarkStyle = json_encode($placemarkStyle); - - $tpl->set('{placemarkStyle}', $placemarkStyle); - - if ($row['date']) { - $row['date'] = strtotime($row['date']); - } - if ($row['short_story']) { - $row['short_story'] = stripslashes($row['short_story']); - } - if ($row['full_story']) { - $row['full_story'] = stripslashes($row['full_story']); - } - - if ($row['category']) { - $my_cat = []; - $my_cat_link = []; - $cat_list = explode(',', $row['category']); - - $config['category_separator'] = ($config['category_separator'] != ',') ? ' ' . $config['category_separator'] : ', '; - - if (count($cat_list) == 1) { - $my_cat[] = $cat_info[$cat_list[0]]['name']; - $my_cat_link = get_categories($cat_list[0], $config['category_separator']); - } else { - foreach ($cat_list as $element) { - if ($element) { - $my_cat[] = $cat_info[$element]['name']; - if ($config['allow_alt_url']) { - $my_cat_link[] = "{$cat_info[$element]['name']}"; - } else { - $my_cat_link[] = "{$cat_info[$element]['name']}"; - } - } - } - $my_cat_link = implode("{$config['category_separator']} ", $my_cat_link); - } - $my_cat = implode("{$config['category_separator']} ", $my_cat); - } - if ($row['title']) { - $row['title'] = strip_tags($row['title']); - } - - $xf = xfieldsdataload($row['xfields']); - - $xfCo_ = html_entity_decode($xf[$cfg->main->coordsField], ENT_COMPAT); - - $xfCoords = json_decode($xfCo_); - - $lon = ($xfCoords->lon) ? $xfCoords->lon : $cfg->main->mapCenter->longitude; - $lat = ($xfCoords->lat) ? $xfCoords->lat : $cfg->main->mapCenter->latitude; - $zoom = ($xfCoords->zoom) ? $xfCoords->zoom : $cfg->main->mapCenter->zoom; - - } else { - die('empty news id'); - } - - $script_yandex = ''; - $script_popup = ''; - $script_module = ''; - - $tpl->set('{key}', $key); - - $tpl->set('{scripts}', $script_yandex . $script_popup . $script_module); - $tpl->set('{script_yandex}', $script_yandex); - $tpl->set('{script_popup}', $script_popup); - $tpl->set('{script_module}', $script_module); - - $tpl->set('{lon}', $lon); - $tpl->set('{lat}', $lat); - $tpl->set('{zoom}', $zoom); - $tpl->set('{mapHeight}', $mapHeight); - $tpl->set('{controls}', $controls); - $tpl->set('{placemarkStyle}', $placemarkStyle); - $tpl->set('{baloon}', ''); - $tpl->set('{id}', $row['id']); - - - // Определяем список тегов, используемых в шаблоне на основании массива с данными о разрешенных полях - foreach ($existFields as $field) { - - if ($row[$field]) { - $tpl->set('{' . $field . '}', $row[$field]); - $tpl->copy_template = preg_replace("'\\[not_" . $field . "\\](.*?)\\[/not_" . $field . "\\]'is", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[" . $field . "]", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[/" . $field . "]", "", $tpl->copy_template); - } else { - $tpl->set('{' . $field . '}', ""); - $tpl->copy_template = preg_replace("'\\[" . $field . "\\](.*?)\\[/" . $field . "\\]'is", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[not_" . $field . "]", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[/not_" . $field . "]", "", $tpl->copy_template); - } - } - - // Работаем с допполями - if (strpos($tpl->copy_template, "[xfvalue_") !== false OR strpos($tpl->copy_template, "[xfgiven_") !== false) { - - $xfieldsdata = $xf; - $xfields = xfieldsload(); - foreach ($xfields as $value) { - $preg_safe_name = preg_quote($value[0], "'"); - - if ($value[6] AND !empty($xfieldsdata[$value[0]])) { - $temp_array = explode(",", $xfieldsdata[$value[0]]); - $value3 = []; - - foreach ($temp_array as $value2) { - - $value2 = trim($value2); - $value2 = str_replace("'", "'", $value2); - - if ($config['allow_alt_url']) { - $value3[] = "" . $value2 . ""; - } else { - $value3[] = "" . $value2 . ""; - } - } - - $xfieldsdata[$value[0]] = implode(", ", $value3); - - unset($temp_array); - unset($value2); - unset($value3); - - } - - if (empty($xfieldsdata[$value[0]])) { - $tpl->copy_template = preg_replace("'\\[xfgiven_{$preg_safe_name}\\](.*?)\\[/xfgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[xfnotgiven_{$value[0]}]", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[/xfnotgiven_{$value[0]}]", "", $tpl->copy_template); - } else { - $tpl->copy_template = preg_replace("'\\[xfnotgiven_{$preg_safe_name}\\](.*?)\\[/xfnotgiven_{$preg_safe_name}\\]'is", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[xfgiven_{$value[0]}]", "", $tpl->copy_template); - $tpl->copy_template = str_replace("[/xfgiven_{$value[0]}]", "", $tpl->copy_template); - } - - $xfieldsdata[$value[0]] = stripslashes($xfieldsdata[$value[0]]); - - if ($config['allow_links'] AND $value[3] == "textarea" AND function_exists('replace_links')) { - $xfieldsdata[$value[0]] = replace_links($xfieldsdata[$value[0]], $replace_links['news']); - } - - $tpl->copy_template = str_replace("[xfvalue_{$value[0]}]", $xfieldsdata[$value[0]], $tpl->copy_template); - - if (preg_match("#\\[xfvalue_{$preg_safe_name} limit=['\"](.+?)['\"]\\]#i", $tpl->copy_template, $matches)) { - $count = intval($matches[1]); - - $xfieldsdata[$value[0]] = str_replace("

", " ", $xfieldsdata[$value[0]]); - $xfieldsdata[$value[0]] = strip_tags($xfieldsdata[$value[0]], "
"); - $xfieldsdata[$value[0]] = trim(str_replace("
", " ", str_replace("
", " ", str_replace("\n", " ", str_replace("\r", "", $xfieldsdata[$value[0]]))))); - - if ($count AND dle_strlen($xfieldsdata[$value[0]], $config['charset']) > $count) { - - $xfieldsdata[$value[0]] = dle_substr($xfieldsdata[$value[0]], 0, $count, $config['charset']); - - if (($temp_dmax = dle_strrpos($xfieldsdata[$value[0]], ' ', $config['charset']))) { - $xfieldsdata[$value[0]] = dle_substr($xfieldsdata[$value[0]], 0, $temp_dmax, $config['charset']); - } - - } - - $tpl->set($matches[0], $xfieldsdata[$value[0]]); - - } - } - } - - // тянем картинки из краткой новости - if (stripos($tpl->copy_template, "{image-") !== false) { - - $images = []; - preg_match_all('/(img|src)=("|\')[^"\'>]+/i', $row['short_story'], $media); - $data = preg_replace('/(img|src)("|\'|="|=\')(.*)/i', "$3", $media[0]); - - foreach ($data as $url) { - $info = pathinfo($url); - if (isset($info['extension'])) { - if ($info['filename'] == "spoiler-plus" OR $info['filename'] == "spoiler-plus") { - continue; - } - $info['extension'] = strtolower($info['extension']); - if (($info['extension'] == 'jpg') || ($info['extension'] == 'jpeg') || ($info['extension'] == 'gif') || ($info['extension'] == 'png')) { - array_push($images, $url); - } - } - } - - if (count($images)) { - $i = 0; - foreach ($images as $url) { - $i++; - $tpl->copy_template = str_replace('{image-' . $i . '}', $url, $tpl->copy_template); - $tpl->copy_template = str_replace('[image-' . $i . ']', "", $tpl->copy_template); - $tpl->copy_template = str_replace('[/image-' . $i . ']', "", $tpl->copy_template); - } - - } - - $tpl->copy_template = preg_replace("#\[image-(.+?)\](.+?)\[/image-(.+?)\]#is", "", $tpl->copy_template); - $tpl->copy_template = preg_replace("#\\{image-(.+?)\\}#i", "{THEME}/dleimages/no_image.jpg", $tpl->copy_template); - - } - - // тянем картинки из полной новости - if (stripos($tpl->copy_template, "{fullimage-") !== false) { - - $images = []; - preg_match_all('/(img|src)=("|\')[^"\'>]+/i', $row['full_story'], $media); - $data = preg_replace('/(img|src)("|\'|="|=\')(.*)/i', "$3", $media[0]); - - foreach ($data as $url) { - $info = pathinfo($url); - if (isset($info['extension'])) { - if ($info['filename'] == "spoiler-plus" OR $info['filename'] == "spoiler-plus") { - continue; - } - $info['extension'] = strtolower($info['extension']); - if (($info['extension'] == 'jpg') || ($info['extension'] == 'jpeg') || ($info['extension'] == 'gif') || ($info['extension'] == 'png')) { - array_push($images, $url); - } - } - } - - if (count($images)) { - $i = 0; - foreach ($images as $url) { - $i++; - $tpl->copy_template = str_replace('{fullimage-' . $i . '}', $url, $tpl->copy_template); - $tpl->copy_template = str_replace('[fullimage-' . $i . ']', "", $tpl->copy_template); - $tpl->copy_template = str_replace('[/fullimage-' . $i . ']', "", $tpl->copy_template); - } - - } - - $tpl->copy_template = preg_replace("#\[fullimage-(.+?)\](.+?)\[/fullimage-(.+?)\]#is", "", $tpl->copy_template); - $tpl->copy_template = preg_replace("#\\{fullimage-(.+?)\\}#i", "{THEME}/dleimages/no_image.jpg", $tpl->copy_template); - - } - - if (preg_match("#\\{title limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) { - $count = intval($matches[1]); - if ($count AND dle_strlen($row['title'], $config['charset']) > $count) { - $row['title'] = dle_substr($row['title'], 0, $count, $config['charset']); - if (($temp_dmax = dle_strrpos($row['title'], ' ', $config['charset']))) { - $row['title'] = dle_substr($row['title'], 0, $temp_dmax, $config['charset']); - } - } - $tpl->set($matches[0], $row['title']); - } - - if (preg_match("#\\{short_story limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) { - $count = intval($matches[1]); - $row['short_story'] = str_replace("

", " ", $row['short_story']); - $row['short_story'] = strip_tags($row['short_story'], "
"); - $row['short_story'] = trim(str_replace("
", " ", str_replace("
", " ", str_replace("\n", " ", str_replace("\r", "", $row['short_story']))))); - if ($count AND dle_strlen($row['short_story'], $config['charset']) > $count) { - $row['short_story'] = dle_substr($row['short_story'], 0, $count, $config['charset']); - if (($temp_dmax = dle_strrpos($row['short_story'], ' ', $config['charset']))) { - $row['short_story'] = dle_substr($row['short_story'], 0, $temp_dmax, $config['charset']); - } - } - $tpl->set($matches[0], $row['short_story']); - } - - if (preg_match("#\\{full_story limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) { - $count = intval($matches[1]); - $row['full_story'] = str_replace("

", " ", $row['full_story']); - $row['full_story'] = strip_tags($row['full_story'], "
"); - $row['full_story'] = trim(str_replace("
", " ", str_replace("
", " ", str_replace("\n", " ", str_replace("\r", "", $row['full_story']))))); - if ($count AND dle_strlen($row['full_story'], $config['charset']) > $count) { - $row['full_story'] = dle_substr($row['full_story'], 0, $count, $config['charset']); - if (($temp_dmax = dle_strrpos($row['full_story'], ' ', $config['charset']))) { - $row['full_story'] = dle_substr($row['full_story'], 0, $temp_dmax, $config['charset']); - } - } - $tpl->set($matches[0], $row['full_story']); - - } - - $tpl->compile('yMap'); - $yMap = $tpl->result['yMap']; - - create_cache($yMapCfg['cachePrefix'], $yMap, $cacheName . $config['skin'], true); - - $tpl->clear(); - } else { - $yMap = '' . $module_lang['moduleTextMissedTemplateFile'] . ': ' . $config['skin'] . '/' . $yMapCfg['template'] . '.tpl'; - } + // Поля, которые отбираются из БД в любом случае + $_queryFields = ['id', 'category', 'xfields', 'approve']; + + // убираем пробелы, на всякий случай + $fields = str_replace(' ', '', $fields); + + // Разбиваем поля на массив + $_fields = explode(',', $fields); + + // Сравниваем со списком разрешенных полей + foreach ($_fields as $key => $field) { + if (!in_array($field, $existFields)) { + // Удаляем лишние поля из массива + unset($_fields[$key]); + } + } + + // Объединяем массивы + $arQueryFields = array_merge($_queryFields, $_fields); + + // И опять разбиваем, для вставки в запрос. + $queryFields = implode(', ', $arQueryFields); + + // API-key + $key = ($cfg->main->apiKey) ? '&apikey='.$cfg->main->apiKey : ''; + + + $mapHeight = ($cfg->main->mapHeight) ? $cfg->main->mapHeight : '400'; + $controls = (array)$cfg->main->controls; + $controls = array_keys($controls); + $controls = json_encode($controls); + + if (file_exists(TEMPLATE_DIR.'/'.$yMapCfg['template'].'.tpl')) { + + $tpl->load_template($yMapCfg['template'].'.tpl'); + + if ($yMapCfg['id'] > 0) { + $row = $db->super_query("SELECT ".$queryFields." FROM ".PREFIX."_post WHERE id = ".$yMapCfg['id']); + + $catPoints = $cfg->pointSettings->catPoints; + $_catId = intval($row['category']); + + $catPoint = ($catPoints->$_catId) ? $_catId : 'default'; + $placemarkStyle = (array)$catPoints->$catPoint; + // небольшой костылёк для приведения типов, иначе я.карта не воспринимает. + if ($placemarkStyle['iconImageSize']) { + $placemarkStyle['iconImageSize'][0] = (int)$placemarkStyle['iconImageSize'][0]; + $placemarkStyle['iconImageSize'][1] = (int)$placemarkStyle['iconImageSize'][1]; + } + if ($placemarkStyle['iconImageOffset']) { + $placemarkStyle['iconImageOffset'][0] = (int)$placemarkStyle['iconImageOffset'][0]; + $placemarkStyle['iconImageOffset'][1] = (int)$placemarkStyle['iconImageOffset'][1]; + } + + $placemarkStyle = json_encode($placemarkStyle); + + $tpl->set('{placemarkStyle}', $placemarkStyle); + + if ($row['date']) { + $row['date'] = strtotime($row['date']); + } + if ($row['short_story']) { + $row['short_story'] = stripslashes($row['short_story']); + } + if ($row['full_story']) { + $row['full_story'] = stripslashes($row['full_story']); + } + + if ($row['category']) { + $my_cat = []; + $my_cat_link = []; + $cat_list = explode(',', $row['category']); + + $config['category_separator'] = ($config['category_separator'] != ',') ? ' ' + .$config['category_separator'] : ', '; + + if (count($cat_list) == 1) { + $my_cat[] = $cat_info[$cat_list[0]]['name']; + $my_cat_link = get_categories($cat_list[0], $config['category_separator']); + } else { + foreach ($cat_list as $element) { + if ($element) { + $my_cat[] = $cat_info[$element]['name']; + if ($config['allow_alt_url']) { + $my_cat_link[] = "{$cat_info[$element]['name']}"; + } else { + $my_cat_link[] + = "{$cat_info[$element]['name']}"; + } + } + } + $my_cat_link = implode("{$config['category_separator']} ", $my_cat_link); + } + $my_cat = implode("{$config['category_separator']} ", $my_cat); + } + + if ($row['title']) { + $row['title'] = strip_tags($row['title']); + } + + $xf = xfieldsdataload($row['xfields']); + + $xfCo_ = html_entity_decode($xf[$cfg->main->coordsField], ENT_COMPAT); + + $xfCoords = json_decode($xfCo_); + + $lon = ($xfCoords->lon) ? $xfCoords->lon : $cfg->main->mapCenter->longitude; + $lat = ($xfCoords->lat) ? $xfCoords->lat : $cfg->main->mapCenter->latitude; + $zoom = ($xfCoords->zoom) ? $xfCoords->zoom : $cfg->main->mapCenter->zoom; + + } else { + die('empty news id'); + } + + $script_yandex = ''; + $script_popup = ''; + $script_module = ''; + + $tpl->set('{key}', $key); + + $tpl->set('{scripts}', $script_yandex.$script_popup.$script_module); + $tpl->set('{script_yandex}', $script_yandex); + $tpl->set('{script_popup}', $script_popup); + $tpl->set('{script_module}', $script_module); + + $tpl->set('{lon}', $lon); + $tpl->set('{lat}', $lat); + $tpl->set('{zoom}', $zoom); + $tpl->set('{mapHeight}', $mapHeight); + $tpl->set('{controls}', $controls); + $tpl->set('{placemarkStyle}', $placemarkStyle); + $tpl->set('{baloon}', ''); + $tpl->set('{id}', $row['id']); + + + // Определяем список тегов, используемых в шаблоне на основании массива с данными о разрешенных полях + foreach ($existFields as $field) { + + if ($row[$field]) { + $tpl->set('{'.$field.'}', $row[$field]); + $tpl->copy_template = preg_replace("'\\[not_".$field."\\](.*?)\\[/not_".$field."\\]'is", "", + $tpl->copy_template); + $tpl->copy_template = str_replace("[".$field."]", "", $tpl->copy_template); + $tpl->copy_template = str_replace("[/".$field."]", "", $tpl->copy_template); + } else { + $tpl->set('{'.$field.'}', ""); + $tpl->copy_template = preg_replace("'\\[".$field."\\](.*?)\\[/".$field."\\]'is", "", + $tpl->copy_template); + $tpl->copy_template = str_replace("[not_".$field."]", "", $tpl->copy_template); + $tpl->copy_template = str_replace("[/not_".$field."]", "", $tpl->copy_template); + } + } + + // Работаем с допполями + if (strpos($tpl->copy_template, "[xfvalue_") !== false OR strpos($tpl->copy_template, "[xfgiven_") !== false) { + + $xfieldsdata = $xf; + $xfields = xfieldsload(); + if (count($xfields)) { + + $xfieldsdata = xfieldsdataload($row['xfields']); + + foreach ($xfields as $value) { + $preg_safe_name = preg_quote($value[0], "'"); + + if ($value[20]) { + + $value[20] = explode(',', $value[20]); + + if ($value[20][0] AND !in_array($member_id['user_group'], $value[20])) { + $xfieldsdata[$value[0]] = ""; + } + + } + + if ($value[3] == "yesorno") { + + if (intval($xfieldsdata[$value[0]])) { + $xfgiven = true; + $xfieldsdata[$value[0]] = $lang['xfield_xyes']; + } else { + $xfgiven = false; + $xfieldsdata[$value[0]] = $lang['xfield_xno']; + } + + } else { + + if ($xfieldsdata[$value[0]] == "") { + $xfgiven = false; + } else { + $xfgiven = true; + } + + } + + if (!$xfgiven) { + $tpl->copy_template + = preg_replace("'\\[xfgiven_{$preg_safe_name}\\](.*?)\\[/xfgiven_{$preg_safe_name}\\]'is", + "", $tpl->copy_template); + $tpl->copy_template = str_ireplace("[xfnotgiven_{$value[0]}]", "", $tpl->copy_template); + $tpl->copy_template = str_ireplace("[/xfnotgiven_{$value[0]}]", "", $tpl->copy_template); + } else { + $tpl->copy_template + = preg_replace("'\\[xfnotgiven_{$preg_safe_name}\\](.*?)\\[/xfnotgiven_{$preg_safe_name}\\]'is", + "", $tpl->copy_template); + $tpl->copy_template = str_ireplace("[xfgiven_{$value[0]}]", "", $tpl->copy_template); + $tpl->copy_template = str_ireplace("[/xfgiven_{$value[0]}]", "", $tpl->copy_template); + } + + if (strpos($tpl->copy_template, "[ifxfvalue {$value[0]}") !== false) { + $tpl->copy_template = preg_replace_callback("#\\[ifxfvalue(.+?)\\](.+?)\\[/ifxfvalue\\]#is", + "check_xfvalue", $tpl->copy_template); + } + + if ($value[6] AND !empty($xfieldsdata[$value[0]])) { + $temp_array = explode(",", $xfieldsdata[$value[0]]); + $value3 = []; + + foreach ($temp_array as $value2) { + + $value2 = trim($value2); + + if ($value2) { + + $value4 = str_replace(["'", """, "&", "{", "[", ":"], + ["'", '"', "&", "{", "[", ":"], $value2); + + if ($value[3] == "datetime") { + + $value2 = strtotime($value4); + + if (!trim($value[24])) { + $value[24] = $config['timestamp_active']; + } + + if ($value[25]) { + + if ($value[26]) { + $value2 = langdate($value[24], $value2); + } else { + $value2 = langdate($value[24], $value2, false, $customlangdate); + } + + } else { + $value2 = date($value[24], $value2); + } + + } + + if ($config['allow_alt_url']) { + $value3[] = "".$value2.""; + } else { + $value3[] = "".$value2.""; + } + } + + } + + if (empty($value[21])) { + $value[21] = ", "; + } + + $xfieldsdata[$value[0]] = implode($value[21], $value3); + + unset($temp_array); + unset($value2); + unset($value3); + unset($value3); + + } elseif ($value[3] == "datetime" AND !empty($xfieldsdata[$value[0]])) { + + $xfieldsdata[$value[0]] = strtotime(str_replace(":", ":", $xfieldsdata[$value[0]])); + + if (!trim($value[24])) { + $value[24] = $config['timestamp_active']; + } + + if ($value[25]) { + + if ($value[26]) { + $xfieldsdata[$value[0]] = langdate($value[24], $xfieldsdata[$value[0]]); + } else { + $xfieldsdata[$value[0]] = langdate($value[24], $xfieldsdata[$value[0]], false, + $customlangdate); + } + + } else { + $xfieldsdata[$value[0]] = date($value[24], $xfieldsdata[$value[0]]); + } + + + } + + if ($config['allow_links'] AND $value[3] == "textarea" AND function_exists('replace_links')) { + $xfieldsdata[$value[0]] = replace_links($xfieldsdata[$value[0]], $replace_links['news']); + } + + if ($value[3] == "image" AND $xfieldsdata[$value[0]]) { + + $temp_array = explode('|', $xfieldsdata[$value[0]]); + + if (count($temp_array) > 1) { + + $temp_alt = $temp_array[0]; + $temp_value = $temp_array[1]; + + } else { + + $temp_alt = ''; + $temp_value = $temp_array[0]; + + } + + $path_parts = @pathinfo($temp_value); + + if ($value[12] AND file_exists(ROOT_DIR."/uploads/posts/".$path_parts['dirname']."/thumbs/" + .$path_parts['basename']) + ) { + $thumb_url = $config['http_home_url']."uploads/posts/".$path_parts['dirname']."/thumbs/" + .$path_parts['basename']; + $img_url = $config['http_home_url']."uploads/posts/".$path_parts['dirname']."/" + .$path_parts['basename']; + } else { + $img_url = $config['http_home_url']."uploads/posts/".$path_parts['dirname']."/" + .$path_parts['basename']; + $thumb_url = ""; + } + + if ($thumb_url) { + $tpl->set("[xfvalue_thumb_url_{$value[0]}]", $thumb_url); + $xfieldsdata[$value[0]] + = "\"{$temp_alt}\""; + } else { + $tpl->set("[xfvalue_thumb_url_{$value[0]}]", $img_url); + $xfieldsdata[$value[0]] + = "\"{$temp_alt}\""; + } + + $tpl->set("[xfvalue_image_url_{$value[0]}]", $img_url); + + } + + if ($value[3] == "image" AND !$xfieldsdata[$value[0]]) { + + $tpl->set("[xfvalue_thumb_url_{$value[0]}]", ""); + $tpl->set("[xfvalue_image_url_{$value[0]}]", ""); + + } + + if ($value[3] == "imagegalery" AND $xfieldsdata[$value[0]] AND stripos($tpl->copy_template, + "[xfvalue_{$value[0]}") !== false + ) { + + $fieldvalue_arr = explode(',', $xfieldsdata[$value[0]]); + $gallery_image = []; + $gallery_single_image = []; + $xf_image_count = 0; + $single_need = false; + + if (stripos($tpl->copy_template, "[xfvalue_{$value[0]} image=") !== false) { + $single_need = true; + } + + foreach ($fieldvalue_arr as $temp_value) { + $xf_image_count++; + + $temp_value = trim($temp_value); + + if ($temp_value == "") { + continue; + } + + $temp_array = explode('|', $temp_value); + + if (count($temp_array) > 1) { + + $temp_alt = $temp_array[0]; + $temp_value = $temp_array[1]; + + } else { + + $temp_alt = ''; + $temp_value = $temp_array[0]; + + } + + $path_parts = @pathinfo($temp_value); + + if ($value[12] AND file_exists(ROOT_DIR."/uploads/posts/".$path_parts['dirname']."/thumbs/" + .$path_parts['basename']) + ) { + $thumb_url = $config['http_home_url']."uploads/posts/".$path_parts['dirname']."/thumbs/" + .$path_parts['basename']; + $img_url = $config['http_home_url']."uploads/posts/".$path_parts['dirname']."/" + .$path_parts['basename']; + } else { + $img_url = $config['http_home_url']."uploads/posts/".$path_parts['dirname']."/" + .$path_parts['basename']; + $thumb_url = ""; + } + + if ($thumb_url) { + + $gallery_image[] + = "

  • \"{$temp_alt}\"
  • "; + $gallery_single_image['[xfvalue_'.$value[0].' image="'.$xf_image_count.'"]'] + = "\"{$temp_alt}\""; + + } else { + $gallery_image[] = "
  • \"{$temp_alt}\"
  • "; + $gallery_single_image['[xfvalue_'.$value[0].' image="'.$xf_image_count.'"]'] + = "\"{$temp_alt}\""; + } + + } + + if ($single_need AND count($gallery_single_image)) { + foreach ($gallery_single_image as $temp_key => $temp_value) { + $tpl->set($temp_key, $temp_value); + } + } + + $xfieldsdata[$value[0]] = "
      " + .implode($gallery_image)."
    "; + + } + + if ($config['image_lazy'] AND $view_template != "print") { + $xfieldsdata[$value[0]] = preg_replace_callback("##i", "enable_lazyload", + $xfieldsdata[$value[0]]); + } + + $tpl->set("[xfvalue_{$value[0]}]", $xfieldsdata[$value[0]]); + + $all_xf_content[] = $xfieldsdata[$value[0]]; + + if (preg_match("#\\[xfvalue_{$preg_safe_name} limit=['\"](.+?)['\"]\\]#i", $tpl->copy_template, + $matches) + ) { + $count = intval($matches[1]); + + $xfieldsdata[$value[0]] = str_replace("><", "> <", $xfieldsdata[$value[0]]); + $xfieldsdata[$value[0]] = strip_tags($xfieldsdata[$value[0]], "
    "); + $xfieldsdata[$value[0]] = trim(str_replace("
    ", " ", str_replace("
    ", " ", + str_replace("\n", " ", str_replace("\r", "", $xfieldsdata[$value[0]]))))); + $xfieldsdata[$value[0]] = preg_replace('/\s+/u', ' ', $xfieldsdata[$value[0]]); + + if ($count AND dle_strlen($xfieldsdata[$value[0]], $config['charset']) > $count) { + + $xfieldsdata[$value[0]] = dle_substr($xfieldsdata[$value[0]], 0, $count, + $config['charset']); + + if (($temp_dmax = dle_strrpos($xfieldsdata[$value[0]], ' ', $config['charset']))) { + $xfieldsdata[$value[0]] = dle_substr($xfieldsdata[$value[0]], 0, $temp_dmax, + $config['charset']); + } + + } + + $tpl->set($matches[0], $xfieldsdata[$value[0]]); + + } + } + } + } + + if (stripos($tpl->copy_template, "{image-") !== false && in_array('short_story', $arQueryFields)) { + + $images = []; + preg_match_all('/(img|src)=("|\')[^"\'>]+/i', $row['short_story'].$row['xfields'], $media); + $data = preg_replace('/(img|src)("|\'|="|=\')(.*)/i', "$3", $media[0]); + + foreach ($data as $url) { + $info = pathinfo($url); + if (isset($info['extension'])) { + if ($info['filename'] == "spoiler-plus" OR $info['filename'] == "spoiler-minus" + OR strpos($info['dirname'], 'engine/data/emoticons') !== false + ) { + continue; + } + $info['extension'] = strtolower($info['extension']); + if (($info['extension'] == 'jpg') || ($info['extension'] == 'jpeg') || ($info['extension'] == 'gif') + || ($info['extension'] == 'png') + || ($info['extension'] == 'webp') + ) { + array_push($images, $url); + } + } + } + + if (count($images)) { + $i = 0; + foreach ($images as $url) { + $i++; + $tpl->copy_template = str_replace('{image-'.$i.'}', $url, $tpl->copy_template); + $tpl->copy_template = str_replace('[image-'.$i.']', "", $tpl->copy_template); + $tpl->copy_template = str_replace('[/image-'.$i.']', "", $tpl->copy_template); + $tpl->copy_template = preg_replace("#\[not-image-{$i_count}\](.+?)\[/not-image-{$i_count}\]#is", "", + $tpl->copy_template); + } + + } + + $tpl->copy_template = preg_replace("#\[image-(.+?)\](.+?)\[/image-(.+?)\]#is", "", $tpl->copy_template); + $tpl->copy_template = preg_replace("#\\{image-(.+?)\\}#i", "{THEME}/dleimages/no_image.jpg", + $tpl->copy_template); + $tpl->copy_template = preg_replace("#\[not-image-(.+?)\]#i", "", $tpl->copy_template); + $tpl->copy_template = preg_replace("#\[/not-image-(.+?)\]#i", "", $tpl->copy_template); + + } + + if (stripos($tpl->copy_template, "{fullimage-") !== false && in_array('full_story', $arQueryFields)) { + + $images = []; + preg_match_all('/(img|src)=("|\')[^"\'>]+/i', $row['full_story'], $media); + $data = preg_replace('/(img|src)("|\'|="|=\')(.*)/i', "$3", $media[0]); + + foreach ($data as $url) { + $info = pathinfo($url); + if (isset($info['extension'])) { + if ($info['filename'] == "spoiler-plus" OR $info['filename'] == "spoiler-minus" + OR strpos($info['dirname'], 'engine/data/emoticons') !== false + ) { + continue; + } + $info['extension'] = strtolower($info['extension']); + if (($info['extension'] == 'jpg') || ($info['extension'] == 'jpeg') || ($info['extension'] == 'gif') + || ($info['extension'] == 'png') + || ($info['extension'] == 'webp') + ) { + array_push($images, $url); + } + } + } + + if (count($images)) { + $i = 0; + foreach ($images as $url) { + $i++; + $tpl->copy_template = str_replace('{fullimage-'.$i.'}', $url, $tpl->copy_template); + $tpl->copy_template = str_replace('[fullimage-'.$i.']', "", $tpl->copy_template); + $tpl->copy_template = str_replace('[/fullimage-'.$i.']', "", $tpl->copy_template); + } + + } + + $tpl->copy_template = preg_replace("#\[fullimage-(.+?)\](.+?)\[/fullimage-(.+?)\]#is", "", + $tpl->copy_template); + $tpl->copy_template = preg_replace("#\\{fullimage-(.+?)\\}#i", "{THEME}/dleimages/no_image.jpg", + $tpl->copy_template); + + } + + $images = []; + $allcontent = $row['full_story'].$row['short_story'].$row['xfields']; + preg_match_all('/(img|src)=("|\')[^"\'>]+/i', $allcontent, $media); + $data = preg_replace('/(img|src)("|\'|="|=\')(.*)/i', "$3", $media[0]); + + foreach ($data as $url) { + $info = pathinfo($url); + if (isset($info['extension'])) { + if ($info['filename'] == "spoiler-plus" OR $info['filename'] == "spoiler-minus" + OR strpos($info['dirname'], 'engine/data/emoticons') !== false + ) { + continue; + } + $info['extension'] = strtolower($info['extension']); + if (($info['extension'] == 'jpg' || $info['extension'] == 'jpeg' || $info['extension'] == 'gif' + || $info['extension'] == 'png' + || $info['extension'] == 'webp') AND !in_array($url, $images) + ) { + array_push($images, $url); + } + } + } + + if (in_array('title', $arQueryFields)) { + if (preg_match("#\\{title limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) { + $count = intval($matches[1]); + if ($count AND dle_strlen($row['title'], $config['charset']) > $count) { + $row['title'] = dle_substr($row['title'], 0, $count, $config['charset']); + if (($temp_dmax = dle_strrpos($row['title'], ' ', $config['charset']))) { + $row['title'] = dle_substr($row['title'], 0, $temp_dmax, $config['charset']); + } + } + $tpl->set($matches[0], $row['title']); + } + } + + if (in_array('short_story', $arQueryFields)) { + if (preg_match("#\\{short_story limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) { + $count = intval($matches[1]); + $row['short_story'] = str_replace("

    ", " ", $row['short_story']); + $row['short_story'] = strip_tags($row['short_story'], "
    "); + $row['short_story'] = trim(str_replace("
    ", " ", + str_replace("
    ", " ", str_replace("\n", " ", str_replace("\r", "", $row['short_story']))))); + if ($count AND dle_strlen($row['short_story'], $config['charset']) > $count) { + $row['short_story'] = dle_substr($row['short_story'], 0, $count, $config['charset']); + if (($temp_dmax = dle_strrpos($row['short_story'], ' ', $config['charset']))) { + $row['short_story'] = dle_substr($row['short_story'], 0, $temp_dmax, $config['charset']); + } + } + $tpl->set($matches[0], $row['short_story']); + } + } + + if (in_array('full_story', $arQueryFields)) { + if (preg_match("#\\{full_story limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) { + $count = intval($matches[1]); + $row['full_story'] = str_replace("

    ", " ", $row['full_story']); + $row['full_story'] = strip_tags($row['full_story'], "
    "); + $row['full_story'] = trim(str_replace("
    ", " ", + str_replace("
    ", " ", str_replace("\n", " ", str_replace("\r", "", $row['full_story']))))); + if ($count AND dle_strlen($row['full_story'], $config['charset']) > $count) { + $row['full_story'] = dle_substr($row['full_story'], 0, $count, $config['charset']); + if (($temp_dmax = dle_strrpos($row['full_story'], ' ', $config['charset']))) { + $row['full_story'] = dle_substr($row['full_story'], 0, $temp_dmax, $config['charset']); + } + } + $tpl->set($matches[0], $row['full_story']); + + } + } + + $tpl->compile('yMap'); + $yMap = $tpl->result['yMap']; + + create_cache($yMapCfg['cachePrefix'], $yMap, $cacheName.$config['skin'], true); + + $tpl->clear(); + } else { + $yMap = ''.$module_lang['moduleTextMissedTemplateFile'].': '.$config['skin'].'/' + .$yMapCfg['template'].'.tpl'; + } } diff --git a/engine/modules/ymaps/js/ymaps_editnews.js b/engine/modules/ymaps/js/ymaps_editnews.js index 46636da..ce3c9f9 100644 --- a/engine/modules/ymaps/js/ymaps_editnews.js +++ b/engine/modules/ymaps/js/ymaps_editnews.js @@ -43,12 +43,11 @@ doc var loadController = function () { // eslint-disable-next-line camelcase - var dleRoot = window.dle_root || ''; + var dleRoot = window.dle_root || '/'; $.ajax({ url: dleRoot + 'engine/ajax/controller.php', data: { - mod: 'ymaps', - type: 'editnews' + mod: 'ymaps_editnews' } }) .done(function(data) { diff --git a/engine/modules/ymaps/language/Russian.lng b/engine/modules/ymaps/language/Russian.lng index 3e36c79..207d42c 100644 --- a/engine/modules/ymaps/language/Russian.lng +++ b/engine/modules/ymaps/language/Russian.lng @@ -58,6 +58,7 @@ $module_lang = [ 'pointersCatDefault' => 'Иконка по умолчанию: ', 'catIdWrong' => 'Категория не существует', 'moduleActionApply' => 'Применить', + 'moduleActionReset' => 'Сбросить', 'markerCustomColor' => ' (свой цвет)', 'moduleActionChange' => 'Изменить', 'moduleActionAdd' => 'Добавить', From 1d01e4d79881c3da0ab3c87e20b2901985dba5a9 Mon Sep 17 00:00:00 2001 From: pafnuty Date: Sat, 29 Feb 2020 18:46:25 +0400 Subject: [PATCH 08/12] =?UTF-8?q?3.0.0=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/data/ymaps_config.json | 22 +--- templates/{THEME}/ymaps/all/.htaccess | 4 +- templates/{THEME}/ymaps/all/allplacemarks.tpl | 2 + templates/{THEME}/ymaps/all/index.htm | 8 -- templates/{THEME}/ymaps/all_placemarks.tpl | 122 ++++++++++++++++++ templates/{THEME}/ymaps/default.tpl | 80 ++++++------ templates/{THEME}/ymaps/icons/index.htm | 8 -- templates/{THEME}/ymaps/simple.tpl | 2 +- 8 files changed, 169 insertions(+), 79 deletions(-) create mode 100644 templates/{THEME}/ymaps/all/allplacemarks.tpl delete mode 100644 templates/{THEME}/ymaps/all/index.htm create mode 100644 templates/{THEME}/ymaps/all_placemarks.tpl delete mode 100644 templates/{THEME}/ymaps/icons/index.htm diff --git a/engine/data/ymaps_config.json b/engine/data/ymaps_config.json index 2f434e2..de1b82a 100644 --- a/engine/data/ymaps_config.json +++ b/engine/data/ymaps_config.json @@ -1,21 +1 @@ -{ - "main": { - "apiKey": "", - "mapHeight": "450", - "controls": { - "fullscreenControl": "1", - "searchControl": "1", - "typeSelector": "1", - "zoomControl": "1" - }, - "mapCenter": { - "latitude": "25.0213", - "longitude": "54.9849", - "zoom": "13" - }, - "coordsField": "" - }, - "pointSettings": { - - } -} \ No newline at end of file +{"main":{"apiKey":"df7667ca-6e4b-4402-bbf0-339991016702","mapHeight":"450","controls":{"fullscreenControl":"1","searchControl":"1","typeSelector":"1","zoomControl":"1"},"mapCenter":{"latitude":"25.0213","longitude":"54.9849","zoom":"13"},"coordsField":"coords"},"pointSettings":{"catPoints":{"default":{"iconLayout":"default#image","iconImageHref":"http:\/\/yandexmaps.loc\/templates\/Default\/ymaps\/icons\/blue2.png","iconImageSize":["30","48"],"iconImageOffset":["-15","-24"]}}}} \ No newline at end of file diff --git a/templates/{THEME}/ymaps/all/.htaccess b/templates/{THEME}/ymaps/all/.htaccess index d1163bf..7d3aaf1 100644 --- a/templates/{THEME}/ymaps/all/.htaccess +++ b/templates/{THEME}/ymaps/all/.htaccess @@ -1,2 +1,2 @@ -Order Deny,Allow -Allow from all +Order allow,deny +Deny from all \ No newline at end of file diff --git a/templates/{THEME}/ymaps/all/allplacemarks.tpl b/templates/{THEME}/ymaps/all/allplacemarks.tpl new file mode 100644 index 0000000..af4bad3 --- /dev/null +++ b/templates/{THEME}/ymaps/all/allplacemarks.tpl @@ -0,0 +1,2 @@ +startFrom = 0 +limit = 1500 \ No newline at end of file diff --git a/templates/{THEME}/ymaps/all/index.htm b/templates/{THEME}/ymaps/all/index.htm deleted file mode 100644 index 7d13843..0000000 --- a/templates/{THEME}/ymaps/all/index.htm +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Error!!! - -Error!!! - diff --git a/templates/{THEME}/ymaps/all_placemarks.tpl b/templates/{THEME}/ymaps/all_placemarks.tpl new file mode 100644 index 0000000..ce8ded0 --- /dev/null +++ b/templates/{THEME}/ymaps/all_placemarks.tpl @@ -0,0 +1,122 @@ +Этот файл следует подключать +{* При необходимости переместить стили в CSS файл *} + + +{* Если скрипт я.карт уже есть на странице, это подключение не нужно *} + + + +{* В этом блоке будет отображаться карта *} +

    \ No newline at end of file diff --git a/templates/{THEME}/ymaps/default.tpl b/templates/{THEME}/ymaps/default.tpl index e28aa79..fdd8a79 100644 --- a/templates/{THEME}/ymaps/default.tpl +++ b/templates/{THEME}/ymaps/default.tpl @@ -1,51 +1,53 @@ {scripts} Показать карту
    - +
    \ No newline at end of file diff --git a/templates/{THEME}/ymaps/icons/index.htm b/templates/{THEME}/ymaps/icons/index.htm deleted file mode 100644 index 7d13843..0000000 --- a/templates/{THEME}/ymaps/icons/index.htm +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Error!!! - -Error!!! - diff --git a/templates/{THEME}/ymaps/simple.tpl b/templates/{THEME}/ymaps/simple.tpl index c02a7c9..a802ab1 100644 --- a/templates/{THEME}/ymaps/simple.tpl +++ b/templates/{THEME}/ymaps/simple.tpl @@ -21,7 +21,7 @@ }), placemark = new ymaps.Placemark([lat, lon], { balloonContentBody: balloonContentBodyText, - iconContent: iconContentText, // Раскомментировать при необходимости + iconContent: iconContentText, hintContent: hintContentText }, placemarkStyle From 6a56b9f3513d72832fdf3b4d1975d80de442557b Mon Sep 17 00:00:00 2001 From: pafnuty Date: Sat, 29 Feb 2020 18:47:55 +0400 Subject: [PATCH 09/12] =?UTF-8?q?3.0.0=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/{THEME}/ymaps/all_placemarks.tpl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/templates/{THEME}/ymaps/all_placemarks.tpl b/templates/{THEME}/ymaps/all_placemarks.tpl index ce8ded0..9f95996 100644 --- a/templates/{THEME}/ymaps/all_placemarks.tpl +++ b/templates/{THEME}/ymaps/all_placemarks.tpl @@ -1,4 +1,11 @@ -Этот файл следует подключать +{* + Этот файл следует подключать в другие шаблоны вот так: + + include file="ymaps/all_placemarks.tpl" + +*} + + {* При необходимости переместить стили в CSS файл *}