diff --git a/scripts/category.sql b/scripts/category.sql index 5a7342de8..1c9fd37b5 100644 --- a/scripts/category.sql +++ b/scripts/category.sql @@ -30,6 +30,7 @@ SELECT rb.id, bt.id FROM orient_wordpress.`iatm_orient_2_term_relationships` rl Inner JOIN orient.rainlab_blog_categories bt on bt.id = rl.term_taxonomy_id INNER JOIN orient.rainlab_blog_posts rb on rl.object_id = rb.id_en + update iatm_orient_term_relationships SET term_taxonomy_id = 9 where term_taxonomy_id = 2; update iatm_orient_term_relationships SET term_taxonomy_id = 5 where term_taxonomy_id = 3; update iatm_orient_term_relationships SET term_taxonomy_id = 8 where term_taxonomy_id = 5; @@ -40,7 +41,11 @@ update iatm_orient_term_relationships SET term_taxonomy_id = 6 where term_taxono update iatm_orient_term_relationships SET term_taxonomy_id = 7 where term_taxonomy_id = 26; update iatm_orient_term_relationships SET term_taxonomy_id = 14 where term_taxonomy_id = 29; update iatm_orient_term_relationships SET term_taxonomy_id = 12 where term_taxonomy_id = 41; -update iatm_orient_term_relationships SET term_taxonomy_id = 793 where term_taxonomy_id = 41; +update iatm_orient_term_relationships SET term_taxonomy_id = 793 where term_taxonomy_id = 101; update iatm_orient_term_relationships SET term_taxonomy_id = 621 where term_taxonomy_id = 696; +INSERT INTO rainlab_blog_posts_categories (post_id,category_id) +SELECT rb.id, bt.id FROM `iatm_orient_term_relationships` rl + Inner JOIN rainlab_blog_categories bt on bt.id = rl.term_taxonomy_id + INNER JOIN rainlab_blog_posts rb on rl.object_id = rb.id_ru and rb.locale='ru' diff --git a/scripts/post.sql b/scripts/post.sql index 0d7d588a5..b0aad7d12 100644 --- a/scripts/post.sql +++ b/scripts/post.sql @@ -30,19 +30,26 @@ UPDATE rainlab_blog_posts rb ALTER TABLE `rainlab_blog_posts` CHANGE `featured_image` `featured_image` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL; UPDATE rainlab_blog_posts rb - inner join orient_wordpress.iatm_orient_postmeta ip on rb.id_ru = ip.post_id and ip.meta_key='_thumbnail_id' - inner join orient_wordpress.arient_ru_posts wp on wp.ID = ip.meta_value - set rb.featured_image = REPLACE(wp.guid,'https://orient.tm/en/wp-content/','/ru/') + inner join iatm_orient_postmeta ip on rb.id_ru = ip.post_id and ip.meta_key='_thumbnail_id' + inner join iatm_orient_posts wp on wp.ID = ip.meta_value + set rb.featured_image = REPLACE(REPLACE(wp.guid,'https://orient.tm/wp-content/uploads/','/ru/'),'http://orient.tm/wp-content/uploads/','/ru/') +where rb.locale = 'ru' ////////////// replace image address UPDATE rainlab_blog_posts set featured_image = REPLACE(featured_image,'https://orient.tm/en/wp-content/','') where featured_image !='' ///////////////////////post views////// -INSERT INTO orient.vdomah_blogviews_views (views,post_id) -select pp.pageviews,rb.id FROM orient_wordpress.iatm_orient_2_popularpostsdata pp -INNER join orient.rainlab_blog_posts rb on rb.id_en = pp.postid -INSERT INTO orient.vdomah_blogviews_views (views,post_id) -select pp.pageviews,rb.id FROM orient_wordpress.iatm_orient_popularpostsdata pp - INNER join orient.rainlab_blog_posts rb on rb.id_ru = pp.postid AND rb.locale = 'ru' +INSERT INTO vdomah_blogviews_views (views,post_id) +select pp.meta_value,rb.id FROM iatm_orient_2_postmeta pp + INNER join rainlab_blog_posts rb on rb.id_en = pp.post_id AND rb.locale = 'en' and pp.meta_key = 'views'; +INSERT IGNORE INTO vdomah_blogviews_views (views,post_id) +select pp.meta_value,rb.id FROM iatm_orient_postmeta pp + INNER join rainlab_blog_posts rb on rb.id_ru = pp.post_id AND rb.locale = 'ru' and pp.meta_key = 'views'; +////post inside image +UPDATE rainlab_blog_posts set content = replace(content,'http://orient.tm/wp-content/uploads/','storage/app/media/ru/') +UPDATE rainlab_blog_posts set content = replace(content,'https://orient.tm/wp-content/uploads/','storage/app/media/ru/'), content_html = REPLACE(content_html,'https://orient.tm/wp-content/uploads/','storage/app/media/ru/') + +UPDATE rainlab_blog_posts set content = replace(content,'https://orient.tm/en/wp-content/uploads/sites/2/','storage/app/media/en/'), content_html = REPLACE(content_html,'https://orient.tm/en/wp-content/uploads/sites/2/','storage/app/media/en/') +where content_html LIKE '%https://orient.tm/en/wp-content/uploads/sites/2/%' diff --git a/scripts/tags.sql b/scripts/tags.sql index 8cfbf50c0..cbcd77504 100644 --- a/scripts/tags.sql +++ b/scripts/tags.sql @@ -5,9 +5,11 @@ LEFT JOIN orient_wordpress.iatm_orient_2_terms tm ON ta.`term_id` = tm.term_id WHERE ta.taxonomy = 'post_tag'; -INSERT INTO orient.bedard_blogtags_post_tag (tag_id,post_id) +INSERT INTO bedard_blogtags_post_tag (tag_id,post_id) SELECT bt.id, rb.id FROM `iatm_orient_2_term_relationships` rl -LEFT JOIN iatm_orient_2_term_taxonomy tx ON rl.term_taxonomy_id = tx.term_taxonomy_id -LEFT JOIN orient.rainlab_blog_posts rb on rl.object_id = rb.id_en -LEFT JOIN orient.bedard_blogtags_tags bt on bt.id_en = rl.term_taxonomy_id -WHERE tx.taxonomy = 'post_tag' + LEFT JOIN iatm_orient_2_term_taxonomy tx ON rl.term_taxonomy_id = tx.term_taxonomy_id + LEFT JOIN rainlab_blog_posts rb on rl.object_id = rb.id_en + LEFT JOIN bedard_blogtags_tags bt on bt.id_en = rl.term_taxonomy_id +where tx.taxonomy = 'post_tag' and bt.locale ='en' + +ALTER TABLE `bedard_blogtags_tags` ADD UNIQUE `unique_index`(`name`, `locale`); diff --git a/themes/modern/pages/index.htm b/themes/modern/pages/index.htm index 42d1ae5d0..826bc98cd 100644 --- a/themes/modern/pages/index.htm +++ b/themes/modern/pages/index.htm @@ -32,6 +32,31 @@ random = 0 code = "bottom" type = "slider" random = 0 + +[adverts adv_bottom_2] +code = "cnpc" +type = "slider" +random = 0 + +[adverts adv_bottom_3] +code = "china-daily" +type = "single" +random = 0 + +[adverts right_top] +code = "right-top" +type = "single" +random = 0 + +[adverts right_middle] +code = "right-middle" +type = "single" +random = 0 + +[adverts right_bottom] +code = "right-bottom" +type = "single" +random = 0 == {% partial 'slider' %} @@ -77,7 +102,7 @@ random = 0
- + {% component 'adv_bottom_2' %}
@@ -86,7 +111,7 @@ random = 0
- + {% component 'adv_bottom_3' %}
{% partial 'index/partner_news'%} @@ -94,15 +119,10 @@ random = 0
ИНТЕРЕСНЫЕ ССЫЛКИ
- - - - - - - - - + {% component 'right_top' %} + {% component 'right_middle' %} + {% component 'right_bottom' %} + {% partial 'tags' %} {% partial 'calendar' %}