diff --git a/install.php b/install.php index 7554aee..cf2abcf 100644 --- a/install.php +++ b/install.php @@ -16,3 +16,10 @@ rex_media_service::addMedia($data, false); } + +/* Cronjob installieren */ +$cronjob = array_filter(rex_sql::factory()->getArray("SELECT * FROM rex_category WHERE `type` = 'rex_cronjob_neues_publish'")); +if(!$cronjob) { + $query = rex_file::get(rex_path::addon('neues', 'install/rex_cronjob_neues_publish.sql')); + rex_sql::factory()->setQuery($query); +} diff --git a/install/rex_cronjob_neues_publish.sql b/install/rex_cronjob_neues_publish.sql new file mode 100644 index 0000000..c637b45 --- /dev/null +++ b/install/rex_cronjob_neues_publish.sql @@ -0,0 +1,4 @@ +SET NAMES utf8mb4; + +INSERT INTO `rex_cronjob` (`name`, `description`, `type`, `parameters`, `interval`, `nexttime`, `environment`, `execution_moment`, `execution_start`, `status`, `createdate`, `createuser`, `updatedate`, `updateuser`) VALUES +('[neues] Geplante Beiträge veröffentlichen', 'Veröffentlicht alle Beiträge (status = 1), deren Status geplant (status = 0) ist und deren Veröffentlichungszeitpunkt erreicht wurde (publishdate < now()).', 'rex_cronjob_neues_publish', '[]', '{\"minutes\":\"all\",\"hours\":\"all\",\"days\":\"all\",\"weekdays\":\"all\",\"months\":\"all\"}', NOW(), '|frontend|backend|script|', 0, NOW(), 1, NOW(), 'neues', NOW(), 'neues'); diff --git a/install/tableset.json b/install/tableset.json index c928239..f5e7f48 100644 --- a/install/tableset.json +++ b/install/tableset.json @@ -1 +1,842 @@ -{"rex_neues_category":{"table":{"status":1,"table_name":"rex_neues_category","name":"\ud83d\udcf0 Tags","description":"","list_amount":50,"list_sortfield":"name","list_sortorder":"ASC","search":0,"hidden":1,"export":0,"import":0,"mass_deletion":0,"mass_edit":0,"schema_overwrite":1,"history":0,"createdate":"0000-00-00 00:00:00","updatedate":"0000-00-00 00:00:00","createuser":"","updateuser":""},"fields":[{"table_name":"rex_neues_category","prio":1,"type_id":"value","type_name":"be_manager_relation","db_type":"text","list_hidden":0,"search":1,"name":"date_id","label":"translate:neues_date_ids","not_required":"","attributes":"","notice":"translate:neues_date_id_notice","table":"rex_neues_entry","empty_option":"1","size":"","field":"category_ids","type":"4","empty_value":"","relation_table":"rex_neues_entry_category_rel","filter":""},{"table_name":"rex_neues_category","prio":2,"type_id":"value","type_name":"text","db_type":"varchar(191)","list_hidden":0,"search":1,"name":"name","label":"translate:neues_category_title","not_required":"","attributes":"{\"required\":\"required\"}","default":"","no_db":"0","notice":"translate:neues_external_url_notice","append":"","prepend":""},{"table_name":"rex_neues_category","prio":3,"type_id":"validate","type_name":"unique","db_type":"","list_hidden":1,"search":0,"name":"name","label":"","not_required":"","table":"","empty_option":"0","message":"translate:neues_category_name_validate_unique"},{"table_name":"rex_neues_category","prio":4,"type_id":"value","type_name":"be_media_preview","db_type":"text","list_hidden":1,"search":0,"name":"image","label":"translate:neues_category_image","not_required":"","multiple":"0","notice":"","types":"jpg,jpeg,png,gif,svg","preview":"1","category":""},{"table_name":"rex_neues_category","prio":5,"type_id":"value","type_name":"choice","db_type":"text","list_hidden":1,"search":1,"name":"status","label":"translate:neues_status","not_required":"","multiple":"0","expanded":"0","choices":"translate:neues_status_offline=0,translate:neues_status_online=1","choice_attributes":"","attributes":"","default":"0","no_db":"0","notice":"translate:neues_category_status_notice","preferred_choices":"","group_by":"","placeholder":"","group_attributes":"","choice_label":""},{"table_name":"rex_neues_category","prio":6,"type_id":"value","type_name":"be_user","db_type":"varchar(191)","list_hidden":1,"search":0,"name":"createuser","label":"translate:neues_createuser","not_required":"","only_empty":"1","show_value":"0"},{"table_name":"rex_neues_category","prio":7,"type_id":"value","type_name":"be_user","db_type":"varchar(191)","list_hidden":1,"search":0,"name":"updateuser","label":"translate:neues_updateuser","not_required":"","only_empty":"0","show_value":"0"},{"table_name":"rex_neues_category","prio":8,"type_id":"value","type_name":"datestamp","db_type":"datetime","list_hidden":1,"search":0,"name":"updatedate","label":"translate:neues_updatedate","not_required":"","no_db":"0","only_empty":"0","format":"Y-m-d H:i:s","modify_default":""},{"table_name":"rex_neues_category","prio":9,"type_id":"value","type_name":"datestamp","db_type":"datetime","list_hidden":1,"search":0,"name":"createdate","label":"translate:neues_createdate","not_required":"","no_db":"0","only_empty":"1","format":"Y-m-d H:i:s","modify_default":""}]},"rex_neues_entry":{"table":{"status":1,"table_name":"rex_neues_entry","name":"\ud83d\udcf0 News","description":"","list_amount":500,"list_sortfield":"publishdate","list_sortorder":"DESC","search":1,"hidden":1,"export":1,"import":1,"mass_deletion":0,"mass_edit":0,"schema_overwrite":1,"history":0,"createdate":"0000-00-00 00:00:00","updatedate":"0000-00-00 00:00:00","createuser":"","updateuser":""},"fields":[{"table_name":"rex_neues_entry","prio":1,"type_id":"value","type_name":"html","db_type":"none","list_hidden":0,"search":0,"name":"row_start","label":"","not_required":"","html":"
\r\n
"},{"table_name":"rex_neues_entry","prio":2,"type_id":"value","type_name":"choice","db_type":"text","list_hidden":1,"search":0,"name":"status","label":"translate:neues_status","not_required":"","multiple":"0","expanded":"0","choices":"translate:neues_status_offline=-1,translate:neues_status_draft=0,translate:neues_status_online=1","choice_attributes":"","attributes":"","default":"","no_db":"0","notice":"translate:neues_status_notice","preferred_choices":"","group_by":"","placeholder":"","group_attributes":"","choice_label":""},{"table_name":"rex_neues_entry","prio":3,"type_id":"value","type_name":"text","db_type":"varchar(191)","list_hidden":0,"search":1,"name":"name","label":"translate:neues_name","not_required":"","attributes":"{\"required\":\"required\"}","default":"","no_db":"0","notice":"transalte:neues_name_notice","append":"","prepend":""},{"table_name":"rex_neues_entry","prio":4,"type_id":"validate","type_name":"empty","db_type":"","list_hidden":1,"search":0,"name":"name","label":"","not_required":"","message":"translate:neues_name_validate_empty"},{"table_name":"rex_neues_entry","prio":5,"type_id":"value","type_name":"textarea","db_type":"text","list_hidden":1,"search":0,"name":"teaser","label":"translate:neues_teaser","not_required":"","attributes":"{\"style\":\"max-height: 100px;\"}","default":"","no_db":"0","notice":"translate:neues_teaser_notice"},{"table_name":"rex_neues_entry","prio":6,"type_id":"value","type_name":"textarea","db_type":"text","list_hidden":1,"search":0,"name":"description","label":"translate:neues_description","not_required":"","attributes":"{\"class\":\"###neues-settings-editor###\"}","default":"","no_db":"0","notice":"translate:neues_description_notice"},{"table_name":"rex_neues_entry","prio":7,"type_id":"value","type_name":"domain","db_type":"text","list_hidden":1,"search":1,"name":"domain_ids","label":"translate:neues_domain_ids","not_required":"","attributes":"","notice":"translate:neues_domain_ids_notice"},{"table_name":"rex_neues_entry","prio":8,"type_id":"value","type_name":"be_manager_relation","db_type":"text","list_hidden":1,"search":0,"name":"lang_id","label":"translate:neues_language","not_required":"","attributes":"","notice":"","table":"rex_neues_entry_lang","empty_option":"1","size":"","field":"name","type":"0","empty_value":"","relation_table":"","filter":""},{"table_name":"rex_neues_entry","prio":9,"type_id":"value","type_name":"html","db_type":"none","list_hidden":0,"search":0,"name":"col","label":"","not_required":"","html":"<\/div>\r\n
"},{"table_name":"rex_neues_entry","prio":10,"type_id":"value","type_name":"datetime_local","db_type":"datetime","list_hidden":0,"search":0,"name":"publishdate","label":"translate:neues_publishdate","not_required":"","attributes":"{\"requried\":\"required\"}","no_db":"0","notice":"","current_date":"1","max":"","min":""},{"table_name":"rex_neues_entry","prio":11,"type_id":"value","type_name":"be_manager_relation","db_type":"int(10) unsigned","list_hidden":0,"search":1,"name":"author_id","label":"translate:neues_entry_author_id","not_required":"","attributes":"","notice":"","table":"rex_neues_author","empty_option":"1","size":"","field":"name","type":"2","empty_value":"","relation_table":"","filter":""},{"table_name":"rex_neues_entry","prio":12,"type_id":"validate","type_name":"compare_value","db_type":"","list_hidden":1,"search":0,"name":"publishdate","label":"","not_required":"","message":"translate:neues_publishdate_validate_compare_value","compare_type":"==","compare_value":"0000-00-00 00:00:00"},{"table_name":"rex_neues_entry","prio":13,"type_id":"value","type_name":"html","db_type":"none","list_hidden":0,"search":0,"name":"col2","label":"","not_required":"","html":"<\/div>\r\n
"},{"table_name":"rex_neues_entry","prio":14,"type_id":"value","type_name":"text","db_type":"varchar(191)","list_hidden":1,"search":0,"name":"url","label":"translate:neues_external_url","not_required":"","attributes":"","default":"","no_db":"0","notice":"translate:neues_external_url_notice","append":"","prepend":""},{"table_name":"rex_neues_entry","prio":15,"type_id":"validate","type_name":"type","db_type":"","list_hidden":1,"search":0,"name":"url","label":"","not_required":"1","type":"url","message":"translate:neues_external_url_validate_url"},{"table_name":"rex_neues_entry","prio":16,"type_id":"value","type_name":"be_manager_relation","db_type":"text","list_hidden":0,"search":1,"name":"category_ids","label":"translate:neues_category_ids","not_required":"","attributes":"","notice":"","table":"rex_neues_category","empty_option":"1","size":"","field":"name","type":"3","empty_value":"","relation_table":"rex_neues_entry_category_rel","filter":""},{"table_name":"rex_neues_entry","prio":17,"type_id":"value","type_name":"be_media_preview","db_type":"text","list_hidden":0,"search":0,"name":"image","label":"translate:neues_image","not_required":"","multiple":"0","notice":"","types":"svg,jpg,jpeg,gif,png","preview":"1","category":""},{"table_name":"rex_neues_entry","prio":18,"type_id":"value","type_name":"be_media","db_type":"text","list_hidden":1,"search":0,"name":"images","label":"translate:neues_images","not_required":"","multiple":"1","notice":"","types":"jpg,png","preview":"1","category":""},{"table_name":"rex_neues_entry","prio":19,"type_id":"value","type_name":"html","db_type":"none","list_hidden":0,"search":0,"name":"row_end","label":"","not_required":"","html":"<\/div>\r\n<\/div>"},{"table_name":"rex_neues_entry","prio":20,"type_id":"value","type_name":"datestamp","db_type":"datetime","list_hidden":1,"search":0,"name":"createdate","label":"translate:neues_createdate","not_required":"","no_db":"0","only_empty":"1","format":"","modify_default":""},{"table_name":"rex_neues_entry","prio":21,"type_id":"value","type_name":"be_user","db_type":"varchar(191)","list_hidden":1,"search":0,"name":"createuser","label":"translate:neues_createuser","not_required":"","only_empty":"1","show_value":"0"},{"table_name":"rex_neues_entry","prio":22,"type_id":"value","type_name":"datestamp","db_type":"datetime","list_hidden":1,"search":0,"name":"updatedate","label":"translate:neues_updateuser","not_required":"","no_db":"0","only_empty":"0","format":"","modify_default":""},{"table_name":"rex_neues_entry","prio":23,"type_id":"value","type_name":"be_user","db_type":"varchar(191)","list_hidden":1,"search":0,"name":"updateuser","label":"translate:neues_updateuser","not_required":"","only_empty":"0","show_value":"0"}]},"rex_neues_entry_lang":{"table":{"status":1,"table_name":"rex_neues_entry_lang","name":"\ud83d\udcf0 Sprache","description":"","list_amount":50,"list_sortfield":"id","list_sortorder":"ASC","search":0,"hidden":1,"export":0,"import":0,"mass_deletion":0,"mass_edit":0,"schema_overwrite":1,"history":0,"createdate":"0000-00-00 00:00:00","updatedate":"0000-00-00 00:00:00","createuser":"","updateuser":""},"fields":[{"table_name":"rex_neues_entry_lang","prio":1,"type_id":"value","type_name":"be_manager_relation","db_type":"text","list_hidden":0,"search":0,"name":"entry","label":"translate:neues_language_entry","not_required":"","attributes":"","notice":"translate:neues_language_entry_notice","table":"rex_neues_entry","empty_option":"1","size":"","field":"lang_id","type":"4","empty_value":"","relation_table":"rex_neues_entry","filter":""},{"table_name":"rex_neues_entry_lang","prio":2,"type_id":"value","type_name":"text","db_type":"varchar(191)","list_hidden":0,"search":1,"name":"code","label":"translate:neues_language_code","not_required":"","attributes":"","default":"de","no_db":"0","notice":"translate:neues_language_code_notice","append":"","prepend":""},{"table_name":"rex_neues_entry_lang","prio":3,"type_id":"value","type_name":"text","db_type":"varchar(191)","list_hidden":0,"search":1,"name":"name","label":"translate:neues_language_name","not_required":"","attributes":"","default":"Deutsch","no_db":"0","notice":"translate:neues_language_name_notice","append":"","prepend":""}]},"rex_neues_author":{"table":{"status":1,"table_name":"rex_neues_author","name":"translate:neues_author_table","description":"","list_amount":50,"list_sortfield":"id","list_sortorder":"ASC","search":1,"hidden":1,"export":1,"import":1,"mass_deletion":0,"mass_edit":0,"schema_overwrite":1,"history":0,"createdate":"0000-00-00 00:00:00","updatedate":"0000-00-00 00:00:00","createuser":"","updateuser":""},"fields":[{"table_name":"rex_neues_author","prio":1,"type_id":"value","type_name":"text","db_type":"varchar(191)","list_hidden":0,"search":1,"name":"name","label":"translate:neues_author_name","not_required":"","attributes":"","default":"","no_db":"0","notice":"","append":"","prepend":""},{"table_name":"rex_neues_author","prio":2,"type_id":"value","type_name":"text","db_type":"varchar(191)","list_hidden":0,"search":1,"name":"nickname","label":"translate:neues_author_nickname","not_required":"","attributes":"","default":"","no_db":"0","notice":"","append":"","prepend":""},{"table_name":"rex_neues_author","prio":3,"type_id":"value","type_name":"textarea","db_type":"text","list_hidden":1,"search":0,"name":"text","label":"translate:neues_author_text","not_required":"","attributes":"","default":"","no_db":"0","notice":""},{"table_name":"rex_neues_author","prio":4,"type_id":"value","type_name":"choice","db_type":"text","list_hidden":0,"search":1,"name":"be_user_id","label":"translate:neues_author_be_user_id","not_required":"","multiple":"0","expanded":"0","choices":"select id as value, login as label from rex_user","choice_attributes":"","attributes":"","default":"","no_db":"0","notice":"","preferred_choices":"","group_by":"","placeholder":"Bitte w\u00e4hlen","group_attributes":"","choice_label":""}]},"rex_neues_entry_category_rel":{"table":{"status":1,"table_name":"rex_neues_entry_category_rel","name":"\ud83d\udcf0 translate:neues_entry_category_rel","description":"","list_amount":50,"list_sortfield":"id","list_sortorder":"ASC","search":0,"hidden":1,"export":0,"import":0,"mass_deletion":0,"mass_edit":0,"schema_overwrite":1,"history":0,"createdate":"0000-00-00 00:00:00","updatedate":"0000-00-00 00:00:00","createuser":"","updateuser":""},"fields":[{"table_name":"rex_neues_entry_category_rel","prio":1,"type_id":"value","type_name":"be_manager_relation","db_type":"text","list_hidden":0,"search":0,"name":"entry_id","label":"translate:neues_entry","not_required":"","attributes":"","notice":"","table":"rex_neues_entry","empty_option":"0","size":"","field":"name","type":"0","empty_value":"","relation_table":"","filter":""},{"table_name":"rex_neues_entry_category_rel","prio":2,"type_id":"value","type_name":"be_manager_relation","db_type":"text","list_hidden":1,"search":0,"name":"category_id","label":"translate:neues_category_title","not_required":"","attributes":"","notice":"","table":"rex_neues_category","empty_option":"0","size":"","field":"name","type":"0","empty_value":"","relation_table":"","filter":""}]}} +{ + "rex_neues_author": { + "fields": [ + { + "append": "", + "attributes": "", + "db_type": "varchar(191)", + "default": "", + "label": "translate:neues_author_name", + "list_hidden": 0, + "name": "name", + "no_db": "0", + "not_required": "", + "notice": "", + "prepend": "", + "prio": 1, + "search": 1, + "table_name": "rex_neues_author", + "type_id": "value", + "type_name": "text" + }, + { + "append": "", + "attributes": "", + "db_type": "varchar(191)", + "default": "", + "label": "translate:neues_author_nickname", + "list_hidden": 0, + "name": "nickname", + "no_db": "0", + "not_required": "", + "notice": "", + "prepend": "", + "prio": 2, + "search": 1, + "table_name": "rex_neues_author", + "type_id": "value", + "type_name": "text" + }, + { + "attributes": "", + "db_type": "text", + "default": "", + "label": "translate:neues_author_text", + "list_hidden": 1, + "name": "text", + "no_db": "0", + "not_required": "", + "notice": "", + "prio": 3, + "search": 0, + "table_name": "rex_neues_author", + "type_id": "value", + "type_name": "textarea" + }, + { + "attributes": "", + "choice_attributes": "", + "choice_label": "", + "choices": "select id as value, login as label from rex_user", + "db_type": "text", + "default": "", + "expanded": "0", + "group_attributes": "", + "group_by": "", + "label": "translate:neues_author_be_user_id", + "list_hidden": 0, + "multiple": "0", + "name": "be_user_id", + "no_db": "0", + "not_required": "", + "notice": "", + "placeholder": "Bitte w\u00e4hlen", + "preferred_choices": "", + "prio": 4, + "search": 1, + "table_name": "rex_neues_author", + "type_id": "value", + "type_name": "choice" + } + ], + "table": { + "createdate": "0000-00-00 00:00:00", + "createuser": "", + "description": "", + "export": 1, + "hidden": 1, + "history": 0, + "import": 1, + "list_amount": 50, + "list_sortfield": "id", + "list_sortorder": "ASC", + "mass_deletion": 0, + "mass_edit": 0, + "name": "translate:neues_author_table", + "schema_overwrite": 1, + "search": 1, + "status": 1, + "table_name": "rex_neues_author", + "updatedate": "0000-00-00 00:00:00", + "updateuser": "" + } + }, + "rex_neues_category": { + "fields": [ + { + "attributes": "", + "db_type": "text", + "empty_option": "1", + "empty_value": "", + "field": "category_ids", + "filter": "", + "label": "translate:neues_date_ids", + "list_hidden": 0, + "name": "date_id", + "not_required": "", + "notice": "translate:neues_date_id_notice", + "prio": 1, + "relation_table": "rex_neues_entry_category_rel", + "search": 1, + "size": "", + "table": "rex_neues_entry", + "table_name": "rex_neues_category", + "type": "4", + "type_id": "value", + "type_name": "be_manager_relation" + }, + { + "append": "", + "attributes": "{\"required\":\"required\"}", + "db_type": "varchar(191)", + "default": "", + "label": "translate:neues_category_title", + "list_hidden": 0, + "name": "name", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_external_url_notice", + "prepend": "", + "prio": 2, + "search": 1, + "table_name": "rex_neues_category", + "type_id": "value", + "type_name": "text" + }, + { + "db_type": "", + "empty_option": "0", + "label": "", + "list_hidden": 1, + "message": "translate:neues_category_name_validate_unique", + "name": "name", + "not_required": "", + "prio": 3, + "search": 0, + "table": "", + "table_name": "rex_neues_category", + "type_id": "validate", + "type_name": "unique" + }, + { + "category": "", + "db_type": "text", + "label": "translate:neues_category_image", + "list_hidden": 1, + "multiple": "0", + "name": "image", + "not_required": "", + "notice": "", + "preview": "1", + "prio": 4, + "search": 0, + "table_name": "rex_neues_category", + "type_id": "value", + "type_name": "be_media_preview", + "types": "jpg,jpeg,png,gif,svg" + }, + { + "attributes": "", + "choice_attributes": "", + "choice_label": "", + "choices": "translate:neues_status_offline=0,translate:neues_status_online=1", + "db_type": "text", + "default": "0", + "expanded": "0", + "group_attributes": "", + "group_by": "", + "label": "translate:neues_status", + "list_hidden": 1, + "multiple": "0", + "name": "status", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_category_status_notice", + "placeholder": "", + "preferred_choices": "", + "prio": 5, + "search": 1, + "table_name": "rex_neues_category", + "type_id": "value", + "type_name": "choice" + }, + { + "db_type": "varchar(191)", + "label": "translate:neues_createuser", + "list_hidden": 1, + "name": "createuser", + "not_required": "", + "only_empty": "1", + "prio": 6, + "search": 0, + "show_value": "0", + "table_name": "rex_neues_category", + "type_id": "value", + "type_name": "be_user" + }, + { + "db_type": "varchar(191)", + "label": "translate:neues_updateuser", + "list_hidden": 1, + "name": "updateuser", + "not_required": "", + "only_empty": "0", + "prio": 7, + "search": 0, + "show_value": "0", + "table_name": "rex_neues_category", + "type_id": "value", + "type_name": "be_user" + }, + { + "db_type": "datetime", + "format": "Y-m-d H:i:s", + "label": "translate:neues_updatedate", + "list_hidden": 1, + "modify_default": "", + "name": "updatedate", + "no_db": "0", + "not_required": "", + "only_empty": "0", + "prio": 8, + "search": 0, + "table_name": "rex_neues_category", + "type_id": "value", + "type_name": "datestamp" + }, + { + "db_type": "datetime", + "format": "Y-m-d H:i:s", + "label": "translate:neues_createdate", + "list_hidden": 1, + "modify_default": "", + "name": "createdate", + "no_db": "0", + "not_required": "", + "only_empty": "1", + "prio": 9, + "search": 0, + "table_name": "rex_neues_category", + "type_id": "value", + "type_name": "datestamp" + } + ], + "table": { + "createdate": "0000-00-00 00:00:00", + "createuser": "", + "description": "", + "export": 0, + "hidden": 1, + "history": 0, + "import": 0, + "list_amount": 50, + "list_sortfield": "name", + "list_sortorder": "ASC", + "mass_deletion": 0, + "mass_edit": 0, + "name": "\ud83d\udcf0 Tags", + "schema_overwrite": 1, + "search": 0, + "status": 1, + "table_name": "rex_neues_category", + "updatedate": "0000-00-00 00:00:00", + "updateuser": "" + } + }, + "rex_neues_entry": { + "fields": [ + { + "db_type": "none", + "html": "
\r\n
", + "label": "", + "list_hidden": 0, + "name": "row_start", + "not_required": "", + "prio": 1, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "html" + }, + { + "attributes": "", + "choice_attributes": "", + "choice_label": "", + "choices": "translate:neues_status_deleted=2,translate:neues_status_draft=-1,translate:neues_status_planned=0,translate:neues_status_online=1", + "db_type": "text", + "default": "", + "expanded": "0", + "group_attributes": "", + "group_by": "", + "label": "translate:neues_status", + "list_hidden": 1, + "multiple": "0", + "name": "status", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_status_notice", + "placeholder": "", + "preferred_choices": "", + "prio": 2, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "choice_status" + }, + { + "append": "", + "attributes": "{\"required\":\"required\"}", + "db_type": "varchar(191)", + "default": "", + "label": "translate:neues_name", + "list_hidden": 0, + "name": "name", + "no_db": "0", + "not_required": "", + "notice": "transalte:neues_name_notice", + "prepend": "", + "prio": 3, + "search": 1, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "text" + }, + { + "db_type": "", + "label": "", + "list_hidden": 1, + "message": "translate:neues_name_validate_empty", + "name": "name", + "not_required": "", + "prio": 4, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "validate", + "type_name": "empty" + }, + { + "attributes": "{\"style\":\"max-height: 100px;\"}", + "db_type": "text", + "default": "", + "label": "translate:neues_teaser", + "list_hidden": 1, + "name": "teaser", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_teaser_notice", + "prio": 5, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "textarea" + }, + { + "attributes": "{\"class\":\"###neues-settings-editor###\"}", + "db_type": "text", + "default": "", + "label": "translate:neues_description", + "list_hidden": 1, + "name": "description", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_description_notice", + "prio": 6, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "textarea" + }, + { + "attributes": "", + "db_type": "text", + "label": "translate:neues_domain_ids", + "list_hidden": 1, + "name": "domain_ids", + "not_required": "", + "notice": "translate:neues_domain_ids_notice", + "prio": 7, + "search": 1, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "domain" + }, + { + "attributes": "", + "db_type": "text", + "empty_option": "1", + "empty_value": "", + "field": "name", + "filter": "", + "label": "translate:neues_language", + "list_hidden": 1, + "name": "lang_id", + "not_required": "", + "notice": "", + "prio": 8, + "relation_table": "", + "search": 0, + "size": "", + "table": "rex_neues_entry_lang", + "table_name": "rex_neues_entry", + "type": "0", + "type_id": "value", + "type_name": "be_manager_relation" + }, + { + "db_type": "none", + "html": "<\/div>\r\n
", + "label": "", + "list_hidden": 0, + "name": "col", + "not_required": "", + "prio": 9, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "html" + }, + { + "attributes": "{\"requried\":\"required\"}", + "current_date": "1", + "db_type": "datetime", + "label": "translate:neues_publishdate", + "list_hidden": 0, + "max": "", + "min": "", + "name": "publishdate", + "no_db": "0", + "not_required": "", + "notice": "", + "prio": 10, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "datetime_local" + }, + { + "attributes": "", + "db_type": "int(10) unsigned", + "empty_option": "1", + "empty_value": "", + "field": "name", + "filter": "", + "label": "translate:neues_entry_author_id", + "list_hidden": 0, + "name": "author_id", + "not_required": "", + "notice": "", + "prio": 11, + "relation_table": "", + "search": 1, + "size": "", + "table": "rex_neues_author", + "table_name": "rex_neues_entry", + "type": "2", + "type_id": "value", + "type_name": "be_manager_relation" + }, + { + "compare_type": "==", + "compare_value": "0000-00-00 00:00:00", + "db_type": "", + "label": "", + "list_hidden": 1, + "message": "translate:neues_publishdate_validate_compare_value", + "name": "publishdate", + "not_required": "", + "prio": 12, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "validate", + "type_name": "compare_value" + }, + { + "db_type": "none", + "html": "<\/div>\r\n
", + "label": "", + "list_hidden": 0, + "name": "col2", + "not_required": "", + "prio": 13, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "html" + }, + { + "append": "", + "attributes": "", + "db_type": "varchar(191)", + "default": "", + "label": "translate:neues_external_url", + "list_hidden": 1, + "name": "url", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_external_url_notice", + "prepend": "", + "prio": 14, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "text" + }, + { + "db_type": "", + "label": "", + "list_hidden": 1, + "message": "translate:neues_external_url_validate_url", + "name": "url", + "not_required": "1", + "prio": 15, + "search": 0, + "table_name": "rex_neues_entry", + "type": "url", + "type_id": "validate", + "type_name": "type" + }, + { + "attributes": "", + "db_type": "text", + "empty_option": "1", + "empty_value": "", + "field": "name", + "filter": "", + "label": "translate:neues_category_ids", + "list_hidden": 0, + "name": "category_ids", + "not_required": "", + "notice": "", + "prio": 16, + "relation_table": "rex_neues_entry_category_rel", + "search": 1, + "size": "", + "table": "rex_neues_category", + "table_name": "rex_neues_entry", + "type": "3", + "type_id": "value", + "type_name": "be_manager_relation" + }, + { + "category": "", + "db_type": "text", + "label": "translate:neues_image", + "list_hidden": 0, + "multiple": "0", + "name": "image", + "not_required": "", + "notice": "", + "preview": "1", + "prio": 17, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "be_media_preview", + "types": "svg,jpg,jpeg,gif,png" + }, + { + "category": "", + "db_type": "text", + "label": "translate:neues_images", + "list_hidden": 1, + "multiple": "1", + "name": "images", + "not_required": "", + "notice": "", + "preview": "1", + "prio": 18, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "be_media", + "types": "jpg,png" + }, + { + "db_type": "none", + "html": "<\/div>\r\n<\/div>", + "label": "", + "list_hidden": 0, + "name": "row_end", + "not_required": "", + "prio": 19, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "html" + }, + { + "db_type": "datetime", + "format": "", + "label": "translate:neues_createdate", + "list_hidden": 1, + "modify_default": "", + "name": "createdate", + "no_db": "0", + "not_required": "", + "only_empty": "1", + "prio": 20, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "datestamp" + }, + { + "db_type": "varchar(191)", + "label": "translate:neues_createuser", + "list_hidden": 1, + "name": "createuser", + "not_required": "", + "only_empty": "1", + "prio": 21, + "search": 0, + "show_value": "0", + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "be_user" + }, + { + "db_type": "datetime", + "format": "", + "label": "translate:neues_updateuser", + "list_hidden": 1, + "modify_default": "", + "name": "updatedate", + "no_db": "0", + "not_required": "", + "only_empty": "0", + "prio": 22, + "search": 0, + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "datestamp" + }, + { + "db_type": "varchar(191)", + "label": "translate:neues_updateuser", + "list_hidden": 1, + "name": "updateuser", + "not_required": "", + "only_empty": "0", + "prio": 23, + "search": 0, + "show_value": "0", + "table_name": "rex_neues_entry", + "type_id": "value", + "type_name": "be_user" + } + ], + "table": { + "createdate": "0000-00-00 00:00:00", + "createuser": "", + "description": "", + "export": 1, + "hidden": 1, + "history": 0, + "import": 1, + "list_amount": 500, + "list_sortfield": "publishdate", + "list_sortorder": "DESC", + "mass_deletion": 0, + "mass_edit": 0, + "name": "\ud83d\udcf0 News", + "schema_overwrite": 1, + "search": 1, + "status": 1, + "table_name": "rex_neues_entry", + "updatedate": "0000-00-00 00:00:00", + "updateuser": "" + } + }, + "rex_neues_entry_category_rel": { + "fields": [ + { + "attributes": "", + "db_type": "text", + "empty_option": "0", + "empty_value": "", + "field": "name", + "filter": "", + "label": "translate:neues_entry", + "list_hidden": 0, + "name": "entry_id", + "not_required": "", + "notice": "", + "prio": 1, + "relation_table": "", + "search": 0, + "size": "", + "table": "rex_neues_entry", + "table_name": "rex_neues_entry_category_rel", + "type": "0", + "type_id": "value", + "type_name": "be_manager_relation" + }, + { + "attributes": "", + "db_type": "text", + "empty_option": "0", + "empty_value": "", + "field": "name", + "filter": "", + "label": "translate:neues_category_title", + "list_hidden": 1, + "name": "category_id", + "not_required": "", + "notice": "", + "prio": 2, + "relation_table": "", + "search": 0, + "size": "", + "table": "rex_neues_category", + "table_name": "rex_neues_entry_category_rel", + "type": "0", + "type_id": "value", + "type_name": "be_manager_relation" + } + ], + "table": { + "createdate": "0000-00-00 00:00:00", + "createuser": "", + "description": "", + "export": 0, + "hidden": 1, + "history": 0, + "import": 0, + "list_amount": 50, + "list_sortfield": "id", + "list_sortorder": "ASC", + "mass_deletion": 0, + "mass_edit": 0, + "name": "\ud83d\udcf0 translate:neues_entry_category_rel", + "schema_overwrite": 1, + "search": 0, + "status": 1, + "table_name": "rex_neues_entry_category_rel", + "updatedate": "0000-00-00 00:00:00", + "updateuser": "" + } + }, + "rex_neues_entry_lang": { + "fields": [ + { + "attributes": "", + "db_type": "text", + "empty_option": "1", + "empty_value": "", + "field": "lang_id", + "filter": "", + "label": "translate:neues_language_entry", + "list_hidden": 0, + "name": "entry", + "not_required": "", + "notice": "translate:neues_language_entry_notice", + "prio": 1, + "relation_table": "rex_neues_entry", + "search": 0, + "size": "", + "table": "rex_neues_entry", + "table_name": "rex_neues_entry_lang", + "type": "4", + "type_id": "value", + "type_name": "be_manager_relation" + }, + { + "append": "", + "attributes": "", + "db_type": "varchar(191)", + "default": "de", + "label": "translate:neues_language_code", + "list_hidden": 0, + "name": "code", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_language_code_notice", + "prepend": "", + "prio": 2, + "search": 1, + "table_name": "rex_neues_entry_lang", + "type_id": "value", + "type_name": "text" + }, + { + "append": "", + "attributes": "", + "db_type": "varchar(191)", + "default": "Deutsch", + "label": "translate:neues_language_name", + "list_hidden": 0, + "name": "name", + "no_db": "0", + "not_required": "", + "notice": "translate:neues_language_name_notice", + "prepend": "", + "prio": 3, + "search": 1, + "table_name": "rex_neues_entry_lang", + "type_id": "value", + "type_name": "text" + } + ], + "table": { + "createdate": "0000-00-00 00:00:00", + "createuser": "", + "description": "", + "export": 0, + "hidden": 1, + "history": 0, + "import": 0, + "list_amount": 50, + "list_sortfield": "id", + "list_sortorder": "ASC", + "mass_deletion": 0, + "mass_edit": 0, + "name": "\ud83d\udcf0 Sprache", + "schema_overwrite": 1, + "search": 0, + "status": 1, + "table_name": "rex_neues_entry_lang", + "updatedate": "0000-00-00 00:00:00", + "updateuser": "" + } + } +} diff --git a/lang/de_de.lang b/lang/de_de.lang index f1eb1e1..e3b5079 100644 --- a/lang/de_de.lang +++ b/lang/de_de.lang @@ -50,8 +50,9 @@ neues_status = Veröffentlicht? neues_status_notice = Gibt an, ob dieser News-Beitrag aktuell sichtbar sein soll (veröffentlicht/geplant) oder sich noch im Entwurfsstadium befindet. neues_category_status_notice = Gibt an, ob diese Kategorie aktuell sichtbar sein soll (veröffentlicht/geplant) oder sich noch im Entwurfsstadium befindet. neues_status_online = Veröffentlicht -neues_status_offline = Offline +neues_status_planned = Geplant neues_status_draft = Entwurf +neues_status_deleted = Verworfen neues_domain_ids = Websites neues_domain_ids_notice = Hier können Sie festlegen, ob die News nur auf einer oder auf mehreren Websites innerhalb dieser REDAXO-Installation veröffentlicht werden soll. @@ -87,3 +88,9 @@ neues_docs_neues_language = Sprachen neues_docs_url = URL-Adon neues_docs_rss = RSS-Feed neues_docs_restful_api = YForm RESTful API + +# Cronjob + +neues_entry_publish_success = %s Beiträge wurden erfolgreich veröffentlicht. +neues_entry_publish_error = %s Beiträge konnten nicht veröffentlicht werden. +neues_entry_publish_cronjob = Geplante Beiträge veröffentlichen. (Aktuelles) diff --git a/lang/en_gb.lang b/lang/en_gb.lang index 22197d6..448366b 100644 --- a/lang/en_gb.lang +++ b/lang/en_gb.lang @@ -49,10 +49,9 @@ neues_status = Published? neues_status_notice = Indicates whether this news post should currently be visible (published/scheduled) or is still in the draft stage. neues_category_status_notice = Indicates whether this category should currently be visible (published/scheduled) or is still in the draft stage. neues_status_online = Published -neues_status_offline = Offline +neues_status_planned = Planned neues_status_draft = Draft -neues_domain_ids = Websites -neues_date_ids = Entries +neues_status_deleted = Discarded neues_language = Language neues_language_name = Language @@ -61,6 +60,7 @@ neues_language_code = Language code (ISO 639-1) neues_language_code_notice = Two-letter language code according to ISO standard, e.g.en neues_language_entry = Manage entries neues_language_entry_notice = Manage linked dates + neues_domain_ids = Websites neues_domain_ids_notice = Here you can specify whether the news should be published on one or more websites within this REDAXO installation. neues_date_ids = Entries @@ -87,3 +87,9 @@ neues_docs_neues_language = Languages neues_docs_url = URL Addon neues_docs_rss = RSS Feed neues_docs_restful_api = YForm RESTful API + +# Cronjob + +neues_entry_publish_success = %s posts have been successfully published. +neues_entry_publish_error = %s posts could not be published. +neues_entry_publish_cronjob = Publish planned posts. (Current) diff --git a/lang/es_es.lang b/lang/es_es.lang index 6f3908b..b762028 100644 --- a/lang/es_es.lang +++ b/lang/es_es.lang @@ -49,8 +49,9 @@ neues_status = ¿Publicado? neues_status_notice = Indica si esta entrada de noticias debe ser visible actualmente (publicada/programada) o si todavía está en la etapa de borrador. neues_category_status_notice = Indica si esta categoría debe ser visible actualmente (publicada/programada) o si todavía está en la etapa de borrador. neues_status_online = Publicado -neues_status_offline = Desconectado +neues_status_planned = Planeado neues_status_draft = Borrador +neues_status_deleted = Descartado neues_domain_ids = Sitios web neues_domain_ids_notice = Aquí puede determinar si las noticias deben publicarse solo en uno o en varios sitios web dentro de esta instalación de REDAXO. @@ -86,3 +87,9 @@ neues_docs_neues_language = Sprachen neues_docs_url = URL-Adon neues_docs_rss = RSS-Feed neues_docs_restful_api = YForm RESTful API + +# Cronjob + +neues_entry_publish_success = %s entradas se han publicado con éxito. +neues_entry_publish_error = %s entradas no se pudieron publicar. +neues_entry_publish_cronjob = Publicar entradas planificadas. (Actual) diff --git a/lang/fr_fr.lang b/lang/fr_fr.lang index fcf29b9..51f1029 100644 --- a/lang/fr_fr.lang +++ b/lang/fr_fr.lang @@ -50,8 +50,9 @@ neues_status = Publié ? neues_status_notice = Indique si cet article de nouvelles doit actuellement être visible (publié/prévu) ou s'il est encore à l'état de brouillon. neues_category_status_notice = Indique si cette catégorie doit actuellement être visible (publiée/prévue) ou si elle est encore à l'état de brouillon. neues_status_online = Publié -neues_status_offline = Hors ligne +neues_status_planned = Prévu neues_status_draft = Brouillon +neues_status_deleted = Supprimé neues_domain_ids = Sites web neues_domain_ids_notice = Ici, vous pouvez déterminer si les nouvelles doivent être publiées sur un ou plusieurs sites web au sein de cette installation REDAXO. @@ -87,3 +88,9 @@ neues_docs_neues_language = Langues neues_docs_url = Addon URL neues_docs_rss = Flux RSS neues_docs_restful_api = API RESTful YForm + +# Cronjob + +neues_entry_publish_success = %s articles ont été publiés avec succès. +neues_entry_publish_error = %s articles n'ont pas pu être publiés. +neues_entry_publish_cronjob = Publier des articles planifiés. (Actuel) diff --git a/lang/it_it.lang b/lang/it_it.lang index 3cb1382..2fc7ba4 100644 --- a/lang/it_it.lang +++ b/lang/it_it.lang @@ -50,8 +50,9 @@ neues_status = Pubblicato? neues_status_notice = Indica se questo articolo di notizie dovrebbe essere attualmente visibile (pubblicato/pianificato) o se è ancora in fase di bozza. neues_category_status_notice = Indica se questa categoria dovrebbe essere attualmente visibile (pubblicata/pianificata) o se è ancora in fase di bozza. neues_status_online = Pubblicato -neues_status_offline = Offline +neues_status_planned = Pianificato neues_status_draft = Bozza +neues_status_deleted = Scartato neues_domain_ids = Siti web neues_domain_ids_notice = Qui puoi decidere se le notizie devono essere pubblicate su uno o più siti web all'interno di questa installazione REDAXO. @@ -87,3 +88,9 @@ neues_docs_neues_language = Lingue neues_docs_url = Addon URL neues_docs_rss = Feed RSS neues_docs_restful_api = YForm API RESTful + +# Cronjob + +neues_entry_publish_success = %s articoli sono stati pubblicati con successo. +neues_entry_publish_error = %s articoli non sono stati pubblicati. +neues_entry_publish_cronjob = Pubblica articoli pianificati. (Corrente) diff --git a/lang/sv_se.lang b/lang/sv_se.lang index 42cb8a5..d89a151 100644 --- a/lang/sv_se.lang +++ b/lang/sv_se.lang @@ -49,8 +49,9 @@ neues_status = Publicerad? neues_status_notice = Anger om detta nyhetsinlägg ska vara synligt just nu (publicerat/schemalagt) eller om det fortfarande är i utkaststadiet. neues_category_status_notice = Anger om denna kategori ska vara synlig just nu (publicerat/schemalagt) eller om det fortfarande är i utkaststadiet. neues_status_online = Publicerad -neues_status_offline = Offline +neues_status_planned = Planerad neues_status_draft = Utkast +neues_status_deleted = Kasserad neues_domain_ids = Webbplatser neues_domain_ids_notice = Här kan du bestämma om nyheterna ska publiceras på bara en eller flera webbplatser inom denna REDAXO-installation. @@ -75,14 +76,20 @@ neues_author_be_user_id = REDAXO-användare # Doku -neues_docs_a_intro = Einleitung +neues_docs_a_intro = Introduktion neues_docs_b_import_export = Import/Export neues_docs_c_migration = Migration -neues_docs_settings = Einstellungen -neues_docs_neues_entry = Einträge -neues_docs_neues_category = Kategorien -neues_docs_neues_author = Autor:innen -neues_docs_neues_language = Sprachen -neues_docs_url = URL-Adon -neues_docs_rss = RSS-Feed +neues_docs_settings = Inställningar +neues_docs_neues_entry = Inlägg +neues_docs_neues_category = Kategorier +neues_docs_neues_author = Författare +neues_docs_neues_language = Språk +neues_docs_url = URL-Addon +neues_docs_rss = RSS-flöde neues_docs_restful_api = YForm RESTful API + +# Cronjob + +neues_entry_publish_success = %s inlägg har publicerats framgångsrikt. +neues_entry_publish_error = %s inlägg kunde inte publiceras. +neues_entry_publish_cronjob = Publicera planerade inlägg. diff --git a/lib/rex_cronjob_neues_publish.php b/lib/rex_cronjob_neues_publish.php new file mode 100644 index 0000000..2448e31 --- /dev/null +++ b/lib/rex_cronjob_neues_publish.php @@ -0,0 +1,29 @@ +where('status', 0)->where('publishdate', date('Y-m-d'), '<')->find(); + $neues_entry_to_publish->setValue('status', 1); + if (!$neues_entry_to_publish->save()) { + $this->setMessage(sprintf(rex_i18n::msg('neues_entry_publish_error'), count($neues_entry_to_publish))); + return false; + } + + $this->setMessage(sprintf(rex_i18n::msg('neues_entry_publish_success'), count($neues_entry_to_publish))); + return true; + } + + public function getTypeName() + { + return rex_i18n::msg('neues_entry_publish_cronjob'); + } + + public function getParamFields() + { + return []; + } +} diff --git a/package.yml b/package.yml index ec5481b..a6552ac 100644 --- a/package.yml +++ b/package.yml @@ -1,5 +1,5 @@ package: neues -version: '3.3.2' +version: '4.0.0-dev' author: 'Alexander Walther' supportpage: https://alexplusde.github.io/neues/ load: late