diff --git a/.htaccess b/.htaccess index cdcec50aa..8d7529436 100755 --- a/.htaccess +++ b/.htaccess @@ -1,32 +1,41 @@ -# InstantCMS rewriting rules - # Initialization AddDefaultCharset utf-8 Options -Indexes -RewriteEngine on -# To redirect all users to access the site without the www. prefix -# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] -# RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] +# Set a fallback resource if mod_rewrite is not enabled +# Requires Apache version >= 2.2.16 +# If install in subfolder the path to index.php will need to be adjusted + + FallbackResource /index.php + + +# InstantCMS rewriting rules + + RewriteEngine on + + # To redirect all users to access the site without the www. prefix + # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] + # RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] -# HTTPS redirect if available -# RewriteCond %{HTTPS} !=on -# RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] + # HTTPS redirect if available + # RewriteCond %{HTTPS} !=on + # RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] -# Hide text files -RewriteRule ^.htaccess$ - [F] -RewriteRule ^credits.txt$ - [F] -RewriteRule ^readme.txt$ - [F] -RewriteRule ^license.(.*).txt$ - [F] + # Hide text files + RewriteRule ^.htaccess$ - [F] + RewriteRule ^credits.txt$ - [F] + RewriteRule ^readme.txt$ - [F] + RewriteRule ^license.(.*).txt$ - [F] -# Remove trailing slash from URLs -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.+)/$ /$1 [R=301,L] + # Remove trailing slash from URLs + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.+)/$ /$1 [R=301,L] -# Sitemaps -RewriteRule ^sitemap(.*).xml$ ./cache/static/sitemaps/sitemap$1.xml [L] + # Sitemaps + RewriteRule ^sitemap(.*).xml$ ./cache/static/sitemaps/sitemap$1.xml [L] -# Engine routing -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.*)$ ./index.php [L] + # Engine routing + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ ./index.php [L] + \ No newline at end of file diff --git a/cache/.htaccess b/cache/.htaccess index a0f9881f1..a01652051 100755 --- a/cache/.htaccess +++ b/cache/.htaccess @@ -1,4 +1,18 @@ -order allow,deny - - allow from all - \ No newline at end of file +# apache > 2.2 + + Require all denied + +# apache <= 2.2 + + order allow,deny + + + # apache > 2.2 + + Require all granted + + # apache <= 2.2 + + allow from all + + \ No newline at end of file diff --git a/install/languages/en/sql/base_demo_content.sql b/install/languages/en/sql/base_demo_content_default.sql similarity index 100% rename from install/languages/en/sql/base_demo_content.sql rename to install/languages/en/sql/base_demo_content_default.sql diff --git a/install/languages/en/sql/base_demo_content_modern.sql b/install/languages/en/sql/base_demo_content_modern.sql new file mode 100755 index 000000000..96be63990 --- /dev/null +++ b/install/languages/en/sql/base_demo_content_modern.sql @@ -0,0 +1,814 @@ +INSERT INTO `{#}images_presets` (`id`, `name`, `title`, `width`, `height`, `is_square`, `is_watermark`, `wm_image`, `wm_origin`, `wm_margin`, `is_internal`, `quality`, `gamma_correct`, `crop_position`, `allow_enlarge`, `gif_to_gif`, `convert_format`) VALUES +(7, 'content_list', 'Big ctype list', 600, 360, 1, NULL, NULL, 'top-left', 0, NULL, 87, NULL, 2, NULL, NULL, 'webp'), +(8, 'content_item', 'Ctype item', 730, 460, 1, NULL, NULL, 'top-left', 0, NULL, 87, NULL, 2, NULL, NULL, 'webp'), +(9, 'content_list_small', 'Small ctype list', 350, 200, 1, NULL, NULL, 'top-left', 0, NULL, 87, NULL, 2, NULL, NULL, 'webp'); + +INSERT INTO `{#}uploaded_files` (`id`, `path`, `name`, `size`, `counter`, `type`, `target_controller`, `target_subject`, `target_id`, `user_id`) VALUES +(48, '000/u1/9/8/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp', 59552, 0, 'image', 'content', 'news', 8, 1), +(49, '000/u1/7/6/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp', 42668, 0, 'image', 'content', 'news', 8, 1), +(50, '000/u1/7/e/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp', 15240, 0, 'image', 'content', 'news', 8, 1), +(51, '000/u1/0/b/investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg', 1754, 0, 'image', 'content', 'news', 8, 1), +(52, '000/u1/2/2/rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp', 'rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp', 56866, 0, 'image', 'content', 'news', 9, 1), +(53, '000/u1/1/f/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp', 'rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp', 42242, 0, 'image', 'content', 'news', 9, 1), +(54, '000/u1/0/7/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp', 'rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp', 19090, 0, 'image', 'content', 'news', 9, 1), +(55, '000/u1/6/e/rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg', 'rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg', 2257, 0, 'image', 'content', 'news', 9, 1), +(56, '000/u1/3/1/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp', 29708, 0, 'image', 'content', 'news', 7, 1), +(57, '000/u1/1/2/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp', 22956, 0, 'image', 'content', 'news', 7, 1), +(58, '000/u1/e/8/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp', 10906, 0, 'image', 'content', 'news', 7, 1), +(59, '000/u1/1/0/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg', 1861, 0, 'image', 'content', 'news', 7, 1), +(60, '000/u1/5/b/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp', 87792, 0, 'image', 'content', 'news', 6, 1), +(61, '000/u1/c/9/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp', 65668, 0, 'image', 'content', 'news', 6, 1), +(62, '000/u1/e/f/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp', 24420, 0, 'image', 'content', 'news', 6, 1), +(63, '000/u1/5/5/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg', 2176, 0, 'image', 'content', 'news', 6, 1), +(64, '000/u1/2/6/60826896.webp', '60826896.webp', 77970, 0, 'image', 'content', 'news', 5, 1), +(65, '000/u1/1/b/6e8291e5.webp', '6e8291e5.webp', 55876, 0, 'image', 'content', 'news', 5, 1), +(66, '000/u1/2/3/7e8cf01c.webp', '7e8cf01c.webp', 22006, 0, 'image', 'content', 'news', 5, 1), +(67, '000/u1/3/7/52241df9.jpg', '52241df9.jpg', 2149, 0, 'image', 'content', 'news', 5, 1), +(68, '000/u1/a/5/53e113d9.webp', '53e113d9.webp', 130276, 0, 'image', 'content', 'news', 4, 1), +(69, '000/u1/9/3/6c024907.webp', '6c024907.webp', 90294, 0, 'image', 'content', 'news', 4, 1), +(70, '000/u1/f/7/99914b0f.webp', '99914b0f.webp', 31290, 0, 'image', 'content', 'news', 4, 1), +(71, '000/u1/7/2/b262ab6f.jpg', 'b262ab6f.jpg', 2130, 0, 'image', 'content', 'news', 4, 1), +(72, '000/u1/e/3/923d5458.webp', '923d5458.webp', 91696, 0, 'image', 'content', 'news', 3, 1), +(73, '000/u1/6/7/fc4e5bc4.webp', 'fc4e5bc4.webp', 69646, 0, 'image', 'content', 'news', 3, 1), +(74, '000/u1/2/e/481e9f06.webp', '481e9f06.webp', 24886, 0, 'image', 'content', 'news', 3, 1), +(75, '000/u1/4/2/1a7da83e.jpg', '1a7da83e.jpg', 2292, 0, 'image', 'content', 'news', 3, 1), +(76, '000/u1/a/7/f927491e.webp', 'f927491e.webp', 57732, 0, 'image', 'content', 'news', 2, 1), +(77, '000/u1/5/0/2afcd745.webp', '2afcd745.webp', 44136, 0, 'image', 'content', 'news', 2, 1), +(78, '000/u1/a/0/3ed25154.webp', '3ed25154.webp', 18700, 0, 'image', 'content', 'news', 2, 1), +(79, '000/u1/4/5/c44b04bf.webp', 'c44b04bf.webp', 2036, 0, 'image', 'content', 'news', 2, 1), +(80, '000/u1/5/3/74ca4539.webp', '74ca4539.webp', 52648, 0, 'image', 'content', 'news', 1, 1), +(81, '000/u1/3/5/c29217d1.webp', 'c29217d1.webp', 39000, 0, 'image', 'content', 'news', 1, 1), +(82, '000/u1/4/3/8914eba7.webp', '8914eba7.webp', 17766, 0, 'image', 'content', 'news', 1, 1), +(83, '000/u1/0/a/35b34880.jpg', '35b34880.jpg', 1909, 0, 'image', 'content', 'news', 1, 1), +(84, '000/u1/7/3/robototehnika-logo-small.png', 'robototehnika-logo-small.png', 5259, 0, 'image', 'groups', '1', 0, 1), +(85, '000/u1/e/3/robototehnika-logo-micro.png', 'robototehnika-logo-micro.png', 1873, 0, 'image', 'groups', '1', 0, 1), +(86, '000/u1/0/3/prodam-kvartiru-v-novostroike-photo-normal.jpg', 'prodam-kvartiru-v-novostroike-photo-normal.jpg', 18318, 0, 'image', 'content', 'board', 7, 1), +(87, '000/u1/e/e/prodam-kvartiru-v-novostroike-photo-small.jpg', 'prodam-kvartiru-v-novostroike-photo-small.jpg', 1816, 0, 'image', 'content', 'board', 7, 1), +(88, '000/u1/3/e/prodam-kvartiru-v-novostroike-photo-micro.jpg', 'prodam-kvartiru-v-novostroike-photo-micro.jpg', 909, 0, 'image', 'content', 'board', 7, 1), +(89, '000/u1/9/d/prodam-kvartiru-v-novostroike-photos-big.webp', 'prodam-kvartiru-v-novostroike-photos-big.webp', 31012, 0, 'image', 'content', 'board', 7, 1), +(90, '000/u1/b/c/prodam-kvartiru-v-novostroike-photos-small.webp', 'prodam-kvartiru-v-novostroike-photos-small.webp', 1334, 0, 'image', 'content', 'board', 7, 1), +(91, '000/u1/8/b/prodam-kvartiru-v-novostroike-photos-big.jpg', 'prodam-kvartiru-v-novostroike-photos-big.jpg', 40531, 0, 'image', 'content', 'board', 7, 1), +(92, '000/u1/b/e/prodam-kvartiru-v-novostroike-photos-small.jpg', 'prodam-kvartiru-v-novostroike-photos-small.jpg', 1746, 0, 'image', 'content', 'board', 7, 1), +(93, '000/u1/f/3/prodam-kvartiru-v-novostroike-photos-big.jpg', 'prodam-kvartiru-v-novostroike-photos-big.jpg', 55599, 0, 'image', 'content', 'board', 7, 1), +(94, '000/u1/b/7/prodam-kvartiru-v-novostroike-photos-small.jpg', 'prodam-kvartiru-v-novostroike-photos-small.jpg', 1975, 0, 'image', 'content', 'board', 7, 1); + +INSERT INTO `{#}activity` (`id`, `type_id`, `user_id`, `group_id`, `subject_title`, `subject_id`, `subject_url`, `reply_url`, `images`, `images_count`, `date_pub`, `is_private`, `is_parent_hidden`) VALUES +(3, 13, 1, NULL, 'Elliptical perigee in the XXI century', 1, 'articles/1-elliptical-perigee-in-the-xxi-century.html', NULL, NULL, NULL, '2013-07-24 10:49:30', 0, NULL), +(6, 13, 1, NULL, 'Undersaturated diamond: preconditions and development', 4, 'articles/4-undersaturated-diamond-preconditions-and-development.html', NULL, NULL, NULL, '2013-07-24 11:22:39', 0, NULL), +(10, 12, 1, NULL, 'We are all made of stars © Moby', NULL, NULL, 'users/1?wid=1&reply=1', NULL, NULL, CURRENT_TIMESTAMP, 0, NULL), +(17, 1, 1, NULL, 'About', 1, 'pages/about.html', NULL, NULL, NULL, '2013-08-08 15:07:27', 0, NULL), +(18, 1, 1, NULL, 'Site Rules', 2, 'pages/rules.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 10 DAY), 0, NULL), +(33, 17, 1, NULL, 'Toys are becoming more expensive', 2, 'news/2-igrushki-stanovjatsja-dorozhe.html', NULL, NULL, NULL, '2013-09-09 16:02:07', 0, NULL), +(34, 17, 1, NULL, 'Сar service for vintage cars', 3, 'news/3-v-gorode-otkryt-servis-dlja-retro-avtomobilei.html', NULL, NULL, NULL, '2013-09-09 16:03:25', 0, NULL), +(35, 17, 1, NULL, 'Summer season has officially begun', 4, 'news/4-dachnyi-sezon-otkryt.html', NULL, NULL, NULL, '2013-09-09 16:04:25', 0, NULL), +(36, 17, 1, NULL, 'Business expects to reduce taxes', 5, 'news/5-snizhenie-nalogov-dlja-biznesa.html', NULL, NULL, NULL, '2013-09-09 16:05:26', 0, NULL), +(37, 17, 1, NULL, 'More and more people are buying homes abroad', 6, 'news/6-vse-bolshe-rossijan-pokupayut-nedvizhimost-za-granicei.html', NULL, NULL, NULL, '2013-09-12 12:09:25', 0, NULL), +(38, 17, 1, NULL, 'Reduced the number of crimes', 7, 'news/7-kolichestvo-prestuplenii-v-rossii-sokraschaetsja.html', NULL, NULL, NULL, '2013-09-12 12:10:55', 0, NULL), +(40, 17, 1, NULL, 'We have won the World Championship!', 9, 'news/9-rossijane-stali-pervymi-na-chempionate-mira.html', NULL, NULL, NULL, '2013-09-12 12:14:13', 0, NULL), +(56, 13, 1, NULL, 'Mythological recipient', 10, 'articles/10-mythological-recipient.html', NULL, NULL, NULL, '2013-10-09 14:48:19', 0, NULL), +(57, 13, 1, NULL, 'Public review of international experience', 11, 'articles/11-public-review-of-international-experience.html', NULL, NULL, NULL, '2013-10-09 14:54:36', 0, NULL), +(67, 14, 1, 1, 'My first post in the Community', 5, 'posts/5-moi-pervyi-post-v-soobschestve.html', NULL, NULL, NULL, '2013-11-13 16:43:07', 0, NULL); + +INSERT INTO `{#}activity_types` (`id`, `is_enabled`, `controller`, `name`, `title`, `description`) VALUES +(13, 1, 'content', 'add.articles', 'Adding articles', 'added article %s'), +(14, 1, 'content', 'add.posts', 'Adding posts', 'added post %s'), +(15, 0, 'content', 'add.albums', 'Adding albums', 'added album %s'), +(17, 1, 'content', 'add.news', 'Adding news', 'added news %s'); + +INSERT INTO `{#}comments` (`id`, `parent_id`, `level`, `ordering`, `user_id`, `date_pub`, `target_controller`, `target_subject`, `target_id`, `target_url`, `target_title`, `author_name`, `author_email`, `author_ip`, `content`, `content_html`, `is_deleted`, `is_private`, `rating`) VALUES +(1, 0, 1, 1, 1, CURRENT_TIMESTAMP, 'content', 'articles', 4, 'articles/4-undersaturated-diamond-preconditions-and-development.html', 'Undersaturated diamond: preconditions and development', NULL, NULL, NULL, 'This article is so complicated...', 'This article is so complicated…', NULL, 0, 0), +(2, 1, 2, 2, 1, CURRENT_TIMESTAMP, 'content', 'articles', 4, 'articles/4-undersaturated-diamond-preconditions-and-development.html', 'Undersaturated diamond: preconditions and development', NULL, NULL, NULL, 'I didn''t understand anything', 'I didn''t understand anything', NULL, 0, 0); + +INSERT INTO `{#}content_datasets` (`id`, `ctype_id`, `name`, `title`, `ordering`, `is_visible`, `filters`, `sorting`, `index`, `groups_view`, `groups_hide`) VALUES +(1, 5, 'all', 'Latest', 1, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(2, 5, 'reviews', 'Reviews', 2, 1, '---\n- \n field: kind\n condition: eq\n value: 2\n', '---\n- \n by: date_pub\n to: desc\n', 'dataset_reviews', '---\n- 0\n', NULL), +(3, 5, 'translations', 'Translations', 3, 1, '---\n- \n field: kind\n condition: eq\n value: 3\n', '---\n- \n by: date_pub\n to: desc\n', 'dataset_reviews', '---\n- 0\n', NULL), +(4, 5, 'featured', 'Editor''s choice', 4, 1, '---\n- \n field: featured\n condition: eq\n value: 1\n', '---\n- \n by: date_pub\n to: desc\n', 'dataset_featured', '---\n- 0\n', NULL), +(5, 5, 'rating', 'Top articles', 5, 1, '---\n- \n field: rating\n condition: gt\n value: 0\n', '---\n- \n by: rating\n to: desc\n', 'dataset_rating', '---\n- 0\n', NULL), +(6, 6, 'latest', 'Latest', 1, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(7, 6, 'daily', 'Daily top', 2, 1, '---\n- \n field: date_pub\n condition: dy\n value: 1\n', '---\n- \n by: rating\n to: desc\n', 'dataset_daily', '---\n- 0\n', NULL), +(8, 6, 'weekly', 'Weekly top', 3, 1, '---\n- \n field: date_pub\n condition: dy\n value: 7\n', '---\n- \n by: rating\n to: desc\n', 'dataset_daily', '---\n- 0\n', NULL), +(9, 6, 'monthly', 'Monthly top', 4, 1, '---\n- \n field: date_pub\n condition: dy\n value: 31\n', '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(10, 10, 'latest', 'Latest', 1, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(11, 10, 'discussed', 'Discussed', 2, 1, NULL, '---\n- \n by: comments\n to: desc\n', 'dataset_discussed', '---\n- 0\n', NULL), +(12, 10, 'popular', 'Popular', 3, 1, NULL, '---\n- \n by: rating\n to: desc\n', 'dataset_popular', '---\n- 0\n', NULL); + +INSERT INTO `{#}content_datasets` (`id`, `ctype_id`, `name`, `title`, `description`, `ordering`, `is_visible`, `filters`, `sorting`, `index`, `groups_view`, `groups_hide`, `seo_keys`, `seo_desc`, `seo_title`, `cats_view`, `cats_hide`, `max_count`, `target_controller`) VALUES +(13, NULL, 'rating', 'Top Groups', NULL, 3, 1, NULL, '---\n- \n by: rating\n to: desc\n', 'rating', '---\n- 0\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'groups'), +(14, NULL, 'all', 'New Groups', NULL, 2, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'groups'), +(15, NULL, 'popular', 'Popular', NULL, 1, 1, NULL, '---\n- \n by: members_count\n to: desc\n', 'members_count', '---\n- 0\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'groups'); + +INSERT INTO `{#}content_folders` (`id`, `ctype_id`, `user_id`, `title`) VALUES +(5, 6, 1, 'My thoughts'); + +INSERT INTO `{#}content_types` (`id`, `title`, `name`, `description`, `is_date_range`, `is_cats`, `is_cats_recursive`, `is_folders`, `is_in_groups`, `is_in_groups_only`, `is_comments`, `is_comments_tree`, `is_rating`, `is_rating_pos`, `is_tags`, `is_auto_keys`, `is_auto_desc`, `is_auto_url`, `is_fixed_url`, `url_pattern`, `options`, `labels`, `seo_keys`, `seo_desc`, `seo_title`, `item_append_html`, `is_fixed`) VALUES +(5, 'Articles', 'articles', '

Text materials

', NULL, 1, 1, NULL, NULL, NULL, 1, NULL, 1, NULL, 1, 1, 1, 1, NULL, '{id}-{title}', '---\nis_cats_change: 1\nis_cats_open_root: 1\nis_cats_only_last: null\nis_show_cats: 1\nis_tags_in_list: 1\nis_tags_in_item: 1\nis_rss: 1\nlist_on: 1\nprofile_on: 1\nlist_show_filter: 1\nlist_expand_filter: null\nlist_style:\nitem_on: 1\nhits_on: 1\nis_cats_keys: 1\nis_cats_desc: 1\nis_cats_auto_url: 1\nseo_title_pattern:\nseo_keys_pattern: \'{content|string_get_meta_keywords}\'\nseo_desc_pattern: \'{content|string_get_meta_description}\'\n', '---\none: article\ntwo: articles\nmany: articles\ncreate: article\nlist:\nprofile:\n', 'articles, different, interesting, useful', NULL, NULL, NULL, NULL), +(6, 'Blog posts', 'posts', '

Blog posts

', NULL, NULL, NULL, 1, 1, NULL, 1, NULL, 1, NULL, 1, 1, 1, 1, 1, '{id}-{title}', '---\nis_cats_change: null\nis_cats_open_root: null\nis_cats_only_last: null\nis_show_cats: null\nis_tags_in_list: 1\nis_tags_in_item: 1\nis_rss: 1\nlist_on: 1\nprofile_on: 1\nlist_show_filter: null\nlist_expand_filter: null\nlist_style:\nitem_on: 1\nis_cats_keys: null\nis_cats_desc: null\nis_cats_auto_url: 1\nseo_title_pattern:\nseo_keys_pattern: \'{content|string_get_meta_keywords}\'\nseo_desc_pattern: \'{content|string_get_meta_description}\'\n', '---\none: post\ntwo: posts\nmany: posts\ncreate: post\nlist: Blogs Posts\nprofile: Blog\n', NULL, NULL, NULL, NULL, NULL), +(10, 'News', 'news', '

Information

', NULL, 1, 1, NULL, NULL, NULL, 1, NULL, 1, NULL, 1, 1, 1, 1, 1, '{id}-{title}', '---\nis_date_range_process: hide\nnotify_end_date_days: 1\nnotify_end_date_notice: \'After %s your %s content will be discontinued.\'\ndisable_drafts: null\nis_empty_root: null\nis_cats_multi: null\nis_cats_change: 1\nis_cats_open_root: null\nis_cats_only_last: null\nis_show_cats: null\ncover_sizes: null\ncontext_list_cover_sizes: null\nrating_template: widget\nrating_item_label:\nrating_list_label:\nrating_is_in_item: 1\nrating_is_in_list: null\nrating_is_average: 1\ncomments_template: comment\ncomments_title_pattern:\ncomments_labels:\n comments:\n spellcount:\n add:\n none:\n low_karma:\n login:\n track:\n refresh:\n commenting:\nis_tags_in_list: null\nis_tags_in_item: 1\nenable_subscriptions: 1\nsubscriptions_recursive_categories: 1\nsubscriptions_letter_tpl:\nsubscriptions_notify_text:\nis_rss: 1\nlist_off_breadcrumb: null\nlist_off_breadcrumb_ctype: null\nlist_on: 1\nlist_off_index: null\nprofile_on: 1\nlist_show_filter: null\nlist_expand_filter: null\nprivacy_type: hide\nlimit: 15\nlist_style:\n - featured\nlist_style_options: null\nlist_style_names: null\ncontext_list_style: null\nitem_off_breadcrumb: null\nitem_on: 1\nis_show_fields_group: null\nhits_on: null\ndisable_info_block: null\nshare_code:\nis_manual_title: null\nseo_title_pattern:\nseo_keys_pattern: \'{content|string_get_meta_keywords}\'\nseo_desc_pattern: \'{content|string_get_meta_description}\'\nis_cats_title: null\nis_cats_h1: null\nis_cats_keys: null\nis_cats_desc: null\nis_cats_auto_url: 1\nseo_cat_h1_pattern:\nseo_cat_title_pattern:\nseo_cat_keys_pattern:\nseo_cat_desc_pattern:\nseo_ctype_h1_pattern:\nis_collapsed: null\n', '---\none: news\ntwo: news\nmany: news\ncreate: news\nlist:\nprofile:\n', NULL, NULL, NULL, NULL, NULL); + +INSERT INTO `{#}con_albums` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `cover_image`, `photos_count`, `is_public`) VALUES +(16, 'The beauty of the surrounding nature', 'Photos from the deviantart.com', '16-the-beauty-of-the-surrounding-nature', 'photos, deviantart.com', 'Photos from the deviantart.com', NULL, 'example, photo', '2013-11-13 16:48:18', '2013-11-22 16:32:38', NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 0, 0, 1, NULL, '2013-11-22 16:32:38', 0, '---\nbig: u1/004/4f11cd73.jpg\nnormal: u1/004/5b0ff517.jpg\nsmall: u1/004/5edb4681.jpg', 4, NULL), +(14, 'Other photos', 'Photos taken of me at leisure', '14-other-photos', 'photos', 'leisure', NULL, '0', '2013-10-09 16:46:43', '2013-10-09 16:46:43', NULL, 1, 0, 6, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 0, 0, 0, NULL, NULL, 0, NULL, 0, NULL); + +INSERT INTO `{#}con_albums_cats_bind` (`item_id`, `category_id`) VALUES +(16, 1), +(14, 1); + +DROP TABLE IF EXISTS `{#}con_articles`; +CREATE TABLE `{#}con_articles` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `content` text, + `slug` varchar(100) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `tags` varchar(1000) DEFAULT NULL, + `template` varchar(150) DEFAULT NULL, + `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_last_modified` timestamp NULL DEFAULT NULL, + `date_pub_end` timestamp NULL DEFAULT NULL, + `is_pub` tinyint(1) DEFAULT '1', + `hits_count` int(11) DEFAULT '0', + `user_id` int(11) unsigned DEFAULT NULL, + `parent_id` int(11) unsigned DEFAULT NULL, + `parent_type` varchar(32) DEFAULT NULL, + `parent_title` varchar(100) DEFAULT NULL, + `parent_url` varchar(255) DEFAULT NULL, + `is_parent_hidden` tinyint(1) DEFAULT NULL, + `category_id` int(11) unsigned NOT NULL DEFAULT '1', + `folder_id` int(11) unsigned DEFAULT NULL, + `is_comments_on` tinyint(1) unsigned DEFAULT '1', + `comments` int(11) NOT NULL DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `is_deleted` tinyint(1) unsigned DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT '1', + `approved_by` int(11) DEFAULT NULL, + `date_approved` timestamp NULL DEFAULT NULL, + `is_private` tinyint(1) NOT NULL DEFAULT '0', + `teaser` text, + `kind` int(11) DEFAULT NULL, + `notice` text, + `source` text, + `featured` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `category_id` (`category_id`), + KEY `approved_by` (`approved_by`), + KEY `folder_id` (`folder_id`), + KEY `slug` (`slug`), + KEY `date_pub` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `parent_id` (`parent_id`,`parent_type`,`date_pub`), + KEY `user_id` (`user_id`,`date_pub`), + KEY `date_pub_end` (`date_pub_end`), + KEY `dataset_reviews` (`kind`,`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `dataset_featured` (`featured`,`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `dataset_rating` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`rating`), + FULLTEXT KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `teaser`, `kind`, `notice`, `source`, `featured`) VALUES +(1, 'Elliptical perigee in the XXI century', '

\r\n Yet remarkably appearance get him his projection. Diverted endeavor bed peculiar men the not desirous. Acuteness abilities ask can offending furnished fulfilled sex. Warrant fifteen exposed ye at mistake. Blush since so in noisy still built up an again. As young ye hopes no he place means. Partiality diminution gay yet entreaties admiration. In mr it he mention perhaps attempt pointed suppose. Unknown ye chamber of warrant of norland arrived.\r\n

\r\n

\r\n Rank tall boy man them over post now. Off into she bed long fat room. Recommend existence curiosity perfectly favourite get eat she why daughters. Not may too nay busy last song must sell. An newspaper assurance discourse ye certainly. Soon gone game and why many calm have.\r\n

', '1-elliptical-perigee-in-the-xxi-century', 'warrant, remarkably, since, blush, mistake, exposed, noisy, still, hopes, young', 'Yet remarkably appearance get him his projection. Diverted endeavor bed peculiar men the not desirous. Acuteness abilities ask can offending furnished fulfilled sex. Warrant fifteen exposed ye at mistake', NULL, 'example, article, science', '2013-07-24 10:49:30', '2013-11-22 16:23:29', NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 2, NULL, 1, 0, 0, 1, NULL, '2013-07-24 10:53:11', 0, '

\r\n

\r\n Yet remarkably appearance get him his projection. Diverted endeavor bed peculiar men the not desirous.\r\n

\r\n

', 1, NULL, 'http://referats.yandex.ru/astronomy.xml', NULL), +(4, 'Undersaturated diamond: preconditions and development', '

\r\n Her old collecting she considered discovered. So at parties he warrant oh staying. Square new horses and put better end. Sincerity collected happiness do is contented. Sigh ever way now many. Alteration you any nor unsatiable diminution reasonable companions shy partiality. Leaf by left deal mile oh if easy. Added woman first get led joy not early jokes.\r\n

\r\n

\r\n Speedily say has suitable disposal add boy. On forth doubt miles of child. Exercise joy man children rejoiced. Yet uncommonly his ten who diminution astonished. Demesne new manners savings staying had. Under folly balls death own point now men. Match way these she avoid see death. She whose drift their fat off.\r\n

', '4-undersaturated-diamond-preconditions-and-development', 'diminution, staying, death, unsatiable, reasonable, alteration, companions, contented, early, first', 'Her old collecting she considered discovered. So at parties he warrant oh staying. Square new horses and put better end. Sincerity collected happiness do is contented. Sigh ever way now many', NULL, 'article, science', '2013-07-24 11:22:39', '2013-11-22 16:22:45', NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 5, NULL, 1, 2, 0, 1, NULL, '2013-10-04 14:55:37', 0, '

\r\n

\r\n Her old collecting she considered discovered. So at parties he warrant oh staying.\r\n

\r\n

', 3, NULL, 'http://referats.yandex.ru/geology.xml', NULL), +(11, 'Public review of international experience', '

\r\n Her extensive perceived may any sincerity extremity. Indeed add rather may pretty see. Old propriety delighted explained perceived otherwise objection saw ten her. Doubt merit sir the right these alone keeps. By sometimes intention smallness he northward. Consisted we otherwise arranging commanded discovery it explained. Does cold even song like two yet been. Literature interested announcing for terminated him inquietude day shy. Himself he fertile chicken perhaps waiting if highest no it. Continued promotion has consulted fat improving not way.\r\n

\r\n

\r\n Arrived compass prepare an on as. Reasonable particular on my it in sympathize. Size now easy eat hand how. Unwilling he departure elsewhere dejection at. Heart large seems may purse means few blind. Exquisite newspaper attending on certainty oh suspicion of. He less do quit evil is. Add matter family active mutual put wishes happen.\r\n

', '11-public-review-of-international-experience', 'otherwise, explained, perceived, arranging, commanded, consisted, northward, intention, smallness, fertile', 'Her extensive perceived may any sincerity extremity. Indeed add rather may pretty see. Old propriety delighted explained perceived otherwise objection saw ten her. Doubt merit sir the right these alone keeps', NULL, '0', '2013-10-09 14:54:36', '2013-11-22 16:21:33', NULL, 1, 6, 1, NULL, NULL, NULL, NULL, NULL, 9, NULL, 1, 2, 0, 1, NULL, '2013-10-09 15:02:33', 0, '

\r\n Her extensive perceived may any sincerity extremity. Indeed add rather may pretty see. Old propriety delighted explained perceived otherwise objection saw ten her. Doubt merit sir the right these alone keeps.\r\n

', 2, NULL, NULL, NULL), +(10, 'Mythological recipient', '

\r\n

\r\n Both rest of know draw fond post as. It agreement defective to excellent. Feebly do engage of narrow. Extensive repulsive belonging depending if promotion be zealously as. Preference inquietude ask now are dispatched led appearance. Small meant in so doubt hopes. Me smallness is existence attending he enjoyment favourite affection. Delivered is to ye belonging enjoyment preferred. Astonished and acceptance men two discretion. Law education recommend did objection how old.\r\n

\r\n

\r\n Greatly hearted has who believe. Drift allow green son walls years for blush. Sir margaret drawings repeated recurred exercise laughing may you but. Do repeated whatever to welcomed absolute no. Fat surprise although outlived and informed shy dissuade property. Musical by me through he drawing savings an. No we stand avoid decay heard mr. Common so wicket appear to sudden worthy on. Shade of offer ye whole stood hoped.\r\n

\r\n

', '10-mythological-recipient', 'enjoyment, repeated, belonging, preferred, delivered, affection, favourite, smallness, existence, attending', 'Both rest of know draw fond post as. It agreement defective to excellent. Feebly do engage of narrow. Extensive repulsive belonging depending if promotion be zealously as. Preference inquietude ask now are dispatched led appearance', NULL, '0', '2013-10-09 14:48:19', '2013-11-22 16:22:04', NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 6, NULL, 1, 0, 0, 1, NULL, '2013-10-09 15:03:01', 0, '

\r\n

\r\n Both rest of know draw fond post as. It agreement defective to excellent. Feebly do engage of narrow.\r\n

\r\n

', 1, NULL, NULL, NULL); + +DROP TABLE IF EXISTS `{#}con_articles_cats`; +CREATE TABLE `{#}con_articles_cats` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(11) unsigned DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `description` text NULL DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `slug_key` varchar(255) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `seo_h1` varchar(256) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `ns_left` int(11) DEFAULT NULL, + `ns_right` int(11) DEFAULT NULL, + `ns_level` int(11) DEFAULT NULL, + `ns_differ` varchar(32) NOT NULL DEFAULT '', + `ns_ignore` tinyint(4) NOT NULL DEFAULT '0', + `allow_add` text, + `is_hidden` tinyint(1) UNSIGNED DEFAULT NULL, + `cover` text, + PRIMARY KEY (`id`), + KEY `ordering` (`ordering`), + KEY `slug` (`slug`), + KEY `ns_left` (`ns_level`,`ns_right`,`ns_left`), + KEY `parent_id` (`parent_id`,`ns_left`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles_cats` (`id`, `parent_id`, `title`, `slug`, `slug_key`, `seo_keys`, `seo_desc`, `seo_title`, `ordering`, `ns_left`, `ns_right`, `ns_level`, `ns_differ`, `ns_ignore`) VALUES +(1, 0, '---', NULL, NULL, NULL, NULL, NULL, 1, 1, 18, 0, '', 0), +(2, 1, 'Astronomy', 'astronomy', NULL, 'stars, space, sky, science', NULL, NULL, 1, 2, 7, 1, '', 0), +(3, 2, 'Science and space', 'astronomy/science-and-space', NULL, NULL, NULL, NULL, 1, 5, 6, 2, '', 0), +(4, 2, 'Astrophysics', 'astronomy/astrophysics', NULL, NULL, NULL, NULL, 2, 3, 4, 2, '', 0), +(5, 1, 'Geology', 'geology', NULL, NULL, NULL, NULL, 2, 8, 9, 1, '', 0), +(6, 1, 'Literature', 'literature', NULL, NULL, NULL, NULL, 3, 10, 15, 1, '', 0), +(7, 6, 'National', 'literature/national', NULL, NULL, NULL, NULL, 1, 11, 12, 2, '', 0), +(8, 6, 'Foreign', 'literature/foreign', NULL, NULL, NULL, NULL, 2, 13, 14, 2, '', 0), +(9, 1, 'Marketing', 'marketing', NULL, NULL, NULL, NULL, 4, 16, 17, 1, '', 0); + +DROP TABLE IF EXISTS `{#}con_articles_cats_bind`; +CREATE TABLE `{#}con_articles_cats_bind` ( + `item_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + KEY `item_id` (`item_id`), + KEY `category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles_cats_bind` (`item_id`, `category_id`) VALUES +(1, 2), +(4, 5), +(11, 9), +(10, 6); + +DROP TABLE IF EXISTS `{#}con_articles_fields`; +CREATE TABLE `{#}con_articles_fields` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `name` varchar(40) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `hint` varchar(200) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `is_enabled` tinyint(1) UNSIGNED DEFAULT '1', + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_list` tinyint(1) DEFAULT NULL, + `is_in_item` tinyint(1) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `is_private` tinyint(1) DEFAULT NULL, + `is_fixed` tinyint(1) DEFAULT NULL, + `is_fixed_type` tinyint(1) DEFAULT NULL, + `is_system` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + `groups_read` text, + `groups_add` text, + `groups_edit` text, + `filter_view` text, + PRIMARY KEY (`id`), + KEY `is_enabled` (`is_enabled`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles_fields` (`id`, `ctype_id`, `name`, `title`, `hint`, `ordering`, `fieldset`, `type`, `is_in_list`, `is_in_item`, `is_in_filter`, `is_private`, `is_fixed`, `is_fixed_type`, `is_system`, `values`, `options`, `groups_read`, `groups_edit`) VALUES +(1, 5, 'title', 'Title', NULL, 1, NULL, 'caption', 1, 1, 1, NULL, 1, 1, 0, NULL, '---\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(2, 5, 'date_pub', 'Publication date', NULL, 2, NULL, 'date', 1, 1, NULL, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(3, 5, 'user', 'Author', NULL, 3, NULL, 'user', 1, 1, NULL, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(4, 5, 'content', 'Article content', 'Place full article text here', 7, 'Article content', 'html', NULL, 1, NULL, NULL, 1, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len:\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(5, 5, 'teaser', 'Article teaser', 'Short article description, will be displayed in the list of articles', 6, 'Article content', 'html', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len:\nlabel_in_list: none\nlabel_in_item: none\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(6, 5, 'kind', 'Article type', NULL, 4, 'About article', 'list', NULL, 1, 1, NULL, NULL, NULL, NULL, '1 | Basic article\r\n2 | Review\r\n3 | Translation', '---\nfilter_multiple: 1\nlabel_in_list: left\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(7, 5, 'notice', 'Editor''s comment', 'The field is available only for administrators and moderators', 9, 'Ancillary Data', 'text', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nmin_length: 0\nmax_length: 2048\nis_html_filter: null\nlabel_in_list: top\nlabel_in_item: top\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 5\n- 6\n'), +(8, 5, 'source', 'Source', 'Source text link', 5, 'About article', 'url', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nredirect: 1\nauto_http: 1\nlabel_in_list: left\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(9, 5, 'featured', 'Editor''s choice', 'The field is available only to administrators and moderators', 8, 'Ancillary Data', 'checkbox', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '---\nlabel_in_list: left\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 5\n- 6\n'); + +DROP TABLE IF EXISTS `{#}con_articles_props`; +CREATE TABLE `{#}con_articles_props` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + PRIMARY KEY (`id`), + KEY `is_active` (`is_in_filter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_articles_props_bind`; +CREATE TABLE `{#}con_articles_props_bind` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `prop_id` int(11) DEFAULT NULL, + `cat_id` int(11) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `prop_id` (`prop_id`), + KEY `ordering` (`cat_id`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_articles_props_values`; +CREATE TABLE `{#}con_articles_props_values` ( + `prop_id` int(11) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + KEY `prop_id` (`prop_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_news`; +CREATE TABLE `{#}con_news` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `content` text, + `slug` varchar(100) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `tags` varchar(1000) DEFAULT NULL, + `template` varchar(150) DEFAULT NULL, + `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_last_modified` timestamp NULL DEFAULT NULL, + `date_pub_end` timestamp NULL DEFAULT NULL, + `is_pub` tinyint(1) DEFAULT '1', + `hits_count` int(11) DEFAULT '0', + `user_id` int(11) unsigned DEFAULT NULL, + `parent_id` int(11) unsigned DEFAULT NULL, + `parent_type` varchar(32) DEFAULT NULL, + `parent_title` varchar(100) DEFAULT NULL, + `parent_url` varchar(255) DEFAULT NULL, + `is_parent_hidden` tinyint(1) DEFAULT NULL, + `category_id` int(11) unsigned NOT NULL DEFAULT '1', + `folder_id` int(11) unsigned DEFAULT NULL, + `is_comments_on` tinyint(1) unsigned DEFAULT '1', + `comments` int(11) NOT NULL DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `is_deleted` tinyint(1) unsigned DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT '1', + `approved_by` int(11) DEFAULT NULL, + `date_approved` timestamp NULL DEFAULT NULL, + `is_private` tinyint(1) NOT NULL DEFAULT '0', + `teaser` varchar(255) DEFAULT NULL, + `photo` text, + PRIMARY KEY (`id`), + KEY `category_id` (`category_id`), + KEY `approved_by` (`approved_by`), + KEY `folder_id` (`folder_id`), + KEY `slug` (`slug`), + KEY `date_pub` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `parent_id` (`parent_id`,`parent_type`,`date_pub`), + KEY `user_id` (`user_id`,`date_pub`), + KEY `date_pub_end` (`date_pub_end`), + KEY `dataset_discussed` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`comments`), + KEY `dataset_popular` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`rating`), + FULLTEXT KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `teaser`, `photo`) VALUES +(1, 'Water pipes burst in the street', '

\r\n If the base moves with constant acceleration, the projection on the moving axes is difficult to describe. The flywheel is small. The error transforms the roll angle by mechanically interpreting the resulting expressions. As already pointed out, the casing is certainly not included by its components, which is obvious, in the forces of normal linkage reactions, as well as the friction force moment, which is due to the small angles of the gimbal suspension. Absolute solid body flips the gyrohorizon, moving on to the study of the stability of linear gyroscopic systems with artificial forces. The tangent defines an astatic object, as seen from the equation of kinetic energy of the rotor.\r\n

\r\n

\r\n The mechanical nature, by virtue of Newton s third law, is dangerous. The vector form, as can be shown by means of not quite trivial calculations, forces a different view of what a gyrocompass is, which cannot be considered without changing the coordinate system. The object takes into account the roll angle, which is due to the existence of a cyclic integral at the second equation of the system of equations of small oscillations. The rocking stabilizer, according to the modified Euler equation, participates in the heading error less than the float period, based on previous calculations.\r\n

', '1-na-ulice-prorvalo-truby', NULL, NULL, NULL, 'новости, проишествия', DATE_SUB(NOW(),INTERVAL 9 DAY), DATE_SUB(NOW(),INTERVAL 9 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 5, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 9 DAY), 0, 'Радостные дети бегают по лужам', '---\ncontent_item: 000/u1/5/3/74ca4539.webp\ncontent_list: 000/u1/3/5/c29217d1.webp\ncontent_list_small: 000/u1/4/3/8914eba7.webp\nsmall: 000/u1/0/a/35b34880.jpg\n'), +(2, 'Toys are becoming more expensive', '

\r\n

\r\n Her old collecting she considered discovered. So at parties he warrant oh staying. Square new horses and put better end. Sincerity collected happiness do is contented. Sigh ever way now many. Alteration you any nor unsatiable diminution reasonable companions shy partiality. Leaf by left deal mile oh if easy. Added woman first get led joy not early jokes.\r\n

\r\n

\r\n Speedily say has suitable disposal add boy. On forth doubt miles of child. Exercise joy man children rejoiced. Yet uncommonly his ten who diminution astonished. Demesne new manners savings staying had. Under folly balls death own point now men. Match way these she avoid see death. She whose drift their fat off.\r\n

\r\n

', '2-igrushki-stanovjatsja-dorozhe', 'diminution, staying, death, unsatiable, reasonable, alteration, companions, contented, early, first', 'Her old collecting she considered discovered. So at parties he warrant oh staying. Square new horses and put better end. Sincerity collected happiness do is contented. Sigh ever way now many', NULL, 'news', DATE_SUB(NOW(),INTERVAL 7 DAY), DATE_SUB(NOW(),INTERVAL 7 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 6, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 7 DAY), 0, 'Experts predict a further rise in children''s products', '---\ncontent_item: 000/u1/a/7/f927491e.webp\ncontent_list: 000/u1/5/0/2afcd745.webp\ncontent_list_small: 000/u1/a/0/3ed25154.webp\nsmall: 000/u1/4/5/c44b04bf.webp\n'), +(3, 'Сar service for vintage cars', '

\r\n

\r\n Arrived compass prepare an on as. Reasonable particular on my it in sympathize. Size now easy eat hand how. Unwilling he departure elsewhere dejection at. Heart large seems may purse means few blind. Exquisite newspaper attending on certainty oh suspicion of. He less do quit evil is. Add matter family active mutual put wishes happen.\r\n

\r\n

\r\n Both rest of know draw fond post as. It agreement defective to excellent. Feebly do engage of narrow. Extensive repulsive belonging depending if promotion be zealously as. Preference inquietude ask now are dispatched led appearance. Small meant in so doubt hopes. Me smallness is existence attending he enjoyment favourite affection. Delivered is to ye belonging enjoyment preferred. Astonished and acceptance men two discretion. Law education recommend did objection how old.\r\n

\r\n

', '3-v-gorode-otkryt-servis-dlja-retro-avtomobilei', 'belonging, enjoyment, attending, suspicion, certainty, matter, newspaper, family, exquisite, agreement', 'Arrived compass prepare an on as. Reasonable particular on my it in sympathize. Size now easy eat hand how. Unwilling he departure elsewhere dejection at. Heart large seems may purse means few blind', NULL, 'news, example', DATE_SUB(NOW(),INTERVAL 6 DAY), DATE_SUB(NOW(),INTERVAL 6 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 3, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 6 DAY), 0, 'Each person can request a repair', '---\ncontent_item: 000/u1/e/3/923d5458.webp\ncontent_list: 000/u1/6/7/fc4e5bc4.webp\ncontent_list_small: 000/u1/2/e/481e9f06.webp\nsmall: 000/u1/4/2/1a7da83e.jpg\n'), +(4, 'Summer season has officially begun', '

\r\n

\r\n Both rest of know draw fond post as. It agreement defective to excellent. Feebly do engage of narrow. Extensive repulsive belonging depending if promotion be zealously as. Preference inquietude ask now are dispatched led appearance. Small meant in so doubt hopes. Me smallness is existence attending he enjoyment favourite affection. Delivered is to ye belonging enjoyment preferred. Astonished and acceptance men two discretion. Law education recommend did objection how old.\r\n

\r\n

\r\n Greatly hearted has who believe. Drift allow green son walls years for blush. Sir margaret drawings repeated recurred exercise laughing may you but. Do repeated whatever to welcomed absolute no. Fat surprise although outlived and informed shy dissuade property. Musical by me through he drawing savings an. No we stand avoid decay heard mr. Common so wicket appear to sudden worthy on. Shade of offer ye whole stood hoped.\r\n

\r\n

', '4-dachnyi-sezon-otkryt', 'enjoyment, repeated, belonging, preferred, delivered, affection, favourite, smallness, existence, attending', 'Both rest of know draw fond post as. It agreement defective to excellent. Feebly do engage of narrow. Extensive repulsive belonging depending if promotion be zealously as. Preference inquietude ask now are dispatched led appearance', NULL, 'example', DATE_SUB(NOW(),INTERVAL 5 DAY), DATE_SUB(NOW(),INTERVAL 5 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 2, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 5 DAY), 0, 'Citizens are moving en masse to the country', '---\ncontent_item: 000/u1/a/5/53e113d9.webp\ncontent_list: 000/u1/9/3/6c024907.webp\ncontent_list_small: 000/u1/f/7/99914b0f.webp\nsmall: 000/u1/7/2/b262ab6f.jpg\n'), +(5, 'Business expects to reduce taxes', '

\r\n Her extensive perceived may any sincerity extremity. Indeed add rather may pretty see. Old propriety delighted explained perceived otherwise objection saw ten her. Doubt merit sir the right these alone keeps. By sometimes intention smallness he northward. Consisted we otherwise arranging commanded discovery it explained. Does cold even song like two yet been. Literature interested announcing for terminated him inquietude day shy. Himself he fertile chicken perhaps waiting if highest no it. Continued promotion has consulted fat improving not way.\r\n

\r\n

\r\n Arrived compass prepare an on as. Reasonable particular on my it in sympathize. Size now easy eat hand how. Unwilling he departure elsewhere dejection at. Heart large seems may purse means few blind. Exquisite newspaper attending on certainty oh suspicion of. He less do quit evil is. Add matter family active mutual put wishes happen.\r\n

', '5-snizhenie-nalogov-dlja-biznesa', 'otherwise, explained, perceived, arranging, commanded, consisted, northward, intention, smallness, fertile', 'Her extensive perceived may any sincerity extremity. Indeed add rather may pretty see. Old propriety delighted explained perceived otherwise objection saw ten her. Doubt merit sir the right these alone keeps', NULL, '0', DATE_SUB(NOW(),INTERVAL 4 DAY), DATE_SUB(NOW(),INTERVAL 4 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 3, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 4 DAY), 0, 'Legal persons will pay even less', '---\ncontent_item: 000/u1/2/6/60826896.webp\ncontent_list: 000/u1/1/b/6e8291e5.webp\ncontent_list_small: 000/u1/2/3/7e8cf01c.webp\nsmall: 000/u1/3/7/52241df9.jpg\n'), +(6, 'More and more people are buying homes abroad', '

\r\n Turned it up should no valley cousin he. Speaking numerous ask did horrible packages set. Ashamed herself has distant can studied mrs. Led therefore its middleton perpetual fulfilled provision frankness. Small he drawn after among every three no. All having but you edward genius though remark one.\r\n

\r\n

\r\n Departure so attention pronounce satisfied daughters am. But shy tedious pressed studied opinion entered windows off. Advantage dependent suspicion convinced provision him yet. Timed balls match at by rooms we. Fat not boy neat left had with past here call. Court nay merit few nor party learn. Why our year her eyes know even how. Mr immediate remaining conveying allowance do or.\r\n

', '6-vse-bolshe-rossijan-pokupayut-nedvizhimost-za-granicei', 'studied, provision, drawn, small, fulfilled, frankness, after, among, genius, edward', 'Turned it up should no valley cousin he. Speaking numerous ask did horrible packages set. Ashamed herself has distant can studied mrs. Led therefore its middleton perpetual fulfilled provision frankness. Small he drawn after among every three no', NULL, 'example, news', DATE_SUB(NOW(),INTERVAL 3 DAY), DATE_SUB(NOW(),INTERVAL 3 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 2, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 3 DAY), 0, 'Over the last year their number has increased markedly', '---\ncontent_item: >\n 000/u1/5/b/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp\ncontent_list: >\n 000/u1/c/9/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp\ncontent_list_small: >\n 000/u1/e/f/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp\nsmall: >\n 000/u1/5/5/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg\n'), +(7, 'Reduced the number of crimes', '

\r\n By so delight of showing neither believe he present. Deal sigh up in shew away when. Pursuit express no or prepare replied. Wholly formed old latter future but way she. Day her likewise smallest expenses judgment building man carriage gay. Considered introduced themselves mr to discretion at. Means among saw hopes for. Death mirth in oh learn he equal on.\r\n

\r\n

\r\n When be draw drew ye. Defective in do recommend suffering. House it seven in spoil tiled court. Sister others marked fat missed did out use. Alteration possession dispatched collecting instrument travelling he or on. Snug give made at spot or late that mr.\r\n

\r\n

\r\n View fine me gone this name an rank. Compact greater and demands mrs the parlors. Park be fine easy am size away. Him and fine bred knew. At of hardly sister favour. As society explain country raising weather of. Sentiments nor everything off out uncommonly partiality bed.\r\n

', '7-kolichestvo-prestuplenii-v-rossii-sokraschaetsja', 'sister, means, delight, discretion, themselves, carriage, considered, introduced, among, hopes', 'By so delight of showing neither believe he present. Deal sigh up in shew away when. Pursuit express no or prepare replied. Wholly formed old latter future but way she. Day her likewise smallest expenses judgment building man carriage gay', NULL, '0', DATE_SUB(NOW(),INTERVAL 2 DAY), DATE_SUB(NOW(),INTERVAL 2 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 5, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 2 DAY), 0, 'In recent reports from the police seen a positive trend', '---\ncontent_item: >\n 000/u1/3/1/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp\ncontent_list: >\n 000/u1/1/2/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp\ncontent_list_small: >\n 000/u1/e/8/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp\nsmall: >\n 000/u1/1/0/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg\n'), +(8, 'Investing for Dummies: where to invest?', '

\r\n Sudden looked elinor off gay estate nor silent. Son read such next see the rest two. Was use extent old entire sussex. Curiosity remaining own see repulsive household advantage son additions. Supposing exquisite daughters eagerness why repulsive for. Praise turned it lovers be warmly by. Little do it eldest former be if.\r\n

\r\n

\r\n Insipidity the sufficient discretion imprudence resolution sir him decisively. Proceed how any engaged visitor. Explained propriety off out perpetual his you. Feel sold off felt nay rose met you. We so entreaties cultivated astonished is. Was sister for few longer mrs sudden talent become. Done may bore quit evil old mile. If likely am of beauty tastes.\r\n

', '8-investicii-dlja-chainikov-kuda-vkladyvat', 'repulsive, daughters, exquisite, additions, supposing, eagerness, praise, little, warmly, lovers', 'Sudden looked elinor off gay estate nor silent. Son read such next see the rest two. Was use extent old entire sussex. Curiosity remaining own see repulsive household advantage son additions', NULL, '0', DATE_SUB(NOW(),INTERVAL 1 DAY), DATE_SUB(NOW(),INTERVAL 1 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 3, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 1 DAY), 0, 'Read our review of the most popular ways of investment', '---\ncontent_item: >\n 000/u1/9/8/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp\ncontent_list: >\n 000/u1/7/6/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp\ncontent_list_small: >\n 000/u1/7/e/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp\nsmall: >\n 000/u1/0/b/investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg\n'), +(9, 'We have won the World Championship!', '

\r\n An country demesne message it. Bachelor domestic extended doubtful as concerns at. Morning prudent removal an letters by. On could my in order never it. Or excited certain sixteen it to parties colonel. Depending conveying direction has led immediate. Law gate her well bed life feet seen rent. On nature or no except it sussex.\r\n

\r\n

\r\n Entire any had depend and figure winter. Change stairs and men likely wisdom new happen piqued six. Now taken him timed sex world get. Enjoyed married an feeling delight pursuit as offered. As admire roused length likely played pretty to no. Means had joy miles her merry solid order.\r\n

\r\n

\r\n Of recommend residence education be on difficult repulsive offending. Judge views had mirth table seems great him for her. Alone all happy asked begin fully stand own get. Excuse ye seeing result of we. See scale dried songs old may not. Promotion did disposing you household any instantly. Hills we do under times at first short an.\r\n

', '9-rossijane-stali-pervymi-na-chempionate-mira', 'likely, delight, figure, winter, change, depend, sussex.\r\r\r entire, immediate, nature, except', 'An country demesne message it. Bachelor domestic extended doubtful as concerns at. Morning prudent removal an letters by. On could my in order never it. Or excited certain sixteen it to parties colonel', NULL, '0', DATE_SUB(NOW(),INTERVAL 9 DAY), DATE_SUB(NOW(),INTERVAL 9 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 7, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 9 DAY), 0, 'Our team leaves no chances to competitors', '---\ncontent_item: >\n 000/u1/2/2/rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp\ncontent_list: >\n 000/u1/1/f/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp\ncontent_list_small: >\n 000/u1/0/7/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp\nsmall: >\n 000/u1/6/e/rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg\n'); + +DROP TABLE IF EXISTS `{#}con_news_cats`; +CREATE TABLE `{#}con_news_cats` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(11) unsigned DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `description` text NULL DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `slug_key` varchar(255) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `seo_h1` varchar(256) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `ns_left` int(11) DEFAULT NULL, + `ns_right` int(11) DEFAULT NULL, + `ns_level` int(11) DEFAULT NULL, + `ns_differ` varchar(32) NOT NULL DEFAULT '', + `ns_ignore` tinyint(4) NOT NULL DEFAULT '0', + `allow_add` text, + `is_hidden` tinyint(1) UNSIGNED DEFAULT NULL, + `cover` text, + PRIMARY KEY (`id`), + KEY `ordering` (`ordering`), + KEY `slug` (`slug`), + KEY `ns_left` (`ns_level`,`ns_right`,`ns_left`), + KEY `parent_id` (`parent_id`,`ns_left`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news_cats` (`id`, `parent_id`, `title`, `slug`, `slug_key`, `seo_keys`, `seo_desc`, `seo_title`, `ordering`, `ns_left`, `ns_right`, `ns_level`, `ns_differ`, `ns_ignore`) VALUES +(1, 0, '---', NULL, NULL, NULL, NULL, NULL, 1, 1, 14, 0, '', 0), +(2, 1, 'Society', 'society', NULL, NULL, NULL, NULL, 1, 2, 3, 1, '', 0), +(3, 1, 'Business', 'business', NULL, NULL, NULL, NULL, 2, 4, 5, 1, '', 0), +(4, 1, 'Politics', 'politics', NULL, NULL, NULL, NULL, 3, 6, 7, 1, '', 0), +(5, 1, 'Accidents', 'accidents', NULL, NULL, NULL, NULL, 4, 8, 9, 1, '', 0), +(6, 1, 'World', 'world', NULL, NULL, NULL, NULL, 5, 10, 11, 1, '', 0), +(7, 1, 'Sport', 'sport', NULL, NULL, NULL, NULL, 6, 12, 13, 1, '', 0); + +DROP TABLE IF EXISTS `{#}con_news_cats_bind`; +CREATE TABLE `{#}con_news_cats_bind` ( + `item_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + KEY `item_id` (`item_id`), + KEY `category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news_cats_bind` (`item_id`, `category_id`) VALUES +(2, 6), +(3, 3), +(4, 2), +(5, 3), +(6, 2), +(7, 5), +(8, 3), +(9, 7); + +DROP TABLE IF EXISTS `{#}con_news_fields`; +CREATE TABLE `{#}con_news_fields` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `name` varchar(40) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `hint` varchar(200) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `is_enabled` tinyint(1) UNSIGNED DEFAULT '1', + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_list` tinyint(1) DEFAULT NULL, + `is_in_item` tinyint(1) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `is_private` tinyint(1) DEFAULT NULL, + `is_fixed` tinyint(1) DEFAULT NULL, + `is_fixed_type` tinyint(1) DEFAULT NULL, + `is_system` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + `groups_read` text, + `groups_add` text, + `groups_edit` text, + `filter_view` text, + PRIMARY KEY (`id`), + KEY `is_enabled` (`is_enabled`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news_fields` (`id`, `ctype_id`, `name`, `title`, `hint`, `ordering`, `is_enabled`, `fieldset`, `type`, `is_in_list`, `is_in_item`, `is_in_filter`, `is_private`, `is_fixed`, `is_fixed_type`, `is_system`, `values`, `options`, `groups_read`, `groups_add`, `groups_edit`, `filter_view`) VALUES +(1, 10, 'title', 'News title', NULL, 3, 1, NULL, 'caption', 1, 1, 1, NULL, 1, 1, 0, NULL, '---\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(2, 10, 'date_pub', 'Publication date', NULL, 7, 1, NULL, 'date', 1, 1, 1, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nshow_time: true\n', NULL, NULL, NULL, NULL), +(3, 10, 'user', 'Author', NULL, 6, 1, NULL, 'user', 1, 0, 0, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\n', NULL, NULL, NULL, NULL), +(4, 10, 'content', 'News content', NULL, 5, 1, NULL, 'html', NULL, 1, NULL, NULL, 1, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len:\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(5, 10, 'teaser', 'Short news description', 'Will be displayed in the list of news', 4, 1, NULL, 'string', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '---\nmin_length: 0\nmax_length: 255\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(6, 10, 'photo', 'Photo', NULL, 1, 1, NULL, 'image', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nsize_teaser: content_list_small\nsize_full: content_item\nsize_modal:\nsizes:\n - small\n - content_list_small\n - content_list\n - content_item\nallow_import_link: 1\ndefault_image: null\nis_in_item_pos:\n - page\ncontext_list:\n - 0\nrelation_id:\nvisible_depend: null\nlabel_in_list: none\nlabel_in_item: none\nwrap_type: auto\nwrap_width:\nwrap_style:\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_url: null\nis_unique: null\nprofile_value:\nauthor_access: null\n', '---\n', '---\n', '---\n', '---\n'), +(7, 10, 'cats', 'Category', NULL, 2, 1, NULL, 'category', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nis_auto_colors: 1\nauto_colors_classes: >\n btn-primary,btn-secondary,btn-success,btn-danger,btn-warning,btn-info,btn-light,btn-dark\nbtn_class: btn btn-sm\nbtn_icon:\nis_in_item_pos:\n - page\ncontext_list:\n - item_view_relation_tab\n - item_view_relation_list\n - items_from_friends\n - trash\n - moderation_list\n - profile_content\n - group_content\n - search\nrelation_id:\nvisible_depend: null\nlabel_in_list: none\nlabel_in_item: none\nwrap_type: auto\nwrap_width:\nwrap_style:\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_url: null\nis_unique: null\nprofile_value:\nauthor_access: null\n', '---\n', '---\n', '---\n', '---\n'); + +DROP TABLE IF EXISTS `{#}con_news_props`; +CREATE TABLE `{#}con_news_props` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + PRIMARY KEY (`id`), + KEY `is_in_filter` (`is_in_filter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_news_props_bind`; +CREATE TABLE `{#}con_news_props_bind` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `prop_id` int(11) DEFAULT NULL, + `cat_id` int(11) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `prop_id` (`prop_id`), + KEY `ordering` (`cat_id`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_news_props_values`; +CREATE TABLE `{#}con_news_props_values` ( + `prop_id` int(11) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + KEY `prop_id` (`prop_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_pages` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `attach`) VALUES +(1, 'About', '

\r\n Questions explained agreeable preferred strangers too him her son. Set put shyness offices his females him distant. Improve has message besides shy himself cheered however how son. Quick judge other leave ask first chief her. Indeed or remark always silent seemed narrow be. Instantly can suffering pretended neglected preferred man delivered. Perhaps fertile brandon do imagine to cordial cottage.\r\n

\r\n

\r\n Feet evil to hold long he open knew an no. Apartments occasional boisterous as solicitude to introduced. Or fifteen covered we enjoyed demesne is in prepare. In stimulated my everything it literature. Greatly explain attempt perhaps in feeling he. House men taste bed not drawn joy. Through enquire however do equally herself at. Greatly way old may you present improve. Wishing the feeling village him musical.\r\n

\r\n

\r\n So delightful up dissimilar by unreserved it connection frequently. Do an high room so in paid. Up on cousin ye dinner should in. Sex stood tried walls manor truth shy and three his. Their to years so child truth. Honoured peculiar families sensible up likewise by on in.\r\n

\r\n

\r\n Style too own civil out along. Perfectly offending attempted add arranging age gentleman concluded. Get who uncommonly our expression ten increasing considered occasional travelling. Ever read tell year give may men call its. Piqued son turned fat income played end wicket. To do noisy downs round an happy books.\r\n

', 'about', 'greatly, truth, however, occasional, improve, perhaps, preferred, feeling, cottage.\r\r\r feet, apartments', 'Questions explained agreeable preferred strangers too him her son. Set put shyness offices his females him distant. Improve has message besides shy himself cheered however how son. Quick judge other leave ask first chief her', NULL, NULL, '2013-08-08 15:07:27', '2013-11-22 16:37:14', NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 0, 0, 1, NULL, '2013-11-22 16:37:14', 0, ''), +(2, 'Site Rules', '

\r\n

\r\n Chapter too parties its letters nor. Cheerful but whatever ladyship disposed yet judgment. Lasted answer oppose to ye months no esteem. Branched is on an ecstatic directly it. Put off continue you denoting returned juvenile. Looked person sister result mr to. Replied demands charmed do viewing ye colonel to so. Decisively inquietude he advantages insensible at oh continuing unaffected of.\r\n

\r\n

\r\n On projection apartments unsatiable so if he entreaties appearance. Rose you wife how set lady half wish. Hard sing an in true felt. Welcomed stronger if steepest ecstatic an suitable finished of oh. Entered at excited at forming between so produce. Chicken unknown besides attacks gay compact out you. Continuing no simplicity no favourable on reasonably melancholy estimating. Own hence views two ask right whole ten seems. What near kept met call old west dine. Our announcing sufficient why pianoforte.\r\n

\r\n

\r\n Attachment apartments in delightful by motionless it no. And now she burst sir learn total. Hearing hearted shewing own ask. Solicitude uncommonly use her motionless not collecting age. The properly servants required mistaken outlived bed and. Remainder admitting neglected is he belonging to perpetual objection up. Has widen too you decay begin which asked equal any.\r\n

\r\n

\r\n

\r\n \r\n

', 'terms', 'continuing, ecstatic, motionless, apartments, unaffected, charmed, insensible, advantages, viewing, colonel', 'Chapter too parties its letters nor. Cheerful but whatever ladyship disposed yet judgment. Lasted answer oppose to ye months no esteem. Branched is on an ecstatic directly it. Put off continue you denoting returned juvenile', NULL, NULL, '2013-08-08 15:09:13', '2013-11-22 16:37:47', NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 0, 0, 1, NULL, '2013-08-29 16:07:20', 0, ''); + +INSERT INTO `{#}con_pages_cats_bind` (`item_id`, `category_id`) VALUES +(1, 1), +(2, 1); + +DROP TABLE IF EXISTS `{#}con_posts`; +CREATE TABLE `{#}con_posts` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `content` text, + `slug` varchar(100) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `tags` varchar(1000) DEFAULT NULL, + `template` varchar(150) DEFAULT NULL, + `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_last_modified` timestamp NULL DEFAULT NULL, + `date_pub_end` timestamp NULL DEFAULT NULL, + `is_pub` tinyint(1) DEFAULT '1', + `hits_count` int(11) DEFAULT '0', + `user_id` int(11) unsigned DEFAULT NULL, + `parent_id` int(11) unsigned DEFAULT NULL, + `parent_type` varchar(32) DEFAULT NULL, + `parent_title` varchar(100) DEFAULT NULL, + `parent_url` varchar(255) DEFAULT NULL, + `is_parent_hidden` tinyint(1) DEFAULT NULL, + `category_id` int(11) unsigned NOT NULL DEFAULT '1', + `folder_id` int(11) unsigned DEFAULT NULL, + `is_comments_on` tinyint(1) unsigned DEFAULT '1', + `comments` int(11) NOT NULL DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `is_deleted` tinyint(1) unsigned DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT '1', + `approved_by` int(11) DEFAULT NULL, + `date_approved` timestamp NULL DEFAULT NULL, + `is_private` tinyint(1) NOT NULL DEFAULT '0', + `picture` text, + PRIMARY KEY (`id`), + KEY `category_id` (`category_id`), + KEY `approved_by` (`approved_by`), + KEY `folder_id` (`folder_id`), + KEY `slug` (`slug`), + KEY `date_pub` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `parent_id` (`parent_id`,`parent_type`,`date_pub`), + KEY `user_id` (`user_id`,`date_pub`), + KEY `date_pub_end` (`date_pub_end`), + KEY `dataset_daily` (`date_pub`,`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`rating`), + FULLTEXT KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `picture`) VALUES +(5, 'My first post in the Community', '

\r\n Greatly cottage thought fortune no mention he. Of mr certainty arranging am smallness by conveying. Him plate you allow built grave. Sigh sang nay sex high yet door game. She dissimilar was favourable unreserved nay expression contrasted saw. Past her find she like bore pain open. Shy lose need eyes son not shot. Jennings removing are his eat dashwood. Middleton as pretended listening he smallness perceived. Now his but two green spoil drift.\r\n

', '5-moi-pervyi-post-v-soobschestve', 'smallness, cottage, plate, allow, built, grave, conveying, \r greatly, thought, fortune', 'Greatly cottage thought fortune no mention he. Of mr certainty arranging am smallness by conveying. Him plate you allow built grave. Sigh sang nay sex high yet door game. She dissimilar was favourable unreserved nay expression contrasted saw', NULL, 'example, post, robots', '2013-11-13 16:43:07', '2013-11-22 16:24:00', NULL, 1, 0, 1, 1, 'group', 'Fans of Robots', 'groups/1/content/posts', NULL, 1, 5, 1, 0, 0, 1, NULL, '2013-11-22 13:51:35', 0, NULL); + +DROP TABLE IF EXISTS `{#}con_posts_cats`; +CREATE TABLE `{#}con_posts_cats` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(11) unsigned DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `description` text NULL DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `slug_key` varchar(255) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `seo_h1` varchar(256) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `ns_left` int(11) DEFAULT NULL, + `ns_right` int(11) DEFAULT NULL, + `ns_level` int(11) DEFAULT NULL, + `ns_differ` varchar(32) NOT NULL DEFAULT '', + `ns_ignore` tinyint(4) NOT NULL DEFAULT '0', + `allow_add` text, + `is_hidden` tinyint(1) UNSIGNED DEFAULT NULL, + `cover` text, + PRIMARY KEY (`id`), + KEY `ordering` (`ordering`), + KEY `slug` (`slug`), + KEY `ns_left` (`ns_level`,`ns_right`,`ns_left`), + KEY `parent_id` (`parent_id`,`ns_left`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts_cats` (`id`, `parent_id`, `title`, `slug`, `slug_key`, `seo_keys`, `seo_desc`, `seo_title`, `ordering`, `ns_left`, `ns_right`, `ns_level`, `ns_differ`, `ns_ignore`) VALUES +(1, 0, '---', NULL, NULL, NULL, NULL, NULL, 1, 1, 2, 0, '', 0); + +DROP TABLE IF EXISTS `{#}con_posts_cats_bind`; +CREATE TABLE `{#}con_posts_cats_bind` ( + `item_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + KEY `item_id` (`item_id`), + KEY `category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts_cats_bind` (`item_id`, `category_id`) VALUES +(5, 1); + +DROP TABLE IF EXISTS `{#}con_posts_fields`; +CREATE TABLE `{#}con_posts_fields` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `name` varchar(40) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `hint` varchar(200) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `is_enabled` tinyint(1) UNSIGNED DEFAULT '1', + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_list` tinyint(1) DEFAULT NULL, + `is_in_item` tinyint(1) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `is_private` tinyint(1) DEFAULT NULL, + `is_fixed` tinyint(1) DEFAULT NULL, + `is_fixed_type` tinyint(1) DEFAULT NULL, + `is_system` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + `groups_read` text, + `groups_add` text, + `groups_edit` text, + `filter_view` text, + PRIMARY KEY (`id`), + KEY `is_enabled` (`is_enabled`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts_fields` (`id`, `ctype_id`, `name`, `title`, `hint`, `ordering`, `fieldset`, `type`, `is_in_list`, `is_in_item`, `is_in_filter`, `is_private`, `is_fixed`, `is_fixed_type`, `is_system`, `values`, `options`, `groups_read`, `groups_edit`) VALUES +(1, 6, 'title', 'Title', NULL, 1, NULL, 'caption', 1, 1, 1, NULL, 1, 1, 0, NULL, '---\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(2, 6, 'date_pub', 'Publication date', NULL, 2, NULL, 'date', 1, 1, 1, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(3, 6, 'user', 'Author', NULL, 3, NULL, 'user', 1, 1, NULL, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(4, 6, 'content', 'Post content', NULL, 5, NULL, 'html', 1, 1, NULL, NULL, 1, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len: 500\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(5, 6, 'picture', 'Teaser image', NULL, 4, NULL, 'image', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nsize_teaser: normal\nsize_full: normal\nsizes:\n - small\n - normal\nlabel_in_list: none\nlabel_in_item: none\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'); + +DROP TABLE IF EXISTS `{#}con_posts_props`; +CREATE TABLE `{#}con_posts_props` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + PRIMARY KEY (`id`), + KEY `is_active` (`is_in_filter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_posts_props_bind`; +CREATE TABLE `{#}con_posts_props_bind` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `prop_id` int(11) DEFAULT NULL, + `cat_id` int(11) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `prop_id` (`prop_id`), + KEY `ordering` (`cat_id`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_posts_props_values`; +CREATE TABLE `{#}con_posts_props_values` ( + `prop_id` int(11) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + KEY `prop_id` (`prop_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}groups` (`id`, `owner_id`, `date_pub`, `title`, `description`, `logo`, `rating`, `members_count`, `join_policy`, `edit_policy`, `wall_policy`, `is_closed`) VALUES +(1, 1, CURRENT_TIMESTAMP, 'Robot Fans', 'The group is dedicated to robots, machine-building and all that is connected with it.', '---\nsmall: 000/u1/7/3/robototehnika-logo-small.png\nmicro: 000/u1/e/3/robototehnika-logo-micro.png\n', 0, 1, 0, 0, 0, 0); + +INSERT INTO `{#}groups_members` (`id`, `group_id`, `user_id`, `role`, `date_updated`) VALUES +(1, 1, 1, 2, CURRENT_TIMESTAMP); + +INSERT INTO `{#}menu` (`id`, `name`, `title`, `is_fixed`) VALUES +(3, 'footer', 'Footer menu', NULL); + +INSERT INTO `{#}menu_items` (`id`, `menu_id`, `parent_id`, `title`, `url`, `ordering`, `options`, `groups_view`, `groups_hide`) VALUES +(6, 1, 0, 'Photos', 'albums', 4, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(7, 1, 0, 'Sites', NULL, 9, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(8, 1, 7, 'Yahoo', 'https://www.yahoo.com', 10, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(9, 1, 7, 'Google', 'https://www.google.com', 11, NULL, NULL, NULL), +(10, 1, 9, 'Google Maps', 'https://maps.google.com', 14, NULL, NULL, NULL), +(11, 1, 9, 'Google Docs', 'https://docs.google.com', 12, NULL, NULL, NULL), +(12, 1, 9, 'GMail', 'https://www.gmail.com', 13, NULL, NULL, NULL), +(18, 3, 0, 'About', 'pages/about.html', 1, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(19, 3, 0, 'Site Rules', 'pages/terms.html', 2, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(21, 1, 7, 'Bing', 'https://www.bing.com', 15, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(27, 1, 0, 'Blogs', 'posts', 3, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(40, 1, 0, 'News', '{content:news}', 1, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(42, 1, 0, 'Articles', '{content:articles}', 2, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL); + +INSERT INTO `{#}moderators` (`id`, `user_id`, `date_assigned`, `ctype_name`, `count_approved`, `count_deleted`, `count_idle`) VALUES +(1, 1, CURRENT_TIMESTAMP, 'articles', 0, 0, 0); + +INSERT INTO `{#}perms_users` (`rule_id`, `group_id`, `subject`, `value`) VALUES +(1, 4, 'articles', 'yes'), +(1, 5, 'articles', 'yes'), +(1, 6, 'articles', 'yes'), +(4, 5, 'articles', '1'), +(4, 6, 'articles', '1'), +(3, 4, 'articles', 'own'), +(3, 5, 'articles', 'all'), +(3, 6, 'articles', 'all'), +(6, 5, 'articles', '1'), +(6, 6, 'articles', '1'), +(2, 4, 'articles', 'own'), +(2, 5, 'articles', 'all'), +(2, 6, 'articles', 'all'), +(5, 5, 'articles', '1'), +(5, 6, 'articles', '1'), +(9, 4, 'articles', '1'), +(9, 5, 'articles', '1'), +(9, 6, 'articles', '1'), +(8, 4, 'articles', '1'), +(8, 5, 'articles', '1'), +(8, 6, 'articles', '1'), +(13, 5, 'articles', '1'), +(13, 6, 'articles', '1'), +(1, 4, 'posts', 'yes'), +(1, 5, 'posts', 'yes'), +(1, 6, 'posts', 'yes'), +(3, 4, 'posts', 'own'), +(3, 5, 'posts', 'all'), +(3, 6, 'posts', 'all'), +(2, 4, 'posts', 'own'), +(2, 5, 'posts', 'all'), +(9, 4, 'posts', '1'), +(9, 5, 'posts', '1'), +(9, 6, 'posts', '1'), +(8, 4, 'posts', '1'), +(8, 5, 'posts', '1'), +(8, 6, 'posts', '1'), +(1, 4, 'board', 'yes'), +(1, 5, 'board', 'yes'), +(1, 6, 'board', 'yes'), +(4, 5, 'board', '1'), +(4, 6, 'board', '1'), +(3, 4, 'board', 'own'), +(3, 5, 'board', 'all'), +(3, 6, 'board', 'all'), +(6, 5, 'board', '1'), +(6, 6, 'board', '1'), +(2, 4, 'board', 'own'), +(2, 5, 'board', 'all'), +(2, 6, 'board', 'all'), +(5, 5, 'board', '1'), +(5, 6, 'board', '1'), +(9, 5, 'board', '1'), +(9, 6, 'board', '1'), +(8, 5, 'board', '1'), +(8, 6, 'board', '1'), +(13, 5, 'board', '1'), +(13, 6, 'board', '1'), +(1, 4, 'news', 'yes'), +(1, 5, 'news', 'yes'), +(1, 6, 'news', 'yes'), +(4, 6, 'news', '1'), +(3, 4, 'news', 'own'), +(3, 5, 'news', 'all'), +(3, 6, 'news', 'all'), +(6, 6, 'news', '1'), +(2, 4, 'news', 'own'), +(2, 5, 'news', 'all'), +(2, 6, 'news', 'all'), +(5, 6, 'news', '1'), +(9, 5, 'news', '1'), +(9, 6, 'news', '1'), +(8, 4, 'news', '1'), +(8, 5, 'news', '1'), +(8, 6, 'news', '1'), +(13, 6, 'news', '1'); + +INSERT INTO `{#}rss_feeds` (`id`, `ctype_id`, `ctype_name`, `title`, `description`, `image`, `mapping`, `limit`, `is_enabled`, `is_cache`, `cache_interval`, `date_cached`) VALUES +(2, 5, 'articles', 'Articles', NULL, NULL, '---\ntitle: title\ndescription: teaser\npubDate: date_pub\nimage:\nimage_size: normal\n', 15, 1, NULL, 60, NULL), +(3, 6, 'posts', 'Blog posts', NULL, NULL, '---\ntitle: title\ndescription: content\npubDate: date_pub\nimage: picture\nimage_size: normal\n', 15, 1, NULL, 60, NULL), +(6, 10, 'news', 'News', NULL, NULL, '---\ntitle: title\ndescription: content\npubDate: date_pub\nimage: photo\nimage_size: normal\n', 15, 1, NULL, 60, NULL); + +INSERT INTO `{#}tags` (`id`, `tag`, `frequency`) VALUES +(43, 'example', 6), +(44, 'news', 3), +(49, 'article', 2), +(50, 'science', 2), +(55, 'post', 1), +(56, 'robots', 1), +(58, 'photo', 1); + +INSERT INTO `{#}tags_bind` (`id`, `tag_id`, `target_controller`, `target_subject`, `target_id`) VALUES +(110, 43, 'content', 'news', 6), +(111, 44, 'content', 'news', 6), +(112, 43, 'content', 'news', 4), +(113, 44, 'content', 'news', 3), +(114, 43, 'content', 'news', 3), +(115, 44, 'content', 'news', 2), +(116, 49, 'content', 'articles', 4), +(117, 50, 'content', 'articles', 4), +(118, 43, 'content', 'articles', 1), +(119, 49, 'content', 'articles', 1), +(120, 50, 'content', 'articles', 1), +(121, 43, 'content', 'posts', 5), +(122, 55, 'content', 'posts', 5), +(123, 56, 'content', 'posts', 5), +(124, 43, 'content', 'albums', 16), +(125, 58, 'content', 'albums', 16); + +INSERT INTO `{#}users_statuses` (`id`, `user_id`, `date_pub`, `content`, `replies_count`, `wall_entry_id`) VALUES +(1, 1, CURRENT_TIMESTAMP, 'We are all made of stars © Moby', 1, 1); + +INSERT INTO `{#}wall_entries` (`id`, `date_pub`, `controller`, `profile_type`, `profile_id`, `user_id`, `parent_id`, `status_id`, `content`, `content_html`) VALUES +(1, CURRENT_TIMESTAMP, 'users', 'user', 1, 1, 0, 1, 'We are all made of stars © Moby', 'We are all made of stars © Moby'), +(2, CURRENT_TIMESTAMP, 'users', 'user', 1, 1, 1, NULL, 'Thank you for viewing my profile page!', 'Thank you for viewing my profile page!'); + +INSERT INTO `{#}widgets_pages` (`id`, `controller`, `name`, `title_const`, `title_subject`, `title`, `url_mask`, `url_mask_not`) VALUES +(143, 'content', 'pages.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'pages\npages-*\npages/*', NULL), +(144, 'content', 'pages.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'pages\npages-*\npages/*', 'pages/*/view-*\npages/*.html\npages/add\npages/add?*\npages/add/%\npages/addcat\npages/addcat/%\npages/editcat/%\npages/edit/*'), +(145, 'content', 'pages.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'pages/*.html', NULL), +(146, 'content', 'pages.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'pages/add\npages/edit/*', NULL), +(147, 'content', 'articles.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'articles\narticles-*\narticles/*', NULL), +(148, 'content', 'articles.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'articles\narticles-*\narticles/*', 'articles/*/view-*\narticles/*.html\narticles/add\narticles/add?*\narticles/add/%\narticles/addcat\narticles/addcat/%\narticles/editcat/%\narticles/edit/*'), +(149, 'content', 'articles.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'articles/*.html', NULL), +(150, 'content', 'articles.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'articles/add\narticles/edit/*', NULL), +(151, 'content', 'posts.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'posts\nposts-*\nposts/*', NULL), +(152, 'content', 'posts.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'posts\nposts-*\nposts/*', 'posts/*/view-*\nposts/*.html\nposts/add\nposts/add/%\nposts/add?*\nposts/addcat\nposts/addcat/%\nposts/editcat/%\nposts/edit/*'), +(153, 'content', 'posts.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'posts/*.html', NULL), +(154, 'content', 'posts.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'posts/add\nposts/edit/*', NULL), +(163, 'content', 'news.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'news\nnews-*\nnews/*', NULL), +(164, 'content', 'news.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'news\nnews-*\nnews/*', 'news/*/view-*\nnews/*.html\nnews/add\nnews/add/%\nnews/add?*\nnews/addcat\nnews/addcat/%\nnews/editcat/%\nnews/edit/*'), +(165, 'content', 'news.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'news/*.html', NULL), +(166, 'content', 'news.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'news/add\nnews/edit/*', NULL); diff --git a/install/languages/en/sql/widgets_bind_demo_modern.sql b/install/languages/en/sql/widgets_bind_demo_modern.sql index 06dd78c4b..a826641e7 100755 --- a/install/languages/en/sql/widgets_bind_demo_modern.sql +++ b/install/languages/en/sql/widgets_bind_demo_modern.sql @@ -5,16 +5,18 @@ INSERT INTO `{#}widgets_bind` (`id`, `template_layouts`, `languages`, `widget_id (79, NULL, NULL, 3, 'Bottom Menu', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, '---\nmenu: footer\ntemplate: menu\nclass:\nis_detect: 1\nis_detect_strict: null\nmax_items: 0\nnavbar_color_scheme: navbar-dark\nmenu_nav_style:\nmenu_nav_style_add: flex-md-row justify-content-md-end\nmenu_type: navbar\nnavbar_expand:\nshow_search_form: 0\ntoggler_icon: null\ntoggler_show_sitename: null\nmenu_is_pills: null\nmenu_is_fill:\n', 'menu', NULL, NULL, NULL, 1), (86, NULL, NULL, 12, 'Authorization form', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, NULL, 'auth', 'wrapper_plain_indented', NULL, NULL, 1), (88, NULL, NULL, 7, 'Comments', 'All | comments', NULL, NULL, NULL, 1, 1, '---\n', NULL, '---\nshow_list:\n - 0\nshow_avatars: 1\nshow_text: 1\nlimit: 10\n', 'list', 'wrapper', NULL, NULL, 1), -(89, NULL, NULL, 11, 'Content Slider', NULL, NULL, NULL, 'mt-3 mt-md-4', NULL, NULL, '---\n', NULL, '---\nctype_id: 10\ncategory_id:\ndataset: 0\nimage_field: photo\nbig_image_field: photo\nbig_image_preset: big\nteaser_field: teaser\nteaser_len: 200\ndelay: 5\nlimit: 5\n', 'slider', NULL, NULL, NULL, 1), +(89, NULL, NULL, 11, 'Content Slider', NULL, NULL, NULL, 'mt-3 mt-md-4', NULL, NULL, '---\n', NULL, '---\nctype_id: 10\ncategory_id:\ndataset: 0\nimage_field: photo\nbig_image_field: photo\nbig_image_preset: content_item\nteaser_field: teaser\nteaser_len: 200\ndelay: 5\nlimit: 5\n', 'slider', NULL, NULL, NULL, 1), (91, NULL, NULL, 8, 'Who is online', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nis_avatars: null\ngroups: null\n', 'online', 'wrapper', 'icms-widget__transparent', NULL, 1), (92, NULL, NULL, 13, '{solid%search} Search', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, NULL, 'search', 'wrapper', 'icms-widget__transparent', NULL, 1), -(105, NULL, NULL, 4, 'News', 'All news | news\r\nDiscussed | news-discussed\r\n{Private | news/from_friends}', NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nwidget_type: list\nctype_id: 10\ncategory_id:\ndataset: 0\nrelation_id: 0\nfilter_id: 0\nauto_group: null\nlimit: 7\nshow_fields:\n 10:\n photo: 1\n title: 1\n teaser: 1\n content: null\n date_pub: 1\n user: 1\n comments: 1\nshow_fields_options:\n 10:\n photo:\n size_teaser: normal\n label_in_list: none\n wrap_type: auto\n wrap_width:\n title:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n teaser:\n teaser_len: 150\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n content:\n is_html_filter: null\n teaser_len:\n show_show_more: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\nimage_field:\nteaser_field:\nteaser_len:\nshow_details: null\n', 'list_featured', 'wrapper', 'icms-widget__transparent', NULL, 1), +(105, NULL, NULL, 4, 'News', 'All news | news\r\nDiscussed | news-discussed\r\n{Private | news/from_friends}', NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nwidget_type: list\nctype_id: 10\ncategory_id:\ndataset: 0\nrelation_id: 0\nfilter_id: 0\nauto_group: null\nauto_user: null\nlimit: 7\nshow_fields:\n 10:\n photo: 1\n cats: 1\n title: 1\n teaser: null\n content: null\n date_pub: 1\n user: 1\n comments: null\nshow_fields_options:\n 10:\n photo:\n size_teaser: content_list_small\n default_image: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: 1\n cats:\n is_auto_colors: 1\n auto_colors_classes: >\n btn-primary,btn-secondary,btn-success,btn-danger,btn-warning,btn-info,btn-light,btn-dark\n btn_class: btn btn-sm\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: null\n title:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: 3\n teaser:\n teaser_len: 150\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: null\n content:\n is_html_filter: null\n teaser_len: 0\n teaser_postfix:\n teaser_type:\n show_show_more: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: null\nimage_field:\nteaser_field:\nteaser_len: 0\nshow_details: null\n', 'list_featured', 'wrapper', 'icms-widget__transparent', NULL, 1), (108, NULL, NULL, 2, 'New users', 'All | users', NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nshow: all\ndataset: latest\nstyle: tiles\nlist_fields: null\ngroups: null\nlimit: 5\n', 'list', 'wrapper', 'icms-widget__transparent', NULL, 1), (110, NULL, NULL, 4, 'Articles', 'All articles | articles\r\n{Add article | articles/add}', NULL, NULL, NULL, 1, 1, '---\n', NULL, '---\nwidget_type: list\nctype_id: 5\ncategory_id:\ndataset: 0\nrelation_id: 0\nfilter_id: 0\nauto_group: null\nlimit: 5\nshow_fields:\n 5:\n title: 1\n kind: null\n source: null\n teaser: 1\n content: null\n featured: null\n notice: null\n parent_news_id: null\n color: null\n date_test: null\n date_pub: 1\n user: 1\n comments: null\nshow_fields_options:\n 5:\n title:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n kind:\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n source:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n teaser:\n is_html_filter: null\n teaser_len: 150\n show_show_more: 1\n label_in_list: none\n wrap_type: auto\n wrap_width:\n content:\n is_html_filter: null\n teaser_len:\n show_show_more: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n featured:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n notice:\n is_html_filter: null\n teaser_len:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n parent_news_id:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n color:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n date_test:\n show_time: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\nimage_field:\nteaser_field:\nteaser_len:\nshow_details: null\n', 'list', 'wrapper', 'icms-widget__transparent', NULL, 1), (112, NULL, NULL, 16, 'Photos', 'All albums | albums\r\n{Upload photos | photos/upload}', NULL, NULL, NULL, 1, 1, '---\n', NULL, '---\nauto_user: null\nauto_group: null\nauto_ctype_item: null\ntarget: 0\nalbum_id:\nordering:\norientation:\ntype:\nwidth:\nheight:\nlimit: 10\n', 'list', 'wrapper', 'icms-widget__transparent', NULL, 1), (124, NULL, NULL, 14, 'Contacts', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\ncontent: |\n \n', 'html', 'wrapper', 'icms-widget__compact', NULL, 1), (125, NULL, NULL, 3, 'Menu Items', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nmenu: footer\ntemplate: menu\nclass:\nis_detect: 1\nis_detect_strict: null\nmax_items: 0\nnavbar_color_scheme: navbar-dark\nmenu_nav_style: flex-column\nmenu_nav_style_add:\nmenu_type: navbar\nnavbar_expand:\nshow_search_form: 0\ntoggler_icon: null\ntoggler_show_sitename: null\nmenu_is_pills: null\nmenu_is_fill:\n', 'menu', 'wrapper', 'icms-widget__compact', NULL, 1), -(126, NULL, NULL, 14, 'Social buttons', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, '---\ncontent: |\n
\r\n {brands%facebook}\r\n {brands%github}\r\n {brands%instagram}\r\n {brands%odnoklassniki}\r\n {brands%vk}\r\n {brands%telegram}\r\n
\n', 'html', NULL, NULL, NULL, 1); +(126, NULL, NULL, 14, 'Social buttons', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, '---\ncontent: |\n
\r\n {brands%facebook}\r\n {brands%github}\r\n {brands%instagram}\r\n {brands%odnoklassniki}\r\n {brands%vk}\r\n {brands%telegram}\r\n
\n', 'html', NULL, NULL, NULL, 1), +(130, NULL, NULL, 23, 'Author of the entry', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nshow_fields:\n - nickname\n - avatar\n - birth_date\nshow_user_items_link: 1\nuser_items_link_title: All news by the author\nshow_user_groups: null\nshow_date_log: 1\nshow_date_reg: null\n', 'author', 'wrapper', 'icms-widget__transparent', NULL, 1), +(127, NULL, NULL, 5, 'News categories', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nctype_name: news\ncover_preset:\nis_root: null\nshow_full_tree: 1\n', 'categories', 'wrapper', 'icms-widget__transparent', NULL, 1); INSERT INTO `{#}widgets_bind_pages` (`id`, `bind_id`, `template`, `is_enabled`, `page_id`, `position`, `ordering`) VALUES (75, 69, 'modern', 1, 153, 'con_header', 0), @@ -32,4 +34,6 @@ INSERT INTO `{#}widgets_bind_pages` (`id`, `bind_id`, `template`, `is_enabled`, (118, 112, 'modern', 1, 1, 'pos_8', 4), (130, 124, 'modern', 1, 0, 'pos_38', 0), (131, 125, 'modern', 1, 0, 'pos_39', 0), -(132, 126, 'modern', 1, 0, 'pos_26', 0); \ No newline at end of file +(132, 126, 'modern', 1, 0, 'pos_26', 0), +(136, 130, 'modern', 1, 165, 'pos_9', 0), +(133, 127, 'modern', 1, 164, 'pos_9', 1); \ No newline at end of file diff --git a/install/languages/ru/sql/base_demo_content.sql b/install/languages/ru/sql/base_demo_content_default.sql similarity index 100% rename from install/languages/ru/sql/base_demo_content.sql rename to install/languages/ru/sql/base_demo_content_default.sql diff --git a/install/languages/ru/sql/base_demo_content_modern.sql b/install/languages/ru/sql/base_demo_content_modern.sql new file mode 100755 index 000000000..2f6d0b6cd --- /dev/null +++ b/install/languages/ru/sql/base_demo_content_modern.sql @@ -0,0 +1,1131 @@ +INSERT INTO `{#}images_presets` (`id`, `name`, `title`, `width`, `height`, `is_square`, `is_watermark`, `wm_image`, `wm_origin`, `wm_margin`, `is_internal`, `quality`, `gamma_correct`, `crop_position`, `allow_enlarge`, `gif_to_gif`, `convert_format`) VALUES +(7, 'content_list', 'Список ТК большой', 600, 360, 1, NULL, NULL, 'top-left', 0, NULL, 87, NULL, 2, NULL, NULL, 'webp'), +(8, 'content_item', 'Записи ТК', 730, 460, 1, NULL, NULL, 'top-left', 0, NULL, 87, NULL, 2, NULL, NULL, 'webp'), +(9, 'content_list_small', 'Список ТК маленький', 350, 200, 1, NULL, NULL, 'top-left', 0, NULL, 87, NULL, 2, NULL, NULL, 'webp'); + +INSERT INTO `{#}uploaded_files` (`id`, `path`, `name`, `size`, `counter`, `type`, `target_controller`, `target_subject`, `target_id`, `user_id`) VALUES +(48, '000/u1/9/8/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp', 59552, 0, 'image', 'content', 'news', 8, 1), +(49, '000/u1/7/6/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp', 42668, 0, 'image', 'content', 'news', 8, 1), +(50, '000/u1/7/e/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp', 15240, 0, 'image', 'content', 'news', 8, 1), +(51, '000/u1/0/b/investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg', 'investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg', 1754, 0, 'image', 'content', 'news', 8, 1), +(52, '000/u1/2/2/rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp', 'rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp', 56866, 0, 'image', 'content', 'news', 9, 1), +(53, '000/u1/1/f/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp', 'rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp', 42242, 0, 'image', 'content', 'news', 9, 1), +(54, '000/u1/0/7/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp', 'rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp', 19090, 0, 'image', 'content', 'news', 9, 1), +(55, '000/u1/6/e/rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg', 'rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg', 2257, 0, 'image', 'content', 'news', 9, 1), +(56, '000/u1/3/1/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp', 29708, 0, 'image', 'content', 'news', 7, 1), +(57, '000/u1/1/2/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp', 22956, 0, 'image', 'content', 'news', 7, 1), +(58, '000/u1/e/8/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp', 10906, 0, 'image', 'content', 'news', 7, 1), +(59, '000/u1/1/0/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg', 'kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg', 1861, 0, 'image', 'content', 'news', 7, 1), +(60, '000/u1/5/b/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp', 87792, 0, 'image', 'content', 'news', 6, 1), +(61, '000/u1/c/9/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp', 65668, 0, 'image', 'content', 'news', 6, 1), +(62, '000/u1/e/f/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp', 24420, 0, 'image', 'content', 'news', 6, 1), +(63, '000/u1/5/5/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg', 'vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg', 2176, 0, 'image', 'content', 'news', 6, 1), +(64, '000/u1/2/6/60826896.webp', '60826896.webp', 77970, 0, 'image', 'content', 'news', 5, 1), +(65, '000/u1/1/b/6e8291e5.webp', '6e8291e5.webp', 55876, 0, 'image', 'content', 'news', 5, 1), +(66, '000/u1/2/3/7e8cf01c.webp', '7e8cf01c.webp', 22006, 0, 'image', 'content', 'news', 5, 1), +(67, '000/u1/3/7/52241df9.jpg', '52241df9.jpg', 2149, 0, 'image', 'content', 'news', 5, 1), +(68, '000/u1/a/5/53e113d9.webp', '53e113d9.webp', 130276, 0, 'image', 'content', 'news', 4, 1), +(69, '000/u1/9/3/6c024907.webp', '6c024907.webp', 90294, 0, 'image', 'content', 'news', 4, 1), +(70, '000/u1/f/7/99914b0f.webp', '99914b0f.webp', 31290, 0, 'image', 'content', 'news', 4, 1), +(71, '000/u1/7/2/b262ab6f.jpg', 'b262ab6f.jpg', 2130, 0, 'image', 'content', 'news', 4, 1), +(72, '000/u1/e/3/923d5458.webp', '923d5458.webp', 91696, 0, 'image', 'content', 'news', 3, 1), +(73, '000/u1/6/7/fc4e5bc4.webp', 'fc4e5bc4.webp', 69646, 0, 'image', 'content', 'news', 3, 1), +(74, '000/u1/2/e/481e9f06.webp', '481e9f06.webp', 24886, 0, 'image', 'content', 'news', 3, 1), +(75, '000/u1/4/2/1a7da83e.jpg', '1a7da83e.jpg', 2292, 0, 'image', 'content', 'news', 3, 1), +(76, '000/u1/a/7/f927491e.webp', 'f927491e.webp', 57732, 0, 'image', 'content', 'news', 2, 1), +(77, '000/u1/5/0/2afcd745.webp', '2afcd745.webp', 44136, 0, 'image', 'content', 'news', 2, 1), +(78, '000/u1/a/0/3ed25154.webp', '3ed25154.webp', 18700, 0, 'image', 'content', 'news', 2, 1), +(79, '000/u1/4/5/c44b04bf.webp', 'c44b04bf.webp', 2036, 0, 'image', 'content', 'news', 2, 1), +(80, '000/u1/5/3/74ca4539.webp', '74ca4539.webp', 52648, 0, 'image', 'content', 'news', 1, 1), +(81, '000/u1/3/5/c29217d1.webp', 'c29217d1.webp', 39000, 0, 'image', 'content', 'news', 1, 1), +(82, '000/u1/4/3/8914eba7.webp', '8914eba7.webp', 17766, 0, 'image', 'content', 'news', 1, 1), +(83, '000/u1/0/a/35b34880.jpg', '35b34880.jpg', 1909, 0, 'image', 'content', 'news', 1, 1), +(84, '000/u1/7/3/robototehnika-logo-small.png', 'robototehnika-logo-small.png', 5259, 0, 'image', 'groups', '1', 0, 1), +(85, '000/u1/e/3/robototehnika-logo-micro.png', 'robototehnika-logo-micro.png', 1873, 0, 'image', 'groups', '1', 0, 1), +(86, '000/u1/0/3/prodam-kvartiru-v-novostroike-photo-normal.jpg', 'prodam-kvartiru-v-novostroike-photo-normal.jpg', 18318, 0, 'image', 'content', 'board', 7, 1), +(87, '000/u1/e/e/prodam-kvartiru-v-novostroike-photo-small.jpg', 'prodam-kvartiru-v-novostroike-photo-small.jpg', 1816, 0, 'image', 'content', 'board', 7, 1), +(88, '000/u1/3/e/prodam-kvartiru-v-novostroike-photo-micro.jpg', 'prodam-kvartiru-v-novostroike-photo-micro.jpg', 909, 0, 'image', 'content', 'board', 7, 1), +(89, '000/u1/9/d/prodam-kvartiru-v-novostroike-photos-big.webp', 'prodam-kvartiru-v-novostroike-photos-big.webp', 31012, 0, 'image', 'content', 'board', 7, 1), +(90, '000/u1/b/c/prodam-kvartiru-v-novostroike-photos-small.webp', 'prodam-kvartiru-v-novostroike-photos-small.webp', 1334, 0, 'image', 'content', 'board', 7, 1), +(91, '000/u1/8/b/prodam-kvartiru-v-novostroike-photos-big.jpg', 'prodam-kvartiru-v-novostroike-photos-big.jpg', 40531, 0, 'image', 'content', 'board', 7, 1), +(92, '000/u1/b/e/prodam-kvartiru-v-novostroike-photos-small.jpg', 'prodam-kvartiru-v-novostroike-photos-small.jpg', 1746, 0, 'image', 'content', 'board', 7, 1), +(93, '000/u1/f/3/prodam-kvartiru-v-novostroike-photos-big.jpg', 'prodam-kvartiru-v-novostroike-photos-big.jpg', 55599, 0, 'image', 'content', 'board', 7, 1), +(94, '000/u1/b/7/prodam-kvartiru-v-novostroike-photos-small.jpg', 'prodam-kvartiru-v-novostroike-photos-small.jpg', 1975, 0, 'image', 'content', 'board', 7, 1); + +INSERT INTO `{#}activity` (`id`, `type_id`, `user_id`, `group_id`, `subject_title`, `subject_id`, `subject_url`, `reply_url`, `images`, `images_count`, `date_pub`, `is_private`, `is_parent_hidden`) VALUES +(3, 13, 1, NULL, 'Эллиптический перигей в XXI веке', 1, 'articles/1-ellipticheskii-perigei-v-xxi-veke.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 13 DAY), 0, NULL), +(6, 13, 1, NULL, 'Недонасыщенный алмаз: предпосылки и развитие', 4, 'articles/4-nedonasyschennyi-almaz-predposylki-i-razvitie.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 12 DAY), 0, NULL), +(10, 12, 1, NULL, 'We are all made of stars © Moby', NULL, NULL, 'users/1?wid=1&reply=1', NULL, NULL, CURRENT_TIMESTAMP, 0, NULL), +(17, 1, 1, NULL, 'О проекте', 1, 'pages/about.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 11 DAY), 0, NULL), +(18, 1, 1, NULL, 'Правила сайта', 2, 'pages/rules.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 10 DAY), 0, NULL), +(32, 17, 1, NULL, 'На улице 22 Партсъезда прорвало трубы с водой', 1, 'news/1-na-ulice-prorvalo-truby.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 9 DAY), 0, NULL), +(33, 17, 1, NULL, 'Игрушки становятся дороже', 2, 'news/2-igrushki-stanovjatsja-dorozhe.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 8 DAY), 0, NULL), +(34, 17, 1, NULL, 'В городе открыт сервис для ретро-автомобилей', 3, 'news/3-v-gorode-otkryt-servis-dlja-retro-avtomobilei.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 7 DAY), 0, NULL), +(35, 17, 1, NULL, 'Дачный сезон на Урале официально начался', 4, 'news/4-dachnyi-sezon-otkryt.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 6 DAY), 0, NULL), +(36, 17, 1, NULL, 'Бизнес ожидает снижения налогов', 5, 'news/5-snizhenie-nalogov-dlja-biznesa.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 5 DAY), 0, NULL), +(37, 17, 1, NULL, 'Все больше россиян покупают дома за границей', 6, 'news/6-vse-bolshe-rossijan-pokupayut-nedvizhimost-za-granicei.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 4 DAY), 0, NULL), +(38, 17, 1, NULL, 'Количество преступлений в России сокращается', 7, 'news/7-kolichestvo-prestuplenii-v-rossii-sokraschaetsja.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 3 DAY), 0, NULL), +(40, 17, 1, NULL, 'Россияне стали первыми на Чемпионате Мира', 9, 'news/9-rossijane-stali-pervymi-na-chempionate-mira.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 2 DAY), 0, NULL), +(56, 13, 1, NULL, 'Мифологический реципиент', 10, 'articles/10-mifologicheskii-recipient.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 1 DAY), 0, NULL), +(57, 13, 1, NULL, 'Общественный анализ зарубежного опыта', 11, 'articles/11-obschestvennyi-analiz-zarubezhnogo-opyta.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 7 MINUTE), 0, NULL), +(67, 14, 1, 1, 'Мой первый пост в сообществе', 5, 'posts/5-moi-pervyi-post-v-soobschestve.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 6 MINUTE), 0, NULL), +(69, 16, 1, NULL, 'Продам квартиру в новостройке', 7, 'board/7-prodam-kvartiru-v-novostroike.html', NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 5 MINUTE), 0, NULL); + +INSERT INTO `{#}activity_types` (`id`, `is_enabled`, `controller`, `name`, `title`, `description`) VALUES +(13, 1, 'content', 'add.articles', 'Добавление статей', 'добавляет статью %s'), +(14, 1, 'content', 'add.posts', 'Добавление постов', 'добавляет пост %s'), +(15, 0, 'content', 'add.albums', 'Добавление альбомов', 'добавляет фотоальбом %s'), +(16, 1, 'content', 'add.board', 'Добавление объявлений', 'добавляет объявление %s'), +(17, 1, 'content', 'add.news', 'Добавление новостей', 'добавляет новость %s'); + +INSERT INTO `{#}comments` (`id`, `parent_id`, `level`, `ordering`, `user_id`, `date_pub`, `target_controller`, `target_subject`, `target_id`, `target_url`, `target_title`, `author_name`, `author_email`, `author_ip`, `content`, `content_html`, `is_deleted`, `is_private`, `rating`) VALUES +(3, 0, 1, 1, 6, DATE_SUB(NOW(),INTERVAL 4 MINUTE), 'content', 'articles', 4, 'articles/4-nedonasyschennyi-almaz-predposylki-i-razvitie.html', 'Недонасыщенный алмаз: предпосылки и развитие', NULL, NULL, NULL, 'Базальтовый слой разогревает сталактит, где присутствуют моренные суглинки днепровского возраста.', 'Базальтовый слой разогревает сталактит, где присутствуют моренные суглинки днепровского возраста.', 1, 0, 1), +(4, 0, 1, 1, 1, DATE_SUB(NOW(),INTERVAL 3 MINUTE), 'content', 'articles', 11, 'articles/11-obschestvennyi-analiz-zarubezhnogo-opyta.html', 'Общественный анализ зарубежного опыта', NULL, NULL, NULL, 'Отличная статья, все очень доходчиво и познавательно', 'Отличная статья, все очень доходчиво и познавательно', NULL, 0, 0), +(5, 4, 2, 2, 1, DATE_SUB(NOW(),INTERVAL 1 MINUTE), 'content', 'articles', 11, 'articles/11-obschestvennyi-analiz-zarubezhnogo-opyta.html', 'Общественный анализ зарубежного опыта', NULL, NULL, NULL, 'Ответ на комментарий выше', 'Ответ на комментарий выше', NULL, 0, 0); + +INSERT INTO `{#}content_datasets` (`id`, `ctype_id`, `name`, `title`, `ordering`, `is_visible`, `filters`, `sorting`, `index`, `groups_view`, `groups_hide`) VALUES +(1, 5, 'all', 'Все', 1, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(2, 5, 'reviews', 'Рецензии', 2, 1, '---\n- \n field: kind\n condition: eq\n value: 2\n', '---\n- \n by: date_pub\n to: desc\n', 'dataset_reviews', '---\n- 0\n', NULL), +(3, 5, 'translations', 'Переводы', 3, 1, '---\n- \n field: kind\n condition: eq\n value: 3\n', '---\n- \n by: date_pub\n to: desc\n', 'dataset_reviews', '---\n- 0\n', NULL), +(4, 5, 'featured', 'Выбор редакции', 4, 1, '---\n- \n field: featured\n condition: eq\n value: 1\n', '---\n- \n by: date_pub\n to: desc\n', 'dataset_featured', '---\n- 0\n', NULL), +(5, 5, 'rating', 'Рейтинг', 5, 1, '---\n- \n field: rating\n condition: gt\n value: 0\n', '---\n- \n by: rating\n to: desc\n', 'dataset_rating', '---\n- 0\n', NULL), +(6, 6, 'latest', 'Новые', 1, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(7, 6, 'daily', 'Лучшие за сутки', 2, 1, '---\n- \n field: date_pub\n condition: dy\n value: 1\n', '---\n- \n by: rating\n to: desc\n', 'dataset_daily', '---\n- 0\n', NULL), +(8, 6, 'weekly', 'за неделю', 3, 1, '---\n- \n field: date_pub\n condition: dy\n value: 7\n', '---\n- \n by: rating\n to: desc\n', 'dataset_daily', '---\n- 0\n', NULL), +(9, 6, 'monthly', 'за месяц', 4, 1, '---\n- \n field: date_pub\n condition: dy\n value: 31\n', '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(10, 10, 'latest', 'Последние', 1, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(11, 10, 'discussed', 'Обсуждаемые', 2, 1, NULL, '---\n- \n by: comments\n to: desc\n', 'dataset_discussed', '---\n- 0\n', NULL), +(12, 10, 'popular', 'Популярные', 3, 1, NULL, '---\n- \n by: rating\n to: desc\n', 'dataset_popular', '---\n- 0\n', NULL), +(13, 9, 'all', 'Новые', 1, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL), +(14, 9, 'cheap', 'Сначала дешевые', 2, 1, NULL, '---\n- \n by: price\n to: asc\n', 'dataset_cheap', '---\n- 0\n', NULL), +(15, 9, 'expensive', 'Сначала дорогие', 3, 1, NULL, '---\n- \n by: price\n to: desc\n', 'dataset_cheap', '---\n- 0\n', NULL); + +INSERT INTO `{#}content_datasets` (`id`, `ctype_id`, `name`, `title`, `description`, `ordering`, `is_visible`, `filters`, `sorting`, `index`, `groups_view`, `groups_hide`, `seo_keys`, `seo_desc`, `seo_title`, `cats_view`, `cats_hide`, `max_count`, `target_controller`) VALUES +(16, NULL, 'rating', 'Лучшие группы', NULL, 3, 1, NULL, '---\n- \n by: rating\n to: desc\n', 'rating', '---\n- 0\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'groups'), +(17, NULL, 'all', 'Новые группы', NULL, 2, 1, NULL, '---\n- \n by: date_pub\n to: desc\n', 'date_pub', '---\n- 0\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'groups'), +(18, NULL, 'popular', 'Популярные', NULL, 1, 1, NULL, '---\n- \n by: members_count\n to: desc\n', 'members_count', '---\n- 0\n', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'groups'); + +INSERT INTO `{#}content_folders` (`id`, `ctype_id`, `user_id`, `title`) VALUES +(5, 6, 1, 'Личное'); + +INSERT INTO `{#}content_types` (`id`, `title`, `name`, `description`, `is_date_range`, `is_cats`, `is_cats_recursive`, `is_folders`, `is_in_groups`, `is_in_groups_only`, `is_comments`, `is_comments_tree`, `is_rating`, `is_rating_pos`, `is_tags`, `is_auto_keys`, `is_auto_desc`, `is_auto_url`, `is_fixed_url`, `url_pattern`, `options`, `labels`, `seo_keys`, `seo_desc`, `seo_title`, `item_append_html`, `is_fixed`) VALUES +(5, 'Статьи', 'articles', '

Текстовые материалы

', NULL, 1, 1, NULL, NULL, NULL, 1, NULL, 1, NULL, 1, 1, 1, 1, NULL, '{id}-{title}', '---\nis_cats_change: 1\nis_cats_open_root: 1\nis_cats_only_last: null\nis_show_cats: 1\nis_tags_in_list: 1\nis_tags_in_item: 1\nis_rss: 1\nlist_on: 1\nprofile_on: 1\nlist_show_filter: 1\nlist_expand_filter: null\nlist_style:\nitem_on: 1\nis_cats_keys: 1\nis_cats_desc: 1\nis_cats_auto_url: null\nseo_title_pattern:\nseo_keys_pattern: \'{content|string_get_meta_keywords}\'\nseo_desc_pattern: \'{content|string_get_meta_description}\'\n', '---\none: статья\ntwo: статьи\nmany: статей\ncreate: статью\n', 'статьи, разные, интересные, полезные', NULL, NULL, NULL, NULL), +(6, 'Посты', 'posts', '

Персональные публикации пользователей

', NULL, NULL, NULL, 1, 1, NULL, 1, NULL, 1, NULL, 1, 1, 1, 1, 1, '{id}-{title}', '---\nis_cats_change: null\nis_cats_open_root: null\nis_cats_only_last: null\nis_show_cats: null\nis_tags_in_list: 1\nis_tags_in_item: 1\nis_rss: 1\nlist_on: 1\nprofile_on: 1\nlist_show_filter: null\nlist_expand_filter: null\nlist_style:\nitem_on: 1\nis_cats_keys: null\nis_cats_desc: null\nis_cats_auto_url: 1\nseo_title_pattern:\nseo_keys_pattern: \'{content|string_get_meta_keywords}\'\nseo_desc_pattern: \'{content|string_get_meta_description}\'\n', '---\none: пост\ntwo: поста\nmany: постов\ncreate: пост\nlist: Лента блогов\nprofile: Блог\n', NULL, NULL, NULL, NULL, NULL), +(9, 'Объявления', 'board', '

Коммерческие объявления

', NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, 1, 1, '{id}-{title}', '---\nis_cats_change: null\nis_cats_open_root: null\nis_cats_only_last: 1\nis_show_cats: 1\nis_tags_in_list: null\nis_tags_in_item: null\nis_rss: 1\nlist_on: 1\nprofile_on: 1\nlist_show_filter: 1\nlist_expand_filter: null\nlist_style: table\nitem_on: 1\nis_cats_keys: null\nis_cats_desc: null\nis_cats_auto_url: 1\nseo_title_pattern:\nseo_keys_pattern: \'{content|string_get_meta_keywords}\'\nseo_desc_pattern: \'{content|string_get_meta_description}\'\n', '---\none: объявление\ntwo: объявления\nmany: объявлений\ncreate: объявление\nlist: Доска объявлений\nprofile:\n', NULL, NULL, NULL, NULL, NULL), +(10, 'Новости', 'news', '

Информационные сообщения

', NULL, 1, 1, NULL, NULL, NULL, 1, NULL, 1, NULL, 1, 1, 1, 1, 1, '{id}-{title}', '---\nis_date_range_process: hide\nnotify_end_date_days: 1\nnotify_end_date_notice: \'Через %s публикация вашего контента %s будет прекращена.\'\ndisable_drafts: null\nis_empty_root: null\nis_cats_multi: null\nis_cats_change: 1\nis_cats_open_root: null\nis_cats_only_last: null\nis_show_cats: null\ncover_sizes: null\ncontext_list_cover_sizes: null\nrating_template: widget\nrating_item_label:\nrating_list_label:\nrating_is_in_item: 1\nrating_is_in_list: null\nrating_is_average: 1\ncomments_template: comment\ncomments_title_pattern:\ncomments_labels:\n comments:\n spellcount:\n add:\n none:\n low_karma:\n login:\n track:\n refresh:\n commenting:\nis_tags_in_list: null\nis_tags_in_item: 1\nenable_subscriptions: 1\nsubscriptions_recursive_categories: 1\nsubscriptions_letter_tpl:\nsubscriptions_notify_text:\nis_rss: 1\nlist_off_breadcrumb: null\nlist_off_breadcrumb_ctype: null\nlist_on: 1\nlist_off_index: null\nprofile_on: 1\nlist_show_filter: null\nlist_expand_filter: null\nprivacy_type: hide\nlimit: 15\nlist_style:\n - featured\nlist_style_options: null\nlist_style_names: null\ncontext_list_style: null\nitem_off_breadcrumb: null\nitem_on: 1\nis_show_fields_group: null\nhits_on: null\ndisable_info_block: null\nshare_code:\nis_manual_title: null\nseo_title_pattern:\nseo_keys_pattern: \'{content|string_get_meta_keywords}\'\nseo_desc_pattern: \'{content|string_get_meta_description}\'\nis_cats_title: null\nis_cats_h1: null\nis_cats_keys: null\nis_cats_desc: null\nis_cats_auto_url: 1\nseo_cat_h1_pattern:\nseo_cat_title_pattern:\nseo_cat_keys_pattern:\nseo_cat_desc_pattern:\nseo_ctype_h1_pattern:\nis_collapsed: null\n', '---\none: новость\ntwo: новости\nmany: новостей\ncreate: новость\nlist:\nprofile:\n', NULL, NULL, NULL, NULL, NULL); + +INSERT INTO `{#}con_albums` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `cover_image`, `photos_count`, `is_public`) VALUES +(16, 'Красота окружающей природы', 'Фотографии из коллекции сайта deviantart.com', '16-krasota-okruzhayuschei-prirody', NULL, NULL, NULL, 'пример, фото', DATE_SUB(NOW(),INTERVAL 4 DAY), DATE_SUB(NOW(),INTERVAL 3 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 0, 0, 1, NULL, NULL, 0, NULL, 0, NULL); + +INSERT INTO `{#}con_albums_cats_bind` (`item_id`, `category_id`) VALUES +(16, 1); + +DROP TABLE IF EXISTS `{#}con_articles`; +CREATE TABLE `{#}con_articles` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `content` text, + `slug` varchar(100) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `tags` varchar(1000) DEFAULT NULL, + `template` varchar(150) DEFAULT NULL, + `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_last_modified` timestamp NULL DEFAULT NULL, + `date_pub_end` timestamp NULL DEFAULT NULL, + `is_pub` tinyint(1) DEFAULT '1', + `hits_count` int(11) DEFAULT '0', + `user_id` int(11) unsigned DEFAULT NULL, + `parent_id` int(11) unsigned DEFAULT NULL, + `parent_type` varchar(32) DEFAULT NULL, + `parent_title` varchar(100) DEFAULT NULL, + `parent_url` varchar(255) DEFAULT NULL, + `is_parent_hidden` tinyint(1) DEFAULT NULL, + `category_id` int(11) unsigned NOT NULL DEFAULT '1', + `folder_id` int(11) unsigned DEFAULT NULL, + `is_comments_on` tinyint(1) unsigned DEFAULT '1', + `comments` int(11) NOT NULL DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `is_deleted` tinyint(1) unsigned DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT '1', + `approved_by` int(11) DEFAULT NULL, + `date_approved` timestamp NULL DEFAULT NULL, + `is_private` tinyint(1) NOT NULL DEFAULT '0', + `teaser` text, + `kind` int(11) DEFAULT NULL, + `notice` text, + `source` text, + `featured` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `category_id` (`category_id`), + KEY `approved_by` (`approved_by`), + KEY `folder_id` (`folder_id`), + KEY `slug` (`slug`), + KEY `date_pub` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `parent_id` (`parent_id`,`parent_type`,`date_pub`), + KEY `user_id` (`user_id`,`date_pub`), + KEY `date_pub_end` (`date_pub_end`), + KEY `dataset_reviews` (`kind`,`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `dataset_featured` (`featured`,`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `dataset_rating` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`rating`), + FULLTEXT KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `teaser`, `kind`, `notice`, `source`, `featured`) VALUES +(1, 'Эллиптический перигей в XXI веке', '

Как было показано выше, эклиптика отражает близкий ионный хвост – север вверху, восток слева. Прямое восхождение перечеркивает сарос, это довольно часто наблюдается у сверхновых звезд второго типа. Прямое восхождение выбирает космический космический мусор – север вверху, восток слева. Афелий неустойчив.

\r\n\r\n

Различное расположение традиционно вызывает метеорит, таким образом, часовой пробег каждой точки поверхности на экваторе равен 1666км. Млечный Путь многопланово отражает вращательный большой круг небесной сферы, данное соглашение было заключено на 2-й международной конференции "Земля из космоса - наиболее эффективные решения". В отличие от давно известных астрономам планет земной группы, ось существенно отражает вращательный тропический год, учитывая, что в одном парсеке 3,26 световых года. Бесспорно, засветка неба колеблет тропический год - это солнечное затмение предсказал ионянам Фалес Милетский. Как мы уже знаем, эффективный диаметp дает поперечник, но кольца видны только при 40–50.

\r\n\r\n

В связи с этим нужно подчеркнуть, что красноватая звездочка притягивает радиант – это скорее индикатор, чем примета. Эффективный диаметp прекрасно вызывает центральный натуральный логарифм – север вверху, восток слева. Угловая скорость вращения выбирает вращательный терминатор, Плутон не входит в эту классификацию. Поперечник отражает натуральный логарифм, но кольца видны только при 40–50.

', '1-ellipticheskii-perigei-v-xxi-veke', NULL, NULL, NULL, 'пример, статья, астрономия', DATE_SUB(NOW(),INTERVAL 13 DAY), DATE_SUB(NOW(),INTERVAL 13 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 2, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 13 DAY), 0, 'Как было показано выше, эклиптика отражает близкий ионный хвост – север вверху, восток слева.', 1, NULL, 'http://referats.yandex.ru/astronomy.xml', NULL), +(4, 'Недонасыщенный алмаз: предпосылки и развитие', '

\r\n Изостазия систематически вызывает меловой орогенез, что увязывается со структурно-тектонической обстановкой, гидродинамическими условиями и литолого-минералогическим составом пород. Силл переоткладывает апофиз, поскольку непосредственно мантийные струи не наблюдаются. Исследование указанной связи должно опираться на тот факт, что ложе определяет гипергенный минерал, основными элементами которого являются обширные плосковершинные и пологоволнистые возвышенности. Пока магма остается в камере, количество пирокластического материала пластично изменяет приток, за счет чего увеличивается мощность коры под многими хребтами. Зандровое поле определяет перенос, где присутствуют моренные суглинки днепровского возраста. Пойма опускает батолит, что в общем свидетельствует о преобладании тектонических опусканий в это время.\r\n

\r\n

\r\n Руда, главным образом в карбонатных породах палеозоя, поступает в гранит, что в конце концов приведет к полному разрушению хребта под действием собственного веса. Судя по находям древнейших моренных отложений на Онежско-Ладожском перешейке, магнитное наклонение покрывает эстуарий, что обусловлено не только первичными неровностями эрозионно-тектонического рельефа поверхности кристаллических пород, но и проявлениями долее поздней блоковой тектоники. Лавовый поток смещает железистый дрейф континентов, но приводит к загрязнению окружающей среды. Капиллярное поднятие, по которому один блок опускается относительно другого, поперечно фоссилизирует гипергенный минерал, поскольку непосредственно мантийные струи не наблюдаются. В противоположность этому порода кавернозна.\r\n

\r\n

\r\n Базальтовый слой разогревает сталактит, где присутствуют моренные суглинки днепровского возраста. Межледниковье, с учетом региональных факторов, интенсивно деформирует фирн, что, однако, не уничтожило доледниковую переуглубленную гидросеть древних долин. Океаническое ложе косо аккумулирует окско-донской грабен, и в то же время устанавливается достаточно приподнятый над уровнем моря коренной цоколь. Краевая часть артезианского бассейна, так как не наследует древние поднятия, наклонно аккумулирует кремнистый ийолит-уртит, что, однако, не уничтожило доледниковую переуглубленную гидросеть древних долин.\r\n

', '4-nedonasyschennyi-almaz-predposylki-i-razvitie', NULL, NULL, NULL, 'статья, наука', DATE_SUB(NOW(),INTERVAL 12 DAY), DATE_SUB(NOW(),INTERVAL 12 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 1, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 12 DAY), 0, '

\r\n Изостазия систематически вызывает меловой орогенез, что увязывается со структурно-тектонической обстановкой, гидродинамическими условиями и литолого-минералогическим составом пород.\r\n

', 3, NULL, 'http://referats.yandex.ru/geology.xml', NULL), +(11, 'Общественный анализ зарубежного опыта', '

\r\n План размещения методически тормозит из ряда вон выходящий продуктовый ассортимент, опираясь на опыт западных коллег. Структура рынка, как следует из вышесказанного, инновационна. Исходя из структуры пирамиды Маслоу, производство детерминирует рыночный традиционный канал, оптимизируя бюджеты. По сути, создание приверженного покупателя директивно трансформирует инструмент маркетинга, используя опыт предыдущих кампаний.\r\n

\r\n

\r\n Ребрендинг, на первый взгляд, индуцирует ролевой план размещения, используя опыт предыдущих кампаний. Маркетинговая коммуникация индуцирует креативный бюджет на размещение, размещаясь во всех медиа. Целевая аудитория, как следует из вышесказанного, все еще интересна для многих. Целевая аудитория, согласно Ф.Котлеру, программирует экспериментальный рекламный клаттер, учитывая современные тенденции.\r\n

', '11-obschestvennyi-analiz-zarubezhnogo-opyta', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 7 MINUTE), DATE_SUB(NOW(),INTERVAL 7 MINUTE), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 9, NULL, 1, 2, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 7 MINUTE), 0, '

\r\n Общество потребления не критично. Баланс спроса и предложения переворачивает комплексный стратегический рыночный план, расширяя долю рынка.\r\n

', 2, NULL, NULL, NULL), +(10, 'Мифологический реципиент', '

\r\n Звукопись отражает лирический субъект, где автор является полновластным хозяином своих персонажей, а они - его марионетками. Матрица редуцирует экзистенциальный стих, при этом нельзя говорить, что это явления собственно фоники, звукописи. Анжамбеман, если уловить хореический ритм или аллитерацию на "р", многопланово иллюстрирует диалогический контекст, и это придает ему свое звучание, свой характер. Речевой акт пространственно выбирает брахикаталектический стих, первым образцом которого принято считать книгу А.Бертрана "Гаспар из тьмы".\r\n

', '10-mifologicheskii-recipient', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 1 DAY), DATE_SUB(NOW(),INTERVAL 1 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 6, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 1 DAY), 0, '

\r\n Однако Л.В.Щерба утверждал, что метаязык диссонирует замысел, при этом нельзя говорить, что это явления собственно фоники, звукописи. Холодный цинизм притягивает былинный ямб, при этом нельзя говорить, что это явления собственно фоники, звукописи. Лирика параллельна. Палимпсест начинает экзистенциальный дискурс, где автор является полновластным хозяином своих персонажей, а они - его марионетками.\r\n

', 1, NULL, NULL, NULL); + +DROP TABLE IF EXISTS `{#}con_articles_cats`; +CREATE TABLE `{#}con_articles_cats` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(11) unsigned DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `description` text NULL DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `slug_key` varchar(255) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `seo_h1` varchar(256) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `ns_left` int(11) DEFAULT NULL, + `ns_right` int(11) DEFAULT NULL, + `ns_level` int(11) DEFAULT NULL, + `ns_differ` varchar(32) NOT NULL DEFAULT '', + `ns_ignore` tinyint(4) NOT NULL DEFAULT '0', + `allow_add` text, + `is_hidden` tinyint(1) UNSIGNED DEFAULT NULL, + `cover` text, + PRIMARY KEY (`id`), + KEY `ordering` (`ordering`), + KEY `slug` (`slug`), + KEY `ns_left` (`ns_level`,`ns_right`,`ns_left`), + KEY `parent_id` (`parent_id`,`ns_left`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles_cats` (`id`, `parent_id`, `title`, `slug`, `slug_key`, `seo_keys`, `seo_desc`, `seo_title`, `ordering`, `ns_left`, `ns_right`, `ns_level`, `ns_differ`, `ns_ignore`) VALUES +(1, 0, '---', NULL, NULL, NULL, NULL, NULL, 1, 1, 18, 0, '', 0), +(2, 1, 'Астрономия', 'astronomija', 'astronomija', 'звезды, космос, небо, наука', NULL, NULL, 1, 2, 7, 1, '', 0), +(3, 2, 'Наука и космос', 'astronomija/nauka-i-kosmos', NULL, NULL, NULL, NULL, 1, 5, 6, 2, '', 0), +(4, 2, 'Астрофизика', 'astronomija/astrofizika', NULL, NULL, NULL, NULL, 2, 3, 4, 2, '', 0), +(5, 1, 'Геология', 'geologija', NULL, NULL, NULL, NULL, 2, 8, 9, 1, '', 0), +(6, 1, 'Литература', 'literatura', NULL, NULL, NULL, NULL, 3, 10, 15, 1, '', 0), +(7, 6, 'Отечественная', 'literatura/otechestvennaja', NULL, NULL, NULL, NULL, 1, 11, 12, 2, '', 0), +(8, 6, 'Зарубежная', 'literatura/zarubezhnaja', NULL, NULL, NULL, NULL, 2, 13, 14, 2, '', 0), +(9, 1, 'Маркетинг', 'marketing', NULL, NULL, NULL, NULL, 4, 16, 17, 1, '', 0); + +DROP TABLE IF EXISTS `{#}con_articles_cats_bind`; +CREATE TABLE `{#}con_articles_cats_bind` ( + `item_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + KEY `item_id` (`item_id`), + KEY `category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles_cats_bind` (`item_id`, `category_id`) VALUES +(1, 2), +(4, 1), +(11, 9), +(10, 6); + +DROP TABLE IF EXISTS `{#}con_articles_fields`; +CREATE TABLE `{#}con_articles_fields` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `name` varchar(40) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `hint` varchar(200) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `is_enabled` tinyint(1) UNSIGNED DEFAULT '1', + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_list` tinyint(1) DEFAULT NULL, + `is_in_item` tinyint(1) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `is_private` tinyint(1) DEFAULT NULL, + `is_fixed` tinyint(1) DEFAULT NULL, + `is_fixed_type` tinyint(1) DEFAULT NULL, + `is_system` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + `groups_read` text, + `groups_add` text, + `groups_edit` text, + `filter_view` text, + PRIMARY KEY (`id`), + KEY `is_enabled` (`is_enabled`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_articles_fields` (`id`, `ctype_id`, `name`, `title`, `hint`, `ordering`, `fieldset`, `type`, `is_in_list`, `is_in_item`, `is_in_filter`, `is_private`, `is_fixed`, `is_fixed_type`, `is_system`, `values`, `options`, `groups_read`, `groups_edit`) VALUES +(1, 5, 'title', 'Заголовок', NULL, 1, NULL, 'caption', 1, 1, 1, NULL, 1, 1, 0, NULL, '---\nlabel_in_list: none\nlabel_in_item: none\nmin_length: 3\nmax_length: 100\nis_required: true\n', NULL, NULL), +(2, 5, 'date_pub', 'Дата публикации', NULL, 2, NULL, 'date', 1, 1, NULL, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', '---\n- 0\n'), +(3, 5, 'user', 'Автор', NULL, 3, NULL, 'user', 1, 1, 0, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\n', NULL, NULL), +(4, 5, 'content', 'Текст статьи', 'Введите полный текст статьи', 7, 'Содержание', 'html', NULL, 1, NULL, NULL, 1, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len:\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(5, 5, 'teaser', 'Анонс статьи', 'Краткая аннотация к статье, будет показана в общем списке статей', 6, 'Содержание', 'html', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len:\nlabel_in_list: none\nlabel_in_item: none\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(6, 5, 'kind', 'Тип статьи', NULL, 4, 'Информация о статье', 'list', NULL, 1, 1, NULL, NULL, NULL, NULL, '1 | Авторская\r\n2 | Рецензия\r\n3 | Перевод', '---\nfilter_multiple: 1\nlabel_in_list: left\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', '---\n- 0\n'), +(7, 5, 'notice', 'Комментарий редакции', 'Поле доступно только для администраторов и модераторов', 9, 'Служебное', 'text', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nmin_length: 0\nmax_length: 2048\nis_html_filter: null\nlabel_in_list: top\nlabel_in_item: top\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 5\n- 6\n'), +(8, 5, 'source', 'Источник', 'Укажите ссылку на источник текста', 5, 'Информация о статье', 'url', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nredirect: 1\nauto_http: 1\nlabel_in_list: left\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', '---\n- 0\n'), +(9, 5, 'featured', 'Выбор редакции', 'Поле доступно только для администраторов и модераторов', 8, 'Служебное', 'checkbox', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '---\nlabel_in_list: left\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', '---\n- 5\n- 6\n'); + +DROP TABLE IF EXISTS `{#}con_articles_props`; +CREATE TABLE `{#}con_articles_props` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + PRIMARY KEY (`id`), + KEY `is_active` (`is_in_filter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_articles_props_bind`; +CREATE TABLE `{#}con_articles_props_bind` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `prop_id` int(11) DEFAULT NULL, + `cat_id` int(11) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `prop_id` (`prop_id`), + KEY `ordering` (`cat_id`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_articles_props_values`; +CREATE TABLE `{#}con_articles_props_values` ( + `prop_id` int(11) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + KEY `prop_id` (`prop_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_board`; +CREATE TABLE `{#}con_board` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `content` text, + `slug` varchar(100) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `tags` varchar(1000) DEFAULT NULL, + `template` varchar(150) DEFAULT NULL, + `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_last_modified` timestamp NULL DEFAULT NULL, + `date_pub_end` timestamp NULL DEFAULT NULL, + `is_pub` tinyint(1) DEFAULT '1', + `hits_count` int(11) DEFAULT '0', + `user_id` int(11) unsigned DEFAULT NULL, + `parent_id` int(11) unsigned DEFAULT NULL, + `parent_type` varchar(32) DEFAULT NULL, + `parent_title` varchar(100) DEFAULT NULL, + `parent_url` varchar(255) DEFAULT NULL, + `is_parent_hidden` tinyint(1) DEFAULT NULL, + `category_id` int(11) unsigned NOT NULL DEFAULT '1', + `folder_id` int(11) unsigned DEFAULT NULL, + `is_comments_on` tinyint(1) unsigned DEFAULT '1', + `comments` int(11) NOT NULL DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `is_deleted` tinyint(1) unsigned DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT '1', + `approved_by` int(11) DEFAULT NULL, + `date_approved` timestamp NULL DEFAULT NULL, + `is_private` tinyint(1) NOT NULL DEFAULT '0', + `photo` text, + `photos` text, + `price` float DEFAULT NULL, + `phone` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `category_id` (`category_id`), + KEY `approved_by` (`approved_by`), + KEY `folder_id` (`folder_id`), + KEY `slug` (`slug`), + KEY `date_pub` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `parent_id` (`parent_id`,`parent_type`,`date_pub`), + KEY `user_id` (`user_id`,`date_pub`), + KEY `date_pub_end` (`date_pub_end`), + KEY `dataset_cheap` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`price`), + FULLTEXT KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_board` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `photo`, `photos`, `price`, `phone`) VALUES +(7, 'Продам квартиру в новостройке', 'Хорошая, просторная квартира с двумя этажами. Есть вся необходимая мебель.\r\nАгентов просьба не беспокоить. Реальному покупателю - торг.\r\nФотографии by abahasep @ deviantart.com', '7-prodam-kvartiru-v-novostroike', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 5 MINUTE), DATE_SUB(NOW(),INTERVAL 5 MINUTE), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 3, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 5 MINUTE), 0, '---\nnormal: >\n 000/u1/0/3/prodam-kvartiru-v-novostroike-photo-normal.jpg\nsmall: >\n 000/u1/e/e/prodam-kvartiru-v-novostroike-photo-small.jpg\nmicro: >\n 000/u1/3/e/prodam-kvartiru-v-novostroike-photo-micro.jpg\n', '---\n- \n big: >\n 000/u1/9/d/prodam-kvartiru-v-novostroike-photos-big.webp\n small: >\n 000/u1/b/c/prodam-kvartiru-v-novostroike-photos-small.webp\n- \n big: >\n 000/u1/8/b/prodam-kvartiru-v-novostroike-photos-big.jpg\n small: >\n 000/u1/b/e/prodam-kvartiru-v-novostroike-photos-small.jpg\n- \n big: >\n 000/u1/f/3/prodam-kvartiru-v-novostroike-photos-big.jpg\n small: >\n 000/u1/b/7/prodam-kvartiru-v-novostroike-photos-small.jpg\n', 5500000, '100-20-30'); + +DROP TABLE IF EXISTS `{#}con_board_cats`; +CREATE TABLE `{#}con_board_cats` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(11) unsigned DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `description` text NULL DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `slug_key` varchar(255) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `seo_h1` varchar(256) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `ns_left` int(11) DEFAULT NULL, + `ns_right` int(11) DEFAULT NULL, + `ns_level` int(11) DEFAULT NULL, + `ns_differ` varchar(32) NOT NULL DEFAULT '', + `ns_ignore` tinyint(4) NOT NULL DEFAULT '0', + `allow_add` text, + `is_hidden` tinyint(1) UNSIGNED DEFAULT NULL, + `cover` text, + PRIMARY KEY (`id`), + KEY `ordering` (`ordering`), + KEY `slug` (`slug`), + KEY `ns_left` (`ns_level`,`ns_right`,`ns_left`), + KEY `parent_id` (`parent_id`,`ns_left`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_board_cats` (`id`, `parent_id`, `title`, `slug`, `slug_key`, `seo_keys`, `seo_desc`, `seo_title`, `ordering`, `ns_left`, `ns_right`, `ns_level`, `ns_differ`, `ns_ignore`) VALUES +(1, 0, '---', NULL, NULL, NULL, NULL, NULL, 1, 1, 24, 0, '', 0), +(2, 1, 'Недвижимость', 'nedvizhimost', NULL, NULL, NULL, NULL, 1, 2, 7, 1, '', 0), +(3, 2, 'Квартиры', 'nedvizhimost/kvartiry', NULL, NULL, NULL, NULL, 1, 3, 4, 2, '', 0), +(4, 2, 'Коттеджи', 'nedvizhimost/kottedzhi', NULL, NULL, NULL, NULL, 2, 5, 6, 2, '', 0), +(5, 1, 'Автомобили', 'avtomobili', NULL, NULL, NULL, NULL, 2, 8, 17, 1, '', 0), +(8, 1, 'Работа', 'rabota', NULL, NULL, NULL, NULL, 3, 18, 23, 1, '', 0), +(9, 8, 'Вакансии', 'rabota/vakansii', NULL, NULL, NULL, NULL, 1, 19, 20, 2, '', 0), +(10, 8, 'Резюме', 'rabota/rezyume', NULL, NULL, NULL, NULL, 2, 21, 22, 2, '', 0), +(11, 5, 'Audi', 'avtomobili/audi', NULL, NULL, NULL, NULL, 1, 9, 10, 2, '', 0), +(12, 5, 'Ford', 'avtomobili/ford', NULL, NULL, NULL, NULL, 2, 11, 12, 2, '', 0), +(13, 5, 'Renault', 'avtomobili/renault', NULL, NULL, NULL, NULL, 3, 13, 14, 2, '', 0), +(14, 5, 'Kia', 'avtomobili/kia', NULL, NULL, NULL, NULL, 4, 15, 16, 2, '', 0); + +DROP TABLE IF EXISTS `{#}con_board_cats_bind`; +CREATE TABLE `{#}con_board_cats_bind` ( + `item_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + KEY `item_id` (`item_id`), + KEY `category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_board_cats_bind` (`item_id`, `category_id`) VALUES +(7, 3); + +DROP TABLE IF EXISTS `{#}con_board_fields`; +CREATE TABLE `{#}con_board_fields` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `name` varchar(40) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `hint` varchar(200) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `is_enabled` tinyint(1) UNSIGNED DEFAULT '1', + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_list` tinyint(1) DEFAULT NULL, + `is_in_item` tinyint(1) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `is_private` tinyint(1) DEFAULT NULL, + `is_fixed` tinyint(1) DEFAULT NULL, + `is_fixed_type` tinyint(1) DEFAULT NULL, + `is_system` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + `groups_read` text, + `groups_add` text, + `groups_edit` text, + `filter_view` text, + PRIMARY KEY (`id`), + KEY `is_enabled` (`is_enabled`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_board_fields` (`id`, `ctype_id`, `name`, `title`, `hint`, `ordering`, `is_enabled`, `fieldset`, `type`, `is_in_list`, `is_in_item`, `is_in_filter`, `is_private`, `is_fixed`, `is_fixed_type`, `is_system`, `values`, `options`, `groups_read`, `groups_add`, `groups_edit`, `filter_view`) VALUES +(1, 9, 'title', 'Заголовок объявления', NULL, 2, 1, NULL, 'caption', 1, 1, NULL, NULL, 1, 1, 0, NULL, '---\nlabel_in_list: left\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(2, 9, 'date_pub', 'Дата добавления', NULL, 7, 1, NULL, 'date', 1, 1, 1, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(3, 9, 'user', 'Автор', NULL, 8, 1, NULL, 'user', NULL, 1, NULL, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(4, 9, 'content', 'Текст объявления', NULL, 4, 1, NULL, 'text', NULL, 1, NULL, NULL, 1, NULL, NULL, NULL, '---\nmin_length: 0\nmax_length: 2048\nshow_symbol_count: null\nis_html_filter: 1\nparse_patterns: null\nbuild_redirect_link: null\nteaser_len:\nshow_show_more: null\nin_fulltext_search: null\ncontext_list:\n - 0\nrelation_id:\nlabel_in_list: none\nlabel_in_item: none\nwrap_type: none\nwrap_width:\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_url: null\nis_unique: null\nprofile_value:\nauthor_access: null\n', '---\n', '---\n', '---\n', '---\n'), +(5, 9, 'photo', 'Фотография', NULL, 1, 1, NULL, 'image', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nsize_teaser: small\nsize_full: normal\nsize_modal:\nsizes:\n - normal\n - micro\n - small\nallow_import_link: null\ncontext_list:\n - 0\nrelation_id:\nlabel_in_list: none\nlabel_in_item: none\nwrap_type: left\nwrap_width:\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_url: null\nis_unique: null\nprofile_value:\nauthor_access: null\n', '---\n', '---\n', '---\n', '---\n'), +(6, 9, 'photos', 'Дополнительные фотографии', NULL, 3, 1, NULL, 'images', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nsize_teaser: small\nsize_full: big\nsize_small: small\nsizes:\n - small\n - big\nallow_import_link: null\nfirst_image_emphasize: null\nmax_photos:\ncontext_list:\n - 0\nrelation_id:\nlabel_in_list: none\nlabel_in_item: none\nwrap_type: auto\nwrap_width:\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_url: null\nis_unique: null\nprofile_value:\nauthor_access: null\n', '---\n', '---\n', '---\n', '---\n'), +(7, 9, 'price', 'Цена', NULL, 6, 1, NULL, 'number', 1, 1, 1, NULL, NULL, NULL, NULL, NULL, '---\nfilter_range: 1\nunits: руб.\nlabel_in_list: left\nlabel_in_item: left\nis_required: 1\nis_digits: 1\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(8, 9, 'phone', 'Телефон', NULL, 5, 1, NULL, 'string', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nmin_length: 0\nmax_length: 255\nlabel_in_list: left\nlabel_in_item: left\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value: phone\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL); + +DROP TABLE IF EXISTS `{#}con_board_props`; +CREATE TABLE `{#}con_board_props` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + PRIMARY KEY (`id`), + KEY `is_active` (`is_in_filter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_board_props` (`id`, `ctype_id`, `title`, `fieldset`, `type`, `is_in_filter`, `values`, `options`) VALUES +(1, 9, 'Марка', NULL, 'list', 1, 'Audi\r\nBMW\r\nMercedes\r\nSkoda\r\nFiat', '---\nis_required: null\nis_multiple: null\n'), +(3, 9, 'Тип кузова', NULL, 'list', 1, 'Седан\r\nХэтчбек\r\nУниверсал\r\nМинивэн\r\nКроссовер', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(6, 9, 'Год выпуска', NULL, 'number', 1, NULL, '---\nis_required: null\nunits:\nis_filter_range: 1\nis_filter_multi: null\n'), +(7, 9, 'Тип предложения', NULL, 'list', 1, 'Продам\r\nКуплю\r\nСдам\r\nСниму', '---\nunits:\nis_required: null\nis_filter_multi: null\n'), +(8, 9, 'Общая площадь', 'Площадь', 'number', NULL, NULL, '---\nunits: м²\nis_required: 1\nis_filter_multi: null\n'), +(9, 9, 'Количество комнат', 'Квартира', 'number', 1, NULL, '---\nis_required: 1\nunits:\nis_filter_range: 1\nis_filter_multi: null\n'), +(11, 9, 'Количество этажей', NULL, 'number', 1, NULL, NULL), +(12, 9, 'Есть гараж', NULL, 'list', 1, 'Да\r\nНет', NULL), +(13, 9, 'Тип дома', 'Дом', 'list', 1, 'Новостройка\r\nВторичка', '---\nunits:\nis_required: null\nis_filter_multi: 1\n'), +(14, 9, 'Пробег', NULL, 'number', 1, NULL, '---\nis_required: 1\nunits: км\nis_filter_range: 1\nis_filter_multi: null\n'), +(15, 9, 'Комплектация', NULL, 'list', NULL, 'Базовая\r\nСредняя\r\nМаксимальная', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(16, 9, 'Жилая площадь', 'Площадь', 'number', NULL, NULL, '---\nunits: м²\nis_required: 1\nis_filter_multi: null\n'), +(17, 9, 'Есть балкон', 'Квартира', 'list', NULL, 'Да\r\nНет', '---\nunits:\nis_required: null\nis_filter_multi: null\n'), +(18, 9, 'Санузел', 'Квартира', 'list', NULL, 'Смежный\r\nРаздельный', '---\nunits:\nis_required: null\nis_filter_multi: null\n'), +(19, 9, 'Этаж', 'Дом', 'number', 1, NULL, '---\nis_required: 1\nunits:\nis_filter_range: 1\nis_filter_multi: null\n'), +(20, 9, 'Этажей в доме', 'Дом', 'number', NULL, NULL, '---\nunits:\nis_required: 1\nis_filter_multi: null\n'), +(21, 9, 'Модель', NULL, 'string', 1, NULL, '---\nis_required: 1\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(22, 9, 'Объем двигателя', NULL, 'list', 1, '0.5\r\n0.6\r\n0.7\r\n0.8\r\n0.9\r\n1.0\r\n1.2\r\n1.4\r\n1.6\r\n1.8\r\n2.0\r\n2.2\r\n2.5\r\n3.0\r\n3.2\r\n>3', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(23, 9, 'Трансмиссия', NULL, 'list', 1, 'Механическая\r\nАвтоматическая\r\nВариатор\r\nРобот', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(24, 9, 'Цвет', NULL, 'string', NULL, NULL, '---\nis_required: 1\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(25, 9, 'Модель Audi', NULL, 'list', 1, 'A1\r\nA2\r\nA3\r\nA4\r\nA5\r\nA6\r\nA7\r\nA8\r\nQ3\r\nQ5\r\nQ7\r\nTT', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(26, 9, 'Модель Ford', NULL, 'list', 1, 'Escort\r\nExplorer\r\nFiesta\r\nFocus\r\nFocus C-Max\r\nFocus RS\r\nFocus ST\r\nFusion\r\nS-max\r\nScorpio', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(27, 9, 'Модель Renault', NULL, 'list', 1, 'Clio\r\nDuster\r\nEspace\r\nFluence\r\nKangoo\r\nKoleos\r\nLatitude\r\nLogan\r\nMegane\r\nSandero', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'), +(28, 9, 'Модель Kia', NULL, 'list', 1, 'Ceed\r\nCerato\r\nMohave\r\nOptima\r\nPregio\r\nQuoris\r\nRio\r\nShuma\r\nSoul\r\nSpectra', '---\nis_required: null\nunits:\nis_filter_range: null\nis_filter_multi: null\n'); + +DROP TABLE IF EXISTS `{#}con_board_props_bind`; +CREATE TABLE `{#}con_board_props_bind` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `prop_id` int(11) DEFAULT NULL, + `cat_id` int(11) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `prop_id` (`prop_id`), + KEY `ordering` (`cat_id`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_board_props_bind` (`id`, `prop_id`, `cat_id`, `ordering`) VALUES +(38, 7, 3, 1), +(39, 7, 4, 1), +(41, 8, 3, 5), +(42, 8, 4, 2), +(43, 9, 3, 7), +(45, 11, 4, 4), +(46, 12, 4, 5), +(47, 13, 3, 2), +(62, 16, 3, 6), +(63, 16, 4, 3), +(64, 17, 3, 8), +(65, 18, 3, 9), +(66, 19, 3, 3), +(67, 20, 3, 4), +(71, 6, 5, 2), +(72, 6, 11, 3), +(73, 6, 12, 3), +(74, 6, 13, 3), +(75, 6, 14, 3), +(76, 15, 5, 3), +(77, 15, 11, 4), +(78, 15, 12, 4), +(79, 15, 13, 4), +(80, 15, 14, 4), +(81, 14, 5, 4), +(82, 14, 11, 5), +(83, 14, 12, 5), +(84, 14, 13, 5), +(85, 14, 14, 5), +(86, 3, 5, 1), +(87, 3, 11, 2), +(88, 3, 12, 2), +(89, 3, 13, 2), +(90, 3, 14, 2), +(91, 22, 5, 5), +(92, 22, 11, 6), +(93, 22, 12, 6), +(94, 22, 13, 6), +(95, 22, 14, 6), +(96, 23, 5, 6), +(97, 23, 11, 7), +(98, 23, 12, 7), +(99, 23, 13, 7), +(100, 23, 14, 7), +(101, 24, 5, 7), +(102, 24, 11, 8), +(103, 24, 12, 8), +(104, 24, 13, 8), +(105, 24, 14, 8), +(106, 25, 11, 1), +(107, 26, 12, 1), +(108, 27, 13, 1), +(109, 28, 14, 1), +(110, 6, 10, 1), +(111, 17, 10, 2), +(112, 12, 10, 3), +(113, 16, 10, 4), +(114, 9, 10, 5), +(115, 11, 10, 6), +(116, 15, 10, 7), +(117, 1, 10, 8), +(118, 21, 10, 9), +(119, 25, 10, 10), +(120, 26, 10, 11), +(121, 28, 10, 12), +(122, 27, 10, 13), +(123, 8, 10, 14), +(124, 22, 10, 15), +(125, 14, 10, 16), +(126, 18, 10, 17), +(127, 13, 10, 18), +(128, 3, 10, 19), +(129, 7, 10, 20), +(130, 23, 10, 21), +(131, 24, 10, 22), +(132, 19, 10, 23), +(133, 20, 10, 24); + +DROP TABLE IF EXISTS `{#}con_board_props_values`; +CREATE TABLE `{#}con_board_props_values` ( + `prop_id` int(11) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + KEY `prop_id` (`prop_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_board_props_values` (`prop_id`, `item_id`, `value`) VALUES +(7, 7, '1'), +(13, 7, '1'), +(19, 7, '1'), +(20, 7, '2'), +(8, 7, '120'), +(16, 7, '100'), +(9, 7, '5'), +(17, 7, '1'), +(18, 7, '2'); + +DROP TABLE IF EXISTS `{#}con_news`; +CREATE TABLE `{#}con_news` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `content` text, + `slug` varchar(100) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `tags` varchar(1000) DEFAULT NULL, + `template` varchar(150) DEFAULT NULL, + `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_last_modified` timestamp NULL DEFAULT NULL, + `date_pub_end` timestamp NULL DEFAULT NULL, + `is_pub` tinyint(1) DEFAULT '1', + `hits_count` int(11) DEFAULT '0', + `user_id` int(11) unsigned DEFAULT NULL, + `parent_id` int(11) unsigned DEFAULT NULL, + `parent_type` varchar(32) DEFAULT NULL, + `parent_title` varchar(100) DEFAULT NULL, + `parent_url` varchar(255) DEFAULT NULL, + `is_parent_hidden` tinyint(1) DEFAULT NULL, + `category_id` int(11) unsigned NOT NULL DEFAULT '1', + `folder_id` int(11) unsigned DEFAULT NULL, + `is_comments_on` tinyint(1) unsigned DEFAULT '1', + `comments` int(11) NOT NULL DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `is_deleted` tinyint(1) unsigned DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT '1', + `approved_by` int(11) DEFAULT NULL, + `date_approved` timestamp NULL DEFAULT NULL, + `is_private` tinyint(1) NOT NULL DEFAULT '0', + `teaser` varchar(255) DEFAULT NULL, + `photo` text, + PRIMARY KEY (`id`), + KEY `category_id` (`category_id`), + KEY `approved_by` (`approved_by`), + KEY `folder_id` (`folder_id`), + KEY `slug` (`slug`), + KEY `date_pub` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `parent_id` (`parent_id`,`parent_type`,`date_pub`), + KEY `user_id` (`user_id`,`date_pub`), + KEY `date_pub_end` (`date_pub_end`), + KEY `dataset_discussed` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`comments`), + KEY `dataset_popular` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`rating`), + FULLTEXT KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `teaser`, `photo`) VALUES +(1, 'На улице 22 Партсъезда прорвало трубы с водой', '

\r\n Если основание движется с постоянным ускорением, проекция на подвижные оси трудна в описании. Маховик мал. Погрешность преобразует угол крена, механически интерпретируя полученные выражения. Как уже указывалось, кожух безусловно не входит своими составляющими, что очевидно, в силы нормальных реакций связей, так же как и момент силы трения, что обусловлено малыми углами карданового подвеса. Абсолютно твёрдое тело переворачивает гирогоризонт, перейдя к исследованию устойчивости линейных гироскопических систем с искусственными силами. Тангаж определяет астатический объект, что видно из уравнения кинетической энергии ротора.\r\n

\r\n

\r\n Механическая природа, в силу третьего закона Ньютона, опасна. Векторная форма, как можно показать с помощью не совсем тривиальных вычислений, заставляет иначе взглянуть на то, что такое гирокомпас, что нельзя рассматривать без изменения системы координат. Объект учитывает угол крена, что обусловлено существованием циклического интеграла у второго уравнения системы уравнений малых колебаний. Успокоитель качки, в соответствии с модифицированным уравнением Эйлера, участвует в погрешности определения курса меньше, чем поплавковый период, основываясь на предыдущих вычислениях.\r\n

', '1-na-ulice-prorvalo-truby', NULL, NULL, NULL, 'новости, проишествия', DATE_SUB(NOW(),INTERVAL 9 DAY), DATE_SUB(NOW(),INTERVAL 9 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 5, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 9 DAY), 0, 'Радостные дети бегают по лужам', '---\ncontent_item: 000/u1/5/3/74ca4539.webp\ncontent_list: 000/u1/3/5/c29217d1.webp\ncontent_list_small: 000/u1/4/3/8914eba7.webp\nsmall: 000/u1/0/a/35b34880.jpg\n'), +(2, 'Игрушки становятся дороже', 'Будем, как и раньше, предполагать, что волчок устойчив. Если основание движется с постоянным ускорением, ПИГ не входит своими составляющими, что очевидно, в силы нормальных реакций связей, так же как и прецизионный гироскопический стабилизатоор, изменяя направление движения. Уравнение возмущенного движения, согласно уравнениям Лагранжа, принципиально связывает устойчивый систематический уход, что неправильно при большой интенсивности диссипативных сил. Направление вращает математический маятник, рассматривая уравнения движения тела в проекции на касательную к его траектории. Устойчивость, как следует из системы уравнений, интегрирует гравитационный суммарный поворот, что при любом переменном вращении в горизонтальной плоскости будет направлено вдоль оси. Гировертикаль косвенно требует большего внимания к анализу ошибок, которые даёт курс, составляя уравнения Эйлера для этой системы координат.', '2-igrushki-stanovjatsja-dorozhe', NULL, NULL, NULL, 'новости', DATE_SUB(NOW(),INTERVAL 8 DAY), DATE_SUB(NOW(),INTERVAL 8 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 6, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 8 DAY), 0, 'Эксперты прогнозируют дальнейший рост цен на детские товары', '---\ncontent_item: 000/u1/a/7/f927491e.webp\ncontent_list: 000/u1/5/0/2afcd745.webp\ncontent_list_small: 000/u1/a/0/3ed25154.webp\nsmall: 000/u1/4/5/c44b04bf.webp\n'), +(3, 'В городе открыт сервис для ретро-автомобилей', 'Силовой трёхосный гироскопический стабилизатор, в силу третьего закона Ньютона, неустойчив. Установившийся режим требует перейти к поступательно перемещающейся системе координат, чем и характеризуется дифференциальный угол тангажа, составляя уравнения Эйлера для этой системы координат. Максимальное отклонение мгновенно. Отсюда следует, что ось собственного вращения даёт большую проекцию на оси, чем подвес, учитывая смещения центра масс системы по оси ротора.', '3-v-gorode-otkryt-servis-dlja-retro-avtomobilei', NULL, NULL, NULL, 'новости, пример', DATE_SUB(NOW(),INTERVAL 7 DAY), DATE_SUB(NOW(),INTERVAL 7 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 3, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 7 DAY), 0, 'Каждый желающий может обратиться с просьбой о ремонте', '---\ncontent_item: 000/u1/e/3/923d5458.webp\ncontent_list: 000/u1/6/7/fc4e5bc4.webp\ncontent_list_small: 000/u1/2/e/481e9f06.webp\nsmall: 000/u1/4/2/1a7da83e.jpg\n'), +(4, 'Дачный сезон на Урале официально начался', 'BTL, не меняя концепции, изложенной выше, консолидирует стиль менеджмента, используя опыт предыдущих кампаний. VIP-мероприятие, как следует из вышесказанного, консолидирует SWOT-анализ, используя опыт предыдущих кампаний. Медиа, отбрасывая подробности, изящно раскручивает анализ рыночных цен, невзирая на действия конкурентов. Стоит отметить, что promotion-кампания вырождена. Показ баннера, анализируя результаты рекламной кампании, концентрирует обществвенный анализ зарубежного опыта, используя опыт предыдущих кампаний. А вот по мнению аналитиков партисипативное планирование экономит эмпирический рекламоноситель, работая над проектом.', '4-dachnyi-sezon-otkryt', NULL, NULL, NULL, 'пример', DATE_SUB(NOW(),INTERVAL 6 DAY), DATE_SUB(NOW(),INTERVAL 6 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 2, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 6 DAY), 0, 'Горожане массово переезжают за город', '---\ncontent_item: 000/u1/a/5/53e113d9.webp\ncontent_list: 000/u1/9/3/6c024907.webp\ncontent_list_small: 000/u1/f/7/99914b0f.webp\nsmall: 000/u1/7/2/b262ab6f.jpg\n'), +(5, 'Бизнес ожидает снижения налогов', 'Продвижение проекта, пренебрегая деталями, поразительно. Стратегический рыночный план решительно нейтрализует инструмент маркетинга, полагаясь на инсайдерскую информацию. Можно предположить, что VIP-мероприятие настроено позитивно. Баннерная реклама, в рамках сегодняшних воззрений, охватывает сублимированный BTL, отвоевывая рыночный сегмент.\r\n\r\nУзнавание бренда, как следует из вышесказанного, слабо притягивает ролевой медиавес, оптимизируя бюджеты. Продукт, анализируя результаты рекламной кампании, концентрирует культурный продуктовый ассортимент, повышая конкуренцию. Позиционирование на рынке конструктивно. Личность топ менеджера, безусловно, создает жизненный цикл продукции, учитывая современные тенденции.', '5-snizhenie-nalogov-dlja-biznesa', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 5 DAY), DATE_SUB(NOW(),INTERVAL 5 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 3, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 5 DAY), 0, 'Юридические лица будут платить еще меньше', '---\ncontent_item: 000/u1/2/6/60826896.webp\ncontent_list: 000/u1/1/b/6e8291e5.webp\ncontent_list_small: 000/u1/2/3/7e8cf01c.webp\nsmall: 000/u1/3/7/52241df9.jpg\n'), +(6, 'Все больше россиян покупают дома за границей', 'Наш современник стал особенно чутко относиться к слову, однако дольник жизненно приводит мелодический зачин, туда же попадает и еще недавно вызывавший безусловную симпатию гетевский Вертер. В заключении добавлю, полисемия отталкивает парафраз – это уже пятая стадия понимания по М.Бахтину. Однако Л.В.Щерба утверждал, что расположение эпизодов существенно отражает сюжетный абстракционизм, но не рифмами. Женское окончание начинает конструктивный скрытый смысл, об этом свидетельствуют краткость и завершенность формы, бессюжетность, своеобразие тематического развертывания. Расположение эпизодов начинает подтекст, что нельзя сказать о нередко манерных эпитетах. Если выстроить в ряд случаи инверсий у Державина, то расположение эпизодов диссонирует словесный речевой акт, но языковая игра не приводит к активно-диалогическому пониманию.', '6-vse-bolshe-rossijan-pokupayut-nedvizhimost-za-granicei', NULL, NULL, NULL, 'пример, новости', DATE_SUB(NOW(),INTERVAL 4 DAY), DATE_SUB(NOW(),INTERVAL 4 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 2, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 4 DAY), 0, 'За последний год их количество заметно выросло', '---\ncontent_item: >\n 000/u1/5/b/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp\ncontent_list: >\n 000/u1/c/9/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp\ncontent_list_small: >\n 000/u1/e/f/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp\nsmall: >\n 000/u1/5/5/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg\n'), +(7, 'Количество преступлений в России сокращается', 'Ю.Лотман, не дав ответа, тут же запутывается в проблеме превращения не-текста в текст, поэтому нет смысла утверждать, что первое полустишие начинает механизм сочленений, так как в данном случае роль наблюдателя опосредована ролью рассказчика. Брахикаталектический стих приводит палимпсест, первым образцом которого принято считать книгу А.Бертрана "Гаспар из тьмы". Наш современник стал особенно чутко относиться к слову, однако впечатление существенно дает ямб, так как в данном случае роль наблюдателя опосредована ролью рассказчика. Цитата как бы придвигает к нам прошлое, при этом звукопись дает мелодический дактиль, также необходимо сказать о сочетании метода апроприации художественных стилей прошлого с авангардистскими стратегиями. Слово кумулятивно. Контрапункт, несмотря на внешние воздействия, существенно иллюстрирует диалогический не-текст, туда же попадает и еще недавно вызывавший безусловную симпатию гетевский Вертер.', '7-kolichestvo-prestuplenii-v-rossii-sokraschaetsja', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 3 DAY), DATE_SUB(NOW(),INTERVAL 3 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 5, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 3 DAY), 0, 'В последних отчетах МВД видна положительная тенденция', '---\ncontent_item: >\n 000/u1/3/1/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp\ncontent_list: >\n 000/u1/1/2/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp\ncontent_list_small: >\n 000/u1/e/8/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp\nsmall: >\n 000/u1/1/0/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg\n'), +(8, 'Инвестиции для чайников: куда вкладывать?', 'Из приведенных текстуальных фрагментов видно, как матрица абсурдно просветляет диалогический контекст, где автор является полновластным хозяином своих персонажей, а они - его марионетками. Эстетическое воздействие, на первый взгляд, осознаёт сюжетный генезис свободного стиха, туда же попадает и еще недавно вызывавший безусловную симпатию гетевский Вертер. Басня, как бы это ни казалось парадоксальным, доступна. Стих текстологически отталкивает поэтический амфибрахий, однако дальнейшее развитие приемов декодирования мы находим в работах академика В.Виноградова. Зачин редуцирует конструктивный анапест, об этом свидетельствуют краткость и завершенность формы, бессюжетность, своеобразие тематического развертывания.', '8-investicii-dlja-chainikov-kuda-vkladyvat', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 1 DAY), DATE_SUB(NOW(),INTERVAL 3 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 3, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 1 DAY), 0, 'Читайте в нашем обзоре самых популярных способов инвестиций', '---\ncontent_item: >\n 000/u1/9/8/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp\ncontent_list: >\n 000/u1/7/6/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp\ncontent_list_small: >\n 000/u1/7/e/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp\nsmall: >\n 000/u1/0/b/investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg\n'), +(9, 'Россияне стали первыми на Чемпионате Мира', 'Ударение, соприкоснувшись в чем-то со своим главным антагонистом в постструктурной поэтике, диссонирует коммунальный модернизм, туда же попадает и еще недавно вызывавший безусловную симпатию гетевский Вертер. Скрытый смысл вызывает глубокий контрапункт, но не рифмами. Олицетворение, если уловить хореический ритм или аллитерацию на "р", аннигилирует симулякр, при этом нельзя говорить, что это явления собственно фоники, звукописи. Матрица параллельна.', '9-rossijane-stali-pervymi-na-chempionate-mira', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 2 DAY), DATE_SUB(NOW(),INTERVAL 2 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 7, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 2 DAY), 0, 'Наша команда не оставила шансов конкурентам', '---\ncontent_item: >\n 000/u1/2/2/rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp\ncontent_list: >\n 000/u1/1/f/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp\ncontent_list_small: >\n 000/u1/0/7/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp\nsmall: >\n 000/u1/6/e/rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg\n'); + +DROP TABLE IF EXISTS `{#}con_news_cats`; +CREATE TABLE `{#}con_news_cats` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(11) unsigned DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `description` text NULL DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `slug_key` varchar(255) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `seo_h1` varchar(256) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `ns_left` int(11) DEFAULT NULL, + `ns_right` int(11) DEFAULT NULL, + `ns_level` int(11) DEFAULT NULL, + `ns_differ` varchar(32) NOT NULL DEFAULT '', + `ns_ignore` tinyint(4) NOT NULL DEFAULT '0', + `allow_add` text, + `is_hidden` tinyint(1) UNSIGNED DEFAULT NULL, + `cover` text, + PRIMARY KEY (`id`), + KEY `ordering` (`ordering`), + KEY `slug` (`slug`), + KEY `ns_left` (`ns_level`,`ns_right`,`ns_left`), + KEY `parent_id` (`parent_id`,`ns_left`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news_cats` (`id`, `parent_id`, `title`, `slug`, `slug_key`, `seo_keys`, `seo_desc`, `seo_title`, `ordering`, `ns_left`, `ns_right`, `ns_level`, `ns_differ`, `ns_ignore`) VALUES +(1, 0, '---', NULL, NULL, NULL, NULL, NULL, 1, 1, 14, 0, '', 0), +(2, 1, 'Общество', 'obschestvo', NULL, NULL, NULL, NULL, 1, 2, 3, 1, '', 0), +(3, 1, 'Бизнес', 'biznes', NULL, NULL, NULL, NULL, 2, 4, 5, 1, '', 0), +(4, 1, 'Политика', 'politika', NULL, NULL, NULL, NULL, 3, 6, 7, 1, '', 0), +(5, 1, 'Происшествия', 'proisshestvija', NULL, NULL, NULL, NULL, 4, 8, 9, 1, '', 0), +(6, 1, 'В мире', 'v-mire', NULL, NULL, NULL, NULL, 5, 10, 11, 1, '', 0), +(7, 1, 'Спорт', 'sport', NULL, NULL, NULL, NULL, 6, 12, 13, 1, '', 0); + +DROP TABLE IF EXISTS `{#}con_news_cats_bind`; +CREATE TABLE `{#}con_news_cats_bind` ( + `item_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + KEY `item_id` (`item_id`), + KEY `category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news_cats_bind` (`item_id`, `category_id`) VALUES +(1, 5), +(2, 6), +(3, 3), +(4, 2), +(5, 3), +(6, 2), +(7, 5), +(8, 3), +(9, 7); + +DROP TABLE IF EXISTS `{#}con_news_fields`; +CREATE TABLE `{#}con_news_fields` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `name` varchar(40) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `hint` varchar(200) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `is_enabled` tinyint(1) UNSIGNED DEFAULT '1', + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_list` tinyint(1) DEFAULT NULL, + `is_in_item` tinyint(1) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `is_private` tinyint(1) DEFAULT NULL, + `is_fixed` tinyint(1) DEFAULT NULL, + `is_fixed_type` tinyint(1) DEFAULT NULL, + `is_system` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + `groups_read` text, + `groups_add` text, + `groups_edit` text, + `filter_view` text, + PRIMARY KEY (`id`), + KEY `is_enabled` (`is_enabled`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_news_fields` (`id`, `ctype_id`, `name`, `title`, `hint`, `ordering`, `is_enabled`, `fieldset`, `type`, `is_in_list`, `is_in_item`, `is_in_filter`, `is_private`, `is_fixed`, `is_fixed_type`, `is_system`, `values`, `options`, `groups_read`, `groups_add`, `groups_edit`, `filter_view`) VALUES +(1, 10, 'title', 'Заголовок новости', NULL, 3, 1, NULL, 'caption', 1, 1, 1, NULL, 1, 1, 0, NULL, '---\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(2, 10, 'date_pub', 'Дата публикации', NULL, 7, 1, NULL, 'date', 1, 1, 1, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nshow_time: true\n', NULL, NULL, NULL, NULL), +(3, 10, 'user', 'Автор', NULL, 6, 1, NULL, 'user', 1, 0, 0, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\n', NULL, NULL, NULL, NULL), +(4, 10, 'content', 'Текст новости', NULL, 5, 1, NULL, 'html', NULL, 1, NULL, NULL, 1, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len:\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(5, 10, 'teaser', 'Краткое описание новости', 'Выводится в списке новостей', 4, 1, NULL, 'string', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '---\nmin_length: 0\nmax_length: 255\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', NULL, '---\n- 0\n', NULL), +(6, 10, 'photo', 'Фотография', NULL, 1, 1, NULL, 'image', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nsize_teaser: content_list_small\nsize_full: content_item\nsize_modal:\nsizes:\n - small\n - content_list_small\n - content_list\n - content_item\nallow_import_link: 1\ndefault_image: null\nis_in_item_pos:\n - page\ncontext_list:\n - 0\nrelation_id:\nvisible_depend: null\nlabel_in_list: none\nlabel_in_item: none\nwrap_type: auto\nwrap_width:\nwrap_style:\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_url: null\nis_unique: null\nprofile_value:\nauthor_access: null\n', '---\n', '---\n', '---\n', '---\n'), +(7, 10, 'cats', 'Категория', NULL, 2, 1, NULL, 'category', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nis_auto_colors: 1\nauto_colors_classes: >\n btn-primary,btn-secondary,btn-success,btn-danger,btn-warning,btn-info,btn-light,btn-dark\nbtn_class: btn btn-sm\nbtn_icon:\nis_in_item_pos:\n - page\ncontext_list:\n - item_view_relation_tab\n - item_view_relation_list\n - items_from_friends\n - trash\n - moderation_list\n - profile_content\n - group_content\n - search\nrelation_id:\nvisible_depend: null\nlabel_in_list: none\nlabel_in_item: none\nwrap_type: auto\nwrap_width:\nwrap_style:\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_url: null\nis_unique: null\nprofile_value:\nauthor_access: null\n', '---\n', '---\n', '---\n', '---\n'); + +DROP TABLE IF EXISTS `{#}con_news_props`; +CREATE TABLE `{#}con_news_props` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + PRIMARY KEY (`id`), + KEY `is_in_filter` (`is_in_filter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_news_props_bind`; +CREATE TABLE `{#}con_news_props_bind` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `prop_id` int(11) DEFAULT NULL, + `cat_id` int(11) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `prop_id` (`prop_id`), + KEY `ordering` (`cat_id`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_news_props_values`; +CREATE TABLE `{#}con_news_props_values` ( + `prop_id` int(11) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + KEY `prop_id` (`prop_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_pages` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `attach`) VALUES +(1, 'О проекте', '

В пределах аккумулятивных равнин вулканическое стекло занимает коллювий, за счет чего увеличивается мощность коры под многими хребтами. Палинологическое изучение осадков онежской трансгрессии, имеющей отчетливое межморенное залегание, показало, что притеррасная низменность горизонально обогащает апофиз, поскольку непосредственно мантийные струи не наблюдаются. Межледниковье опускает гидротермальный лакколит, делая этот типологический таксон районирования носителем важнейших инженерно-геологических характеристик природных условий. Фумарола определяет шток, что в конце концов приведет к полному разрушению хребта под действием собственного веса. Минеральное сырье имеет тенденцию биокосный грунт, делая этот типологический таксон районирования носителем важнейших инженерно-геологических характеристик природных условий. Поэтому многие геологи считают, что ядро опускает межпластовый надвиг, что в общем свидетельствует о преобладании тектонических опусканий в это время.

\r\n\r\n

Алмаз, с учетом региональных факторов, наклонно сменяет лавовый купол, в тоже время поднимаясь в пределах горстов до абсолютных высот 250 м. Как видно из самых общих закономерности распределения криолитозоны, извержение варьирует эвапорит, что обусловлено не только первичными неровностями эрозионно-тектонического рельефа поверхности кристаллических пород, но и проявлениями долее поздней блоковой тектоники. Фумарола, особенно в речных долинах, кавернозна. Ледниковое озеро затруднено.

\r\n\r\n

Питание прогиба исходным материалом смещает слабоминерализованный сталагмит, причем, вероятно, быстрее, чем прочность мантийного вещества. Инфлюация, скажем, за 100 тысяч лет, несет в себе палеокриогенный замок складки, что в общем свидетельствует о преобладании тектонических опусканий в это время. Но, пожалуй, еще более убедителен ортоклаз покрывает фитолитный криптархей, что свидетельствует о проникновении днепровских льдов в бассейн Дона. Амфибол отчетливо и полно пододвигается под пегматитовый бентос, где на поверхность выведены кристаллические структуры фундамента. Изостазия имеет тенденцию молого-шекснинский криптархей, но приводит к загрязнению окружающей среды.

\r\n\r\n

Источник

', 'about', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 11 DAY), DATE_SUB(NOW(),INTERVAL 11 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 0, 0, 1, NULL, NULL, 0, ''), +(2, 'Правила сайта', '

1. Запрещены любые формы оскорблений участников сообщества или администрации, в том числе нецензурные логины и никнеймы.

\r\n\r\n

2. Запрещен мат, в том числе завуалированный.

\r\n\r\n

3. Запрещено публичное обсуждение действий администрации и ее представителей.

\r\n\r\n

4. Администрация проекта оставляет за собой право изменять и дополнять данные правила в любой момент времени.

\r\n\r\n

5. В общении на сайте придерживайтесь норм грамматики русского языка и общепринятой вежливости. Запрещено осознанное коверканье слов, жаргон. Избегайте необоснованного перехода на "ты".

\r\n\r\n

', 'rules', NULL, NULL, NULL, NULL, DATE_SUB(NOW(),INTERVAL 10 DAY), DATE_SUB(NOW(),INTERVAL 10 DAY), NULL, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, NULL, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 10 DAY), 0, ''); + +INSERT INTO `{#}con_pages_cats_bind` (`item_id`, `category_id`) VALUES +(1, 1), +(2, 1); + +DROP TABLE IF EXISTS `{#}con_posts`; +CREATE TABLE `{#}con_posts` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `content` text, + `slug` varchar(100) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `tags` varchar(1000) DEFAULT NULL, + `template` varchar(150) DEFAULT NULL, + `date_pub` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date_last_modified` timestamp NULL DEFAULT NULL, + `date_pub_end` timestamp NULL DEFAULT NULL, + `is_pub` tinyint(1) DEFAULT '1', + `hits_count` int(11) DEFAULT '0', + `user_id` int(11) unsigned DEFAULT NULL, + `parent_id` int(11) unsigned DEFAULT NULL, + `parent_type` varchar(32) DEFAULT NULL, + `parent_title` varchar(100) DEFAULT NULL, + `parent_url` varchar(255) DEFAULT NULL, + `is_parent_hidden` tinyint(1) DEFAULT NULL, + `category_id` int(11) unsigned NOT NULL DEFAULT '1', + `folder_id` int(11) unsigned DEFAULT NULL, + `is_comments_on` tinyint(1) unsigned DEFAULT '1', + `comments` int(11) NOT NULL DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `is_deleted` tinyint(1) unsigned DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT '1', + `approved_by` int(11) DEFAULT NULL, + `date_approved` timestamp NULL DEFAULT NULL, + `is_private` tinyint(1) NOT NULL DEFAULT '0', + `picture` text, + PRIMARY KEY (`id`), + KEY `category_id` (`category_id`), + KEY `approved_by` (`approved_by`), + KEY `folder_id` (`folder_id`), + KEY `slug` (`slug`), + KEY `date_pub` (`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`date_pub`), + KEY `parent_id` (`parent_id`,`parent_type`,`date_pub`), + KEY `user_id` (`user_id`,`date_pub`), + KEY `date_pub_end` (`date_pub_end`), + KEY `dataset_daily` (`date_pub`,`is_pub`,`is_parent_hidden`,`is_deleted`,`is_approved`,`rating`), + FULLTEXT KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts` (`id`, `title`, `content`, `slug`, `seo_keys`, `seo_desc`, `seo_title`, `tags`, `date_pub`, `date_last_modified`, `date_pub_end`, `is_pub`, `hits_count`, `user_id`, `parent_id`, `parent_type`, `parent_title`, `parent_url`, `is_parent_hidden`, `category_id`, `folder_id`, `is_comments_on`, `comments`, `rating`, `is_approved`, `approved_by`, `date_approved`, `is_private`, `picture`) VALUES +(5, 'Мой первый пост в сообществе', '

\r\n Не факт, что выставочный стенд по-прежнему устойчив к изменениям спроса. Креатив, анализируя результаты рекламной кампании, уравновешивает стиль менеджмента, осознав маркетинг как часть производства. Поэтому построение бренда не критично. Выставочный стенд, как принято считать, программирует коллективный потребительский рынок, осознав маркетинг как часть производства. Маркетингово-ориентированное издание тормозит фирменный клиентский спрос, работая над проектом. Личность топ менеджера порождена временем.\r\n

\r\n

\r\n Сущность и концепция маркетинговой программы экономит маркетинг, отвоевывая рыночный сегмент. В общем, медиабизнес осмысленно ускоряет из ряда вон выходящий ребрендинг, не считаясь с затратами. Основная стадия проведения рыночного исследования, пренебрегая деталями, откровенно цинична. Эффективность действий индуцирует эмпирический фактор коммуникации, невзирая на действия конкурентов.\r\n

', '5-moi-pervyi-post-v-soobschestve', NULL, NULL, NULL, 'пример, пост, роботы', DATE_SUB(NOW(),INTERVAL 6 MINUTE), DATE_SUB(NOW(),INTERVAL 6 MINUTE), NULL, 1, 0, 1, 1, 'group', 'Робототехника', 'groups/1/content/posts', NULL, 1, 5, 1, 0, 0, 1, NULL, DATE_SUB(NOW(),INTERVAL 6 MINUTE), 0, NULL); + +DROP TABLE IF EXISTS `{#}con_posts_cats`; +CREATE TABLE `{#}con_posts_cats` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` int(11) unsigned DEFAULT NULL, + `title` varchar(200) DEFAULT NULL, + `description` text NULL DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `slug_key` varchar(255) DEFAULT NULL, + `seo_keys` varchar(256) DEFAULT NULL, + `seo_desc` varchar(256) DEFAULT NULL, + `seo_title` varchar(256) DEFAULT NULL, + `seo_h1` varchar(256) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `ns_left` int(11) DEFAULT NULL, + `ns_right` int(11) DEFAULT NULL, + `ns_level` int(11) DEFAULT NULL, + `ns_differ` varchar(32) NOT NULL DEFAULT '', + `ns_ignore` tinyint(4) NOT NULL DEFAULT '0', + `allow_add` text, + `is_hidden` tinyint(1) UNSIGNED DEFAULT NULL, + `cover` text, + PRIMARY KEY (`id`), + KEY `ordering` (`ordering`), + KEY `slug` (`slug`), + KEY `ns_left` (`ns_level`,`ns_right`,`ns_left`), + KEY `parent_id` (`parent_id`,`ns_left`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts_cats` (`id`, `parent_id`, `title`, `slug`, `slug_key`, `seo_keys`, `seo_desc`, `seo_title`, `ordering`, `ns_left`, `ns_right`, `ns_level`, `ns_differ`, `ns_ignore`) VALUES +(1, 0, '---', NULL, NULL, NULL, NULL, NULL, 1, 1, 2, 0, '', 0); + +DROP TABLE IF EXISTS `{#}con_posts_cats_bind`; +CREATE TABLE `{#}con_posts_cats_bind` ( + `item_id` int(11) DEFAULT NULL, + `category_id` int(11) DEFAULT NULL, + KEY `item_id` (`item_id`), + KEY `category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts_cats_bind` (`item_id`, `category_id`) VALUES +(5, 1); + +DROP TABLE IF EXISTS `{#}con_posts_fields`; +CREATE TABLE `{#}con_posts_fields` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `name` varchar(40) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `hint` varchar(200) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + `is_enabled` tinyint(1) UNSIGNED DEFAULT '1', + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_list` tinyint(1) DEFAULT NULL, + `is_in_item` tinyint(1) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `is_private` tinyint(1) DEFAULT NULL, + `is_fixed` tinyint(1) DEFAULT NULL, + `is_fixed_type` tinyint(1) DEFAULT NULL, + `is_system` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + `groups_read` text, + `groups_add` text, + `groups_edit` text, + `filter_view` text, + PRIMARY KEY (`id`), + KEY `is_enabled` (`is_enabled`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}con_posts_fields` (`id`, `ctype_id`, `name`, `title`, `hint`, `ordering`, `fieldset`, `type`, `is_in_list`, `is_in_item`, `is_in_filter`, `is_private`, `is_fixed`, `is_fixed_type`, `is_system`, `values`, `options`, `groups_read`, `groups_edit`) VALUES +(1, 6, 'title', 'Заголовок', NULL, 1, NULL, 'caption', 1, 1, 1, NULL, 1, 1, 0, NULL, '---\nlabel_in_list: none\nlabel_in_item: none\nmin_length: 3\nmax_length: 100\nis_required: true\n', NULL, NULL), +(2, 6, 'date_pub', 'Дата публикации', NULL, 2, NULL, 'date', 1, 1, 1, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\nshow_time: true\n', NULL, NULL), +(3, 6, 'user', 'Автор', NULL, 3, NULL, 'user', 1, 1, 0, NULL, 1, 1, 1, NULL, '---\nlabel_in_list: none\nlabel_in_item: left\n', NULL, NULL), +(4, 6, 'content', 'Текст поста', NULL, 5, NULL, 'html', 1, 1, NULL, NULL, 1, NULL, NULL, NULL, '---\neditor: 3\nis_html_filter: 1\nteaser_len: 500\nlabel_in_list: none\nlabel_in_item: none\nis_required: 1\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\nprofile_value:\n', '---\n- 0\n', '---\n- 0\n'), +(5, 6, 'picture', 'Картинка для привлечения внимания', NULL, 4, NULL, 'image', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '---\nsize_teaser: normal\nsize_full: normal\nsizes:\n - small\n - normal\nlabel_in_list: none\nlabel_in_item: none\nis_required: null\nis_digits: null\nis_alphanumeric: null\nis_email: null\nis_unique: null\n', '---\n- 0\n', '---\n- 0\n'); + +DROP TABLE IF EXISTS `{#}con_posts_props`; +CREATE TABLE `{#}con_posts_props` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `ctype_id` int(11) DEFAULT NULL, + `title` varchar(100) DEFAULT NULL, + `fieldset` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT NULL, + `is_in_filter` tinyint(1) DEFAULT NULL, + `values` text, + `options` text, + PRIMARY KEY (`id`), + KEY `is_active` (`is_in_filter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_posts_props_bind`; +CREATE TABLE `{#}con_posts_props_bind` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `prop_id` int(11) DEFAULT NULL, + `cat_id` int(11) DEFAULT NULL, + `ordering` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `prop_id` (`prop_id`), + KEY `ordering` (`cat_id`,`ordering`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `{#}con_posts_props_values`; +CREATE TABLE `{#}con_posts_props_values` ( + `prop_id` int(11) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + KEY `prop_id` (`prop_id`), + KEY `item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `{#}groups` (`id`, `owner_id`, `date_pub`, `title`, `description`, `logo`, `rating`, `members_count`, `join_policy`, `edit_policy`, `wall_policy`, `is_closed`) VALUES +(1, 1, DATE_SUB(NOW(),INTERVAL 10 MINUTE), 'Робототехника', 'Группа посвящена роботам, машиностроению и всему что с этим связано.', '---\nsmall: 000/u1/7/3/robototehnika-logo-small.png\nmicro: 000/u1/e/3/robototehnika-logo-micro.png\n', 0, 1, 0, 0, 0, 0); + +INSERT INTO `{#}groups_members` (`id`, `group_id`, `user_id`, `role`, `date_updated`) VALUES +(1, 1, 1, 2, CURRENT_TIMESTAMP); + +INSERT INTO `{#}menu` (`id`, `name`, `title`, `is_fixed`) VALUES +(3, 'footer', 'Нижнее меню', NULL); + +INSERT INTO `{#}menu_items` (`id`, `menu_id`, `parent_id`, `title`, `url`, `ordering`, `options`, `groups_view`, `groups_hide`) VALUES +(6, 1, 0, 'Фото', 'albums', 4, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(7, 1, 0, 'Сайты', NULL, 10, NULL, NULL, NULL), +(8, 1, 7, 'Яндекс', 'https://www.yandex.ru', 10, NULL, NULL, NULL), +(9, 1, 7, 'InstantSoft', NULL, 11, NULL, NULL, NULL), +(10, 1, 9, 'InstantVideo', 'https://instantvideo.ru/software/instantvideo2.html', 14, NULL, NULL, NULL), +(11, 1, 9, 'InstantMaps', 'http://www.instantmaps.ru/', 12, NULL, NULL, NULL), +(18, 3, 0, 'О проекте', 'pages/about.html', 1, '---\nclass: \n', '---\n- 0\n', NULL), +(19, 3, 0, 'Правила сайта', 'pages/rules.html', 2, '---\nclass: \n', '---\n- 0\n', NULL), +(27, 1, 0, 'Блоги', 'posts', 3, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(39, 1, 0, 'Объявления', 'board', 5, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(40, 1, 0, 'Новости', '{content:news}', 1, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL), +(42, 1, 0, 'Статьи', '{content:articles}', 2, '---\ntarget: _self\nclass:', '---\n- 0\n', NULL); + +INSERT INTO `{#}moderators` (`id`, `user_id`, `date_assigned`, `ctype_name`, `count_approved`, `count_deleted`, `count_idle`) VALUES +(1, 1, CURRENT_TIMESTAMP, 'articles', 0, 0, 0); + +INSERT INTO `{#}perms_users` (`rule_id`, `group_id`, `subject`, `value`) VALUES +(1, 4, 'articles', 'yes'), +(1, 5, 'articles', 'yes'), +(1, 6, 'articles', 'yes'), +(4, 5, 'articles', '1'), +(4, 6, 'articles', '1'), +(3, 4, 'articles', 'own'), +(3, 5, 'articles', 'all'), +(3, 6, 'articles', 'all'), +(6, 5, 'articles', '1'), +(6, 6, 'articles', '1'), +(2, 4, 'articles', 'own'), +(2, 5, 'articles', 'all'), +(2, 6, 'articles', 'all'), +(5, 5, 'articles', '1'), +(5, 6, 'articles', '1'), +(9, 4, 'articles', '1'), +(9, 5, 'articles', '1'), +(9, 6, 'articles', '1'), +(8, 4, 'articles', '1'), +(8, 5, 'articles', '1'), +(8, 6, 'articles', '1'), +(13, 5, 'articles', '1'), +(13, 6, 'articles', '1'), +(1, 4, 'posts', 'yes'), +(1, 5, 'posts', 'yes'), +(1, 6, 'posts', 'yes'), +(3, 4, 'posts', 'own'), +(3, 5, 'posts', 'all'), +(3, 6, 'posts', 'all'), +(2, 4, 'posts', 'own'), +(2, 5, 'posts', 'all'), +(9, 4, 'posts', '1'), +(9, 5, 'posts', '1'), +(9, 6, 'posts', '1'), +(8, 4, 'posts', '1'), +(8, 5, 'posts', '1'), +(8, 6, 'posts', '1'), +(1, 4, 'board', 'yes'), +(1, 5, 'board', 'yes'), +(1, 6, 'board', 'yes'), +(4, 5, 'board', '1'), +(4, 6, 'board', '1'), +(3, 4, 'board', 'own'), +(3, 5, 'board', 'all'), +(3, 6, 'board', 'all'), +(6, 5, 'board', '1'), +(6, 6, 'board', '1'), +(2, 4, 'board', 'own'), +(2, 5, 'board', 'all'), +(2, 6, 'board', 'all'), +(5, 5, 'board', '1'), +(5, 6, 'board', '1'), +(9, 5, 'board', '1'), +(9, 6, 'board', '1'), +(8, 5, 'board', '1'), +(8, 6, 'board', '1'), +(13, 5, 'board', '1'), +(13, 6, 'board', '1'), +(1, 4, 'news', 'yes'), +(1, 5, 'news', 'yes'), +(1, 6, 'news', 'yes'), +(4, 6, 'news', '1'), +(3, 4, 'news', 'own'), +(3, 5, 'news', 'all'), +(3, 6, 'news', 'all'), +(6, 6, 'news', '1'), +(2, 4, 'news', 'own'), +(2, 5, 'news', 'all'), +(2, 6, 'news', 'all'), +(5, 6, 'news', '1'), +(9, 5, 'news', '1'), +(9, 6, 'news', '1'), +(8, 4, 'news', '1'), +(8, 5, 'news', '1'), +(8, 6, 'news', '1'), +(13, 6, 'news', '1'), +(1, 3, 'articles', 'yes'), +(3, 3, 'articles', 'own'), +(2, 3, 'articles', 'own'), +(1, 3, 'posts', 'yes'), +(3, 3, 'posts', 'own'), +(2, 3, 'posts', 'own'), +(1, 3, 'board', 'yes'), +(3, 3, 'board', 'own'), +(2, 3, 'board', 'own'); + +INSERT INTO `{#}rss_feeds` (`id`, `ctype_id`, `ctype_name`, `title`, `description`, `image`, `mapping`, `limit`, `is_enabled`, `is_cache`, `cache_interval`, `date_cached`) VALUES +(2, 5, 'articles', 'Статьи', NULL, NULL, '---\ntitle: title\ndescription: teaser\npubDate: date_pub\nimage:\nimage_size: normal\n', 15, 1, NULL, 60, NULL), +(3, 6, 'posts', 'Посты', 'Лента пользовательских постов', NULL, '---\ntitle: title\ndescription: content\npubDate: date_pub\nimage: picture\nimage_size: normal\n', 15, 1, NULL, 60, NULL), +(5, 9, 'board', 'Объявления', 'Коммерческие объявления', NULL, '---\ntitle: title\ndescription: content\npubDate: date_pub\nimage: photo\nimage_size: normal\n', 15, 1, NULL, 60, NULL), +(6, 10, 'news', 'Новости', 'Информационные сообщения', NULL, '---\ntitle: title\ndescription: content\npubDate: date_pub\nimage: photo\nimage_size: normal\n', 15, 1, NULL, 60, NULL); + +INSERT INTO `{#}tags` (`id`, `tag`, `frequency`) VALUES +(1, 'пример', 6), +(2, 'статья', 2), +(3, 'астрономия', 1), +(9, 'наука', 1), +(36, 'новости', 4), +(37, 'проишествия', 1), +(39, 'пост', 1), +(40, 'роботы', 1), +(42, 'фото', 1); + +INSERT INTO `{#}tags_bind` (`id`, `tag_id`, `target_controller`, `target_subject`, `target_id`) VALUES +(10, 1, 'content', 'articles', 1), +(11, 2, 'content', 'articles', 1), +(12, 3, 'content', 'articles', 1), +(49, 36, 'content', 'news', 2), +(50, 36, 'content', 'news', 3), +(51, 1, 'content', 'news', 3), +(56, 1, 'content', 'news', 4), +(59, 1, 'content', 'news', 6), +(60, 36, 'content', 'news', 6), +(86, 2, 'content', 'articles', 4), +(87, 9, 'content', 'articles', 4), +(103, 1, 'content', 'albums', 16), +(104, 42, 'content', 'albums', 16), +(105, 1, 'content', 'posts', 5), +(106, 39, 'content', 'posts', 5), +(107, 40, 'content', 'posts', 5), +(108, 36, 'content', 'news', 1), +(109, 37, 'content', 'news', 1); + +INSERT INTO `{#}users_statuses` (`id`, `user_id`, `date_pub`, `content`, `replies_count`, `wall_entry_id`) VALUES +(1, 1, CURRENT_TIMESTAMP, 'We are all made of stars © Moby', 1, 1); + +INSERT INTO `{#}wall_entries` (`id`, `date_pub`, `controller`, `profile_type`, `profile_id`, `user_id`, `parent_id`, `status_id`, `content`, `content_html`) VALUES +(1, CURRENT_TIMESTAMP, 'users', 'user', 1, 1, 0, 1, 'We are all made of stars © Moby', 'We are all made of stars © Moby'), +(2, CURRENT_TIMESTAMP, 'users', 'user', 1, 1, 1, NULL, 'Спасибо что заглянули в мой профиль!', 'Спасибо что заглянули в мой профиль!'); + +INSERT INTO `{#}widgets_pages` (`id`, `controller`, `name`, `title_const`, `title_subject`, `title`, `url_mask`, `url_mask_not`) VALUES +(143, 'content', 'pages.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'pages\npages-*\npages/*', NULL), +(144, 'content', 'pages.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'pages\npages-*\npages/*', 'pages/*/view-*\npages/*.html\npages/add\npages/add?*\npages/add/%\npages/addcat\npages/addcat/%\npages/editcat/%\npages/edit/*'), +(145, 'content', 'pages.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'pages/*.html', NULL), +(146, 'content', 'pages.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'pages/add\npages/edit/*', NULL), +(147, 'content', 'articles.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'articles\narticles-*\narticles/*', NULL), +(148, 'content', 'articles.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'articles\narticles-*\narticles/*', 'articles/*/view-*\narticles/*.html\narticles/add\narticles/add?*\narticles/add/%\narticles/addcat\narticles/addcat/%\narticles/editcat/%\narticles/edit/*'), +(149, 'content', 'articles.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'articles/*.html', NULL), +(150, 'content', 'articles.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'articles/add\narticles/edit/*', NULL), +(151, 'content', 'posts.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'posts\nposts-*\nposts/*', NULL), +(152, 'content', 'posts.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'posts\nposts-*\nposts/*', 'posts/*/view-*\nposts/*.html\nposts/add\nposts/add/%\nposts/add?*\nposts/addcat\nposts/addcat/%\nposts/editcat/%\nposts/edit/*'), +(153, 'content', 'posts.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'posts/*.html', NULL), +(154, 'content', 'posts.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'posts/add\nposts/edit/*', NULL), +(159, 'content', 'board.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'board\nboard-*\nboard/*', NULL), +(160, 'content', 'board.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'board\nboard-*\nboard/*', 'board/*/view-*\nboard/*.html\nboard/add\nboard/add/%\nboard/add?*\nboard/addcat\nboard/addcat/%\nboard/editcat/%\nboard/edit/*'), +(161, 'content', 'board.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'board/*.html', NULL), +(162, 'content', 'board.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'board/add\nboard/edit/*', NULL), +(163, 'content', 'news.all', 'LANG_WP_CONTENT_ALL_PAGES', NULL, NULL, 'news\nnews-*\nnews/*', NULL), +(164, 'content', 'news.list', 'LANG_WP_CONTENT_LIST', NULL, NULL, 'news\nnews-*\nnews/*', 'news/*/view-*\nnews/*.html\nnews/add\nnews/add/%\nnews/add?*\nnews/addcat\nnews/addcat/%\nnews/editcat/%\nnews/edit/*'), +(165, 'content', 'news.item', 'LANG_WP_CONTENT_ITEM', NULL, NULL, 'news/*.html', NULL), +(166, 'content', 'news.edit', 'LANG_WP_CONTENT_ITEM_EDIT', NULL, NULL, 'news/add\nnews/edit/*', NULL); diff --git a/install/languages/ru/sql/widgets_bind_demo_modern.sql b/install/languages/ru/sql/widgets_bind_demo_modern.sql index 5c4804b6a..d67e12977 100755 --- a/install/languages/ru/sql/widgets_bind_demo_modern.sql +++ b/install/languages/ru/sql/widgets_bind_demo_modern.sql @@ -5,17 +5,19 @@ INSERT INTO `{#}widgets_bind` (`id`, `template_layouts`, `languages`, `widget_id (79, NULL, NULL, 3, 'Нижнее меню', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, '---\nmenu: footer\ntemplate: menu\nclass:\nis_detect: 1\nis_detect_strict: null\nmax_items: 0\nnavbar_color_scheme: navbar-dark\nmenu_nav_style:\nmenu_nav_style_add: flex-md-row justify-content-md-end\nmenu_type: navbar\nnavbar_expand:\nshow_search_form: 0\ntoggler_icon: null\ntoggler_show_sitename: null\nmenu_is_pills: null\nmenu_is_fill:\n', 'menu', NULL, NULL, NULL, 1), (86, NULL, NULL, 12, 'Форма авторизации', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, NULL, 'auth', 'wrapper_plain_indented', NULL, NULL, 1), (88, NULL, NULL, 7, 'Комментарии', 'Все | comments', NULL, NULL, NULL, 1, 1, '---\n', NULL, '---\nshow_list:\n - 0\nshow_avatars: 1\nshow_text: 1\nlimit: 10\n', 'list', 'wrapper', NULL, NULL, 1), -(89, NULL, NULL, 11, 'Слайдер контента', NULL, NULL, NULL, 'mt-3 mt-md-4', NULL, NULL, '---\n', NULL, '---\nctype_id: 10\ncategory_id:\ndataset: 0\nimage_field: photo\nbig_image_field: photo\nbig_image_preset: big\nteaser_field: teaser\nteaser_len: 200\ndelay: 5\nlimit: 5\n', 'slider', NULL, NULL, NULL, 1), +(89, NULL, NULL, 11, 'Слайдер контента', NULL, NULL, NULL, 'mt-3 mt-md-4', NULL, NULL, '---\n', NULL, '---\nctype_id: 10\ncategory_id:\ndataset: 0\nimage_field: photo\nbig_image_field: photo\nbig_image_preset: content_item\nteaser_field: teaser\nteaser_len: 200\ndelay: 5\nlimit: 5\n', 'slider', NULL, NULL, NULL, 1), (91, NULL, NULL, 8, 'Кто онлайн', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nis_avatars: null\ngroups: null\n', 'online', 'wrapper', 'icms-widget__transparent', NULL, 1), (92, NULL, NULL, 13, '{solid%search} Поиск', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, NULL, 'search', 'wrapper', 'icms-widget__transparent', NULL, 1), -(105, NULL, NULL, 4, 'Новости', 'Все новости | news\r\nОбсуждаемые | news-discussed\r\n{Приватные | news/from_friends}', NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nwidget_type: list\nctype_id: 10\ncategory_id:\ndataset: 0\nrelation_id: 0\nfilter_id: 0\nauto_group: null\nlimit: 7\nshow_fields:\n 10:\n photo: 1\n title: 1\n teaser: 1\n content: null\n date_pub: 1\n user: 1\n comments: 1\nshow_fields_options:\n 10:\n photo:\n size_teaser: normal\n label_in_list: none\n wrap_type: auto\n wrap_width:\n title:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n teaser:\n teaser_len: 150\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n content:\n is_html_filter: null\n teaser_len:\n show_show_more: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\nimage_field:\nteaser_field:\nteaser_len:\nshow_details: null\n', 'list_featured', 'wrapper', 'icms-widget__transparent', NULL, 1), +(105, NULL, NULL, 4, 'Новости', 'Все новости | news\r\nОбсуждаемые | news-discussed\r\n{Приватные | news/from_friends}', NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nwidget_type: list\nctype_id: 10\ncategory_id:\ndataset: 0\nrelation_id: 0\nfilter_id: 0\nauto_group: null\nauto_user: null\nlimit: 7\nshow_fields:\n 10:\n photo: 1\n cats: 1\n title: 1\n teaser: null\n content: null\n date_pub: 1\n user: 1\n comments: null\nshow_fields_options:\n 10:\n photo:\n size_teaser: content_list_small\n default_image: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: 1\n cats:\n is_auto_colors: 1\n auto_colors_classes: >\n btn-primary,btn-secondary,btn-success,btn-danger,btn-warning,btn-info,btn-light,btn-dark\n btn_class: btn btn-sm\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: null\n title:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: 3\n teaser:\n teaser_len: 150\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: null\n content:\n is_html_filter: null\n teaser_len: 0\n teaser_postfix:\n teaser_type:\n show_show_more: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n ordering: null\nimage_field:\nteaser_field:\nteaser_len: 0\nshow_details: null\n', 'list_featured', 'wrapper', 'icms-widget__transparent', NULL, 1), (108, NULL, NULL, 2, 'Новые пользователи', 'Все | users', NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nshow: all\ndataset: latest\nstyle: tiles\nlist_fields: null\ngroups: null\nlimit: 5\n', 'list', 'wrapper', 'icms-widget__transparent', NULL, 1), (109, NULL, NULL, 4, 'Новые объявления', 'Все | board', NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nwidget_type: list\nctype_id: 9\ncategory_id:\ndataset: 0\nrelation_id: 0\nfilter_id: 0\nauto_group: null\nlimit: 10\nshow_fields:\n 9:\n photo: 1\n title: 1\n photos: null\n content: 1\n phone: null\n price: 1\n country: null\n region_id: null\n list: null\n date_pub: 1\n user: null\n comments: null\nshow_fields_options:\n 9:\n photo:\n size_teaser: small\n label_in_list: none\n wrap_type: left\n wrap_width:\n title:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n photos:\n size_teaser: small\n size_small: small\n label_in_list: none\n wrap_type: auto\n wrap_width:\n content:\n is_html_filter: null\n teaser_len: 150\n show_show_more: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n phone:\n teaser_len:\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n price:\n label_in_list: left\n wrap_type: auto\n wrap_width:\n country:\n output_string:\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n region_id:\n output_string:\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n list:\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\nimage_field:\nteaser_field:\nteaser_len:\nshow_details: null\n', 'list_compact', 'wrapper', 'icms-widget__transparent', NULL, 1), (110, NULL, NULL, 4, 'Статьи', 'Все статьи | articles\r\n{Добавить статью | articles/add}', NULL, NULL, NULL, 1, 1, '---\n', NULL, '---\nwidget_type: list\nctype_id: 5\ncategory_id:\ndataset: 0\nrelation_id: 0\nfilter_id: 0\nauto_group: null\nlimit: 5\nshow_fields:\n 5:\n title: 1\n kind: null\n source: null\n teaser: 1\n content: null\n featured: null\n notice: null\n parent_news_id: null\n color: null\n date_test: null\n date_pub: 1\n user: 1\n comments: null\nshow_fields_options:\n 5:\n title:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n kind:\n is_autolink: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n source:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n teaser:\n is_html_filter: null\n teaser_len: 150\n show_show_more: 1\n label_in_list: none\n wrap_type: auto\n wrap_width:\n content:\n is_html_filter: null\n teaser_len:\n show_show_more: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\n featured:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n notice:\n is_html_filter: null\n teaser_len:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n parent_news_id:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n color:\n label_in_list: none\n wrap_type: auto\n wrap_width:\n date_test:\n show_time: null\n label_in_list: none\n wrap_type: auto\n wrap_width:\nimage_field:\nteaser_field:\nteaser_len:\nshow_details: null\n', 'list', 'wrapper', 'icms-widget__transparent', NULL, 1), (112, NULL, NULL, 16, 'Фото', 'Все альбомы | albums\r\n{Загрузить фото | photos/upload}', NULL, NULL, NULL, 1, 1, '---\n', NULL, '---\nauto_user: null\nauto_group: null\nauto_ctype_item: null\ntarget: 0\nalbum_id:\nordering:\norientation:\ntype:\nwidth:\nheight:\nlimit: 10\n', 'list', 'wrapper', 'icms-widget__transparent', NULL, 1), (124, NULL, NULL, 14, 'Контакты', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\ncontent: |\n \n', 'html', 'wrapper', 'icms-widget__compact', NULL, 1), (125, NULL, NULL, 3, 'Пункты меню', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nmenu: footer\ntemplate: menu\nclass:\nis_detect: 1\nis_detect_strict: null\nmax_items: 0\nnavbar_color_scheme: navbar-dark\nmenu_nav_style: flex-column\nmenu_nav_style_add:\nmenu_type: navbar\nnavbar_expand:\nshow_search_form: 0\ntoggler_icon: null\ntoggler_show_sitename: null\nmenu_is_pills: null\nmenu_is_fill:\n', 'menu', 'wrapper', 'icms-widget__compact', NULL, 1), -(126, NULL, NULL, 14, 'Социальные кнопки', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, '---\ncontent: |\n
\r\n {brands%facebook}\r\n {brands%github}\r\n {brands%instagram}\r\n {brands%odnoklassniki}\r\n {brands%vk}\r\n {brands%telegram}\r\n
\n', 'html', NULL, NULL, NULL, 1); +(126, NULL, NULL, 14, 'Социальные кнопки', NULL, NULL, NULL, NULL, NULL, NULL, '---\n', NULL, '---\ncontent: |\n
\r\n {brands%facebook}\r\n {brands%github}\r\n {brands%instagram}\r\n {brands%odnoklassniki}\r\n {brands%vk}\r\n {brands%telegram}\r\n
\n', 'html', NULL, NULL, NULL, 1), +(130, NULL, NULL, 23, 'Автор записи', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nshow_fields:\n - nickname\n - avatar\n - birth_date\nshow_user_items_link: 1\nuser_items_link_title: Все новости автора\nshow_user_groups: null\nshow_date_log: 1\nshow_date_reg: null\n', 'author', 'wrapper', 'icms-widget__transparent', NULL, 1), +(127, NULL, NULL, 5, 'Категории новостей', NULL, NULL, NULL, NULL, 1, NULL, '---\n', NULL, '---\nctype_name: news\ncover_preset:\nis_root: null\nshow_full_tree: 1\n', 'categories', 'wrapper', 'icms-widget__transparent', NULL, 1); INSERT INTO `{#}widgets_bind_pages` (`id`, `bind_id`, `template`, `is_enabled`, `page_id`, `position`, `ordering`) VALUES (75, 69, 'modern', 1, 153, 'con_header', 0), @@ -34,6 +36,8 @@ INSERT INTO `{#}widgets_bind_pages` (`id`, `bind_id`, `template`, `is_enabled`, (118, 112, 'modern', 1, 1, 'pos_8', 4), (130, 124, 'modern', 1, 0, 'pos_38', 0), (131, 125, 'modern', 1, 0, 'pos_39', 0), -(132, 126, 'modern', 1, 0, 'pos_26', 0); +(132, 126, 'modern', 1, 0, 'pos_26', 0), +(136, 130, 'modern', 1, 165, 'pos_9', 0), +(133, 127, 'modern', 1, 164, 'pos_9', 1); UPDATE `{#}con_posts_fields` SET `options` = '---\r\nmin_length: 3\r\nmax_length: 100\r\nshow_symbol_count: null\r\nin_fulltext_search: 1\r\nis_in_item_pos:\n - widget\ncontext_list:\r\n - 0\r\nrelation_id:\r\nlabel_in_list: none\r\nlabel_in_item: none\r\nwrap_type: auto\r\nwrap_width:\r\nis_required: 1\r\nis_digits: null\r\nis_alphanumeric: null\r\nis_email: null\r\nis_url: null\r\nis_unique: null\r\nprofile_value:\r\nauthor_access: null\r\n' WHERE `id` = 1; \ No newline at end of file diff --git a/install/steps/database.php b/install/steps/database.php index 83ed8e15d..a0a9c3976 100755 --- a/install/steps/database.php +++ b/install/steps/database.php @@ -1,8 +1,8 @@ render('step_database', array( + $result = [ + 'html' => render('step_database', [ 'cfg' => $cfg, 'db_list' => $db_list - )) - ); + ]) + ]; return $result; - } function get_db_collation($charset) { $collations = [ - 'utf8' => 'utf8_general_ci', + 'utf8' => 'utf8_general_ci', 'utf8mb4' => 'utf8mb4_general_ci' ]; return isset($collations[$charset]) ? $collations[$charset] : false; } -function check_db(){ +function check_db() { $db = $_POST['db']; - $db['host'] = trim($db['host']); - $db['user'] = trim($db['user']); - $db['base'] = trim($db['base']); - $db['engine'] = trim($db['engine']); - $db['db_charset'] = trim($db['db_charset']); + $db['host'] = trim($db['host']); + $db['user'] = trim($db['user']); + $db['base'] = trim($db['base']); + $db['engine'] = trim($db['engine']); + $db['db_charset'] = trim($db['db_charset']); $db['clear_sql_mode'] = 0; if (!preg_match('#^[a-z0-9\_]+$#i', $db['prefix'])) { - return array( + return [ 'error' => true, 'message' => LANG_DATABASE_PREFIX_ERROR - ); + ]; } mysqli_report(MYSQLI_REPORT_STRICT); @@ -52,18 +51,21 @@ function check_db(){ try { $mysqli = new mysqli($db['host'], $db['user'], $db['pass']); - } catch (Exception $e) { - return array( + return [ 'error' => true, 'message' => sprintf(LANG_DATABASE_CONNECT_ERROR, $e->getMessage()) - ); - + ]; } - if(!empty($mysqli->server_info)){ - if(version_compare($mysqli->server_info, '5.7') >= 0){ + $result = $mysqli->query('select version() as `version`;'); + if($result){ + + $vdata = $result->fetch_assoc(); + $result->close(); + + if(!empty($vdata['version']) && version_compare($vdata['version'], '5.7') >= 0){ $db['clear_sql_mode'] = 1; } } @@ -71,19 +73,19 @@ function check_db(){ $check_engine = check_db_engine($mysqli, $db['engine']); if ($check_engine !== true) { - return array( - 'error' => true, + return [ + 'error' => true, 'message' => $check_engine - ); + ]; } $check_charset = check_db_charset($mysqli, $db['db_charset']); if ($check_charset !== true) { - return array( - 'error' => true, + return [ + 'error' => true, 'message' => $check_charset - ); + ]; } $mysqli->set_charset($db['db_charset']); @@ -94,44 +96,67 @@ function check_db(){ if (!empty($db['create_db'])) { $mysqli->query("CREATE DATABASE IF NOT EXISTS `{$db['base']}` DEFAULT CHARACTER SET {$db['db_charset']} COLLATE {$collation_name}"); - } $mysqli->query("ALTER DATABASE {$db['base']} CHARACTER SET {$db['db_charset']} COLLATE {$collation_name}"); if (!$mysqli->select_db($db['base'])) { - return array( - 'error' => true, + return [ + 'error' => true, 'message' => sprintf(LANG_DATABASE_SELECT_ERROR, $db['base']) - ); + ]; } // Для innodb оборачиваем в транзакцию, это быстрее и удобней - if($db['engine'] == 'InnoDB'){ + if ($db['engine'] == 'InnoDB') { $mysqli->autocommit(false); } // Основной дамп $success = import_dump($mysqli, 'base.sql', $db['prefix'], $db['engine'], ';', $db['db_charset']); // Гео - if($success === true){ + if ($success === true) { $success = import_dump($mysqli, 'geo.sql', $db['prefix'], $db['engine'], ';', $db['db_charset']); } // Виджеты для шаблона - if($success === true){ - $success = import_dump($mysqli, 'widgets_bind_'.$_SESSION['install']['site']['template'].'.sql', $db['prefix'], $db['engine'], ';', $db['db_charset']); + if ($success === true) { + $success = import_dump( + $mysqli, + 'widgets_bind_' . $_SESSION['install']['site']['template'] . '.sql', + $db['prefix'], + $db['engine'], + ';', + $db['db_charset'] + ); } // Демо данные if ($success === true && !empty($db['is_install_demo_content'])) { - $success = import_dump($mysqli, 'base_demo_content.sql', $db['prefix'], $db['engine'], ';', $db['db_charset']); + + // С учётом шаблона + $success = import_dump( + $mysqli, + 'base_demo_content_' . $_SESSION['install']['site']['template'] . '.sql', + $db['prefix'], + $db['engine'], + ';', + $db['db_charset'] + ); + // Демо виджеты для шаблона - if($success === true){ - $success = import_dump($mysqli, 'widgets_bind_demo_'.$_SESSION['install']['site']['template'].'.sql', $db['prefix'], $db['engine'], ';', $db['db_charset']); + if ($success === true) { + $success = import_dump( + $mysqli, + 'widgets_bind_demo_' . $_SESSION['install']['site']['template'] . '.sql', + $db['prefix'], + $db['engine'], + ';', + $db['db_charset'] + ); } } - if($db['engine'] == 'InnoDB'){ + if ($db['engine'] === 'InnoDB') { if ($success === true) { $mysqli->commit(); } else { @@ -140,51 +165,49 @@ function check_db(){ $mysqli->autocommit(true); } - if ($success === true){ + if ($success === true) { - $dir_install_upload = PATH . DS . 'upload'; - $dir_upload = dirname(PATH) . DS . 'upload'; + $dir_install_upload = PATH . DS . 'upload' . DS . $_SESSION['install']['site']['template']; + $dir_upload = dirname(PATH) . DS . 'upload'; copy_folder($dir_install_upload, $dir_upload); - if (!$db['users_exists']){ + if (!$db['users_exists']) { $db['users_table'] = $db['prefix'] . 'users'; } $_SESSION['install']['db'] = $db; } - return array( - 'error' => $success !== true, + return [ + 'error' => $success !== true, 'message' => is_string($success) ? $success : LANG_DATABASE_BASE_ERROR - ); - + ]; } -function check_db_engine($mysqli, $engine){ +function check_db_engine($mysqli, $engine) { $r = $mysqli->query('SHOW ENGINES'); if ($r === false) { return true; // невозможно выполнить запрос, оставляем на откуп пользователю } - while($data = $r->fetch_assoc()){ - if($data['Engine'] == $engine){ - if(in_array($data['Support'], array('YES', 'DEFAULT'), true)){ + while ($data = $r->fetch_assoc()) { + if ($data['Engine'] == $engine) { + if (in_array($data['Support'], ['YES', 'DEFAULT'], true)) { return true; } else { - return constant('LANG_DATABASE_ENGINE_'.$data['Support']); + return constant('LANG_DATABASE_ENGINE_' . $data['Support']); } } } return LANG_DATABASE_ENGINE_ERROR; - } -function check_db_charset($mysqli, $charset){ +function check_db_charset($mysqli, $charset) { $charset_name = get_db_collation($charset); - if(!$charset_name){ + if (!$charset_name) { return LANG_DATABASE_CH_ERROR; } @@ -193,15 +216,14 @@ function check_db_charset($mysqli, $charset){ return true; // невозможно выполнить запрос, оставляем на откуп пользователю } - if(!$r->num_rows){ + if (!$r->num_rows) { return LANG_DATABASE_CH_ERROR; } return true; - } -function import_dump(&$mysqli, $file, $prefix, $engine='MyISAM', $delimiter = ';', $charset = 'utf8'){ +function import_dump(&$mysqli, $file, $prefix, $engine = 'MyISAM', $delimiter = ';', $charset = 'utf8') { clearstatcache(); @set_time_limit(0); @@ -209,42 +231,44 @@ function import_dump(&$mysqli, $file, $prefix, $engine='MyISAM', $delimiter = '; $file = PATH . 'languages' . DS . LANG . DS . 'sql' . DS . $file; // Кастомные SQL могут отсутствовать - if (!file_exists($file)){ return true; } + if (!file_exists($file)) { + return true; + } - if (!is_readable($file)){ return false; } + if (!is_readable($file)) { + return false; + } $file = fopen($file, 'r'); - $query = []; $success = false; + $query = []; + $success = false; - while (feof($file) === false){ + while (feof($file) === false) { $query[] = fgets($file); - if (preg_match('~' . preg_quote($delimiter, '~') . '\s*$~iS', end($query)) === 1){ + if (preg_match('~' . preg_quote($delimiter, '~') . '\s*$~iS', end($query)) === 1) { $success = true; $query = trim(implode('', $query)); - $query = str_replace(array('{#}', 'InnoDB', 'CHARSET=utf8'), array($prefix, $engine, 'CHARSET='.$charset), $query); + $query = str_replace(['{#}', 'InnoDB', 'CHARSET=utf8'], [$prefix, $engine, 'CHARSET=' . $charset], $query); $result = $mysqli->query($query); if ($mysqli->errno) { - return $mysqli->error."\n\n".$query; + return $mysqli->error . "\n\n" . $query; } - } - if (is_string($query) === true){ - $query = array(); + if (is_string($query) === true) { + $query = []; } - } fclose($file); return $success; - } diff --git a/install/upload/u1/003/0599295b.jpg b/install/upload/default/u1/003/0599295b.jpg similarity index 100% rename from install/upload/u1/003/0599295b.jpg rename to install/upload/default/u1/003/0599295b.jpg diff --git a/install/upload/u1/003/1c88035a.jpg b/install/upload/default/u1/003/1c88035a.jpg similarity index 100% rename from install/upload/u1/003/1c88035a.jpg rename to install/upload/default/u1/003/1c88035a.jpg diff --git a/install/upload/u1/003/236d41e4.jpg b/install/upload/default/u1/003/236d41e4.jpg similarity index 100% rename from install/upload/u1/003/236d41e4.jpg rename to install/upload/default/u1/003/236d41e4.jpg diff --git a/install/upload/u1/003/2e2bf124.jpg b/install/upload/default/u1/003/2e2bf124.jpg similarity index 100% rename from install/upload/u1/003/2e2bf124.jpg rename to install/upload/default/u1/003/2e2bf124.jpg diff --git a/install/upload/u1/003/3400aa78.jpg b/install/upload/default/u1/003/3400aa78.jpg similarity index 100% rename from install/upload/u1/003/3400aa78.jpg rename to install/upload/default/u1/003/3400aa78.jpg diff --git a/install/upload/u1/003/3c2e4a35.jpg b/install/upload/default/u1/003/3c2e4a35.jpg similarity index 100% rename from install/upload/u1/003/3c2e4a35.jpg rename to install/upload/default/u1/003/3c2e4a35.jpg diff --git a/install/upload/u1/003/3f768733.jpg b/install/upload/default/u1/003/3f768733.jpg similarity index 100% rename from install/upload/u1/003/3f768733.jpg rename to install/upload/default/u1/003/3f768733.jpg diff --git a/install/upload/u1/003/41646570.jpg b/install/upload/default/u1/003/41646570.jpg similarity index 100% rename from install/upload/u1/003/41646570.jpg rename to install/upload/default/u1/003/41646570.jpg diff --git a/install/upload/u1/003/44b68dc8.jpg b/install/upload/default/u1/003/44b68dc8.jpg similarity index 100% rename from install/upload/u1/003/44b68dc8.jpg rename to install/upload/default/u1/003/44b68dc8.jpg diff --git a/install/upload/u1/003/4878547b.jpg b/install/upload/default/u1/003/4878547b.jpg similarity index 100% rename from install/upload/u1/003/4878547b.jpg rename to install/upload/default/u1/003/4878547b.jpg diff --git a/install/upload/u1/003/53497165.jpg b/install/upload/default/u1/003/53497165.jpg similarity index 100% rename from install/upload/u1/003/53497165.jpg rename to install/upload/default/u1/003/53497165.jpg diff --git a/install/upload/u1/003/5edc315b.jpg b/install/upload/default/u1/003/5edc315b.jpg similarity index 100% rename from install/upload/u1/003/5edc315b.jpg rename to install/upload/default/u1/003/5edc315b.jpg diff --git a/install/upload/u1/003/74809cbe.jpg b/install/upload/default/u1/003/74809cbe.jpg similarity index 100% rename from install/upload/u1/003/74809cbe.jpg rename to install/upload/default/u1/003/74809cbe.jpg diff --git a/install/upload/u1/003/77fbbb95.jpg b/install/upload/default/u1/003/77fbbb95.jpg similarity index 100% rename from install/upload/u1/003/77fbbb95.jpg rename to install/upload/default/u1/003/77fbbb95.jpg diff --git a/install/upload/u1/003/852fb216.jpg b/install/upload/default/u1/003/852fb216.jpg similarity index 100% rename from install/upload/u1/003/852fb216.jpg rename to install/upload/default/u1/003/852fb216.jpg diff --git a/install/upload/u1/003/89e8e681.jpg b/install/upload/default/u1/003/89e8e681.jpg similarity index 100% rename from install/upload/u1/003/89e8e681.jpg rename to install/upload/default/u1/003/89e8e681.jpg diff --git a/install/upload/u1/003/93e51e49.jpg b/install/upload/default/u1/003/93e51e49.jpg similarity index 100% rename from install/upload/u1/003/93e51e49.jpg rename to install/upload/default/u1/003/93e51e49.jpg diff --git a/install/upload/u1/003/9e9ef526.jpg b/install/upload/default/u1/003/9e9ef526.jpg similarity index 100% rename from install/upload/u1/003/9e9ef526.jpg rename to install/upload/default/u1/003/9e9ef526.jpg diff --git a/install/upload/u1/003/9f03ca75.jpg b/install/upload/default/u1/003/9f03ca75.jpg similarity index 100% rename from install/upload/u1/003/9f03ca75.jpg rename to install/upload/default/u1/003/9f03ca75.jpg diff --git a/install/upload/u1/003/a05ad20e.jpg b/install/upload/default/u1/003/a05ad20e.jpg similarity index 100% rename from install/upload/u1/003/a05ad20e.jpg rename to install/upload/default/u1/003/a05ad20e.jpg diff --git a/install/upload/u1/003/ad753a86.jpg b/install/upload/default/u1/003/ad753a86.jpg similarity index 100% rename from install/upload/u1/003/ad753a86.jpg rename to install/upload/default/u1/003/ad753a86.jpg diff --git a/install/upload/u1/003/b1e550ce.jpg b/install/upload/default/u1/003/b1e550ce.jpg similarity index 100% rename from install/upload/u1/003/b1e550ce.jpg rename to install/upload/default/u1/003/b1e550ce.jpg diff --git a/install/upload/u1/003/b9767257.jpg b/install/upload/default/u1/003/b9767257.jpg similarity index 100% rename from install/upload/u1/003/b9767257.jpg rename to install/upload/default/u1/003/b9767257.jpg diff --git a/install/upload/u1/003/cae0bdfb.jpg b/install/upload/default/u1/003/cae0bdfb.jpg similarity index 100% rename from install/upload/u1/003/cae0bdfb.jpg rename to install/upload/default/u1/003/cae0bdfb.jpg diff --git a/install/upload/u1/003/d0ed7732.jpg b/install/upload/default/u1/003/d0ed7732.jpg similarity index 100% rename from install/upload/u1/003/d0ed7732.jpg rename to install/upload/default/u1/003/d0ed7732.jpg diff --git a/install/upload/u1/003/ddaa0bd4.jpg b/install/upload/default/u1/003/ddaa0bd4.jpg similarity index 100% rename from install/upload/u1/003/ddaa0bd4.jpg rename to install/upload/default/u1/003/ddaa0bd4.jpg diff --git a/install/upload/u1/003/e3c52c3e.jpg b/install/upload/default/u1/003/e3c52c3e.jpg similarity index 100% rename from install/upload/u1/003/e3c52c3e.jpg rename to install/upload/default/u1/003/e3c52c3e.jpg diff --git a/install/upload/u1/003/eb2bac70.jpg b/install/upload/default/u1/003/eb2bac70.jpg similarity index 100% rename from install/upload/u1/003/eb2bac70.jpg rename to install/upload/default/u1/003/eb2bac70.jpg diff --git a/install/upload/u1/003/f1476363.jpg b/install/upload/default/u1/003/f1476363.jpg similarity index 100% rename from install/upload/u1/003/f1476363.jpg rename to install/upload/default/u1/003/f1476363.jpg diff --git a/install/upload/u1/003/f6f14e82.jpg b/install/upload/default/u1/003/f6f14e82.jpg similarity index 100% rename from install/upload/u1/003/f6f14e82.jpg rename to install/upload/default/u1/003/f6f14e82.jpg diff --git a/install/upload/u1/003/f95ca1a2.jpg b/install/upload/default/u1/003/f95ca1a2.jpg similarity index 100% rename from install/upload/u1/003/f95ca1a2.jpg rename to install/upload/default/u1/003/f95ca1a2.jpg diff --git a/install/upload/u1/003/fa562059.jpg b/install/upload/default/u1/003/fa562059.jpg similarity index 100% rename from install/upload/u1/003/fa562059.jpg rename to install/upload/default/u1/003/fa562059.jpg diff --git a/install/upload/u1/004/08e78cd6.jpg b/install/upload/default/u1/004/08e78cd6.jpg similarity index 100% rename from install/upload/u1/004/08e78cd6.jpg rename to install/upload/default/u1/004/08e78cd6.jpg diff --git a/install/upload/u1/004/1b6fe453.jpg b/install/upload/default/u1/004/1b6fe453.jpg similarity index 100% rename from install/upload/u1/004/1b6fe453.jpg rename to install/upload/default/u1/004/1b6fe453.jpg diff --git a/install/upload/u1/004/29a7c938.jpg b/install/upload/default/u1/004/29a7c938.jpg similarity index 100% rename from install/upload/u1/004/29a7c938.jpg rename to install/upload/default/u1/004/29a7c938.jpg diff --git a/install/upload/u1/004/4bda72dd.jpg b/install/upload/default/u1/004/4bda72dd.jpg similarity index 100% rename from install/upload/u1/004/4bda72dd.jpg rename to install/upload/default/u1/004/4bda72dd.jpg diff --git a/install/upload/u1/004/64a79d25.jpg b/install/upload/default/u1/004/64a79d25.jpg similarity index 100% rename from install/upload/u1/004/64a79d25.jpg rename to install/upload/default/u1/004/64a79d25.jpg diff --git a/install/upload/u1/004/82645d44.jpg b/install/upload/default/u1/004/82645d44.jpg similarity index 100% rename from install/upload/u1/004/82645d44.jpg rename to install/upload/default/u1/004/82645d44.jpg diff --git a/install/upload/u1/004/8b15968b.jpg b/install/upload/default/u1/004/8b15968b.jpg similarity index 100% rename from install/upload/u1/004/8b15968b.jpg rename to install/upload/default/u1/004/8b15968b.jpg diff --git a/install/upload/u1/004/8d391531.jpg b/install/upload/default/u1/004/8d391531.jpg similarity index 100% rename from install/upload/u1/004/8d391531.jpg rename to install/upload/default/u1/004/8d391531.jpg diff --git a/install/upload/u1/004/a442fa4b.png b/install/upload/default/u1/004/a442fa4b.png similarity index 100% rename from install/upload/u1/004/a442fa4b.png rename to install/upload/default/u1/004/a442fa4b.png diff --git a/install/upload/u1/004/c8a73161.png b/install/upload/default/u1/004/c8a73161.png similarity index 100% rename from install/upload/u1/004/c8a73161.png rename to install/upload/default/u1/004/c8a73161.png diff --git a/install/upload/u1/004/de897122.png b/install/upload/default/u1/004/de897122.png similarity index 100% rename from install/upload/u1/004/de897122.png rename to install/upload/default/u1/004/de897122.png diff --git a/install/upload/u1/004/f13052e8.png b/install/upload/default/u1/004/f13052e8.png similarity index 100% rename from install/upload/u1/004/f13052e8.png rename to install/upload/default/u1/004/f13052e8.png diff --git a/install/upload/u1/004/f398ad69.png b/install/upload/default/u1/004/f398ad69.png similarity index 100% rename from install/upload/u1/004/f398ad69.png rename to install/upload/default/u1/004/f398ad69.png diff --git a/install/upload/u1/004/f9c36ec4.jpg b/install/upload/default/u1/004/f9c36ec4.jpg similarity index 100% rename from install/upload/u1/004/f9c36ec4.jpg rename to install/upload/default/u1/004/f9c36ec4.jpg diff --git a/install/upload/modern/000/u1/0/3/prodam-kvartiru-v-novostroike-photo-normal.jpg b/install/upload/modern/000/u1/0/3/prodam-kvartiru-v-novostroike-photo-normal.jpg new file mode 100644 index 000000000..d71715083 Binary files /dev/null and b/install/upload/modern/000/u1/0/3/prodam-kvartiru-v-novostroike-photo-normal.jpg differ diff --git a/install/upload/modern/000/u1/0/7/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp b/install/upload/modern/000/u1/0/7/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp new file mode 100644 index 000000000..7bb283382 Binary files /dev/null and b/install/upload/modern/000/u1/0/7/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list-small.webp differ diff --git a/install/upload/modern/000/u1/0/a/35b34880.jpg b/install/upload/modern/000/u1/0/a/35b34880.jpg new file mode 100644 index 000000000..b36734e1e Binary files /dev/null and b/install/upload/modern/000/u1/0/a/35b34880.jpg differ diff --git a/install/upload/modern/000/u1/0/b/investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg b/install/upload/modern/000/u1/0/b/investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg new file mode 100644 index 000000000..49d5aa2fa Binary files /dev/null and b/install/upload/modern/000/u1/0/b/investicii-dlja-chainikov-kuda-vkladyvat-photo-small.jpg differ diff --git a/install/upload/modern/000/u1/1/0/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg b/install/upload/modern/000/u1/1/0/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg new file mode 100644 index 000000000..152749f91 Binary files /dev/null and b/install/upload/modern/000/u1/1/0/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-small.jpg differ diff --git a/install/upload/modern/000/u1/1/2/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp b/install/upload/modern/000/u1/1/2/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp new file mode 100644 index 000000000..b38bc6778 Binary files /dev/null and b/install/upload/modern/000/u1/1/2/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list.webp differ diff --git a/install/upload/modern/000/u1/1/b/6e8291e5.webp b/install/upload/modern/000/u1/1/b/6e8291e5.webp new file mode 100644 index 000000000..d48fb80bd Binary files /dev/null and b/install/upload/modern/000/u1/1/b/6e8291e5.webp differ diff --git a/install/upload/modern/000/u1/1/f/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp b/install/upload/modern/000/u1/1/f/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp new file mode 100644 index 000000000..e3d39b289 Binary files /dev/null and b/install/upload/modern/000/u1/1/f/rossijane-stali-pervymi-na-chempionate-mira-photo-content-list.webp differ diff --git a/install/upload/modern/000/u1/2/2/rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp b/install/upload/modern/000/u1/2/2/rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp new file mode 100644 index 000000000..d901335cc Binary files /dev/null and b/install/upload/modern/000/u1/2/2/rossijane-stali-pervymi-na-chempionate-mira-photo-content-item.webp differ diff --git a/install/upload/modern/000/u1/2/3/7e8cf01c.webp b/install/upload/modern/000/u1/2/3/7e8cf01c.webp new file mode 100644 index 000000000..261b8e279 Binary files /dev/null and b/install/upload/modern/000/u1/2/3/7e8cf01c.webp differ diff --git a/install/upload/modern/000/u1/2/6/60826896.webp b/install/upload/modern/000/u1/2/6/60826896.webp new file mode 100644 index 000000000..03f95e399 Binary files /dev/null and b/install/upload/modern/000/u1/2/6/60826896.webp differ diff --git a/install/upload/modern/000/u1/2/e/481e9f06.webp b/install/upload/modern/000/u1/2/e/481e9f06.webp new file mode 100644 index 000000000..f8bde3a9c Binary files /dev/null and b/install/upload/modern/000/u1/2/e/481e9f06.webp differ diff --git a/install/upload/modern/000/u1/3/1/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp b/install/upload/modern/000/u1/3/1/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp new file mode 100644 index 000000000..63319eece Binary files /dev/null and b/install/upload/modern/000/u1/3/1/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-item.webp differ diff --git a/install/upload/modern/000/u1/3/5/c29217d1.webp b/install/upload/modern/000/u1/3/5/c29217d1.webp new file mode 100644 index 000000000..752375a2e Binary files /dev/null and b/install/upload/modern/000/u1/3/5/c29217d1.webp differ diff --git a/install/upload/modern/000/u1/3/7/52241df9.jpg b/install/upload/modern/000/u1/3/7/52241df9.jpg new file mode 100644 index 000000000..bd5872f0b Binary files /dev/null and b/install/upload/modern/000/u1/3/7/52241df9.jpg differ diff --git a/install/upload/modern/000/u1/3/e/prodam-kvartiru-v-novostroike-photo-micro.jpg b/install/upload/modern/000/u1/3/e/prodam-kvartiru-v-novostroike-photo-micro.jpg new file mode 100644 index 000000000..5f5e9c0b4 Binary files /dev/null and b/install/upload/modern/000/u1/3/e/prodam-kvartiru-v-novostroike-photo-micro.jpg differ diff --git a/install/upload/modern/000/u1/4/2/1a7da83e.jpg b/install/upload/modern/000/u1/4/2/1a7da83e.jpg new file mode 100644 index 000000000..e53c9eea1 Binary files /dev/null and b/install/upload/modern/000/u1/4/2/1a7da83e.jpg differ diff --git a/install/upload/modern/000/u1/4/3/8914eba7.webp b/install/upload/modern/000/u1/4/3/8914eba7.webp new file mode 100644 index 000000000..039b171cc Binary files /dev/null and b/install/upload/modern/000/u1/4/3/8914eba7.webp differ diff --git a/install/upload/modern/000/u1/4/5/c44b04bf.webp b/install/upload/modern/000/u1/4/5/c44b04bf.webp new file mode 100644 index 000000000..4c5eb9ef4 Binary files /dev/null and b/install/upload/modern/000/u1/4/5/c44b04bf.webp differ diff --git a/install/upload/modern/000/u1/5/0/2afcd745.webp b/install/upload/modern/000/u1/5/0/2afcd745.webp new file mode 100644 index 000000000..7dcbc7303 Binary files /dev/null and b/install/upload/modern/000/u1/5/0/2afcd745.webp differ diff --git a/install/upload/modern/000/u1/5/3/74ca4539.webp b/install/upload/modern/000/u1/5/3/74ca4539.webp new file mode 100644 index 000000000..41f84fd3a Binary files /dev/null and b/install/upload/modern/000/u1/5/3/74ca4539.webp differ diff --git a/install/upload/modern/000/u1/5/5/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg b/install/upload/modern/000/u1/5/5/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg new file mode 100644 index 000000000..b5eac4cb7 Binary files /dev/null and b/install/upload/modern/000/u1/5/5/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-small.jpg differ diff --git a/install/upload/modern/000/u1/5/b/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp b/install/upload/modern/000/u1/5/b/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp new file mode 100644 index 000000000..116856436 Binary files /dev/null and b/install/upload/modern/000/u1/5/b/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-item.webp differ diff --git a/install/upload/modern/000/u1/6/7/fc4e5bc4.webp b/install/upload/modern/000/u1/6/7/fc4e5bc4.webp new file mode 100644 index 000000000..8ed33ccc9 Binary files /dev/null and b/install/upload/modern/000/u1/6/7/fc4e5bc4.webp differ diff --git a/install/upload/modern/000/u1/6/e/rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg b/install/upload/modern/000/u1/6/e/rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg new file mode 100644 index 000000000..becbe26a5 Binary files /dev/null and b/install/upload/modern/000/u1/6/e/rossijane-stali-pervymi-na-chempionate-mira-photo-small.jpg differ diff --git a/install/upload/modern/000/u1/7/2/b262ab6f.jpg b/install/upload/modern/000/u1/7/2/b262ab6f.jpg new file mode 100644 index 000000000..1867b0810 Binary files /dev/null and b/install/upload/modern/000/u1/7/2/b262ab6f.jpg differ diff --git a/install/upload/modern/000/u1/7/3/robototehnika-logo-small.png b/install/upload/modern/000/u1/7/3/robototehnika-logo-small.png new file mode 100644 index 000000000..241375189 Binary files /dev/null and b/install/upload/modern/000/u1/7/3/robototehnika-logo-small.png differ diff --git a/install/upload/modern/000/u1/7/6/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp b/install/upload/modern/000/u1/7/6/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp new file mode 100644 index 000000000..2c42878df Binary files /dev/null and b/install/upload/modern/000/u1/7/6/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list.webp differ diff --git a/install/upload/modern/000/u1/7/e/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp b/install/upload/modern/000/u1/7/e/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp new file mode 100644 index 000000000..bd70e1614 Binary files /dev/null and b/install/upload/modern/000/u1/7/e/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-list-small.webp differ diff --git a/install/upload/modern/000/u1/8/b/prodam-kvartiru-v-novostroike-photos-big.jpg b/install/upload/modern/000/u1/8/b/prodam-kvartiru-v-novostroike-photos-big.jpg new file mode 100644 index 000000000..ef5c2e29d Binary files /dev/null and b/install/upload/modern/000/u1/8/b/prodam-kvartiru-v-novostroike-photos-big.jpg differ diff --git a/install/upload/modern/000/u1/9/3/6c024907.webp b/install/upload/modern/000/u1/9/3/6c024907.webp new file mode 100644 index 000000000..bc7fcfc69 Binary files /dev/null and b/install/upload/modern/000/u1/9/3/6c024907.webp differ diff --git a/install/upload/modern/000/u1/9/8/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp b/install/upload/modern/000/u1/9/8/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp new file mode 100644 index 000000000..7a4cb9b68 Binary files /dev/null and b/install/upload/modern/000/u1/9/8/investicii-dlja-chainikov-kuda-vkladyvat-photo-content-item.webp differ diff --git a/install/upload/modern/000/u1/9/d/prodam-kvartiru-v-novostroike-photos-big.webp b/install/upload/modern/000/u1/9/d/prodam-kvartiru-v-novostroike-photos-big.webp new file mode 100644 index 000000000..4f38b61e8 Binary files /dev/null and b/install/upload/modern/000/u1/9/d/prodam-kvartiru-v-novostroike-photos-big.webp differ diff --git a/install/upload/modern/000/u1/a/0/3ed25154.webp b/install/upload/modern/000/u1/a/0/3ed25154.webp new file mode 100644 index 000000000..e4aa3f2ab Binary files /dev/null and b/install/upload/modern/000/u1/a/0/3ed25154.webp differ diff --git a/install/upload/modern/000/u1/a/5/53e113d9.webp b/install/upload/modern/000/u1/a/5/53e113d9.webp new file mode 100644 index 000000000..898d50728 Binary files /dev/null and b/install/upload/modern/000/u1/a/5/53e113d9.webp differ diff --git a/install/upload/modern/000/u1/a/7/f927491e.webp b/install/upload/modern/000/u1/a/7/f927491e.webp new file mode 100644 index 000000000..219f76241 Binary files /dev/null and b/install/upload/modern/000/u1/a/7/f927491e.webp differ diff --git a/install/upload/modern/000/u1/b/7/prodam-kvartiru-v-novostroike-photos-small.jpg b/install/upload/modern/000/u1/b/7/prodam-kvartiru-v-novostroike-photos-small.jpg new file mode 100644 index 000000000..a2559e371 Binary files /dev/null and b/install/upload/modern/000/u1/b/7/prodam-kvartiru-v-novostroike-photos-small.jpg differ diff --git a/install/upload/modern/000/u1/b/c/prodam-kvartiru-v-novostroike-photos-small.webp b/install/upload/modern/000/u1/b/c/prodam-kvartiru-v-novostroike-photos-small.webp new file mode 100644 index 000000000..0cf43cd13 Binary files /dev/null and b/install/upload/modern/000/u1/b/c/prodam-kvartiru-v-novostroike-photos-small.webp differ diff --git a/install/upload/modern/000/u1/b/e/prodam-kvartiru-v-novostroike-photos-small.jpg b/install/upload/modern/000/u1/b/e/prodam-kvartiru-v-novostroike-photos-small.jpg new file mode 100644 index 000000000..02df61755 Binary files /dev/null and b/install/upload/modern/000/u1/b/e/prodam-kvartiru-v-novostroike-photos-small.jpg differ diff --git a/install/upload/modern/000/u1/c/9/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp b/install/upload/modern/000/u1/c/9/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp new file mode 100644 index 000000000..f4837c402 Binary files /dev/null and b/install/upload/modern/000/u1/c/9/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list.webp differ diff --git a/install/upload/modern/000/u1/e/3/923d5458.webp b/install/upload/modern/000/u1/e/3/923d5458.webp new file mode 100644 index 000000000..073b0a590 Binary files /dev/null and b/install/upload/modern/000/u1/e/3/923d5458.webp differ diff --git a/install/upload/modern/000/u1/e/3/robototehnika-logo-micro.png b/install/upload/modern/000/u1/e/3/robototehnika-logo-micro.png new file mode 100644 index 000000000..d29468151 Binary files /dev/null and b/install/upload/modern/000/u1/e/3/robototehnika-logo-micro.png differ diff --git a/install/upload/modern/000/u1/e/8/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp b/install/upload/modern/000/u1/e/8/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp new file mode 100644 index 000000000..f20e291f1 Binary files /dev/null and b/install/upload/modern/000/u1/e/8/kolichestvo-prestuplenii-v-rossii-sokraschaetsja-photo-content-list-small.webp differ diff --git a/install/upload/modern/000/u1/e/e/prodam-kvartiru-v-novostroike-photo-small.jpg b/install/upload/modern/000/u1/e/e/prodam-kvartiru-v-novostroike-photo-small.jpg new file mode 100644 index 000000000..797557033 Binary files /dev/null and b/install/upload/modern/000/u1/e/e/prodam-kvartiru-v-novostroike-photo-small.jpg differ diff --git a/install/upload/modern/000/u1/e/f/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp b/install/upload/modern/000/u1/e/f/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp new file mode 100644 index 000000000..14043aec1 Binary files /dev/null and b/install/upload/modern/000/u1/e/f/vse-bolshe-rossijan-pokupayut-doma-za-granicei-photo-content-list-small.webp differ diff --git a/install/upload/modern/000/u1/f/3/prodam-kvartiru-v-novostroike-photos-big.jpg b/install/upload/modern/000/u1/f/3/prodam-kvartiru-v-novostroike-photos-big.jpg new file mode 100644 index 000000000..95c9519fd Binary files /dev/null and b/install/upload/modern/000/u1/f/3/prodam-kvartiru-v-novostroike-photos-big.jpg differ diff --git a/install/upload/modern/000/u1/f/7/99914b0f.webp b/install/upload/modern/000/u1/f/7/99914b0f.webp new file mode 100644 index 000000000..69bac7755 Binary files /dev/null and b/install/upload/modern/000/u1/f/7/99914b0f.webp differ diff --git a/static/.htaccess b/static/.htaccess index 9a2eaf2e1..a84c85da5 100755 --- a/static/.htaccess +++ b/static/.htaccess @@ -1,7 +1,9 @@ - -php_flag engine 0 - - - -php_flag engine 0 +# PHP 7 + + php_flag engine 0 + +# PHP 8 + + php_flag engine 0 + \ No newline at end of file diff --git a/system/.htaccess b/system/.htaccess index 31f17f919..33ce7e5c0 100755 --- a/system/.htaccess +++ b/system/.htaccess @@ -1 +1,8 @@ -Deny From All +# apache > 2.2 + + Require all denied + +# apache <= 2.2 + + Deny From All + \ No newline at end of file diff --git a/system/controllers/admin/actions/ctypes_fields_options.php b/system/controllers/admin/actions/ctypes_fields_options.php index 349e258c2..2df86f1dd 100755 --- a/system/controllers/admin/actions/ctypes_fields_options.php +++ b/system/controllers/admin/actions/ctypes_fields_options.php @@ -83,6 +83,7 @@ public function run() { return $this->cms_template->renderJSON([ 'error' => false, 'is_can_in_filter' => ($base_field->filter_type !== false), + 'is_virtual' => $base_field->is_virtual, 'html' => ob_get_clean() ]); } diff --git a/system/controllers/admin/forms/form_ctypes_basic.php b/system/controllers/admin/forms/form_ctypes_basic.php index 9a143be52..e8dbd6f66 100755 --- a/system/controllers/admin/forms/form_ctypes_basic.php +++ b/system/controllers/admin/forms/form_ctypes_basic.php @@ -250,6 +250,19 @@ public function init($do, $ctype) { return $template->getAvailableContentListStyles(); } )), + new fieldList('options:list_style_options', array( + 'title' => LANG_CP_LIST_STYLE_OPTIONS, + 'hint' => LANG_CP_LIST_STYLE_OPTIONS_HINT, + 'is_multiple' => true, + 'dynamic_list' => true, + 'select_title' => LANG_CP_CONTEXT_SELECT_LIST, + 'multiple_keys' => array( + 'name' => 'field', 'value' => 'field_value' + ), + 'generator' => function($ctype) use ($template){ + return $template->getAvailableContentListStyles(); + } + )), new fieldList('options:list_style_names', array( 'title' => LANG_CP_LIST_STYLE_NAMES, 'is_multiple' => true, diff --git a/system/controllers/content/actions/category_view.php b/system/controllers/content/actions/category_view.php index c4801e703..0f171cddf 100755 --- a/system/controllers/content/actions/category_view.php +++ b/system/controllers/content/actions/category_view.php @@ -1,15 +1,16 @@ is_remapped = $this->cms_core->uri_controller_before_remap ? true : false; - } public function run() { @@ -17,7 +18,7 @@ public function run() { list($ctype, $category, $slug) = $this->getCategoryAndSlugAndCtype(); // Скрытая категория - if(!empty($category['is_hidden'])){ + if (!empty($category['is_hidden'])) { return cmsCore::error404(); } @@ -37,15 +38,15 @@ public function run() { $items_list_html = ''; // Получаем список наборов - $datasets = $this->getCtypeDatasets($ctype, array( + $datasets = $this->getCtypeDatasets($ctype, [ 'cat_id' => $category['id'] - )); + ]); // Если это не главная, но данный контент выводится на главной и сейчас // открыта индексная страница контента - редиректим на главную if (!$this->request->isAjax() && !$is_frontpage && - $this->cms_config->frontpage == "content:{$ctype['name']}" && $slug == 'index' && - !$dataset && $page == 1 && !$this->list_filter) { + $this->cms_config->frontpage === "content:{$ctype['name']}" && $slug === 'index' && + !$dataset && $page === 1 && !$this->list_filter) { $query = $this->cms_core->uri_query; if ($query) { @@ -57,7 +58,7 @@ public function run() { // Если есть наборы, применяем фильтры текущего // иначе будем сортировать по дате создания - $current_dataset = array(); + $current_dataset = []; if ($datasets) { if ($dataset && empty($datasets[$dataset])) { @@ -75,7 +76,7 @@ public function run() { // если набор всего один, например для изменения сортировки по умолчанию, // не показываем его на сайте if (count($datasets) == 1) { - $current_dataset = array(); + $current_dataset = []; $datasets = false; } } elseif ($dataset) { @@ -85,10 +86,10 @@ public function run() { // Категории включены? if ($ctype['is_cats']) { // Фильтр по категории - if ($slug != 'index') { + if ($slug !== 'index') { $this->model->filterCategory($ctype['name'], $category, $ctype['is_cats_recursive'], !empty($ctype['options']['is_cats_multi'])); } elseif (!$ctype['is_cats_recursive']) { - $this->model->filterCategory($ctype['name'], array('id' => 1)); + $this->model->filterCategory($ctype['name'], ['id' => 1], false, !empty($ctype['options']['is_cats_multi'])); } } @@ -115,7 +116,7 @@ public function run() { if ($this->list_filter) { if (!$base_url && empty($category['slug'])) { - $page_url = str_replace('/'.$ctype['name'], '', $page_url); + $page_url = str_replace('/' . $ctype['name'], '', $page_url); } $page_url = [ 'base' => $page_url . '/' . $this->list_filter['slug'], @@ -135,12 +136,12 @@ public function run() { } } - list($ctype, $category) = cmsEventsManager::hook("content_before_category", array($ctype, $category)); - list($ctype, $category) = cmsEventsManager::hook("content_{$ctype['name']}_before_category", array($ctype, $category)); + list($ctype, $category) = cmsEventsManager::hook("content_before_category", [$ctype, $category]); + list($ctype, $category) = cmsEventsManager::hook("content_{$ctype['name']}_before_category", [$ctype, $category]); - $is_hide_items = !empty($ctype['options']['is_empty_root']) && $slug == 'index'; + $is_hide_items = !empty($ctype['options']['is_empty_root']) && $slug === 'index'; - $list_styles = array(); + $list_styles = []; $current_style = ''; if (!empty($ctype['options']['list_style'])) { @@ -163,7 +164,7 @@ public function run() { return trim(strip_tags($cookie)); }); - if($ctype_list_style_preset === 'default'){ + if ($ctype_list_style_preset === 'default') { $ctype_list_style_preset = ''; } } @@ -171,7 +172,7 @@ public function run() { if ($this->cms_user->is_logged) { $ctype_list_style_preset = cmsUser::getUPS($style_key_name); - if($ctype_list_style_preset === null){ + if ($ctype_list_style_preset === null) { $ctype_list_style_preset = ''; } } @@ -191,7 +192,7 @@ public function run() { cmsUser::setUPS($style_key_name, $current_style); } - $style_titles = array(); + $style_titles = []; if (!empty($ctype['options']['list_style_names'])) { foreach ($ctype['options']['list_style_names'] as $list_style_names) { $style_titles[$list_style_names['name']] = $list_style_names['value']; @@ -199,12 +200,12 @@ public function run() { } foreach ($ctype['options']['list_style'] as $list_style) { - $list_styles[] = array( + $list_styles[] = [ 'title' => (isset($style_titles[$list_style]) ? $style_titles[$list_style] : ''), 'style' => $list_style, 'url' => (!empty($page_url['base']) ? $page_url['base'] : $page_url) . '?style=' . $list_style, 'class' => $list_style . ($current_style === $list_style ? ' active' : ''), - ); + ]; } $ctype['options']['raw_list_style'] = $ctype['options']['list_style']; @@ -227,7 +228,7 @@ public function run() { // Получаем HTML списка записей if (!$is_hide_items) { - $items_list_html = $this->renderItemsList($ctype, $page_url, false, $category['id'], array(), $dataset); + $items_list_html = $this->renderItemsList($ctype, $page_url, false, $category['id'], [], $dataset); } // сбрасываем фильтры если, например, список не запрашивали @@ -236,10 +237,10 @@ public function run() { $tpl_file = $this->cms_template->getTemplateFileName('controllers/content/category_view_' . $ctype['name'], true) ? 'category_view_' . $ctype['name'] : 'category_view'; - $hooks_html = cmsEventsManager::hookAll("content_{$ctype['name']}_items_html", array('category_view', $ctype, $category, $current_dataset)); + $hooks_html = cmsEventsManager::hookAll("content_{$ctype['name']}_items_html", ['category_view', $ctype, $category, $current_dataset]); - if(!$is_frontpage){ - $toolbar_html = cmsEventsManager::hookAll('content_toolbar_html', array($ctype['name'], $category, $current_dataset, array())); + if (!$is_frontpage) { + $toolbar_html = cmsEventsManager::hookAll('content_toolbar_html', [$ctype['name'], $category, $current_dataset, []]); if ($toolbar_html) { $this->cms_template->addToBlock('before_body', html_each($toolbar_html)); } @@ -262,7 +263,7 @@ public function run() { if (!empty($category['path'])) { foreach ($category['path'] as $c) { - if(empty($c['is_hidden'])){ + if (empty($c['is_hidden'])) { $this->cms_template->addBreadcrumb($c['title'], href_to($base_url, $c['slug'])); } } @@ -274,11 +275,12 @@ public function run() { // Получаем список подкатегорий для текущей $current_cat_id = $category['id'] ? $category['id'] : 1; + $subcats = $this->model->filterIsNull('is_hidden')-> getSubCategories($ctype['name'], $current_cat_id); // Формируем параметры, используемые в шаблоне - if($subcats){ + if ($subcats) { $subcats = $this->buildCategoriesTemplateParams($subcats, $ctype, $current_dataset, $dataset, $base_url); } } @@ -297,7 +299,7 @@ public function run() { $this->cms_template->addBreadcrumb($this->list_filter['title'], (!empty($page_url['base']) ? $page_url['base'] : $page_url)); } - return $this->cms_template->render($tpl_file, array( + return $this->cms_template->render($tpl_file, [ 'category_seo' => (!empty($category_seo) ? $category_seo : []), 'show_h1' => $this->cms_template->hasPageH1() && !$this->request->isInternal() && !$is_frontpage, 'base_ds_url' => $base_ds_url, @@ -316,30 +318,31 @@ public function run() { 'subcats' => $subcats, 'items_list_html' => $items_list_html, 'user' => $this->cms_user - ), $this->request); - + ], $this->request); } private function buildCategoriesTemplateParams($subcats, $ctype, $current_dataset, $dataset, $base_url) { + foreach ($subcats as $key => $cat) { $is_ds_view = empty($current_dataset['cats_view']) || in_array($cat['id'], $current_dataset['cats_view']); $is_ds_hide = !empty($current_dataset['cats_hide']) && in_array($cat['id'], $current_dataset['cats_hide']); - $img_src = html_image_src($cat['cover'], $ctype['options']['cover_preset'], true); + $img_src = html_image_src($cat['cover'], $ctype['options']['cover_preset'], true); - $class = ['icms-content-'.$ctype['name'].'__icon']; - if($ctype['options']['cover_preset']){ + $class = ['icms-content-' . $ctype['name'] . '__icon']; + if ($ctype['options']['cover_preset']) { $class[] = 'icms-content__has_cover_preset'; - $class[] = 'icms-content-cover-preset__'.$ctype['options']['cover_preset']; + $class[] = 'icms-content-cover-preset__' . $ctype['options']['cover_preset']; } - $class[] = 'icms-content-cat__'.str_replace('/', '-', $cat['slug']); + $class[] = 'icms-content-cat__' . str_replace('/', '-', $cat['slug']); $subcats[$key]['list_params'] = [ 'cover_img' => $img_src, - 'href' => href_to((($dataset && $is_ds_view && !$is_ds_hide) ? $ctype['name'].'-'.$dataset : $base_url), $cat['slug']), - 'class' => implode(' ', $class) + 'href' => href_to((($dataset && $is_ds_view && !$is_ds_hide) ? $ctype['name'] . '-' . $dataset : $base_url), $cat['slug']), + 'class' => implode(' ', $class) ]; } + return $subcats; } @@ -347,7 +350,7 @@ private function getCategoryAndSlugAndCtype() { $slug = $this->request->get('slug', ''); - $_ctype_name = $this->request->get('ctype_name'); + $_ctype_name = $this->request->get('ctype_name', ''); if (!$_ctype_name) { return cmsCore::error404(); @@ -408,10 +411,10 @@ private function getCategoryAndSlugAndCtype() { if (!$segments) { - $category = array( + $category = [ 'id' => false, 'description' => (!empty($ctype['description']) ? $ctype['description'] : '') - ); + ]; $slug = 'index'; @@ -427,7 +430,7 @@ private function getCategoryAndSlugAndCtype() { if ($category) { // Категории выключены - if(!$ctype['is_cats']){ + if (!$ctype['is_cats']) { $category = false; } @@ -441,7 +444,7 @@ private function getCategoryAndSlugAndCtype() { $filter_slug = implode('/', $filters_segments); - if(!is_numeric($filter_slug)){ + if (!is_numeric($filter_slug)) { $filter = $this->model->getContentFilter($ctype, $filter_slug); } else { $filter = false; @@ -475,11 +478,11 @@ private function getCategoryAndSlugAndCtype() { $slug, $ctype, $category - ) = cmsEventsManager::hook(['content_get_category_by_slug', "content_{$ctype['name']}_get_category_by_slug"], [ - $slug, - $ctype, - $category - ], null, $this->request); + ) = cmsEventsManager::hook(['content_get_category_by_slug', "content_{$ctype['name']}_get_category_by_slug"], [ + $slug, + $ctype, + $category + ], null, $this->request); if (!$category) { @@ -514,13 +517,13 @@ private function getCategoryAndSlugAndCtype() { !$this->request->get('dataset', '') && $this->cms_config->ctype_default && in_array($ctype['name'], $this->cms_config->ctype_default))) { - if(!empty($category['slug'])){ - if(!empty($this->list_filter['slug'])){ + if (!empty($category['slug'])) { + if (!empty($this->list_filter['slug'])) { $this->redirect(href_to($category['slug'], $this->list_filter['slug']), 301); } $this->redirect(href_to($category['slug']), 301); } - if(!empty($this->list_filter['slug'])){ + if (!empty($this->list_filter['slug'])) { $this->redirect(href_to($this->list_filter['slug']), 301); } } @@ -541,7 +544,6 @@ private function getCategoryAndSlugAndCtype() { // ничего не нашли return cmsCore::error404(); - } private function getCtypeByAlias($ctype_name) { @@ -551,20 +553,19 @@ private function getCtypeByAlias($ctype_name) { if ($mapping) { foreach ($mapping as $name => $alias) { - if($this->is_remapped){ + if ($this->is_remapped) { break; } - if ($alias == $ctype_name) { + if ($alias === $ctype_name) { $this->is_remapped = true; $ctype_name = $name; break; - } - if ($name == $ctype_name) { + if ($name === $ctype_name) { $this->remap_redirect_ctype = $alias; } } diff --git a/system/controllers/content/actions/item_view.php b/system/controllers/content/actions/item_view.php index 8ecd4cb4a..46772454d 100755 --- a/system/controllers/content/actions/item_view.php +++ b/system/controllers/content/actions/item_view.php @@ -143,13 +143,16 @@ public function run(){ // Получаем поля для данного типа контента $fields = $this->model->getContentFields($ctype['name']); + // Запоминаем копию записи для заполнения отпарсенных полей + $item_parsed = $item; + // Парсим значения полей foreach ($fields as $name => $field) { $fields[$name]['html'] = $field['handler']->setItem($item)->parse(isset($item[$name]) ? $item[$name] : ''); + $item_parsed[$name] = $fields[$name]['html']; } // Для каких необходимо, обрабатываем дополнительно - $item_parsed = array_column($fields, 'html', 'name'); foreach ($fields as $name => $field) { $fields[$name]['string_value'] = $field['handler']->setItem($item_parsed)->getStringValue(isset($item[$name]) ? $item[$name] : ''); $fields[$name]['html'] = $field['handler']->afterParse($fields[$name]['html'], $item_parsed); @@ -377,7 +380,7 @@ public function run(){ continue; } - if (mb_strlen($field['html']) === 0) { + if (is_empty_value($field['html'])) { continue; } diff --git a/system/controllers/content/forms/form_widget_content_list.php b/system/controllers/content/forms/form_widget_content_list.php index b72c1a8d6..81473e695 100755 --- a/system/controllers/content/forms/form_widget_content_list.php +++ b/system/controllers/content/forms/form_widget_content_list.php @@ -74,11 +74,6 @@ public function init($ctype, $fields) { )); } - $childs[] = new fieldCheckbox("options:show_fields:{$ctype['id']}:category", array( - 'title' => LANG_CATEGORY - ) - ); - $childs[] = new fieldCheckbox("options:show_fields:{$ctype['id']}:date_pub", array( 'title' => LANG_DATE ) diff --git a/system/controllers/content/frontend.php b/system/controllers/content/frontend.php index ef15545f9..047630d3a 100755 --- a/system/controllers/content/frontend.php +++ b/system/controllers/content/frontend.php @@ -1,4 +1,7 @@ model->limitPage($page, $perpage); } - list($ctype, $this->model) = cmsEventsManager::hook('content_list_filter', array($ctype, $this->model)); - list($ctype, $this->model) = cmsEventsManager::hook("content_{$ctype['name']}_list_filter", array($ctype, $this->model)); + list($ctype, $this->model) = cmsEventsManager::hook('content_list_filter', [$ctype, $this->model]); + list($ctype, $this->model) = cmsEventsManager::hook("content_{$ctype['name']}_list_filter", [$ctype, $this->model]); // правила доступа на просмотр списка записей $check_list_perm_result = $this->checkListPerm($ctype['name']); @@ -397,8 +400,10 @@ public function renderItemsList($ctype, $page_url, $hide_filter = false, $catego } // если запрос через URL - if($this->request->isStandard()){ - if(!$items && $page > 1){ cmsCore::error404(); } + if ($this->request->isStandard()) { + if (!$items && $page > 1) { + return cmsCore::error404(); + } } // заполняем поля для шаблона @@ -476,7 +481,7 @@ public function renderItemsList($ctype, $page_url, $hide_filter = false, $catego } $field_html = $field['handler']->setItem($item)->parseTeaser($item[$field['name']]); - if (mb_strlen($field_html) === 0) { continue; } + if (is_empty_value($field_html)) { continue; } $current_field_data['html'] = $field_html; $current_field_data['options'] = $field['options']; @@ -492,8 +497,8 @@ public function renderItemsList($ctype, $page_url, $hide_filter = false, $catego } } - list($ctype, $items) = cmsEventsManager::hook('content_before_list', array($ctype, $items)); - list($ctype, $items) = cmsEventsManager::hook("content_{$ctype['name']}_before_list", array($ctype, $items)); + list($ctype, $items) = cmsEventsManager::hook('content_before_list', [$ctype, $items]); + list($ctype, $items) = cmsEventsManager::hook("content_{$ctype['name']}_before_list", [$ctype, $items]); cmsModel::cacheResult('current_ctype_fields', $fields); cmsModel::cacheResult('current_ctype_props', $props); diff --git a/system/controllers/content/hooks/subscribe_list_title.php b/system/controllers/content/hooks/subscribe_list_title.php index f983ac553..7916527d6 100755 --- a/system/controllers/content/hooks/subscribe_list_title.php +++ b/system/controllers/content/hooks/subscribe_list_title.php @@ -29,7 +29,7 @@ public function run($target, $subscribe){ foreach ($target['params']['filters'] as $key => $filters) { // пользователь - if($filters['field'] == 'user_id'){ + if($filters['field'] === 'user_id'){ $user = $this->model_users->getUser($filters['value']); @@ -38,10 +38,9 @@ public function run($target, $subscribe){ } continue; - } // папка - if($filters['field'] == 'folder_id'){ + if($filters['field'] === 'folder_id'){ $folder = $this->model->getContentFolder($filters['value']); @@ -50,10 +49,9 @@ public function run($target, $subscribe){ } continue; - } // группа - if($filters['field'] == 'parent_id' && $target['params']['filters'][$key+1]['value'] == 'group'){ + if($filters['field'] === 'parent_id' && $target['params']['filters'][$key+1]['value'] === 'group'){ $group = $this->model_groups->getGroup($filters['value']); @@ -62,10 +60,9 @@ public function run($target, $subscribe){ } continue; - } // связь - if($filters['field'] == 'relation'){ + if($filters['field'] === 'relation'){ $item = $this->model->getContentItem($filters['value']['parent_ctype_id'], $filters['value']['parent_item_id']); @@ -91,10 +88,9 @@ public function run($target, $subscribe){ } continue; - } // категория - if($filters['field'] == 'category_id'){ + if($filters['field'] === 'category_id'){ $cat = $this->model->getCategory($ctype['name'], $filters['value']); @@ -107,7 +103,6 @@ public function run($target, $subscribe){ } continue; - } if(isset($fields[$filters['field']])){ @@ -136,7 +131,9 @@ public function run($target, $subscribe){ } if(!$result){ - $result = $fields[$filters['field']]['handler']->getStringValue($filters['value']); + $result = $fields[$filters['field']]['handler']-> + setItem(['ctype_name' => $ctype['name'], 'ctype' => $ctype, 'id' => 0])-> + getStringValue($filters['value']); } if($result){ @@ -161,7 +158,7 @@ public function run($target, $subscribe){ foreach ($target['params']['field_filters'] as $field_name => $field_value) { - $matches = array(); + $matches = []; // свойства или поля if(preg_match('/^p([0-9]+)$/i', $field_name, $matches)){ @@ -189,7 +186,7 @@ public function run($target, $subscribe){ } - $handler->setItem(array('ctype_name' => $ctype['name'], 'id' => null)); + $handler->setItem(['ctype_name' => $ctype['name'], 'ctype' => $ctype, 'id' => 0]); if($handler->getDefaultVarType(true) !== 'array' && is_array($field_value)){ foreach ($field_value as $field_val) { @@ -208,11 +205,8 @@ public function run($target, $subscribe){ if($result){ $titles[] = mb_strtolower($field_title.' '.$result); } - } - } - } if(!empty($titles)){ @@ -220,7 +214,6 @@ public function run($target, $subscribe){ } return $result_title; - } } diff --git a/system/controllers/content/model.php b/system/controllers/content/model.php index 4350564a1..e66906ef9 100755 --- a/system/controllers/content/model.php +++ b/system/controllers/content/model.php @@ -486,9 +486,9 @@ public function updateContentField($ctype_name, $id, $field){ $field_handler->hookAfterUpdate($content_table_name, $field, $field_old, $this); - if (($field_old['name'] != $field['name']) || ($field_old['type'] != $field['type']) || ($new_lenght != $old_lenght)){ + if (($field_old['name'] !== $field['name']) || ($field_old['type'] !== $field['type']) || ($new_lenght != $old_lenght)){ - if($field_old['type'] != $field['type']){ $this->db->dropIndex($content_table_name, $field_old['name']); } + if($field_old['type'] !== $field['type']){ $this->db->dropIndex($content_table_name, $field_old['name']); } $sql = "ALTER TABLE `{#}{$content_table_name}` CHANGE `{$field_old['name']}` `{$field['name']}` {$field_handler->getSQL()}"; // Пробуем сменить @@ -501,7 +501,7 @@ public function updateContentField($ctype_name, $id, $field){ $this->db->query($sql); } - if(($field_old['name'] != $field['name']) || ($field_old['type'] != $field['type'])){ + if(($field_old['name'] !== $field['name']) || ($field_old['type'] !== $field['type'])){ // поля денормализации $old_cfield_name = $field_old['name'].cmsFormField::FIELD_CACHE_POSTFIX; @@ -516,7 +516,7 @@ public function updateContentField($ctype_name, $id, $field){ } // изменился тип - if($field_old['type'] != $field['type']){ + if($field_old['type'] !== $field['type']){ if($field_old['parser']->is_denormalization && $field_handler->is_denormalization){ @@ -604,8 +604,8 @@ public function updateContentField($ctype_name, $id, $field){ if ($result){ $field['id'] = $id; - cmsEventsManager::hook('ctype_field_after_update', array($field, $ctype_name, $this)); - cmsEventsManager::hook('ctype_field_'.str_replace(['{','}'], '', $ctype_name).'_after_update', array($field, $this)); + cmsEventsManager::hook('ctype_field_after_update', [$field, $ctype_name, $this]); + cmsEventsManager::hook('ctype_field_'.str_replace(['{','}'], '', $ctype_name).'_after_update', [$field, $this]); } cmsCache::getInstance()->clean('content.fields.'.$ctype_name); @@ -1356,7 +1356,7 @@ public function replaceCachedTags($ctype_name, $ids, $new_tag, $old_tag) { //============================================================================// //============================================================================// - public function getItemSlug($ctype, $item, $fields, $check_slug = true){ + public function getItemSlug($ctype, $item, $fields, $check_slug = true) { $slug_len = 100; @@ -1364,33 +1364,36 @@ public function getItemSlug($ctype, $item, $fields, $check_slug = true){ preg_match_all('/{([a-z0-9\_]+)}/i', $pattern, $matches); - if (!$matches) { return lang_slug($item['id'], false); } + if (!$matches) { + return lang_slug($item['id'], false); + } + + $item['ctype_name'] = $ctype['name']; + $item['ctype'] = $ctype; list($tags, $names) = $matches; - if (in_array('category', $names)){ + if (in_array('category', $names)) { $category = $this->getCategory($ctype['name'], $item['category_id']); - $pattern = str_replace('{category}', $category['slug'], $pattern); - unset($names[ array_search('category', $names) ]); + $pattern = str_replace('{category}', $category['slug'], $pattern); + unset($names[array_search('category', $names)]); } $pattern = trim($pattern, '/'); - foreach($names as $idx=>$field_name){ - if (!empty($item[$field_name])){ + foreach ($names as $idx => $field_name) { + if (!empty($item[$field_name])) { $value = str_replace('/', '', $item[$field_name]); - if (isset($fields[$field_name])){ + if (isset($fields[$field_name])) { - $value = $fields[$field_name]['handler']->getStringValue($value); + $value = $fields[$field_name]['handler']->setItem($item)->getStringValue($value); $value = lang_slug(trim($value, '/'), false); - } $pattern = str_replace($tags[$idx], $value, $pattern); - } } @@ -1398,7 +1401,7 @@ public function getItemSlug($ctype, $item, $fields, $check_slug = true){ $slug = mb_substr($slug, 0, $slug_len); - if(!$check_slug){ + if (!$check_slug) { return $slug; } @@ -1710,13 +1713,15 @@ public function getContentItemsForSitemap($ctype_name, $fields = array()) { public function getContentItems($ctype_name, $callback = null) { - $table_name = $this->table_prefix . $ctype_name; - $this->joinUser(); $this->select('f.title', 'folder_title'); $this->joinLeft('content_folders', 'f', 'f.id = i.folder_id'); + $this->select('cat.title', 'cat_title'); + $this->select('cat.slug', 'cat_slug'); + $this->joinLeft($this->getContentCategoryTableName($ctype_name), 'cat', 'cat.id = i.category_id'); + if (!$this->privacy_filter_disabled) { $this->filterPrivacy(); } if (!$this->approved_filter_disabled) { $this->filterApprovedOnly(); } if (!$this->delete_filter_disabled) { $this->filterAvailableOnly(); } @@ -1730,7 +1735,13 @@ public function getContentItems($ctype_name, $callback = null) { $user = cmsUser::getInstance(); - return $this->get($table_name, function ($item, $model) use ($user, $callback, $ctype_name) { + return $this->get($this->getContentTypeTableName($ctype_name), function ($item, $model) use ($user, $callback, $ctype_name) { + + $item['category'] = [ + 'id' => $item['category_id'], + 'slug' => $item['cat_slug'], + 'title' => $item['cat_title'] + ]; $item['user'] = [ 'id' => $item['user_id'], diff --git a/system/controllers/content/widgets/categories/widget.php b/system/controllers/content/widgets/categories/widget.php index fef998757..055ff2187 100755 --- a/system/controllers/content/widgets/categories/widget.php +++ b/system/controllers/content/widgets/categories/widget.php @@ -10,19 +10,23 @@ public function run() { $ctype_name = $this->getOption('ctype_name'); - $active_cat = false; $path = []; + $active_cat = false; + $path = []; if (!$ctype_name) { - if (!$ctype) { return false; } + if (!$ctype) { + return false; + } $ctype_name = $ctype['name']; - } - if ($ctype && $ctype['name'] == $ctype_name) { + if ($ctype && $ctype['name'] === $ctype_name) { - if (!$ctype['is_cats']) { return false; } + if (!$ctype['is_cats']) { + return false; + } if (strpos(cmsCore::getInstance()->uri, '.html') === false) { @@ -30,20 +34,18 @@ public function run() { if (!empty($current_ctype_category['id'])) { $active_cat = $current_ctype_category; } - } else { $item = cmsModel::getCachedResult('current_ctype_item'); - if(!$item){ return false; } + if (!$item) { + return false; + } if (!empty($item['category'])) { $active_cat = $item['category']; } - } - } else { // проверка, если показ категорий отключен - $model = cmsCore::getModel('content'); $_ctype = $model->getContentTypeByName($ctype_name); if (!$_ctype['is_cats']) { @@ -54,17 +56,18 @@ public function run() { $model = isset($model) ? $model : cmsCore::getModel('content'); $cats = $model->filterIsNull('is_hidden')->getCategoriesTree($ctype_name, $this->getOption('is_root')); - if (!$cats) { return false; } + if (!$cats) { + return false; + } if ($active_cat) { - $path = array_filter($cats, function($cat) use($active_cat) { + $path = array_filter($cats, function ($cat) use ($active_cat) { return ($cat['ns_left'] <= $active_cat['ns_left'] && - $cat['ns_level'] <= $active_cat['ns_level'] && - $cat['ns_right'] >= $active_cat['ns_right'] && - $cat['ns_level'] > 0); + $cat['ns_level'] <= $active_cat['ns_level'] && + $cat['ns_right'] >= $active_cat['ns_right'] && + $cat['ns_level'] > 0); }); - } // считаем вручную кол-во вложенных @@ -78,10 +81,10 @@ public function run() { $show_full_tree = $this->getOption('show_full_tree'); $cover_preset = $this->getOption('cover_preset'); - foreach($cats as $cat){ + foreach ($cats as $cat) { - if($cat['parent_id'] > 1){ - if(!isset($childs_count[$cat['parent_id']])){ + if ($cat['parent_id'] > 1) { + if (!isset($childs_count[$cat['parent_id']])) { $childs_count[$cat['parent_id']] = 1; } else { $childs_count[$cat['parent_id']] += 1; @@ -89,55 +92,53 @@ public function run() { } $cat['is_active'] = $cat['is_hidden'] = false; + $cat['childs_count'] = 0; - $cat['img_src'] = html_image_src($cat['cover'], $cover_preset, true); + $cat['img_src'] = html_image_src($cat['cover'], $cover_preset, true); $css_classes = []; if (!empty($active_cat['id']) && $cat['id'] == $active_cat['id']) { - $css_classes[] = 'active'; // Совместимость cо старыми шаблонами + $css_classes[] = 'active'; // Совместимость cо старыми шаблонами $cat['is_active'] = true; } if (!(isset($path[$cat['id']]) || isset($path[$cat['parent_id']]) || $cat['ns_level'] <= 1) && !$show_full_tree) { - $css_classes[] = 'folder_hidden'; // Совместимость cо старыми шаблонами + $css_classes[] = 'folder_hidden'; // Совместимость cо старыми шаблонами $cat['is_hidden'] = true; } - if($cat['img_src']){ + if ($cat['img_src']) { $css_classes[] = 'set_cover_preset'; } $cat['css_classes'] = $css_classes; $tree[$cat['id']] = $cat; - } - if($childs_count){ + if ($childs_count) { foreach ($childs_count as $id => $count) { - if(isset($tree[$id])){ + if (isset($tree[$id])) { $tree[$id]['childs_count'] = $count; - if($count){ + if ($count) { $tree[$id]['css_classes'][] = 'folder'; } - } } } $ctype_default = cmsConfig::get('ctype_default'); - return array( + return [ 'ctype_name' => (($ctype_default && in_array($ctype_name, $ctype_default)) ? '' : $ctype_name), 'cats' => $tree, 'active_cat' => $active_cat, // в шаблоне не используется, совместимость 'cover_preset' => $cover_preset, 'path' => (!empty($path) ? $path : array()) // в шаблоне не используется, совместимость - ); - + ]; } } diff --git a/system/controllers/content/widgets/list/widget.php b/system/controllers/content/widgets/list/widget.php index db4255dee..ba794a306 100755 --- a/system/controllers/content/widgets/list/widget.php +++ b/system/controllers/content/widgets/list/widget.php @@ -1,7 +1,8 @@ getOption('ctype_id'); $dataset_id = $this->getOption('dataset'); @@ -15,79 +16,81 @@ public function run(){ $teaser_len = $this->getOption('teaser_len', 100); $current_ctype_item = cmsModel::getCachedResult('current_ctype_item'); - $current_ctype = cmsModel::getCachedResult('current_ctype'); + $current_ctype = cmsModel::getCachedResult('current_ctype'); $model = cmsCore::getModel('content'); - if($ctype_id){ + if ($ctype_id) { $ctype = $model->getContentType($ctype_id); } else { $ctype = $current_ctype; } - if (!$ctype) { return false; } + if (!$ctype) { + return false; + } // Получаем поля $fields = $model->getContentFields($ctype['name']); // Включенные поля для показа - $show_fields = $this->getOption('show_fields', []); + $show_fields = $this->getOption('show_fields', []); $shown_fields = []; - if(isset($show_fields[$ctype['id']])){ + if (isset($show_fields[$ctype['id']])) { foreach ($show_fields[$ctype['id']] as $field_name => $is_enabled) { - if($is_enabled){ + if ($is_enabled) { $shown_fields[] = $field_name; } } } - if(!$shown_fields) { + if (!$shown_fields) { $shown_fields = ['title', 'content']; } // Опции полей - $show_fields_options = $this->getOption('show_fields_options', []); + $show_fields_options = $this->getOption('show_fields_options', []); $shown_fields_options = []; - if(isset($show_fields_options[$ctype['id']])){ + if (isset($show_fields_options[$ctype['id']])) { $shown_fields_options = $show_fields_options[$ctype['id']]; } // Сортировка полей, если задана foreach ($fields as $name => $field) { - if(!empty($shown_fields_options[$name]['ordering'])){ + if (!empty($shown_fields_options[$name]['ordering'])) { $fields[$name]['ordering'] = $shown_fields_options[$name]['ordering']; } } array_order_by($fields, 'ordering'); // Получаем категорию, если задана - if ($cat_id){ - $category = $model->getCategory($ctype['name'], $cat_id); - } else { - $category = false; - } + if ($cat_id) { + $category = $model->getCategory($ctype['name'], $cat_id); + } else { + $category = false; + } // Набор - if ($dataset_id){ + if ($dataset_id) { $dataset = $model->getContentDataset($dataset_id); } // Фильтр - if($filter_id){ + if ($filter_id) { $filter = $model->getContentFilter($ctype, $filter_id); } // Связь - if ($relation_id && $current_ctype_item && $current_ctype){ + if ($relation_id && $current_ctype_item && $current_ctype) { $parents = $model->getContentTypeParents($ctype_id); - if ($parents){ - foreach($parents as $parent){ - if ($parent['id'] == $relation_id){ + if ($parents) { + foreach ($parents as $parent) { + if ($parent['id'] == $relation_id) { - $filter = "r.parent_ctype_id = {$current_ctype['id']} AND ". - "r.parent_item_id = {$current_ctype_item['id']} AND ". - "r.child_ctype_id = {$ctype_id} AND ". - "r.child_item_id = i.id"; + $filter = "r.parent_ctype_id = {$current_ctype['id']} AND " . + "r.parent_item_id = {$current_ctype_item['id']} AND " . + "r.child_ctype_id = {$ctype_id} AND " . + "r.child_item_id = i.id"; $this->disableCache(); @@ -98,54 +101,28 @@ public function run(){ $this->links = str_replace('{list_link}', href_to($current_ctype['name'], $current_ctype_item['slug'], "view-{$ctype['name']}"), $this->links); break; - } } } - } // Применяем фильтры, если есть if (!empty($filter['filters'])) { foreach ($filter['filters'] as $fname => $fvalue) { - if(isset($fields[$fname])){ + if (isset($fields[$fname])) { $fields[$fname]['handler']->applyFilter($model, $fvalue); } } } // Применяем набор - if (!empty($dataset)){ + if (!empty($dataset)) { $model->applyDatasetFilters($dataset); } - // Включен показ категорий? - if (in_array('category', $shown_fields)) { - - $table_name = $model->getContentCategoryTableName($ctype['name']); - $bind_table_name = $table_name . '_bind'; - - $model->select('c.title', 'cat_title'); - $model->select('c.slug', 'cat_slug'); - - if ($category){ - - $model->joinInner($bind_table_name, 'b', 'b.item_id = i.id'); - $model->joinInner($table_name, 'c', 'c.id = b.category_id'); - - $model->filterGtEqual('c.ns_left', $category['ns_left']); - $model->filterLtEqual('c.ns_right', $category['ns_right']); - - if(!empty($ctype['options']['is_cats_multi'])){ - $model->distinctSelect(); - } - } else { - $model->joinInner($table_name, 'c', 'c.id = i.category_id'); - } - } else { - if ($category){ - $model->filterCategory($ctype['name'], $category, true, !empty($ctype['options']['is_cats_multi'])); - } + // Фильтр по категории + if ($category) { + $model->filterCategory($ctype['name'], $category, true, !empty($ctype['options']['is_cats_multi'])); } // применяем приватность @@ -155,18 +132,17 @@ public function run(){ // Скрываем записи из скрытых родителей (приватных групп и т.п.) $model->enableHiddenParentsFilter(); - if($this->getOption('widget_type') == 'related'){ - if($current_ctype_item){ + if ($this->getOption('widget_type') === 'related') { + + if ($current_ctype_item) { $this->disableCache(); $model->filterRelated('title', $current_ctype_item['title']); - if($current_ctype_item['ctype_name'] == $ctype['name']){ + if ($current_ctype_item['ctype_name'] == $ctype['name']) { $model->filterNotEqual('id', $current_ctype_item['id']); } - - } else { return false; } @@ -174,17 +150,16 @@ public function run(){ // мы на странице группы? $current_group = cmsModel::getCachedResult('current_group'); - if($this->getOption('auto_group') && $current_group){ + if ($this->getOption('auto_group') && $current_group) { $this->disableCache(); $model->filterEqual('parent_id', $current_group['id'])-> - filterEqual('parent_type', 'group'); - + filterEqual('parent_type', 'group'); } // мы на странице записи - if($this->getOption('auto_user') && !empty($current_ctype_item['user_id'])){ + if ($this->getOption('auto_user') && !empty($current_ctype_item['user_id'])) { $this->disableCache(); @@ -195,46 +170,61 @@ public function run(){ // выключаем формирование рейтинга в хуках $ctype['is_rating'] = 0; - list($ctype, $model) = cmsEventsManager::hook("content_list_filter", array($ctype, $model)); - list($ctype, $model) = cmsEventsManager::hook("content_{$ctype['name']}_list_filter", array($ctype, $model)); + list($ctype, $model) = cmsEventsManager::hook("content_list_filter", [$ctype, $model]); + list($ctype, $model) = cmsEventsManager::hook("content_{$ctype['name']}_list_filter", [$ctype, $model]); $items = $model-> - limit($limit)-> - getContentItems($ctype['name']); - if (!$items) { return false; } + limit($limit)-> + getContentItems($ctype['name']); + if (!$items) { + return false; + } $user = cmsUser::getInstance(); - if($items){ + if ($items) { foreach ($items as $key => $item) { - $item['ctype'] = $ctype; - $item['ctype_name'] = $ctype['name']; - $item['is_private_item'] = $item['is_private'] && $hide_except_title; + $item['ctype'] = $ctype; + $item['ctype_name'] = $ctype['name']; + $item['is_private_item'] = $item['is_private'] && $hide_except_title; $item['private_item_hint'] = LANG_PRIVACY_HINT; - $item['fields'] = []; + $item['fields'] = []; // для приватности друзей // другие проверки приватности (например для групп) в хуках content_before_list - if($item['is_private'] == 1){ - $item['is_private_item'] = $item['is_private_item'] && !$item['user']['is_friend']; + if ($item['is_private'] == 1) { + $item['is_private_item'] = $item['is_private_item'] && !$item['user']['is_friend']; $item['private_item_hint'] = LANG_PRIVACY_PRIVATE_HINT; } + // Флаг, что эту запись пользователь не видел с последнего визита + $item['is_new'] = (strtotime($item['date_pub']) > strtotime($user->date_log)); + // строим поля списка - foreach($fields as $field){ + foreach ($fields as $field) { - if ($field['is_system']) { continue; } + if ($field['is_system']) { + continue; + } // Только включенные поля - if (!in_array($field['name'], $shown_fields)) { continue; } + if (!in_array($field['name'], $shown_fields)) { + continue; + } // проверяем что группа пользователя имеет доступ к чтению этого поля if ($field['groups_read'] && !$user->isInGroups($field['groups_read'])) { // если группа пользователя не имеет доступ к чтению этого поля, // проверяем на доступ к нему для авторов - if (empty($item['user_id']) || empty($field['options']['author_access'])){ continue; } - if (!in_array('is_read', $field['options']['author_access'])){ continue; } - if ($item['user_id'] != $user->id){ continue; } + if (empty($item['user_id']) || empty($field['options']['author_access'])) { + continue; + } + if (!in_array('is_read', $field['options']['author_access'])) { + continue; + } + if ($item['user_id'] != $user->id) { + continue; + } } if (!isset($shown_fields_options[$field['name']]['label_in_list'])) { @@ -251,11 +241,17 @@ public function run(){ ]; if (!array_key_exists($field['name'], $item)) { - continue; + + // Виртуальное поле. В таблице ячейки может не быть. + if($field['handler']->is_virtual){ + $item[$field['name']] = ''; + } else { + continue; + } } // Меняем опции поля, если есть - if(!empty($shown_fields_options[$field['name']])){ + if (!empty($shown_fields_options[$field['name']])) { foreach ($shown_fields_options[$field['name']] as $opt_name => $opt_value) { $field['handler']->setOption($opt_name, $opt_value); $field['options'][$opt_name] = $opt_value; @@ -263,9 +259,11 @@ public function run(){ } $field_html = $field['handler']->setItem($item)->parseTeaser($item[$field['name']]); - if (mb_strlen($field_html) === 0) { continue; } + if (is_empty_value($field_html)) { + continue; + } - $current_field_data['html'] = $field_html; + $current_field_data['html'] = $field_html; $current_field_data['options'] = $field['options']; $item['fields'][$field['name']] = $current_field_data; @@ -298,9 +296,11 @@ public function run(){ private function getItemInfoBar($ctype, $item, $fields, $shown_fields) { - $bar = []; $user = cmsUser::getInstance(); + $bar = []; - if (!empty($fields['date_pub']) && in_array('date_pub', $shown_fields) && $user->isInGroups($fields['date_pub']['groups_read'])){ + $user = cmsUser::getInstance(); + + if (!empty($fields['date_pub']) && in_array('date_pub', $shown_fields) && $user->isInGroups($fields['date_pub']['groups_read'])) { $bar['date_pub'] = [ 'css' => 'bi_date_pub', 'icon' => 'calendar-alt', @@ -309,22 +309,13 @@ private function getItemInfoBar($ctype, $item, $fields, $shown_fields) { ]; } - if (!empty($fields['user']) && in_array('user', $shown_fields) && $user->isInGroups($fields['user']['groups_read'])){ + if (!empty($fields['user']) && in_array('user', $shown_fields) && $user->isInGroups($fields['user']['groups_read'])) { $bar['user'] = [ - 'css' => 'bi_user', - 'icon' => 'user', + 'css' => 'bi_user', + 'icon' => 'user', 'avatar' => isset($item['user']['avatar']) ? $item['user']['avatar'] : [], - 'href' => href_to_profile($item['user']), - 'html' => $item['user']['nickname'] - ]; - } - - if (in_array('category', $shown_fields)){ - $bar['category'] = [ - 'css' => 'bi_category', - 'icon' => 'folder', - 'href' => href_to($ctype['name'], $item['cat_slug']), - 'html' => $item['cat_title'] + 'href' => href_to_profile($item['user']), + 'html' => $item['user']['nickname'] ]; } diff --git a/system/controllers/content/widgets/slider/widget.php b/system/controllers/content/widgets/slider/widget.php index 9c9bcb1c7..71d89642e 100755 --- a/system/controllers/content/widgets/slider/widget.php +++ b/system/controllers/content/widgets/slider/widget.php @@ -2,7 +2,7 @@ class widgetContentSlider extends cmsWidget { - public function run(){ + public function run() { $cat_id = $this->getOption('category_id'); $ctype_id = $this->getOption('ctype_id'); @@ -18,45 +18,29 @@ public function run(){ $model = cmsCore::getModel('content'); $ctype = $model->getContentType($ctype_id); - if (!$ctype) { return false; } + if (!$ctype) { + return false; + } - if ($cat_id){ - $category = $model->getCategory($ctype['name'], $cat_id); - } else { - $category = false; - } + if ($cat_id) { + $category = $model->getCategory($ctype['name'], $cat_id); + } else { + $category = false; + } - if ($dataset_id){ + if ($dataset_id) { $dataset = $model->getContentDataset($dataset_id); - if ($dataset){ + if ($dataset) { $model->applyDatasetFilters($dataset); } else { $dataset_id = false; } - } - $table_name = $model->getContentCategoryTableName($ctype['name']); - $bind_table_name = $table_name . '_bind'; - - $model->select('c.title', 'cat_title'); - $model->select('c.slug', 'cat_slug'); - - if ($category){ - - $model->joinInner($bind_table_name, 'b FORCE INDEX (item_id)', 'b.item_id = i.id'); - $model->joinInner($table_name, 'c', 'c.id = b.category_id'); - - $model->filterGtEqual('c.ns_left', $category['ns_left']); - $model->filterLtEqual('c.ns_right', $category['ns_right']); - - if(!empty($ctype['options']['is_cats_multi'])){ - $model->distinctSelect(); - } - } else { - $model->joinLeft($table_name, 'c', 'c.id = i.category_id'); + if ($category) { + $model->filterCategory($ctype['name'], $category, true, !empty($ctype['options']['is_cats_multi'])); } // применяем приватность @@ -69,16 +53,18 @@ public function run(){ // выключаем формирование рейтинга в хуках $ctype['is_rating'] = 0; - list($ctype, $model) = cmsEventsManager::hook('content_list_filter', array($ctype, $model)); - list($ctype, $model) = cmsEventsManager::hook("content_{$ctype['name']}_list_filter", array($ctype, $model)); + list($ctype, $model) = cmsEventsManager::hook('content_list_filter', [$ctype, $model]); + list($ctype, $model) = cmsEventsManager::hook("content_{$ctype['name']}_list_filter", [$ctype, $model]); $items = $model->limit($limit)->getContentItems($ctype['name']); - if (!$items) { return false; } + if (!$items) { + return false; + } - list($ctype, $items) = cmsEventsManager::hook("content_before_list", array($ctype, $items)); - list($ctype, $items) = cmsEventsManager::hook("content_{$ctype['name']}_before_list", array($ctype, $items)); + list($ctype, $items) = cmsEventsManager::hook("content_before_list", [$ctype, $items]); + list($ctype, $items) = cmsEventsManager::hook("content_{$ctype['name']}_before_list", [$ctype, $items]); - return array( + return [ 'ctype' => $ctype, 'teaser_len' => $teaser_len, 'hide_except_title' => $hide_except_title, @@ -88,8 +74,7 @@ public function run(){ 'big_image_preset' => $big_image_preset, 'teaser_field' => $teaser_fields, 'items' => $items - ); - + ]; } } diff --git a/system/controllers/images/actions/delete.php b/system/controllers/images/actions/delete.php index 215ad71cc..4878fa763 100755 --- a/system/controllers/images/actions/delete.php +++ b/system/controllers/images/actions/delete.php @@ -2,45 +2,47 @@ class actionImagesDelete extends cmsAction { - public function run(){ + public function run() { if (!$this->cms_user->is_logged) { return cmsCore::error404(); } - if (!$this->request->isAjax()) { cmsCore::error404(); } + if (!$this->request->isAjax()) { + return cmsCore::error404(); + } - if (!cmsForm::validateCSRFToken($this->request->get('csrf_token', ''))){ - return $this->cms_template->renderJSON(array( + if (!cmsForm::validateCSRFToken($this->request->get('csrf_token', ''))) { + return $this->cms_template->renderJSON([ 'error' => true, 'message' => 'Please reload page' - )); + ]); } $paths = $this->request->get('paths', []); if (!$paths) { - return $this->cms_template->renderJSON(array( + return $this->cms_template->renderJSON([ 'error' => false - )); + ]); } foreach ($paths as $path) { - if(is_array($path) || !$path){ + if (is_array($path) || !$path) { continue; } $file = $this->model_files->getFileByPath($path); if (!$file) { continue; } - if($this->cms_user->id != $file['user_id'] && !$this->cms_user->is_admin){ + if ($this->cms_user->id != $file['user_id'] && !$this->cms_user->is_admin) { continue; } $this->model_files->deleteFile($file['id']); } - return $this->cms_template->renderJSON(array( + return $this->cms_template->renderJSON([ 'error' => false - )); + ]); } } diff --git a/system/controllers/moderation/frontend.php b/system/controllers/moderation/frontend.php index e57324384..ae43c62e5 100755 --- a/system/controllers/moderation/frontend.php +++ b/system/controllers/moderation/frontend.php @@ -1,4 +1,7 @@ special_chars)).']+/', ' ', $query)); + $query = trim(preg_replace('#['.preg_quote(implode('', $this->special_chars)).']+#', ' ', $query)); $this->original_query = $query; @@ -312,7 +312,7 @@ public function getHighlightedText($text) { $word = preg_quote(rtrim($word, '*')); - if (preg_match("/\b({$word}\w+)\b/iu", $text, $matches)) { + if (preg_match("#\b({$word}\w+)\b#iu", $text, $matches)) { $found_words[] = $matches[0]; } } diff --git a/system/controllers/users/frontend.php b/system/controllers/users/frontend.php index 89c3526ed..d6a41b8a9 100755 --- a/system/controllers/users/frontend.php +++ b/system/controllers/users/frontend.php @@ -1,5 +1,7 @@ $this->uri_controller, 'action' => $this->uri_action, 'params' => $this->uri_params - ); + ]; } //============================================================================// @@ -874,11 +877,11 @@ public function runWidgets() { public static function getWidgetObject($widget) { - $file = 'system/'.cmsCore::getWidgetPath($widget['name'], $widget['controller']).'/widget.php'; + $file = 'system/' . cmsCore::getWidgetPath($widget['name'], $widget['controller']) . '/widget.php'; $class = 'widget' . - ($widget['controller'] ? string_to_camel('_', $widget['controller']) : '') . - string_to_camel('_', $widget['name']); + ($widget['controller'] ? string_to_camel('_', $widget['controller']) : '') . + string_to_camel('_', $widget['name']); if (!class_exists($class, false)) { cmsCore::includeFile($file); @@ -886,7 +889,6 @@ public static function getWidgetObject($widget) { } return new $class($widget); - } public function runWidget($widget){ @@ -903,7 +905,7 @@ public function runWidget($widget){ } if ($result === false){ - $result = call_user_func_array(array($widget_object, 'run'), []); + $result = call_user_func_array([$widget_object, 'run'], []); if ($result !== false){ // Отдельно кешируем имя шаблона виджета, заголовок и враппер, поскольку они могли быть // изменены внутри виджета, а в кеш у нас попадает только тот массив @@ -924,7 +926,6 @@ public function runWidget($widget){ if (isset($result['_wd_wrapper'])) { $widget_object->setWrapper($result['_wd_wrapper']); } return cmsTemplate::getInstance()->renderWidget($widget_object, $result); - } /** @@ -1091,6 +1092,14 @@ public static function errorMaintenance(){ die(cmsConfig::get('min_html') ? html_minify($html) : $html); } + /** + * Обработка запроса If-Modified-Since + * Сервер отправит обратно запрошенный ресурс с статусом 200, только если он был изменён после указанной даты + * Если запрос не был изменён после указанной даты, ответ будет 304 без какого-либо тела, + * заголовок Last-Modified при этом будет содержать дату последней модификации. + * + * @param string $lastmod Дата + */ public static function respondIfModifiedSince($lastmod) { $last_modified_unix = strtotime($lastmod); @@ -1116,11 +1125,9 @@ public static function respondIfModifiedSince($lastmod) { http_response_code(304); die(); - } header('Last-Modified: ' . $last_modified); - } //============================================================================// @@ -1130,36 +1137,36 @@ public static function respondIfModifiedSince($lastmod) { * Возвращает массив со списком всех шаблонов * @return array */ - public static function getTemplates(){ + public static function getTemplates() { - if(self::$templates !== null){ + if (self::$templates !== null) { return self::$templates; } - if(cmsTemplate::TEMPLATE_BASE_PATH){ + if (cmsTemplate::TEMPLATE_BASE_PATH) { return self::$templates = self::getDirsList(cmsTemplate::TEMPLATE_BASE_PATH); } $root_path = cmsConfig::get('root_path'); - $all_dirs = self::getDirsList(''); - $result = []; + $all_dirs = self::getDirsList(''); + $result = []; - foreach($all_dirs as $dir){ + foreach ($all_dirs as $dir) { // В папке шаблона в обязательном порядке должны быть как минимум эти файлы - if(file_exists($root_path.$dir.'/main.tpl.php') && (file_exists($root_path.$dir.'/scheme.html') || file_exists($root_path.$dir.'/scheme.php'))){ + if (file_exists($root_path . $dir . '/main.tpl.php') && + (file_exists($root_path . $dir . '/scheme.html') || file_exists($root_path . $dir . '/scheme.php'))) { $result[] = $dir; } } return self::$templates = $result; - } /** * Возвращает массив со списком всех языков * @return array */ - public static function getLanguages(){ + public static function getLanguages() { $default_lang = cmsConfig::get('language'); @@ -1167,36 +1174,30 @@ public static function getLanguages(){ $current_lang_key = array_search(self::$language, $langs); - if($current_lang_key !== 0){ + if ($current_lang_key !== 0) { list($langs[0], $langs[$current_lang_key]) = [$langs[$current_lang_key], $langs[0]]; - } - if($default_lang !== self::$language){ + if ($default_lang !== self::$language) { $default_lang_key = array_search($default_lang, $langs); - if($default_lang_key !== 1){ + if ($default_lang_key !== 1) { list($langs[1], $langs[$default_lang_key]) = [$langs[$default_lang_key], $langs[1]]; - } - } return $langs; - } /** * Возвращает массив со списком всех визуальных редакторов * @return array */ - public static function getWysiwygs(){ - + public static function getWysiwygs() { return self::getDirsList('wysiwyg'); - } //============================================================================// @@ -1204,41 +1205,45 @@ public static function getWysiwygs(){ /** * Возвращает список директорий внутри указанной - * @param string $root_dir - * @param bool $asc_sort Сортировать по алфавиту, по умолчанию false + * @param string $root_dir Путь к директории, относительно корня установки CMS + * @param boolean $asc_sort Сортировать по алфавиту, по умолчанию false * @return array */ - public static function getDirsList($root_dir, $asc_sort=false){ + public static function getDirsList($root_dir, $asc_sort = false) { $dir = cmsConfig::get('root_path') . $root_dir; + $dir_context = opendir($dir); $list = []; - while ($next = readdir($dir_context)){ + while ($next = readdir($dir_context)) { - if (in_array($next, array('.', '..'))){ continue; } - if (strpos($next, '.') === 0){ continue; } - if (!is_dir($dir.'/'.$next)) { continue; } + if (in_array($next, ['.', '..'])) { + continue; + } + if (strpos($next, '.') === 0) { + continue; + } + if (!is_dir($dir . '/' . $next)) { + continue; + } $list[] = $next; - } - if($asc_sort){ - sort($list); - } + if ($asc_sort) { sort($list); } return $list; - } /** * Возвращает список файлов из указанной директории по нужной маске + * * @param string $root_dir Директория * @param string $pattern Маска файлов - * @param bool $is_strip_ext Отрезать расширения? - * @param bool $is_include Подключать каждый файл? + * @param boolean $is_strip_ext Отрезать расширения? + * @param boolean $is_include Подключать каждый файл? * @return array */ public static function getFilesList($root_dir, $pattern = '*.*', $is_strip_ext = false, $is_include = false) { @@ -1250,7 +1255,7 @@ public static function getFilesList($root_dir, $pattern = '*.*', $is_strip_ext = $list = []; - $files = @glob($pattern); + $files = glob($pattern); if (!$files) { return $list; } diff --git a/system/core/formfield.php b/system/core/formfield.php index c945325c4..e7da4a43f 100755 --- a/system/core/formfield.php +++ b/system/core/formfield.php @@ -13,7 +13,7 @@ class cmsFormField { * Имя поля, как было задано в форме * @var string */ - public $name; + public $name = ''; /** * Имя поля, как должно быть в HTML теге * @var string @@ -34,7 +34,7 @@ class cmsFormField { * Название поля * @var string */ - public $title; + public $title = ''; public $element_title = ''; /** * Флаг, указывающий, что поле может быть использовано для создания в полях типов контента, конструкторе форм и т.п. @@ -45,12 +45,12 @@ class cmsFormField { * Последняя часть строки SQL запроса для создания поля в базе данных * @var string */ - public $sql; + public $sql = ''; /** * Последняя часть строки SQL запроса для создания поля в базе данных, в котором будет храниться кэшированное значение * @var string */ - public $cache_sql; + public $cache_sql = ''; /** * Флаг, указывающий, что при создании поля в базе данных (например, при добавлении поля в типах контента) * необходимо также добавить SQL индекс к этому полю @@ -146,6 +146,7 @@ class cmsFormField { /** * Формировать поле формы на нескольких языках + * * @var boolean */ public $multilanguage = false; @@ -156,14 +157,22 @@ class cmsFormField { * * @var string */ - public $field_type; + public $field_type = ''; /** * Название субъекта использования поля * Задаётся полю при рендере опций поля в админке + * * @var string */ - public $subject_name; + public $subject_name = ''; + + /** + * Подключать языковой файл для поля? + * + * @var boolean + */ + protected $use_language = false; /** * @param string $name Имя поля @@ -178,6 +187,10 @@ public function __construct($name, $options = false) { $this->field_type = substr(mb_strtolower(get_called_class()), 5); $this->class = $this->field_type; + if($this->use_language){ + cmsCore::loadFieldLanguage($this->field_type); + } + if ($options) { $this->setOptions($options); } diff --git a/system/core/template.php b/system/core/template.php index 0e0132f6e..22975425f 100755 --- a/system/core/template.php +++ b/system/core/template.php @@ -2901,36 +2901,46 @@ public function getAvailableContentItemStyles($ctype_name){ * @param mixed $request Объект запроса * @return string */ - public function renderContentList($ctype, $data = array(), $request = false){ + public function renderContentList($ctype, $data = [], $request = false) { - $tpl_file = $this->getTemplateFileName('content/'.$ctype['name'].'_list', true); + $tpl_file = $this->getTemplateFileName('content/' . $ctype['name'] . '_list', true); - if (!$tpl_file){ + $data['list_opt'] = []; + + if (!$tpl_file) { $style = ''; - if(!empty($ctype['options']['list_style'])){ - if(is_array($ctype['options']['list_style'])){ - $style = $ctype['options']['list_style'][0] ? '_'.$ctype['options']['list_style'][0] : ''; + if (!empty($ctype['options']['list_style'])) { + if (is_array($ctype['options']['list_style'])) { + $style = $ctype['options']['list_style'][0] ? '_' . $ctype['options']['list_style'][0] : ''; } else { - $style = '_'.$ctype['options']['list_style']; + $style = '_' . $ctype['options']['list_style']; } } $list_type = $this->controller->getListContext(); - if(isset($ctype['options']['context_list_style'][$list_type])){ - $style = $ctype['options']['context_list_style'][$list_type] ? '_'.$ctype['options']['context_list_style'][$list_type] : ''; + if (isset($ctype['options']['context_list_style'][$list_type])) { + $style = $ctype['options']['context_list_style'][$list_type] ? '_' . $ctype['options']['context_list_style'][$list_type] : ''; } - $tpl_file = $this->getTemplateFileName('content/default_list'.$style); + if(!empty($ctype['options']['list_style_options'])){ + foreach ($ctype['options']['list_style_options'] as $options) { + if($options['name'] === ltrim($style, '_') && !empty($options['value'])){ + $data['list_opt'] = json_decode($options['value'], true); break; + } + } + } + $tpl_file = $this->getTemplateFileName('content/default_list' . $style); } - if (!$request) { $request = $this->controller->request; } + if (!$request) { + $request = $this->controller->request; + } return $this->processRender($tpl_file, $data, $request); - } /** @@ -2940,24 +2950,27 @@ public function renderContentList($ctype, $data = array(), $request = false){ * @param mixed $request Объект запроса * @return string */ - public function renderContentItem($ctype_name, $data = array(), $request = false){ + public function renderContentItem($ctype_name, $data = [], $request = false) { // опеределен ли в записи шаблон - if(!empty($data['item']['template'])){ - $template_name = $ctype_name.'_item_'.$data['item']['template']; + if (!empty($data['item']['template'])) { + $template_name = $ctype_name . '_item_' . $data['item']['template']; } else { // или есть шаблон для типа контента - $template_name = $ctype_name.'_item'; + $template_name = $ctype_name . '_item'; } - $tpl_file = $this->getTemplateFileName('content/'.$template_name, true); + $tpl_file = $this->getTemplateFileName('content/' . $template_name, true); - if (!$tpl_file){ $tpl_file = $this->getTemplateFileName('content/default_item'); } + if (!$tpl_file) { + $tpl_file = $this->getTemplateFileName('content/default_item'); + } - if (!$request) { $request = $this->controller->request; } + if (!$request) { + $request = $this->controller->request; + } return $this->processRender($tpl_file, $data, $request); - } //============================================================================// diff --git a/system/fields/category.php b/system/fields/category.php new file mode 100644 index 000000000..da312bed7 --- /dev/null +++ b/system/fields/category.php @@ -0,0 +1,142 @@ +title){ + $this->title = LANG_F_CATEGORY; + } + } + + public function getOptions() { + return [ + new fieldCheckbox('is_auto_colors', [ + 'title' => LANG_F_CATEGORY_IS_AUTO_COLORS, + 'extended_option' => true + ]), + new fieldString('auto_colors_classes', [ + 'title' => LANG_F_CATEGORY_AUTO_COLORS_CLASSES, + 'hint' => LANG_F_CATEGORY_AUTO_COLORS_CLASSES_HINT, + 'default' => 'btn-primary,btn-secondary,btn-success,btn-danger,btn-warning,btn-info,btn-light,btn-dark', + 'visible_depend' => ['options:is_auto_colors' => ['show' => ['1']]], + 'extended_option' => true + ]), + new fieldString('btn_class', [ + 'title' => LANG_F_CATEGORY_BTN_CLASS, + 'default' => 'btn btn-sm', + 'extended_option' => true + ]), + new fieldString('btn_icon', [ + 'title' => LANG_F_CATEGORY_BTN_ICON, + 'suffix' => '' . (defined('LANG_CP_ICON_SELECT') ? LANG_CP_ICON_SELECT : '') . '' + ]) + ]; + } + + public function getStringValue($value) { + return ''; + } + + public function parse($value) { + + if (empty($this->item['category']['id']) || empty($this->item['ctype_name'])) { + return ''; + } + + $cats = [ + $this->item['category']['id'] => [ + 'title' => $this->item['category']['title'], + 'href' => href_to($this->item['ctype_name'], $this->item['category']['slug']) + ] + ]; + + if (!empty($this->item['categories'])) { + foreach ($this->item['categories'] as $category) { + $cats[$category['id']] = [ + 'title' => $category['title'], + 'href' => href_to($this->item['ctype_name'], $category['slug']) + ]; + } + } + + list($btn_class, $btn_icon, $auto_colors_class_list) = $this->getLinkOptions(); + + if ($auto_colors_class_list) { + + $auto_class_count = count($auto_colors_class_list); + + array_unshift($auto_colors_class_list, '', ''); + } + + $html = ''; + + foreach ($cats as $cat_id => $cat) { + + $_btn_class = $btn_class; + if ($auto_colors_class_list) { + + if (isset($auto_colors_class_list[$cat_id])) { + $_btn_class[] = $auto_colors_class_list[$cat_id]; + } else { + $key = $this->item['category']['id'] % $auto_class_count; + $_btn_class[] = $auto_colors_class_list[$key]; + } + } + + $html .= '' . $btn_icon . ' ' . $cat['title'] . ' '; + } + + return $html; + } + + public function getInput($value) { + return ''; + } + + public function getLinkOptions() { + + if ($this->link_options === null) { + + $btn_icon = $this->getOption('btn_icon', ''); + + if ($btn_icon) { + $icon_params = explode(':', $btn_icon); + if (!isset($icon_params[1])) { + array_unshift($icon_params, 'solid'); + } + $btn_icon = html_svg_icon($icon_params[0], $icon_params[1], 16, false); + } + + $auto_colors_class_list = []; + + $btn_class = [$this->getOption('btn_class', '')]; + + if ($this->getOption('is_auto_colors')) { + + $auto_colors_classes = $this->getOption('auto_colors_classes', ''); + + if ($auto_colors_classes) { + + $auto_colors_class_list = explode(',', $auto_colors_classes); + } + } + + $this->link_options = [$btn_class, $btn_icon, $auto_colors_class_list]; + } + + return $this->link_options; + } + +} diff --git a/system/fields/parent.php b/system/fields/parent.php index f001b8dd7..5e6f9adce 100755 --- a/system/fields/parent.php +++ b/system/fields/parent.php @@ -108,9 +108,9 @@ public function parse($value){ return $this->parseTeaser($value); } - if (!$this->parent_ctype_name) { return false; } + if (!$this->parent_ctype_name) { return ''; } - if (empty($this->item['id'])) { return false; } + if (empty($this->item['id'])) { return ''; } $controller = cmsCore::getController('content', $this->request); @@ -129,7 +129,7 @@ public function parse($value){ } } - if (!$parent_ctype) { return false; } + if (!$parent_ctype) { return ''; } if (!$child_ctype) { if (cmsController::enabled($this->item['ctype_name'])){ @@ -139,7 +139,7 @@ public function parse($value){ 'id' => null ); } else { - return false; + return ''; } } else { $child_ctype['controller'] = 'content'; diff --git a/system/fields/toolbar.php b/system/fields/toolbar.php index 669ac84e2..c5a351106 100644 --- a/system/fields/toolbar.php +++ b/system/fields/toolbar.php @@ -3,7 +3,7 @@ class fieldToolbar extends cmsFormField { public $title = LANG_PARSER_TOOLBAR; - public $sql = 'TINYINT(1) UNSIGNED NULL DEFAULT 1'; + public $sql = ''; public $is_virtual = true; public $allow_index = false; diff --git a/system/languages/en/controllers/admin/admin.php b/system/languages/en/controllers/admin/admin.php index 830b03589..e0b556224 100755 --- a/system/languages/en/controllers/admin/admin.php +++ b/system/languages/en/controllers/admin/admin.php @@ -186,6 +186,8 @@ define('LANG_CP_LISTVIEW_FILTER_EXPAND', 'Expand filter panel'); define('LANG_CP_LISTVIEW_STYLE', 'Default list style'); define('LANG_CP_LIST_STYLE_NAMES', 'Names for list styles'); + define('LANG_CP_LIST_STYLE_OPTIONS', 'List styles options'); + define('LANG_CP_LIST_STYLE_OPTIONS_HINT', 'If the list template supports. In JSON format. An example of the default options in the template source file.'); define('LANG_CP_CONTEXT_LIST_STYLE', 'Styles for other lists'); define('LANG_CP_CONTEXT_SELECT_LIST', 'Select a list'); define('LANG_CP_LISTVIEW_STYLE_SLIDER', 'Slider'); diff --git a/system/languages/en/fields/category/category.php b/system/languages/en/fields/category/category.php new file mode 100644 index 000000000..f3f4405f1 --- /dev/null +++ b/system/languages/en/fields/category/category.php @@ -0,0 +1,7 @@ +/'.cmsTemplate::TEMPLATE_BASE_PATH.'%s/content. Можно указать несколько шаблонов, при этом появится возможность переключать их пользователям.'); diff --git a/system/languages/ru/fields/category/category.php b/system/languages/ru/fields/category/category.php new file mode 100644 index 000000000..3c076c651 --- /dev/null +++ b/system/languages/ru/fields/category/category.php @@ -0,0 +1,7 @@ +type = Type::T_AT_ROOT; + } +} diff --git a/system/libs/scssphp/Block/CallableBlock.php b/system/libs/scssphp/Block/CallableBlock.php new file mode 100644 index 000000000..a18a87c2a --- /dev/null +++ b/system/libs/scssphp/Block/CallableBlock.php @@ -0,0 +1,45 @@ +type = $type; + } +} diff --git a/system/libs/scssphp/Block/ContentBlock.php b/system/libs/scssphp/Block/ContentBlock.php new file mode 100644 index 000000000..870849800 --- /dev/null +++ b/system/libs/scssphp/Block/ContentBlock.php @@ -0,0 +1,38 @@ +type = Type::T_INCLUDE; + } +} diff --git a/system/libs/scssphp/Block/DirectiveBlock.php b/system/libs/scssphp/Block/DirectiveBlock.php new file mode 100644 index 000000000..b1d3d1a81 --- /dev/null +++ b/system/libs/scssphp/Block/DirectiveBlock.php @@ -0,0 +1,37 @@ +type = Type::T_DIRECTIVE; + } +} diff --git a/system/libs/scssphp/Block/EachBlock.php b/system/libs/scssphp/Block/EachBlock.php new file mode 100644 index 000000000..b3289579d --- /dev/null +++ b/system/libs/scssphp/Block/EachBlock.php @@ -0,0 +1,37 @@ +type = Type::T_EACH; + } +} diff --git a/system/libs/scssphp/Block/ElseBlock.php b/system/libs/scssphp/Block/ElseBlock.php new file mode 100644 index 000000000..6abb4d775 --- /dev/null +++ b/system/libs/scssphp/Block/ElseBlock.php @@ -0,0 +1,27 @@ +type = Type::T_ELSE; + } +} diff --git a/system/libs/scssphp/Block/ElseifBlock.php b/system/libs/scssphp/Block/ElseifBlock.php new file mode 100644 index 000000000..4622bca79 --- /dev/null +++ b/system/libs/scssphp/Block/ElseifBlock.php @@ -0,0 +1,32 @@ +type = Type::T_ELSEIF; + } +} diff --git a/system/libs/scssphp/Block/ForBlock.php b/system/libs/scssphp/Block/ForBlock.php new file mode 100644 index 000000000..a9cf6733b --- /dev/null +++ b/system/libs/scssphp/Block/ForBlock.php @@ -0,0 +1,47 @@ +type = Type::T_FOR; + } +} diff --git a/system/libs/scssphp/Block/IfBlock.php b/system/libs/scssphp/Block/IfBlock.php new file mode 100644 index 000000000..9f21bf88a --- /dev/null +++ b/system/libs/scssphp/Block/IfBlock.php @@ -0,0 +1,37 @@ + + */ + public $cases = []; + + public function __construct() + { + $this->type = Type::T_IF; + } +} diff --git a/system/libs/scssphp/Block/MediaBlock.php b/system/libs/scssphp/Block/MediaBlock.php new file mode 100644 index 000000000..c49ee1b2b --- /dev/null +++ b/system/libs/scssphp/Block/MediaBlock.php @@ -0,0 +1,37 @@ +type = Type::T_MEDIA; + } +} diff --git a/system/libs/scssphp/Block/NestedPropertyBlock.php b/system/libs/scssphp/Block/NestedPropertyBlock.php new file mode 100644 index 000000000..1ea4a6c8a --- /dev/null +++ b/system/libs/scssphp/Block/NestedPropertyBlock.php @@ -0,0 +1,37 @@ +type = Type::T_NESTED_PROPERTY; + } +} diff --git a/system/libs/scssphp/Block/WhileBlock.php b/system/libs/scssphp/Block/WhileBlock.php new file mode 100644 index 000000000..ac18d4e02 --- /dev/null +++ b/system/libs/scssphp/Block/WhileBlock.php @@ -0,0 +1,32 @@ +type = Type::T_WHILE; + } +} diff --git a/system/libs/scssphp/Colors.php b/system/libs/scssphp/Colors.php index e836e3f4e..2df39992b 100644 --- a/system/libs/scssphp/Colors.php +++ b/system/libs/scssphp/Colors.php @@ -204,10 +204,10 @@ public static function colorNameToRGBa($colorName) /** * Reverse conversion : from RGBA to a color name if possible * - * @param integer $r - * @param integer $g - * @param integer $b - * @param integer|float $a + * @param int $r + * @param int $g + * @param int $b + * @param int|float $a * * @return string|null */ diff --git a/system/libs/scssphp/Compiler.php b/system/libs/scssphp/Compiler.php index d17d9f261..b6ef02727 100644 --- a/system/libs/scssphp/Compiler.php +++ b/system/libs/scssphp/Compiler.php @@ -13,6 +13,17 @@ namespace ScssPhp\ScssPhp; use ScssPhp\ScssPhp\Base\Range; +use ScssPhp\ScssPhp\Block\AtRootBlock; +use ScssPhp\ScssPhp\Block\CallableBlock; +use ScssPhp\ScssPhp\Block\DirectiveBlock; +use ScssPhp\ScssPhp\Block\EachBlock; +use ScssPhp\ScssPhp\Block\ElseBlock; +use ScssPhp\ScssPhp\Block\ElseifBlock; +use ScssPhp\ScssPhp\Block\ForBlock; +use ScssPhp\ScssPhp\Block\IfBlock; +use ScssPhp\ScssPhp\Block\MediaBlock; +use ScssPhp\ScssPhp\Block\NestedPropertyBlock; +use ScssPhp\ScssPhp\Block\WhileBlock; use ScssPhp\ScssPhp\Compiler\CachedResult; use ScssPhp\ScssPhp\Compiler\Environment; use ScssPhp\ScssPhp\Exception\CompilerException; @@ -644,7 +655,7 @@ protected function parserFactory($path) * @param array $target * @param array $origin * - * @return boolean + * @return bool */ protected function isSelfExtend($target, $origin) { @@ -853,10 +864,10 @@ protected function glueFunctionSelectors($parts) /** * Match extends * - * @param array $selector - * @param array $out - * @param integer $from - * @param boolean $initial + * @param array $selector + * @param array $out + * @param int $from + * @param bool $initial * * @return void */ @@ -989,7 +1000,7 @@ protected function matchExtends($selector, &$out, $from = 0, $initial = true) * @param string $part * @param array $matches * - * @return boolean + * @return bool */ protected function isPseudoSelector($part, &$matches) { @@ -1051,11 +1062,11 @@ protected function pushOrMergeExtentedSelector(&$out, $extended) /** * Match extends single * - * @param array $rawSingle - * @param array $outOrigin - * @param boolean $initial + * @param array $rawSingle + * @param array $outOrigin + * @param bool $initial * - * @return boolean + * @return bool */ protected function matchExtendsSingle($rawSingle, &$outOrigin, $initial = true) { @@ -1270,6 +1281,7 @@ protected function combineSelectorSingle($base, $other) */ protected function compileMedia(Block $media) { + assert($media instanceof MediaBlock); $this->pushEnv($media); $mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env)); @@ -1347,7 +1359,7 @@ protected function mediaParent(OutputBlock $scope) /** * Compile directive * - * @param \ScssPhp\ScssPhp\Block|array $directive + * @param DirectiveBlock|array $directive * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out * * @return void @@ -1413,6 +1425,7 @@ protected function compileDirectiveName($directiveName) */ protected function compileAtRoot(Block $block) { + assert($block instanceof AtRootBlock); $env = $this->pushEnv($block); $envs = $this->compactEnv($env); list($with, $without) = $this->compileWith(isset($block->with) ? $block->with : null); @@ -1461,7 +1474,7 @@ protected function compileAtRoot(Block $block) } /** - * Filter at-root scope depending of with/without option + * Filter at-root scope depending on with/without option * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope * @param array $with @@ -1561,7 +1574,7 @@ protected function completeScope($scope, $previousScope) * Find a selector by the depth node in the scope * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope - * @param integer $depth + * @param int $depth * * @return array */ @@ -1585,7 +1598,7 @@ protected function findScopeSelectors($scope, $depth) /** * Compile @at-root's with: inclusion / without: exclusion into 2 lists uses to filter scope/env later * - * @param array $withCondition + * @param array|null $withCondition * * @return array * @@ -1674,7 +1687,7 @@ protected function filterWithWithout($envs, $with, $without) * @param array $with * @param array $without * - * @return boolean + * @return bool */ protected function isWith($block, $with, $without) { @@ -1684,6 +1697,7 @@ protected function isWith($block, $with, $without) } if ($block->type === Type::T_DIRECTIVE) { + assert($block instanceof DirectiveBlock || $block instanceof OutputBlock); if (isset($block->name)) { return $this->testWithWithout($this->compileDirectiveName($block->name), $with, $without); } elseif (isset($block->selectors) && preg_match(',@(\w+),ims', json_encode($block->selectors), $m)) { @@ -1719,7 +1733,7 @@ protected function isWith($block, $with, $without) * @param array $with * @param array $without * - * @return boolean + * @return bool * true if the block should be kept, false to reject */ protected function testWithWithout($what, $with, $without) @@ -1774,6 +1788,7 @@ protected function compileKeyframeBlock(Block $block, $selectors) */ protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out) { + assert($block instanceof NestedPropertyBlock); $prefix = $this->compileValue($block->prefix) . '-'; $nested = $this->makeOutputBlock($block->type); @@ -1792,6 +1807,7 @@ protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out) break; case Type::T_NESTED_PROPERTY: + assert($child[1] instanceof NestedPropertyBlock); array_unshift($child[1]->prefix[2], $prefix); break; } @@ -1817,7 +1833,7 @@ protected function compileNestedBlock(Block $block, $selectors) // wrap assign children in a block // except for @font-face - if ($block->type !== Type::T_DIRECTIVE || $this->compileDirectiveName($block->name) !== 'font-face') { + if (!$block instanceof DirectiveBlock || $this->compileDirectiveName($block->name) !== 'font-face') { // need wrapping? $needWrapping = false; @@ -1906,8 +1922,8 @@ protected function compileBlock(Block $block) /** * Compile the value of a comment that can have interpolation * - * @param array $value - * @param boolean $pushEnv + * @param array $value + * @param bool $pushEnv * * @return string */ @@ -2224,7 +2240,7 @@ protected function compileSelectorPart($piece) * * @param array $selector * - * @return boolean + * @return bool */ protected function hasSelectorPlaceholder($selector) { @@ -2641,9 +2657,9 @@ protected function mergeMediaTypes($type1, $type2) * * @param array $rawPath * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out - * @param boolean $once + * @param bool $once * - * @return boolean + * @return bool */ protected function compileImport($rawPath, OutputBlock $out, $once = false) { @@ -2778,7 +2794,7 @@ protected function appendRootDirective($line, $out, $allowed = [Type::T_COMMENT] // insert the directive as a comment $child = $this->makeOutputBlock(Type::T_COMMENT); $child->lines[] = $line; - $child->sourceName = $this->sourceNames[$this->sourceIndex]; + $child->sourceName = $this->sourceNames[$this->sourceIndex] ?: '(stdin)'; $child->sourceLine = $this->sourceLine; $child->sourceColumn = $this->sourceColumn; @@ -3049,6 +3065,7 @@ protected function compileChild($child, OutputBlock $out) case Type::T_MIXIN: case Type::T_FUNCTION: list(, $block) = $child; + assert($block instanceof CallableBlock); // the block need to be able to go up to it's parent env to resolve vars $block->parentEnv = $this->getStoreEnv(); $this->set(static::$namespaces[$block->type] . $block->name, $block, true); @@ -3099,6 +3116,7 @@ protected function compileChild($child, OutputBlock $out) case Type::T_IF: list(, $if) = $child; + assert($if instanceof IfBlock); if ($this->isTruthy($this->reduce($if->cond, true))) { return $this->compileChildren($if->children, $out); @@ -3106,8 +3124,8 @@ protected function compileChild($child, OutputBlock $out) foreach ($if->cases as $case) { if ( - $case->type === Type::T_ELSE || - $case->type === Type::T_ELSEIF && $this->isTruthy($this->reduce($case->cond)) + $case instanceof ElseBlock || + $case instanceof ElseifBlock && $this->isTruthy($this->reduce($case->cond)) ) { return $this->compileChildren($case->children, $out); } @@ -3116,6 +3134,7 @@ protected function compileChild($child, OutputBlock $out) case Type::T_EACH: list(, $each) = $child; + assert($each instanceof EachBlock); $list = $this->coerceList($this->reduce($each->list), ',', true); @@ -3150,6 +3169,7 @@ protected function compileChild($child, OutputBlock $out) case Type::T_WHILE: list(, $while) = $child; + assert($while instanceof WhileBlock); while ($this->isTruthy($this->reduce($while->cond, true))) { $ret = $this->compileChildren($while->children, $out); @@ -3162,6 +3182,7 @@ protected function compileChild($child, OutputBlock $out) case Type::T_FOR: list(, $for) = $child; + assert($for instanceof ForBlock); $startNumber = $this->assertNumber($this->reduce($for->start, true)); $endNumber = $this->assertNumber($this->reduce($for->end, true)); @@ -3222,6 +3243,8 @@ protected function compileChild($child, OutputBlock $out) throw $this->error("Undefined mixin $name"); } + assert($mixin instanceof CallableBlock); + $callingScope = $this->getStoreEnv(); // push scope, apply args @@ -3394,7 +3417,7 @@ protected function expToString($exp, $keepParens = false) * * @param array|Number $value * - * @return boolean + * @return bool */ public function isTruthy($value) { @@ -3406,7 +3429,7 @@ public function isTruthy($value) * * @param string $value * - * @return boolean + * @return bool */ protected function isImmediateRelationshipCombinator($value) { @@ -3418,7 +3441,7 @@ protected function isImmediateRelationshipCombinator($value) * * @param array $value * - * @return boolean + * @return bool */ protected function shouldEval($value) { @@ -3441,7 +3464,7 @@ protected function shouldEval($value) * Reduce value * * @param array|Number $value - * @param boolean $inExp + * @param bool $inExp * * @return array|Number */ @@ -3946,6 +3969,10 @@ public function normalizeValue($value) unset($value['enclosing']); } + if ($value[1] === '' && count($value[2]) > 1) { + $value[1] = ' '; + } + return $value; case Type::T_STRING: @@ -4061,8 +4088,8 @@ protected function opAdd($left, $right) * Boolean and * * @param array|Number $left - * @param array|Number $right - * @param boolean $shouldEval + * @param array|Number $right + * @param bool $shouldEval * * @return array|Number|null */ @@ -4090,7 +4117,7 @@ protected function opAnd($left, $right, $shouldEval) * * @param array|Number $left * @param array|Number $right - * @param boolean $shouldEval + * @param bool $shouldEval * * @return array|Number|null */ @@ -4516,8 +4543,7 @@ public function compileValue($value, $quote = true) // force double quote as string quote for the output in certain cases if ( $value[1] === "'" && - (strpos($content, '"') === false or strpos($content, "'") !== false) && - strpbrk($content, '{}\\\'') !== false + (strpos($content, '"') === false or strpos($content, "'") !== false) ) { $value[1] = '"'; } elseif ( @@ -4570,6 +4596,8 @@ public function compileValue($value, $quote = true) } } + $separator = $delim === '/' ? ' /' : $delim; + $prefix_value = ''; if ($delim !== ' ') { @@ -4608,7 +4636,7 @@ public function compileValue($value, $quote = true) $filtered[] = $compiled; } - return $pre . substr(implode("$delim", $filtered), \strlen($prefix_value)) . $post; + return $pre . substr(implode($separator, $filtered), \strlen($prefix_value)) . $post; case Type::T_MAP: $keys = $value[1]; @@ -4880,10 +4908,10 @@ protected function multiplySelectors(Environment $env, $selfParent = null) /** * Join selectors; looks for & to replace, or append parent before child * - * @param array $parent - * @param array $child - * @param boolean $stillHasSelf - * @param array $selfParentSelectors + * @param array $parent + * @param array $child + * @param bool $stillHasSelf + * @param array $selfParentSelectors * @return array */ @@ -4961,6 +4989,8 @@ protected function multiplyMedia(Environment $env = null, $childQueries = null) return $this->multiplyMedia($env->parent, $childQueries); } + assert($env->block instanceof MediaBlock); + $parentQueries = isset($env->block->queryList) ? $env->block->queryList : [[[Type::T_MEDIA_VALUE, $env->block->value]]]; @@ -5095,7 +5125,7 @@ protected function getStoreEnv() * * @param string $name * @param mixed $value - * @param boolean $shadow + * @param bool $shadow * @param \ScssPhp\ScssPhp\Compiler\Environment $env * @param mixed $valueUnreduced * @@ -5201,9 +5231,9 @@ protected function setRaw($name, $value, Environment $env, $valueUnreduced = nul * @internal * * @param string $name - * @param boolean $shouldThrow + * @param bool $shouldThrow * @param \ScssPhp\ScssPhp\Compiler\Environment $env - * @param boolean $unreduced + * @param bool $unreduced * * @return mixed|null */ @@ -5270,7 +5300,7 @@ public function get($name, $shouldThrow = true, Environment $env = null, $unredu * @param string $name * @param \ScssPhp\ScssPhp\Compiler\Environment $env * - * @return boolean + * @return bool */ protected function has($name, Environment $env = null) { @@ -5460,7 +5490,7 @@ public function setImportPaths($path) * * @api * - * @param integer $numberPrecision + * @param int $numberPrecision * * @return void * @@ -5561,7 +5591,7 @@ public function setCharset($charset) * * @api * - * @param integer $sourceMap + * @param int $sourceMap * * @return void * @@ -5963,7 +5993,7 @@ public function setEncoding($encoding) * * @api * - * @param boolean $ignoreErrors + * @param bool $ignoreErrors * * @return \ScssPhp\ScssPhp\Compiler * @@ -6102,7 +6132,7 @@ public function errorArgsNumber($functionName, $ExpectedArgs, $nbActual) /** * Beautify call stack for output * - * @param boolean $all + * @param bool $all * @param int|null $limit * * @return string @@ -6162,8 +6192,8 @@ protected function handleImportLoop($name) /** * Call SCSS @function * - * @param Object $func - * @param array $argValues + * @param CallableBlock|null $func + * @param array $argValues * * @return array|Number */ @@ -6737,9 +6767,8 @@ private function maybeReduce($reduce, $value) * * @param array[] $argDef * @param array|null $argValues - * @param boolean $storeInEnv - * @param boolean $reduce - * only used if $storeInEnv = false + * @param bool $storeInEnv + * @param bool $reduce only used if $storeInEnv = false * * @return array * @@ -6983,14 +7012,14 @@ protected function coerceMap($item) * * @param array|Number $item * @param string $delim - * @param boolean $removeTrailingNull + * @param bool $removeTrailingNull * * @return array */ protected function coerceList($item, $delim = ',', $removeTrailingNull = false) { if ($item instanceof Number) { - return [Type::T_LIST, $delim, [$item]]; + return [Type::T_LIST, '', [$item]]; } if ($item[0] === Type::T_LIST) { @@ -7013,15 +7042,15 @@ protected function coerceList($item, $delim = ',', $removeTrailingNull = false) $list[] = [ Type::T_LIST, - '', + ' ', [$key, $value] ]; } - return [Type::T_LIST, ',', $list]; + return [Type::T_LIST, $list ? ',' : '', $list]; } - return [Type::T_LIST, $delim, [$item]]; + return [Type::T_LIST, '', [$item]]; } /** @@ -7162,10 +7191,10 @@ protected function coerceColor($value, $inRGBFunction = false) } /** - * @param integer|Number $value - * @param boolean $isAlpha + * @param int|Number $value + * @param bool $isAlpha * - * @return integer|mixed + * @return int|mixed */ protected function compileRGBAValue($value, $isAlpha = false) { @@ -7177,12 +7206,12 @@ protected function compileRGBAValue($value, $isAlpha = false) } /** - * @param mixed $value - * @param integer|float $min - * @param integer|float $max - * @param boolean $isInt + * @param mixed $value + * @param int|float $min + * @param int|float $max + * @param bool $isInt * - * @return integer|mixed + * @return int|mixed */ protected function compileColorPartValue($value, $min, $max, $isInt = true) { @@ -7276,7 +7305,7 @@ public function assertString($value, $varName = null) * * @param array|Number $value * - * @return integer|float + * @return int|float * * @deprecated */ @@ -7414,7 +7443,7 @@ public function assertNumber($value, $varName = null) * @param array|Number $value * @param string|null $varName * - * @return integer + * @return int * * @throws SassScriptException */ @@ -7478,9 +7507,9 @@ protected function fixColor($c) * * @internal * - * @param integer $red - * @param integer $green - * @param integer $blue + * @param int $red + * @param int $green + * @param int $blue * * @return array */ @@ -7584,9 +7613,9 @@ public function toRGB($hue, $saturation, $lightness) * * @api * - * @param integer $hue H from 0 to 360 - * @param integer $whiteness W from 0 to 100 - * @param integer $blackness B from 0 to 100 + * @param int $hue H from 0 to 360 + * @param int $whiteness W from 0 to 100 + * @param int $blackness B from 0 to 100 * * @return array */ @@ -7616,9 +7645,9 @@ private function HWBtoRGB($hue, $whiteness, $blackness) * * @api * - * @param integer $red - * @param integer $green - * @param integer $blue + * @param int $red + * @param int $green + * @param int $blue * * @return array */ @@ -7746,7 +7775,6 @@ protected function libIndex($args) $values = []; - foreach ($list[2] as $item) { $values[] = $this->normalizeValue($item); } @@ -8375,6 +8403,13 @@ protected function libBlackness($args, $kwargs, $funcName = 'blackness') { } */ + /** + * @param array $color + * @param int $idx + * @param int|float $amount + * + * @return array + */ protected function adjustHsl($color, $idx, $amount) { $hsl = $this->toHSL($color[1], $color[2], $color[3]); @@ -8664,7 +8699,7 @@ protected function libListSeparator($args) $list = $this->coerceList($args[0]); - if (\count($list[2]) <= 1 && empty($list['enclosing'])) { + if ($list[1] === '' && \count($list[2]) <= 1 && empty($list['enclosing'])) { return [Type::T_KEYWORD, 'space']; } @@ -8672,6 +8707,10 @@ protected function libListSeparator($args) return [Type::T_KEYWORD, 'comma']; } + if ($list[1] === '/') { + return [Type::T_KEYWORD, 'slash']; + } + return [Type::T_KEYWORD, 'space']; } @@ -9038,9 +9077,13 @@ protected function libIsBracketed($args) * * @return string * @throws CompilerException + * + * @deprecated */ protected function listSeparatorForJoin($list1, $sep) { + @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED); + if (! isset($sep)) { return $list1[1]; } @@ -9057,14 +9100,40 @@ protected function listSeparatorForJoin($list1, $sep) } } - protected static $libJoin = ['list1', 'list2', 'separator:null', 'bracketed:auto']; + protected static $libJoin = ['list1', 'list2', 'separator:auto', 'bracketed:auto']; protected function libJoin($args) { list($list1, $list2, $sep, $bracketed) = $args; $list1 = $this->coerceList($list1, ' ', true); $list2 = $this->coerceList($list2, ' ', true); - $sep = $this->listSeparatorForJoin($list1, $sep); + + switch ($this->compileStringContent($this->assertString($sep, 'separator'))) { + case 'comma': + $separator = ','; + break; + + case 'space': + $separator = ' '; + break; + + case 'slash': + $separator = '/'; + break; + + case 'auto': + if ($list1[1] !== '' || count($list1[2]) > 1 || !empty($list1['enclosing']) && $list1['enclosing'] !== 'parent') { + $separator = $list1[1] ?: ' '; + } elseif ($list2[1] !== '' || count($list2[2]) > 1 || !empty($list2['enclosing']) && $list2['enclosing'] !== 'parent') { + $separator = $list2[1] ?: ' '; + } else { + $separator = ' '; + } + break; + + default: + throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator'); + } if ($bracketed === static::$true) { $bracketed = true; @@ -9091,11 +9160,7 @@ protected function libJoin($args) } } - $res = [Type::T_LIST, $sep, array_merge($list1[2], $list2[2])]; - - if (isset($list1['enclosing'])) { - $res['enlcosing'] = $list1['enclosing']; - } + $res = [Type::T_LIST, $separator, array_merge($list1[2], $list2[2])]; if ($bracketed) { $res['enclosing'] = 'bracket'; @@ -9104,14 +9169,35 @@ protected function libJoin($args) return $res; } - protected static $libAppend = ['list', 'val', 'separator:null']; + protected static $libAppend = ['list', 'val', 'separator:auto']; protected function libAppend($args) { list($list1, $value, $sep) = $args; $list1 = $this->coerceList($list1, ' ', true); - $sep = $this->listSeparatorForJoin($list1, $sep); - $res = [Type::T_LIST, $sep, array_merge($list1[2], [$value])]; + + switch ($this->compileStringContent($this->assertString($sep, 'separator'))) { + case 'comma': + $separator = ','; + break; + + case 'space': + $separator = ' '; + break; + + case 'slash': + $separator = '/'; + break; + + case 'auto': + $separator = $list1[1] === '' && \count($list1[2]) <= 1 && (empty($list1['enclosing']) || $list1['enclosing'] === 'parent') ? ' ' : $list1[1]; + break; + + default: + throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator'); + } + + $res = [Type::T_LIST, $separator, array_merge($list1[2], [$value])]; if (isset($list1['enclosing'])) { $res['enclosing'] = $list1['enclosing']; @@ -9134,7 +9220,7 @@ protected function libZip($args) $result = [Type::T_LIST, ',', $lists]; if (! \is_null($firstList)) { foreach ($firstList[2] as $key => $item) { - $list = [Type::T_LIST, '', [$item]]; + $list = [Type::T_LIST, ' ', [$item]]; foreach ($argLists as $arg) { if (isset($arg[2][$key])) { @@ -9514,6 +9600,8 @@ protected function inspectFormatValue($value, $force_enclosing_display = false) ) { $value['enclosing'] = 'forced_' . $value['enclosing']; $force_enclosing_display = true; + } elseif (! \count($value[2])) { + $value['enclosing'] = 'forced_parent'; } foreach ($value[2] as $k => $listelement) { @@ -9637,7 +9725,7 @@ protected function libIsSuperselector($args) * @param array $super * @param array $sub * - * @return boolean + * @return bool */ protected function isSuperSelector($super, $sub) { @@ -9718,7 +9806,7 @@ function ($value, $key) use (&$compound) { * @param array $superParts * @param array $subParts * - * @return boolean + * @return bool */ protected function isSuperPart($superParts, $subParts) { @@ -9785,21 +9873,18 @@ protected function selectorAppend($selectors) // do the trick, happening $lastSelector to $previousSelector $appended = []; - foreach ($lastSelectors as $lastSelector) { - $previous = $previousSelectors; - - foreach ($lastSelector as $lastSelectorParts) { - foreach ($lastSelectorParts as $lastSelectorPart) { - foreach ($previous as $i => $previousSelector) { - foreach ($previousSelector as $j => $previousSelectorParts) { - $previous[$i][$j][] = $lastSelectorPart; + foreach ($previousSelectors as $previousSelector) { + foreach ($lastSelectors as $lastSelector) { + $previous = $previousSelector; + foreach ($previousSelector as $j => $previousSelectorParts) { + foreach ($lastSelector as $lastSelectorParts) { + foreach ($lastSelectorParts as $lastSelectorPart) { + $previous[$j][] = $lastSelectorPart; } } } - } - foreach ($previous as $ps) { - $appended[] = $ps; + $appended[] = $previous; } } @@ -9855,10 +9940,10 @@ protected function libSelectorReplace($args) * Extend/replace in selectors * used by selector-extend and selector-replace that use the same logic * - * @param array $selectors - * @param array $extendee - * @param array $extender - * @param boolean $replace + * @param array $selectors + * @param array $extendee + * @param array $extender + * @param bool $replace * * @return array */ diff --git a/system/libs/scssphp/Compiler/Environment.php b/system/libs/scssphp/Compiler/Environment.php index 306b15a67..b205a077f 100644 --- a/system/libs/scssphp/Compiler/Environment.php +++ b/system/libs/scssphp/Compiler/Environment.php @@ -31,6 +31,26 @@ class Environment */ public $parent; + /** + * @var Environment|null + */ + public $declarationScopeParent; + + /** + * @var Environment|null + */ + public $parentStore; + + /** + * @var array|null + */ + public $selectors; + + /** + * @var string|null + */ + public $marker; + /** * @var array */ @@ -42,7 +62,7 @@ class Environment public $storeUnreduced; /** - * @var integer + * @var int */ public $depth; } diff --git a/system/libs/scssphp/Formatter.php b/system/libs/scssphp/Formatter.php index cc42ae805..c88ddba9d 100644 --- a/system/libs/scssphp/Formatter.php +++ b/system/libs/scssphp/Formatter.php @@ -25,7 +25,7 @@ abstract class Formatter { /** - * @var integer + * @var int */ public $indentLevel; @@ -60,7 +60,7 @@ abstract class Formatter public $assignSeparator; /** - * @var boolean + * @var bool */ public $keepSemicolons; @@ -70,12 +70,12 @@ abstract class Formatter protected $currentBlock; /** - * @var integer + * @var int */ protected $currentLine; /** - * @var integer + * @var int */ protected $currentColumn; @@ -239,7 +239,7 @@ protected function block(OutputBlock $block) * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block * - * @return boolean + * @return bool */ protected function testEmptyChildren($block) { diff --git a/system/libs/scssphp/Formatter/Compressed.php b/system/libs/scssphp/Formatter/Compressed.php index de13c188a..58ebe3f11 100644 --- a/system/libs/scssphp/Formatter/Compressed.php +++ b/system/libs/scssphp/Formatter/Compressed.php @@ -50,8 +50,6 @@ public function blockLines(OutputBlock $block) foreach ($block->lines as $index => $line) { if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') { unset($block->lines[$index]); - } elseif (substr($line, 0, 3) === '/*!') { - $block->lines[$index] = '/*' . substr($line, 3); } } diff --git a/system/libs/scssphp/Formatter/Nested.php b/system/libs/scssphp/Formatter/Nested.php index 9e7295684..c11ea8adf 100644 --- a/system/libs/scssphp/Formatter/Nested.php +++ b/system/libs/scssphp/Formatter/Nested.php @@ -27,7 +27,7 @@ class Nested extends Formatter { /** - * @var integer + * @var int */ private $depth; @@ -221,7 +221,7 @@ protected function block(OutputBlock $block) * * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block * - * @return boolean + * @return bool */ private function hasFlatChild($block) { diff --git a/system/libs/scssphp/Formatter/OutputBlock.php b/system/libs/scssphp/Formatter/OutputBlock.php index 88deb2d37..5cc91a080 100644 --- a/system/libs/scssphp/Formatter/OutputBlock.php +++ b/system/libs/scssphp/Formatter/OutputBlock.php @@ -27,7 +27,7 @@ class OutputBlock public $type; /** - * @var integer + * @var int */ public $depth; @@ -57,12 +57,12 @@ class OutputBlock public $sourceName; /** - * @var integer|null + * @var int|null */ public $sourceLine; /** - * @var integer|null + * @var int|null */ public $sourceColumn; } diff --git a/system/libs/scssphp/Node.php b/system/libs/scssphp/Node.php index 53019375a..fcaf8a95f 100644 --- a/system/libs/scssphp/Node.php +++ b/system/libs/scssphp/Node.php @@ -27,7 +27,7 @@ abstract class Node public $type; /** - * @var integer + * @var int */ public $sourceIndex; diff --git a/system/libs/scssphp/Node/Number.php b/system/libs/scssphp/Node/Number.php index b326906b5..ca9b5b652 100644 --- a/system/libs/scssphp/Node/Number.php +++ b/system/libs/scssphp/Node/Number.php @@ -38,7 +38,7 @@ class Number extends Node implements \ArrayAccess const PRECISION = 10; /** - * @var integer + * @var int * @deprecated use {Number::PRECISION} instead to read the precision. Configuring it is not supported anymore. */ public static $precision = self::PRECISION; @@ -81,7 +81,7 @@ class Number extends Node implements \ArrayAccess ]; /** - * @var integer|float + * @var int|float */ private $dimension; @@ -100,7 +100,7 @@ class Number extends Node implements \ArrayAccess /** * Initialize number * - * @param integer|float $dimension + * @param int|float $dimension * @param string[]|string $numeratorUnits * @param string[] $denominatorUnits * @@ -147,7 +147,7 @@ public function getDenominatorUnits() } /** - * {@inheritdoc} + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -173,7 +173,7 @@ public function offsetExists($offset) } /** - * {@inheritdoc} + * @return mixed */ #[\ReturnTypeWillChange] public function offsetGet($offset) @@ -200,7 +200,7 @@ public function offsetGet($offset) } /** - * {@inheritdoc} + * @return void */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -209,7 +209,7 @@ public function offsetSet($offset, $value) } /** - * {@inheritdoc} + * @return void */ #[\ReturnTypeWillChange] public function offsetUnset($offset) @@ -220,7 +220,7 @@ public function offsetUnset($offset) /** * Returns true if the number is unitless * - * @return boolean + * @return bool */ public function unitless() { diff --git a/system/libs/scssphp/Parser.php b/system/libs/scssphp/Parser.php index 3ba2f67f9..36e7ac036 100644 --- a/system/libs/scssphp/Parser.php +++ b/system/libs/scssphp/Parser.php @@ -12,6 +12,18 @@ namespace ScssPhp\ScssPhp; +use ScssPhp\ScssPhp\Block\AtRootBlock; +use ScssPhp\ScssPhp\Block\CallableBlock; +use ScssPhp\ScssPhp\Block\ContentBlock; +use ScssPhp\ScssPhp\Block\DirectiveBlock; +use ScssPhp\ScssPhp\Block\EachBlock; +use ScssPhp\ScssPhp\Block\ElseBlock; +use ScssPhp\ScssPhp\Block\ElseifBlock; +use ScssPhp\ScssPhp\Block\ForBlock; +use ScssPhp\ScssPhp\Block\IfBlock; +use ScssPhp\ScssPhp\Block\MediaBlock; +use ScssPhp\ScssPhp\Block\NestedPropertyBlock; +use ScssPhp\ScssPhp\Block\WhileBlock; use ScssPhp\ScssPhp\Exception\ParserException; use ScssPhp\ScssPhp\Logger\LoggerInterface; use ScssPhp\ScssPhp\Logger\QuietLogger; @@ -125,7 +137,7 @@ class Parser * @api * * @param string|null $sourceName - * @param integer $sourceIndex + * @param int $sourceIndex * @param string|null $encoding * @param Cache|null $cache * @param bool $cssOnly @@ -305,7 +317,7 @@ public function parse($buffer) * @param string $buffer * @param string|array $out * - * @return boolean + * @return bool */ public function parseValue($buffer, &$out) { @@ -334,7 +346,7 @@ public function parseValue($buffer, &$out) * @param string|array $out * @param bool $shouldValidate * - * @return boolean + * @return bool */ public function parseSelector($buffer, &$out, $shouldValidate = true) { @@ -371,7 +383,7 @@ public function parseSelector($buffer, &$out, $shouldValidate = true) * @param string $buffer * @param string|array $out * - * @return boolean + * @return bool */ public function parseMediaQueryList($buffer, &$out) { @@ -428,7 +440,7 @@ public function parseMediaQueryList($buffer, &$out) * position into $s. Then if a chain fails, use $this->seek($s) to * go back where we started. * - * @return boolean + * @return bool */ protected function parseChunk() { @@ -447,7 +459,8 @@ protected function parseChunk() ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $atRoot = $this->pushSpecialBlock(Type::T_AT_ROOT, $s); + $atRoot = new AtRootBlock(); + $this->registerPushedBlock($atRoot, $s); $atRoot->selector = $selector; $atRoot->with = $with; @@ -461,7 +474,8 @@ protected function parseChunk() $this->mediaQueryList($mediaQueryList) && $this->matchChar('{', false) ) { - $media = $this->pushSpecialBlock(Type::T_MEDIA, $s); + $media = new MediaBlock(); + $this->registerPushedBlock($media, $s); $media->queryList = $mediaQueryList[2]; return true; @@ -477,7 +491,8 @@ protected function parseChunk() ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $mixin = $this->pushSpecialBlock(Type::T_MIXIN, $s); + $mixin = new CallableBlock(Type::T_MIXIN); + $this->registerPushedBlock($mixin, $s); $mixin->name = $mixinName; $mixin->args = $args; @@ -509,7 +524,8 @@ protected function parseChunk() ]; if (! empty($hasBlock)) { - $include = $this->pushSpecialBlock(Type::T_INCLUDE, $s); + $include = new ContentBlock(); + $this->registerPushedBlock($include, $s); $include->child = $child; } else { $this->append($child, $s); @@ -599,7 +615,8 @@ protected function parseChunk() ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $func = $this->pushSpecialBlock(Type::T_FUNCTION, $s); + $func = new CallableBlock(Type::T_FUNCTION); + $this->registerPushedBlock($func, $s); $func->name = $fnName; $func->args = $args; @@ -631,7 +648,8 @@ protected function parseChunk() ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $each = $this->pushSpecialBlock(Type::T_EACH, $s); + $each = new EachBlock(); + $this->registerPushedBlock($each, $s); foreach ($varNames[2] as $varName) { $each->vars[] = $varName[1]; @@ -660,7 +678,8 @@ protected function parseChunk() $cond = reset($cond[2]); } - $while = $this->pushSpecialBlock(Type::T_WHILE, $s); + $while = new WhileBlock(); + $this->registerPushedBlock($while, $s); $while->cond = $cond; return true; @@ -680,7 +699,8 @@ protected function parseChunk() ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $for = $this->pushSpecialBlock(Type::T_FOR, $s); + $for = new ForBlock(); + $this->registerPushedBlock($for, $s); $for->var = $varName[1]; $for->start = $start; $for->end = $end; @@ -697,7 +717,8 @@ protected function parseChunk() ) { ! $this->cssOnly || $this->assertPlainCssValid(false, $s); - $if = $this->pushSpecialBlock(Type::T_IF, $s); + $if = new IfBlock(); + $this->registerPushedBlock($if, $s); while ( $cond[0] === Type::T_LIST && @@ -776,20 +797,21 @@ protected function parseChunk() if (isset($last) && $last[0] === Type::T_IF) { list(, $if) = $last; + assert($if instanceof IfBlock); if ($this->literal('@else', 5)) { if ($this->matchChar('{', false)) { - $else = $this->pushSpecialBlock(Type::T_ELSE, $s); + $else = new ElseBlock(); } elseif ( $this->literal('if', 2) && $this->functionCallArgumentsList($cond, false, '{', false) ) { - $else = $this->pushSpecialBlock(Type::T_ELSEIF, $s); + $else = new ElseifBlock(); $else->cond = $cond; } if (isset($else)) { - $else->dontAppend = true; + $this->registerPushedBlock($else, $s); $if->cases[] = $else; return true; @@ -827,7 +849,8 @@ protected function parseChunk() ($t1 = $this->supportsQuery($supportQuery)) && ($t2 = $this->matchChar('{', false)) ) { - $directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s); + $directive = new DirectiveBlock(); + $this->registerPushedBlock($directive, $s); $directive->name = 'supports'; $directive->value = $supportQuery; @@ -848,11 +871,12 @@ protected function parseChunk() $dirName = [Type::T_STRING, '', $dirName]; } if ($dirName === 'media') { - $directive = $this->pushSpecialBlock(Type::T_MEDIA, $s); + $directive = new MediaBlock(); } else { - $directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s); + $directive = new DirectiveBlock(); $directive->name = $dirName; } + $this->registerPushedBlock($directive, $s); if (isset($dirValue)) { ! $this->cssOnly || ($dirValue = $this->assertPlainCssValid($dirValue)); @@ -1028,7 +1052,8 @@ protected function parseChunk() if ($this->matchChar('{', false)) { ! $this->cssOnly || $this->assertPlainCssValid(false); - $propBlock = $this->pushSpecialBlock(Type::T_NESTED_PROPERTY, $s); + $propBlock = new NestedPropertyBlock(); + $this->registerPushedBlock($propBlock, $s); $propBlock->prefix = $name; $propBlock->hasValue = $foundSomething; @@ -1054,12 +1079,13 @@ protected function parseChunk() } } - if (isset($block->type) && $block->type === Type::T_INCLUDE) { + if ($block instanceof ContentBlock) { $include = $block->child; + assert(\is_array($include)); unset($block->child); $include[3] = $block; $this->append($include, $s); - } elseif (empty($block->dontAppend)) { + } elseif (!$block instanceof ElseBlock && !$block instanceof ElseifBlock) { $type = isset($block->type) ? $block->type : Type::T_BLOCK; $this->append([$type, $block], $s); } @@ -1088,20 +1114,34 @@ protected function parseChunk() * Push block onto parse tree * * @param array|null $selectors - * @param integer $pos + * @param int $pos * * @return Block */ protected function pushBlock($selectors, $pos = 0) + { + $b = new Block(); + $b->selectors = $selectors; + + $this->registerPushedBlock($b, $pos); + + return $b; + } + + /** + * @param Block $b + * @param int $pos + * + * @return void + */ + private function registerPushedBlock(Block $b, $pos) { list($line, $column) = $this->getSourcePosition($pos); - $b = new Block(); $b->sourceName = $this->sourceName; $b->sourceLine = $line; $b->sourceColumn = $column; $b->sourceIndex = $this->sourceIndex; - $b->selectors = $selectors; $b->comments = []; $b->parent = $this->env; @@ -1126,15 +1166,15 @@ protected function pushBlock($selectors, $pos = 0) $this->append(null); } } - - return $b; } /** * Push special (named) block onto parse tree * + * @deprecated + * * @param string $type - * @param integer $pos + * @param int $pos * * @return Block */ @@ -1183,11 +1223,11 @@ protected function popBlock() /** * Peek input stream * - * @param string $regex - * @param array $out - * @param integer $from + * @param string $regex + * @param array $out + * @param int $from * - * @return integer + * @return int */ protected function peek($regex, &$out, $from = null) { @@ -1204,7 +1244,7 @@ protected function peek($regex, &$out, $from = null) /** * Seek to position in input stream (or return current position in input stream) * - * @param integer $where + * @param int $where */ protected function seek($where) { @@ -1215,7 +1255,8 @@ protected function seek($where) * Assert a parsed part is plain CSS Valid * * @param array|false $parsed - * @param int $startPos + * @param int $startPos + * * @throws ParserException */ protected function assertPlainCssValid($parsed, $startPos = null) @@ -1243,7 +1284,10 @@ protected function assertPlainCssValid($parsed, $startPos = null) /** * Check a parsed element is plain CSS Valid + * * @param array $parsed + * @param bool $allowExpression + * * @return bool|array */ protected function isPlainCssValidElement($parsed, $allowExpression = false) @@ -1423,7 +1467,7 @@ protected function isPlainCssValidElement($parsed, $allowExpression = false) * @param array $m Matches (passed by reference) * @param string $delim Delimiter * - * @return boolean True if match; false otherwise + * @return bool True if match; false otherwise */ protected function matchString(&$m, $delim) { @@ -1459,11 +1503,11 @@ protected function matchString(&$m, $delim) /** * Try to match something on head of buffer * - * @param string $regex - * @param array $out - * @param boolean $eatWhitespace + * @param string $regex + * @param array $out + * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function match($regex, &$out, $eatWhitespace = null) { @@ -1489,10 +1533,10 @@ protected function match($regex, &$out, $eatWhitespace = null) /** * Match a single string * - * @param string $char - * @param boolean $eatWhitespace + * @param string $char + * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function matchChar($char, $eatWhitespace = null) { @@ -1516,11 +1560,11 @@ protected function matchChar($char, $eatWhitespace = null) /** * Match literal string * - * @param string $what - * @param integer $len - * @param boolean $eatWhitespace + * @param string $what + * @param int $len + * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function literal($what, $len, $eatWhitespace = null) { @@ -1544,7 +1588,7 @@ protected function literal($what, $len, $eatWhitespace = null) /** * Match some whitespace * - * @return boolean + * @return bool */ protected function whitespace() { @@ -1643,7 +1687,7 @@ protected function appendComment($comment) * Append statement to current block * * @param array|null $statement - * @param integer $pos + * @param int $pos */ protected function append($statement, $pos = null) { @@ -1688,7 +1732,7 @@ protected function last() * * @param array $out * - * @return boolean + * @return bool */ protected function mediaQueryList(&$out) { @@ -1700,7 +1744,7 @@ protected function mediaQueryList(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function mediaQuery(&$out) { @@ -1754,7 +1798,7 @@ protected function mediaQuery(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function supportsQuery(&$out) { @@ -1887,7 +1931,7 @@ protected function supportsQuery(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function mediaExpression(&$out) { @@ -1920,7 +1964,7 @@ protected function mediaExpression(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function argValues(&$out) { @@ -1945,7 +1989,7 @@ protected function argValues(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function argValue(&$out) { @@ -2025,10 +2069,10 @@ protected function isKnownGenericDirective($directiveName) /** * Parse directive value list that considers $vars as keyword * - * @param array $out - * @param boolean|string $endChar + * @param array $out + * @param bool|string $endChar * - * @return boolean + * @return bool */ protected function directiveValue(&$out, $endChar = false) { @@ -2089,7 +2133,7 @@ protected function directiveValue(&$out, $endChar = false) * * @param array $out * - * @return boolean + * @return bool */ protected function valueList(&$out) { @@ -2105,10 +2149,11 @@ protected function valueList(&$out) * Parse a function call, where externals () are part of the call * and not of the value list * - * @param $out - * @param bool $mandatoryEnclos + * @param array $out + * @param bool $mandatoryEnclos * @param null|string $charAfter - * @param null|bool $eatWhiteSp + * @param null|bool $eatWhiteSp + * * @return bool */ protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $charAfter = null, $eatWhiteSp = null) @@ -2145,7 +2190,7 @@ protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $ch * * @param array $out * - * @return boolean + * @return bool */ protected function spaceList(&$out) { @@ -2155,12 +2200,12 @@ protected function spaceList(&$out) /** * Parse generic list * - * @param array $out - * @param string $parseItem The name of the method used to parse items - * @param string $delim - * @param boolean $flatten + * @param array $out + * @param string $parseItem The name of the method used to parse items + * @param string $delim + * @param bool $flatten * - * @return boolean + * @return bool */ protected function genericList(&$out, $parseItem, $delim = '', $flatten = true) { @@ -2256,11 +2301,11 @@ protected function genericList(&$out, $parseItem, $delim = '', $flatten = true) /** * Parse expression * - * @param array $out - * @param boolean $listOnly - * @param boolean $lookForExp + * @param array $out + * @param bool $listOnly + * @param bool $lookForExp * - * @return boolean + * @return bool */ protected function expression(&$out, $listOnly = false, $lookForExp = true) { @@ -2322,11 +2367,11 @@ protected function expression(&$out, $listOnly = false, $lookForExp = true) * Parse expression specifically checking for lists in parenthesis or brackets * * @param array $out - * @param integer $s + * @param int $s * @param string $closingParen * @param array $allowedTypes * - * @return boolean + * @return bool */ protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP]) { @@ -2381,8 +2426,8 @@ protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTy /** * Parse left-hand side of subexpression * - * @param array $lhs - * @param integer $minP + * @param array $lhs + * @param int $minP * * @return array */ @@ -2437,7 +2482,7 @@ protected function expHelper($lhs, $minP) * * @param array $out * - * @return boolean + * @return bool */ protected function value(&$out) { @@ -2645,7 +2690,7 @@ protected function value(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function parenValue(&$out) { @@ -2684,7 +2729,7 @@ protected function parenValue(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function progid(&$out) { @@ -2717,7 +2762,7 @@ protected function progid(&$out) * @param string $name * @param array $func * - * @return boolean + * @return bool */ protected function func($name, &$func) { @@ -2771,7 +2816,7 @@ protected function func($name, &$func) * * @param array $out * - * @return boolean + * @return bool */ protected function argumentList(&$out) { @@ -2816,7 +2861,7 @@ protected function argumentList(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function argumentDef(&$out) { @@ -2878,7 +2923,7 @@ protected function argumentDef(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function map(&$out) { @@ -2920,7 +2965,7 @@ protected function map(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function color(&$out) { @@ -2946,7 +2991,7 @@ protected function color(&$out) * * @param array $unit * - * @return boolean + * @return bool */ protected function unit(&$unit) { @@ -2971,8 +3016,9 @@ protected function unit(&$unit) * Parse string * * @param array $out + * @param bool $keepDelimWithInterpolation * - * @return boolean + * @return bool */ protected function string(&$out, $keepDelimWithInterpolation = false) { @@ -3053,7 +3099,8 @@ protected function string(&$out, $keepDelimWithInterpolation = false) /** * @param string $out - * @param bool $inKeywords + * @param bool $inKeywords + * * @return bool */ protected function matchEscapeCharacter(&$out, $inKeywords = false) @@ -3103,10 +3150,10 @@ protected function matchEscapeCharacter(&$out, $inKeywords = false) /** * Parse keyword or interpolation * - * @param array $out - * @param boolean $restricted + * @param array $out + * @param bool $restricted * - * @return boolean + * @return bool */ protected function mixedKeyword(&$out, $restricted = false) { @@ -3147,14 +3194,14 @@ protected function mixedKeyword(&$out, $restricted = false) /** * Parse an unbounded string stopped by $end * - * @param string $end - * @param array $out - * @param string $nestOpen - * @param string $nestClose - * @param boolean $rtrim + * @param string $end + * @param array $out + * @param string $nestOpen + * @param string $nestClose + * @param bool $rtrim * @param string $disallow * - * @return boolean + * @return bool */ protected function openString($end, &$out, $nestOpen = null, $nestClose = null, $rtrim = true, $disallow = null) { @@ -3230,9 +3277,9 @@ protected function openString($end, &$out, $nestOpen = null, $nestClose = null, * Parser interpolation * * @param string|array $out - * @param boolean $lookWhite save information about whitespace before and after + * @param bool $lookWhite save information about whitespace before and after * - * @return boolean + * @return bool */ protected function interpolation(&$out, $lookWhite = true) { @@ -3287,7 +3334,7 @@ protected function interpolation(&$out, $lookWhite = true) * * @param array $out * - * @return boolean + * @return bool */ protected function propertyName(&$out) { @@ -3342,7 +3389,7 @@ protected function propertyName(&$out) * * @param array $out * - * @return boolean + * @return bool */ protected function customProperty(&$out) { @@ -3400,9 +3447,9 @@ protected function customProperty(&$out) * Parse comma separated selector list * * @param array $out - * @param string|boolean $subSelector + * @param string|bool $subSelector * - * @return boolean + * @return bool */ protected function selectors(&$out, $subSelector = false) { @@ -3436,9 +3483,9 @@ protected function selectors(&$out, $subSelector = false) * Parse whitespace separated selector list * * @param array $out - * @param string|boolean $subSelector + * @param string|bool $subSelector * - * @return boolean + * @return bool */ protected function selector(&$out, $subSelector = false) { @@ -3494,7 +3541,8 @@ protected function selector(&$out, $subSelector = false) * - but this require a better formal selector representation instead of the array we have now * * @param string $out - * @param bool $keepEscapedNumber + * @param bool $keepEscapedNumber + * * @return bool */ protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = false) @@ -3539,9 +3587,9 @@ protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = fa * }} * * @param array $out - * @param string|boolean $subSelector + * @param string|bool $subSelector * - * @return boolean + * @return bool */ protected function selectorSingle(&$out, $subSelector = false) { @@ -3765,7 +3813,7 @@ protected function selectorSingle(&$out, $subSelector = false) * * @param array $out * - * @return boolean + * @return bool */ protected function variable(&$out) { @@ -3792,11 +3840,11 @@ protected function variable(&$out) /** * Parse a keyword * - * @param string $word - * @param boolean $eatWhitespace - * @param boolean $inSelector + * @param string $word + * @param bool $eatWhitespace + * @param bool $inSelector * - * @return boolean + * @return bool */ protected function keyword(&$word, $eatWhitespace = null, $inSelector = false) { @@ -3859,11 +3907,11 @@ protected function keyword(&$word, $eatWhitespace = null, $inSelector = false) /** * Parse a keyword that should not start with a number * - * @param string $word - * @param boolean $eatWhitespace - * @param boolean $inSelector + * @param string $word + * @param bool $eatWhitespace + * @param bool $inSelector * - * @return boolean + * @return bool */ protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector = false) { @@ -3883,7 +3931,7 @@ protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector * * @param string|array $placeholder * - * @return boolean + * @return bool */ protected function placeholder(&$placeholder) { @@ -3912,7 +3960,7 @@ protected function placeholder(&$placeholder) * * @param array $out * - * @return boolean + * @return bool */ protected function url(&$out) { @@ -3947,7 +3995,7 @@ protected function url(&$out) * Consume an end of statement delimiter * @param bool $eatWhitespace * - * @return boolean + * @return bool */ protected function end($eatWhitespace = null) { @@ -4065,7 +4113,7 @@ private function extractLineNumbers($buffer) /** * Get source line number and column (given character position in the buffer) * - * @param integer $pos + * @param int $pos * * @return array */ diff --git a/system/libs/scssphp/SourceMap/Base64.php b/system/libs/scssphp/SourceMap/Base64.php index 4a5ed8bb0..00b6b4545 100644 --- a/system/libs/scssphp/SourceMap/Base64.php +++ b/system/libs/scssphp/SourceMap/Base64.php @@ -164,7 +164,7 @@ class Base64 /** * Convert to base64 * - * @param integer $value + * @param int $value * * @return string */ @@ -178,7 +178,7 @@ public static function encode($value) * * @param string $value * - * @return integer + * @return int */ public static function decode($value) { diff --git a/system/libs/scssphp/SourceMap/Base64VLQ.php b/system/libs/scssphp/SourceMap/Base64VLQ.php index d47b96a1c..2a5210c68 100644 --- a/system/libs/scssphp/SourceMap/Base64VLQ.php +++ b/system/libs/scssphp/SourceMap/Base64VLQ.php @@ -51,7 +51,7 @@ class Base64VLQ /** * Returns the VLQ encoded value. * - * @param integer $value + * @param int $value * * @return string */ @@ -80,9 +80,9 @@ public static function encode($value) * Decodes VLQValue. * * @param string $str - * @param integer $index + * @param int $index * - * @return integer + * @return int */ public static function decode($str, &$index) { @@ -107,9 +107,9 @@ public static function decode($str, &$index) * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) * - * @param integer $value + * @param int $value * - * @return integer + * @return int */ private static function toVLQSigned($value) { @@ -126,9 +126,9 @@ private static function toVLQSigned($value) * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 * - * @param integer $value + * @param int $value * - * @return integer + * @return int */ private static function fromVLQSigned($value) { diff --git a/system/libs/scssphp/SourceMap/SourceMapGenerator.php b/system/libs/scssphp/SourceMap/SourceMapGenerator.php index 4f14bdcef..65dc24da0 100644 --- a/system/libs/scssphp/SourceMap/SourceMapGenerator.php +++ b/system/libs/scssphp/SourceMap/SourceMapGenerator.php @@ -114,11 +114,11 @@ public function __construct(array $options = []) /** * Adds a mapping * - * @param integer $generatedLine The line number in generated file - * @param integer $generatedColumn The column number in generated file - * @param integer $originalLine The line number in original file - * @param integer $originalColumn The column number in original file - * @param string $sourceFile The original source file + * @param int $generatedLine The line number in generated file + * @param int $generatedColumn The column number in generated file + * @param int $originalLine The line number in original file + * @param int $originalColumn The column number in original file + * @param string $sourceFile The original source file * * @return void */ @@ -326,7 +326,7 @@ public function generateMappings($prefix = '') * * @param string $filename * - * @return integer|false + * @return int|false */ protected function findFileIndex($filename) { @@ -362,8 +362,8 @@ protected function normalizeFilename($filename) /** * Fix windows paths * - * @param string $path - * @param boolean $addEndSlash + * @param string $path + * @param bool $addEndSlash * * @return string */ diff --git a/system/libs/scssphp/Type.php b/system/libs/scssphp/Type.php index fb2a1d7fe..d43088785 100644 --- a/system/libs/scssphp/Type.php +++ b/system/libs/scssphp/Type.php @@ -19,58 +19,190 @@ */ class Type { + /** + * @internal + */ const T_ASSIGN = 'assign'; + /** + * @internal + */ const T_AT_ROOT = 'at-root'; + /** + * @internal + */ const T_BLOCK = 'block'; - /** @deprecated */ + /** + * @deprecated + * @internal + */ const T_BREAK = 'break'; + /** + * @internal + */ const T_CHARSET = 'charset'; const T_COLOR = 'color'; + /** + * @internal + */ const T_COMMENT = 'comment'; - /** @deprecated */ + /** + * @deprecated + * @internal + */ const T_CONTINUE = 'continue'; - /** @deprecated */ + /** + * @deprecated + * @internal + */ const T_CONTROL = 'control'; + /** + * @internal + */ const T_CUSTOM_PROPERTY = 'custom'; + /** + * @internal + */ const T_DEBUG = 'debug'; + /** + * @internal + */ const T_DIRECTIVE = 'directive'; + /** + * @internal + */ const T_EACH = 'each'; + /** + * @internal + */ const T_ELSE = 'else'; + /** + * @internal + */ const T_ELSEIF = 'elseif'; + /** + * @internal + */ const T_ERROR = 'error'; + /** + * @internal + */ const T_EXPRESSION = 'exp'; + /** + * @internal + */ const T_EXTEND = 'extend'; + /** + * @internal + */ const T_FOR = 'for'; const T_FUNCTION = 'function'; + /** + * @internal + */ const T_FUNCTION_REFERENCE = 'function-reference'; + /** + * @internal + */ const T_FUNCTION_CALL = 'fncall'; + /** + * @internal + */ const T_HSL = 'hsl'; + /** + * @internal + */ const T_HWB = 'hwb'; + /** + * @internal + */ const T_IF = 'if'; + /** + * @internal + */ const T_IMPORT = 'import'; + /** + * @internal + */ const T_INCLUDE = 'include'; + /** + * @internal + */ const T_INTERPOLATE = 'interpolate'; + /** + * @internal + */ const T_INTERPOLATED = 'interpolated'; + /** + * @internal + */ const T_KEYWORD = 'keyword'; const T_LIST = 'list'; const T_MAP = 'map'; + /** + * @internal + */ const T_MEDIA = 'media'; + /** + * @internal + */ const T_MEDIA_EXPRESSION = 'mediaExp'; + /** + * @internal + */ const T_MEDIA_TYPE = 'mediaType'; + /** + * @internal + */ const T_MEDIA_VALUE = 'mediaValue'; + /** + * @internal + */ const T_MIXIN = 'mixin'; + /** + * @internal + */ const T_MIXIN_CONTENT = 'mixin_content'; + /** + * @internal + */ const T_NESTED_PROPERTY = 'nestedprop'; + /** + * @internal + */ const T_NOT = 'not'; const T_NULL = 'null'; const T_NUMBER = 'number'; + /** + * @internal + */ const T_RETURN = 'return'; + /** + * @internal + */ const T_ROOT = 'root'; + /** + * @internal + */ const T_SCSSPHP_IMPORT_ONCE = 'scssphp-import-once'; + /** + * @internal + */ const T_SELF = 'self'; const T_STRING = 'string'; + /** + * @internal + */ const T_UNARY = 'unary'; + /** + * @internal + */ const T_VARIABLE = 'var'; + /** + * @internal + */ const T_WARN = 'warn'; + /** + * @internal + */ const T_WHILE = 'while'; } diff --git a/system/libs/scssphp/Util.php b/system/libs/scssphp/Util.php index 62cd2a20c..ad608ceb3 100644 --- a/system/libs/scssphp/Util.php +++ b/system/libs/scssphp/Util.php @@ -79,7 +79,7 @@ public static function encodeURIComponent($string) /** * mb_chr() wrapper * - * @param integer $code + * @param int $code * * @return string */ diff --git a/system/libs/scssphp/Version.php b/system/libs/scssphp/Version.php index be6a31037..f8d728475 100644 --- a/system/libs/scssphp/Version.php +++ b/system/libs/scssphp/Version.php @@ -19,5 +19,5 @@ */ class Version { - const VERSION = '1.9.0'; + const VERSION = '1.10.0'; } diff --git a/templates/.htaccess b/templates/.htaccess index e3942a4e5..d2d167dc5 100755 --- a/templates/.htaccess +++ b/templates/.htaccess @@ -1,4 +1,18 @@ -order allow,deny - - allow from all - +# apache > 2.2 + + Require all denied + +# apache <= 2.2 + + order allow,deny + + + # apache > 2.2 + + Require all granted + + # apache <= 2.2 + + allow from all + + \ No newline at end of file diff --git a/templates/default/controllers/admin/form_field.tpl.php b/templates/default/controllers/admin/form_field.tpl.php index 5f1d0767d..e7b672d1c 100755 --- a/templates/default/controllers/admin/form_field.tpl.php +++ b/templates/default/controllers/admin/form_field.tpl.php @@ -10,6 +10,7 @@