diff --git a/blocks/event.php b/blocks/event.php index 7b83cd2..6fa660c 100644 --- a/blocks/event.php +++ b/blocks/event.php @@ -54,7 +54,7 @@ function b_wgevents_event_show($options) $typeBlock = $options[0]; $limit = (int)$options[1]; $lengthTitle = (int)$options[2]; - $blockType = (string)$options[3]; + $blockType = '0' === (string)$options[3] ? 'simple' : (string)$options[3] ; \array_shift($options); \array_shift($options); \array_shift($options); @@ -67,6 +67,7 @@ function b_wgevents_event_show($options) case 'last': default: // For the block: events last + $dateFrom = 0; $sortBy = 'datecreated'; $orderBy = 'DESC'; break; @@ -74,11 +75,13 @@ function b_wgevents_event_show($options) // For the block: events new // new since last week: 7 * 24 * 60 * 60 = 604800 $dateCreated = \time() - 604800; + $dateFrom = 0; $sortBy = 'datecreated'; $orderBy = 'ASC'; break; case 'random': // For the block: events random + $dateFrom = 0; $sortBy = 'RAND()'; $orderBy = ''; break; diff --git a/docs/changelog.txt b/docs/changelog.txt index 85bd4ca..70947e5 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,3 +1,8 @@ +============================================================== +1.0.6 Stable [2023/03/09] +============================================================== + - fixed bugs in block (goffy) + ============================================================== 1.0.5 Stable [2023/02/28] ============================================================== diff --git a/language/english/blocks.php b/language/english/blocks.php index 0f132c4..6cd3f31 100644 --- a/language/english/blocks.php +++ b/language/english/blocks.php @@ -31,6 +31,9 @@ \define('_MB_WGEVENTS_ALL_EVENTS', 'All events'); // Event \define('_MB_WGEVENTS_EVENT_SHOWMORE', 'Show more events'); +\define('_MB_WGEVENTS_EVENT_NAME', 'Event name'); +\define('_MB_WGEVENTS_EVENT_LOGO', 'Event logo'); +\define('_MB_WGEVENTS_EVENT_GOTO', 'Goto Event'); \define('_MB_WGEVENTS_BLOCKTYPE', 'Block type'); \define('_MB_WGEVENTS_BLOCKTYPE_TABLE', 'Table'); \define('_MB_WGEVENTS_BLOCKTYPE_SIMPLE', 'Simple'); diff --git a/language/german/blocks.php b/language/german/blocks.php index d631bf0..d7f395c 100644 --- a/language/german/blocks.php +++ b/language/german/blocks.php @@ -31,6 +31,9 @@ \define('_MB_WGEVENTS_ALL_EVENTS', 'Alle Veranstaltungen'); // Event \define('_MB_WGEVENTS_EVENT_SHOWMORE', 'Weitere Veranstaltungen anzeigen'); +\define('_MB_WGEVENTS_EVENT_NAME', 'Veranstaltung Name'); +\define('_MB_WGEVENTS_EVENT_LOGO', 'Veranstaltung logo'); +\define('_MB_WGEVENTS_EVENT_GOTO', 'Gehe zur Veranstaltung'); \define('_MB_WGEVENTS_BLOCKTYPE', 'Blocktyp'); \define('_MB_WGEVENTS_BLOCKTYPE_TABLE', 'Tabelle'); \define('_MB_WGEVENTS_BLOCKTYPE_SIMPLE', 'Einfach'); diff --git a/templates/blocks/wgevents_block_events_spotlight.tpl b/templates/blocks/wgevents_block_events_spotlight.tpl index 9aad3dd..b556e86 100644 --- a/templates/blocks/wgevents_block_events_spotlight.tpl +++ b/templates/blocks/wgevents_block_events_spotlight.tpl @@ -2,8 +2,8 @@   - <{$smarty.const._MB_WGEVENTS_EV_NAME}> - <{$smarty.const._MB_WGEVENTS_EV_LOGO}> + <{$smarty.const._MB_WGEVENTS_EVENT_NAME}> + <{$smarty.const._MB_WGEVENTS_EVENT_LOGO}> <{if count($block)}> diff --git a/xoops_version.php b/xoops_version.php index 98e8bb4..87ccb22 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -32,7 +32,8 @@ // ------------------- Information ------------------- // $modversion = [ 'name' => \_MI_WGEVENTS_NAME, - 'version' => '1.0.5', + 'version' => '1.0.6', + 'module_status' => 'Stable', 'description' => \_MI_WGEVENTS_DESC, 'author' => 'Goffy - Wedega', 'author_mail' => 'webmaster@wedega.com', @@ -65,7 +66,6 @@ 'module_website_url' => 'www.xoops.org', 'module_website_name' => 'XOOPS Project', 'release' => '28.02.2023', - 'module_status' => 'Stable', 'system_menu' => 1, 'hasAdmin' => 1, 'hasMain' => 1, @@ -224,7 +224,7 @@ 'show_func' => 'b_wgevents_event_show', 'edit_func' => 'b_wgevents_event_edit', 'template' => 'wgevents_block_events.tpl', - 'options' => 'last|5|25|0', + 'options' => 'last|5|25|simple', ]; // Event new $modversion['blocks'][] = [ @@ -234,7 +234,7 @@ 'show_func' => 'b_wgevents_event_show', 'edit_func' => 'b_wgevents_event_edit', 'template' => 'wgevents_block_events.tpl', - 'options' => 'new|5|25|0', + 'options' => 'new|5|25|simple', ]; /*