-
-
-
- diff --git a/config/app.php b/config/app.php index 0dddfdd0d..d073ca3bc 100644 --- a/config/app.php +++ b/config/app.php @@ -28,7 +28,7 @@ return [ | any other location as required by the application or its packages. */ - 'name' => 'October CMS', + 'name' => 'Orient news', /* |-------------------------------------------------------------------------- @@ -62,7 +62,7 @@ return [ | */ - 'timezone' => 'UTC', + 'timezone' => 'Asia/Ashgabat', /* |-------------------------------------------------------------------------- @@ -148,7 +148,7 @@ return [ */ 'loadDiscoveredPackages' => false, - + /* |-------------------------------------------------------------------------- | Class Aliases diff --git a/plugins/pollozen/mostvisited/Plugin.php b/plugins/pollozen/mostvisited/Plugin.php deleted file mode 100644 index 8b57c662b..000000000 --- a/plugins/pollozen/mostvisited/Plugin.php +++ /dev/null @@ -1,52 +0,0 @@ - 'Most Visited Posts', - 'description' => 'Register visit to RainLab Blog publication and retrieve the most visited publications', - 'author' => 'PolloZen', - 'icon' => 'icon-list-ul' - ]; - } - - /** - * Boot method, called right before the request route. - * - * @return array - */ - public function boot(){ - PostModel::extend(function($model){ - $model->hasMany['visits'] = ['PolloZen\MostVisited\Models\Visits']; - }); - - } - - /** - * Registers any front-end components implemented in this plugin. - * - * @return array - */ - public function registerComponents(){ - - return [ - 'PolloZen\MostVisited\Components\RegisterVisit' => 'registerVisit', - 'PolloZen\MostVisited\Components\TopVisited' => 'topPosts', - ]; - } -} diff --git a/plugins/pollozen/mostvisited/README.md b/plugins/pollozen/mostvisited/README.md deleted file mode 100644 index effca54b5..000000000 --- a/plugins/pollozen/mostvisited/README.md +++ /dev/null @@ -1,58 +0,0 @@ -#Most Visited Post for [RainLab Blog](https://octobercms.com/plugin/rainlab-blog) - -Plugin to register visits to [RainLab Blog](https://octobercms.com/plugin/rainlab-blog) Blog Publications and create a list of the most visited posts in a period of time - -##Installing the watcher -**IMPORTANT** - -In order to register the visit to a Publication `RegisterVisit` component must be added to Post Page - -##Create a most visited posts list -Add the `TopVisitedComponent` - -This component has parameters - -**Most Visited From** - The time period to get the most visited publications - -- Today -- Current Week -- Last Week -- All the time - -**Category filter** - -You can select a category filter, this way you can get the Top 10 from a particular category. If no category is selected, the component will retrieve the top 10 from all your publications - -**Top** - -How many publications must be retrieved - -###Examples - -Using these three parameters you can construct different lists. Eg. - -- **Last week**, top **10** from **local news** -- **Today** top **5** from **all the site** -- Top **10** from **all the site** in **all the time** - -###Displaying the results -The `TopVisitedComponent` inject the **mostVisitedPosts** object - - - -Use as you already use the RainLab blog post - -``` -{% for post in mostVisitedPosts %} -
Nothing to see here. This component is added to the post page in order to register the visit
\ No newline at end of file diff --git a/plugins/pollozen/mostvisited/components/topvisited/default.htm b/plugins/pollozen/mostvisited/components/topvisited/default.htm deleted file mode 100644 index eb8c94e16..000000000 --- a/plugins/pollozen/mostvisited/components/topvisited/default.htm +++ /dev/null @@ -1,18 +0,0 @@ -{% set mostVisitedPosts = __SELF__.mostVisitedPosts %} -= e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/reklama/controllers/groupscontroller/index.htm b/plugins/tps/reklama/controllers/groupscontroller/index.htm new file mode 100644 index 000000000..ea43a3636 --- /dev/null +++ b/plugins/tps/reklama/controllers/groupscontroller/index.htm @@ -0,0 +1 @@ += $this->listRender() ?> diff --git a/plugins/tps/reklama/controllers/groupscontroller/preview.htm b/plugins/tps/reklama/controllers/groupscontroller/preview.htm new file mode 100644 index 000000000..b583e5be7 --- /dev/null +++ b/plugins/tps/reklama/controllers/groupscontroller/preview.htm @@ -0,0 +1,22 @@ + ++ + = e(trans('backend::lang.form.return_to_list')) ?> + +
\ No newline at end of file diff --git a/plugins/tps/reklama/controllers/groupscontroller/update.htm b/plugins/tps/reklama/controllers/groupscontroller/update.htm new file mode 100644 index 000000000..f27c1bbed --- /dev/null +++ b/plugins/tps/reklama/controllers/groupscontroller/update.htm @@ -0,0 +1,54 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/reklama/controllers/reklamascontroller/_list_toolbar.htm b/plugins/tps/reklama/controllers/reklamascontroller/_list_toolbar.htm new file mode 100644 index 000000000..2d721f4bc --- /dev/null +++ b/plugins/tps/reklama/controllers/reklamascontroller/_list_toolbar.htm @@ -0,0 +1,18 @@ + diff --git a/plugins/tps/reklama/controllers/reklamascontroller/config_form.yaml b/plugins/tps/reklama/controllers/reklamascontroller/config_form.yaml new file mode 100644 index 000000000..02744863c --- /dev/null +++ b/plugins/tps/reklama/controllers/reklamascontroller/config_form.yaml @@ -0,0 +1,10 @@ +name: ReklamasController +form: $/tps/reklama/models/reklama/fields.yaml +modelClass: Tps\Reklama\Models\Reklama +defaultRedirect: tps/reklama/reklamascontroller +create: + redirect: 'tps/reklama/reklamascontroller/update/:id' + redirectClose: tps/reklama/reklamascontroller +update: + redirect: tps/reklama/reklamascontroller + redirectClose: tps/reklama/reklamascontroller diff --git a/plugins/tps/reklama/controllers/reklamascontroller/config_list.yaml b/plugins/tps/reklama/controllers/reklamascontroller/config_list.yaml new file mode 100644 index 000000000..47471683c --- /dev/null +++ b/plugins/tps/reklama/controllers/reklamascontroller/config_list.yaml @@ -0,0 +1,12 @@ +title: ReklamasController +modelClass: Tps\Reklama\Models\Reklama +list: $/tps/reklama/models/reklama/columns.yaml +recordUrl: 'tps/reklama/reklamascontroller/update/:id' +noRecordsMessage: 'backend::lang.list.no_records' +recordsPerPage: 20 +showSetup: true +showCheckboxes: true +toolbar: + buttons: list_toolbar + search: + prompt: 'backend::lang.list.search_prompt' diff --git a/plugins/tps/reklama/controllers/reklamascontroller/create.htm b/plugins/tps/reklama/controllers/reklamascontroller/create.htm new file mode 100644 index 000000000..7c0451f9f --- /dev/null +++ b/plugins/tps/reklama/controllers/reklamascontroller/create.htm @@ -0,0 +1,46 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/reklama/controllers/reklamascontroller/index.htm b/plugins/tps/reklama/controllers/reklamascontroller/index.htm new file mode 100644 index 000000000..ea43a3636 --- /dev/null +++ b/plugins/tps/reklama/controllers/reklamascontroller/index.htm @@ -0,0 +1 @@ += $this->listRender() ?> diff --git a/plugins/tps/reklama/controllers/reklamascontroller/preview.htm b/plugins/tps/reklama/controllers/reklamascontroller/preview.htm new file mode 100644 index 000000000..7ce5d0964 --- /dev/null +++ b/plugins/tps/reklama/controllers/reklamascontroller/preview.htm @@ -0,0 +1,22 @@ + ++ + = e(trans('backend::lang.form.return_to_list')) ?> + +
\ No newline at end of file diff --git a/plugins/tps/reklama/controllers/reklamascontroller/update.htm b/plugins/tps/reklama/controllers/reklamascontroller/update.htm new file mode 100644 index 000000000..1fbc39c6e --- /dev/null +++ b/plugins/tps/reklama/controllers/reklamascontroller/update.htm @@ -0,0 +1,54 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/reklama/lang/en/lang.php b/plugins/tps/reklama/lang/en/lang.php new file mode 100644 index 000000000..6b624675a --- /dev/null +++ b/plugins/tps/reklama/lang/en/lang.php @@ -0,0 +1,6 @@ + [ + 'name' => 'Reklama', + 'description' => '' + ] +]; \ No newline at end of file diff --git a/plugins/tps/reklama/models/Group.php b/plugins/tps/reklama/models/Group.php new file mode 100644 index 000000000..63349895e --- /dev/null +++ b/plugins/tps/reklama/models/Group.php @@ -0,0 +1,42 @@ + ['Tps\Reklama\Models\Reklama', + 'table' => 'tps_reklama_item', + 'count' => true + ], + 'adds' => ['Tps\Reklama\Models\Reklama', + 'table' => 'tps_reklama_item', + 'scope' => 'unExpiered' +// 'order' => 'order asc', +// 'condition' => 'active = 1' + ], + ]; +} diff --git a/plugins/tps/reklama/models/Reklama.php b/plugins/tps/reklama/models/Reklama.php new file mode 100644 index 000000000..c9cc82b38 --- /dev/null +++ b/plugins/tps/reklama/models/Reklama.php @@ -0,0 +1,50 @@ + ['Tps\Reklama\Models\Group', + 'table' => 'tps_reklama_group', + 'order' => 'name' + ], + ]; + + public function scopeUnExpiered($query){ + return $query->where('active',1) + ->where(function ($q) { + $q->where('end_date', '>', Carbon::now(config('app.timezone'))) + ->orWhereNull('end_date'); + }) + ->where(function ($q) { + $q->where('start_date', '<', Carbon::now(config('app.timezone'))) + ->orWhereNull('start_date'); + }) + ->orderBy('order'); + } +} diff --git a/plugins/tps/reklama/models/group/columns.yaml b/plugins/tps/reklama/models/group/columns.yaml new file mode 100644 index 000000000..0ed3b3b87 --- /dev/null +++ b/plugins/tps/reklama/models/group/columns.yaml @@ -0,0 +1,17 @@ +columns: + code: + label: Code + type: text + searchable: true + sortable: true + name: + label: Name + type: text + searchable: true + sortable: true + adds_count: + label: Items + type: number + sortable: true + relation: adds_count + valueFrom: count diff --git a/plugins/tps/reklama/models/group/fields.yaml b/plugins/tps/reklama/models/group/fields.yaml new file mode 100644 index 000000000..130d0cc32 --- /dev/null +++ b/plugins/tps/reklama/models/group/fields.yaml @@ -0,0 +1,12 @@ +fields: + name: + label: Name + span: left + type: text + comment: 'Group name' + code: + label: Code + span: auto + required: 1 + type: text + comment: 'Group code' diff --git a/plugins/tps/reklama/models/reklama/columns.yaml b/plugins/tps/reklama/models/reklama/columns.yaml new file mode 100644 index 000000000..5782b253a --- /dev/null +++ b/plugins/tps/reklama/models/reklama/columns.yaml @@ -0,0 +1,18 @@ +columns: + title: + label: title + type: text + url: + label: url + type: text + start_date: + label: start_date + type: datetime + end_date: + label: end_date + type: datetime + group: + label: group + type: text + relation: group + valueFrom: name diff --git a/plugins/tps/reklama/models/reklama/fields.yaml b/plugins/tps/reklama/models/reklama/fields.yaml new file mode 100644 index 000000000..839f9f1e1 --- /dev/null +++ b/plugins/tps/reklama/models/reklama/fields.yaml @@ -0,0 +1,53 @@ +fields: + title: + label: Title + span: auto + type: text + desciption: + label: Description + span: auto + type: text + url: + label: Url + span: auto + type: text + comment: 'link where to redirect on click' + group: + label: Group + nameFrom: code + descriptionFrom: name + span: auto + required: 1 + type: relation + order: + label: 'Sort order' + span: auto + type: number + comment: 'Sorts in ascending order' + start_date: + label: 'Start Date' + mode: datetime + span: auto + type: datepicker + comment: 'Date when will start showing (leave blank for immediate showing)' + media: + label: 'Media file' + mode: image + span: auto + type: mediafinder + end_date: + label: 'End Date' + mode: datetime + span: auto + type: datepicker + comment: 'Date when will end showing (leave blank for endless show)' + enable_stats: + label: 'Statistics counter' + span: auto + type: switch + comment: 'Enable,disabel counter for views and clicks' + active: + label: Status + span: auto + type: switch + comment: 'Enable, disable status' diff --git a/plugins/tps/reklama/plugin.yaml b/plugins/tps/reklama/plugin.yaml new file mode 100644 index 000000000..b3aaec3aa --- /dev/null +++ b/plugins/tps/reklama/plugin.yaml @@ -0,0 +1,28 @@ +plugin: + name: 'tps.reklama::lang.plugin.name' + description: 'tps.reklama::lang.plugin.description' + author: TPS + icon: oc-icon-ge + homepage: '' +navigation: + main-menu-item: + label: Reklama + url: tps/reklama/groupscontroller + icon: icon-empire + sideMenu: + side-menu-item: + label: Groups + url: tps/reklama/groupscontroller + icon: icon-sitemap + side-menu-item2: + label: Reklama + url: tps/reklama/reklamascontroller + icon: icon-star + side-menu-item3: + label: Statistics + url: tps/reklama/groupscontroller + icon: icon-line-chart +permissions: + reklama: + tab: Reklama + label: Rerklama diff --git a/plugins/tps/reklama/updates/builder_table_create_tps_reklama_group.php b/plugins/tps/reklama/updates/builder_table_create_tps_reklama_group.php new file mode 100644 index 000000000..679efac61 --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_create_tps_reklama_group.php @@ -0,0 +1,23 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->string('name')->nullable(); + $table->string('code'); + }); + } + + public function down() + { + Schema::dropIfExists('tps_reklama_group'); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_create_tps_reklama_item.php b/plugins/tps/reklama/updates/builder_table_create_tps_reklama_item.php new file mode 100644 index 000000000..eef2e0143 --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_create_tps_reklama_item.php @@ -0,0 +1,30 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->string('title', 255)->nullable(); + $table->string('desciption', 255)->nullable(); + $table->string('url', 255)->nullable(); + $table->string('media', 255); + $table->dateTime('start_date')->nullable(); + $table->dateTime('end_date')->nullable(); + $table->timestamp('created_at')->nullable(); + $table->timestamp('updated_at')->nullable(); + $table->integer('group_id')->unsigned(); + }); + } + + public function down() + { + Schema::dropIfExists('tps_reklama_item'); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_create_tps_reklama_statistika.php b/plugins/tps/reklama/updates/builder_table_create_tps_reklama_statistika.php new file mode 100644 index 000000000..3d5f3677d --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_create_tps_reklama_statistika.php @@ -0,0 +1,24 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->integer('click')->unsigned(); + $table->integer('view')->unsigned(); + $table->date('date'); + }); + } + + public function down() + { + Schema::dropIfExists('tps_reklama_statistika'); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item.php new file mode 100644 index 000000000..c0c32351c --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item.php @@ -0,0 +1,25 @@ +smallInteger('order')->unsigned()->default(0); + $table->boolean('active')->default(1); + }); + } + + public function down() + { + Schema::table('tps_reklama_item', function($table) + { + $table->dropColumn('order'); + $table->dropColumn('active'); + }); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_2.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_2.php new file mode 100644 index 000000000..ea4bae710 --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_2.php @@ -0,0 +1,23 @@ +boolean('enable_stats')->default(0); + }); + } + + public function down() + { + Schema::table('tps_reklama_item', function($table) + { + $table->dropColumn('enable_stats'); + }); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_statistika.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_statistika.php new file mode 100644 index 000000000..1bdd8f7f1 --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_statistika.php @@ -0,0 +1,23 @@ +integer('item_id')->unsigned(); + }); + } + + public function down() + { + Schema::table('tps_reklama_statistika', function($table) + { + $table->dropColumn('item_id'); + }); + } +} diff --git a/plugins/tps/reklama/updates/version.yaml b/plugins/tps/reklama/updates/version.yaml new file mode 100644 index 000000000..9e2660676 --- /dev/null +++ b/plugins/tps/reklama/updates/version.yaml @@ -0,0 +1,20 @@ +1.0.1: + - 'Initialize plugin.' +1.0.2: + - 'Created table tps_reklama_item' + - builder_table_create_tps_reklama_item.php +1.0.3: + - 'Created table tps_reklama_group' + - builder_table_create_tps_reklama_group.php +1.0.4: + - 'Created table tps_reklama_statistika' + - builder_table_create_tps_reklama_statistika.php +1.0.5: + - 'Updated table tps_reklama_statistika' + - builder_table_update_tps_reklama_statistika.php +1.0.6: + - 'Updated table tps_reklama_item' + - builder_table_update_tps_reklama_item.php +1.0.7: + - 'Updated table tps_reklama_item' + - builder_table_update_tps_reklama_item_2.php diff --git a/scripts/post.sql b/scripts/post.sql index 837456a5b..4a75936c7 100644 --- a/scripts/post.sql +++ b/scripts/post.sql @@ -16,3 +16,12 @@ set rb.featerd_image = wp.guid ////////////// 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.pollozen_mostvisited_visits (post_id,date,visits) +select rb.id, pp.view_date , pp.pageviews FROM orient_wordpress.iatm_orient_2_popularpostssummary pp +INNER join orient.rainlab_blog_posts rb on rb.id_en = pp.postid diff --git a/themes/modern/assets/images/example.svg b/themes/modern/assets/images/example.svg new file mode 100755 index 000000000..71a907ff8 --- /dev/null +++ b/themes/modern/assets/images/example.svg @@ -0,0 +1,3 @@ + diff --git a/themes/modern/assets/images/news/1.png b/themes/modern/assets/images/news/1.png new file mode 100755 index 000000000..c681bc55b Binary files /dev/null and b/themes/modern/assets/images/news/1.png differ diff --git a/themes/modern/assets/images/news/2.png b/themes/modern/assets/images/news/2.png new file mode 100755 index 000000000..6b4363007 Binary files /dev/null and b/themes/modern/assets/images/news/2.png differ diff --git a/themes/modern/assets/images/news/3.png b/themes/modern/assets/images/news/3.png new file mode 100755 index 000000000..1fdf6ab76 Binary files /dev/null and b/themes/modern/assets/images/news/3.png differ diff --git a/themes/modern/config/lang.yaml b/themes/modern/config/lang.yaml index 18a50201d..15454afdf 100644 --- a/themes/modern/config/lang.yaml +++ b/themes/modern/config/lang.yaml @@ -23,7 +23,7 @@ ru: page.tags: 'ТЭГИ' page.calendar: 'КАЛЕНДАРЬ НОВОСТЕЙ' page.latest_news: 'Последние новости' - page.more: 'Ещё' + page.more: 'Посмотреть всё' page.search: 'Поиск' page.search_result: 'По результату поиска было найдено: :number статьи' contact: 'НАШИ КОНТАКТЫ' diff --git a/themes/modern/config/settings.yaml b/themes/modern/config/settings.yaml index 17b9c29b7..227c6950b 100644 --- a/themes/modern/config/settings.yaml +++ b/themes/modern/config/settings.yaml @@ -55,4 +55,9 @@ tabs: label: Linkedin default: span: auto + topCategory: + tab: Home Page + label: Top section cateegory + default: events + span: left diff --git a/themes/modern/pages/index.htm b/themes/modern/pages/index.htm index 72317c352..3354c2a5f 100644 --- a/themes/modern/pages/index.htm +++ b/themes/modern/pages/index.htm @@ -7,334 +7,25 @@ robot_follow = "follow" [viewBag] localeTitle[en] = "Home" + +[blogCategories] +slug = "{{ :slug }}" +displayEmpty = 0 +categoryPage = "category" + +[adverts media_partners] +code = "media" +type = "slider" == {% partial 'slider' %} + + + + + -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+