From e6b2c8d0d28f632f39cb1dd7b8ed02000dcef8cf Mon Sep 17 00:00:00 2001 From: PadowYT2 Date: Sat, 6 Aug 2022 10:55:24 +0300 Subject: [PATCH 1/5] Just that I can make a pr --- custom/templates/Nexus/template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom/templates/Nexus/template.php b/custom/templates/Nexus/template.php index ed5ab856..1e4f2908 100755 --- a/custom/templates/Nexus/template.php +++ b/custom/templates/Nexus/template.php @@ -29,8 +29,8 @@ public function __construct($cache, $smarty, $language, $user, $pages) { $template = [ 'name' => 'Nexus', - 'version' => '1.7.0', - 'nl_version' => '2.0.0-pr13', + 'version' => '1.7.1', + 'nl_version' => '2.0.0', 'author' => 'Vertisan', ]; @@ -209,4 +209,4 @@ public function onPageLoad() } $template = new Nexus_Template($cache, $smarty, $language, $user, $pages); -$template_pagination = ['div' => 'ui mini pagination menu', 'a' => '{x}item']; \ No newline at end of file +$template_pagination = ['div' => 'ui mini pagination menu', 'a' => '{x}item']; From 1e287bee704dbd1539196d1d9ab528b5d1dab6f3 Mon Sep 17 00:00:00 2001 From: PadowYT2 <71085027+PadowYT2@users.noreply.github.com> Date: Sun, 14 Aug 2022 15:42:57 +0300 Subject: [PATCH 2/5] Fix $update_check_nexus not being properly working --- custom/templates/Nexus/template.php | 1 + .../template_settings/classes/NexusUtil.php | 4 +- .../classes/UpdateCheckNexus.php | 53 +++++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100755 custom/templates/Nexus/template_settings/classes/UpdateCheckNexus.php diff --git a/custom/templates/Nexus/template.php b/custom/templates/Nexus/template.php index 1e4f2908..6b841840 100755 --- a/custom/templates/Nexus/template.php +++ b/custom/templates/Nexus/template.php @@ -81,6 +81,7 @@ public function __construct($cache, $smarty, $language, $user, $pages) $this->_pages = $pages; require_once('template_settings/classes/NexusUtil.php'); + require_once('template_settings/classes/UpdateCheckNexus.php'); NexusUtil::initialise(); if ($user->isLoggedIn()) { diff --git a/custom/templates/Nexus/template_settings/classes/NexusUtil.php b/custom/templates/Nexus/template_settings/classes/NexusUtil.php index 28f19235..548b516e 100755 --- a/custom/templates/Nexus/template_settings/classes/NexusUtil.php +++ b/custom/templates/Nexus/template_settings/classes/NexusUtil.php @@ -71,7 +71,7 @@ public static function initialise() if (DB::getInstance()->showTables('nexus_settings')) { $found = false; - + foreach (DB::getInstance()->query('SELECT name FROM nl2_nexus_settings')->results() as $row) { if ($row->name === 'template_about') { $found = true; @@ -188,7 +188,7 @@ public static function updateCheckNexus() return $update_check_nexus_response->getError(); } - $update_check_nexus = new UpdateCheck($update_check_nexus_response->json(true)); + $update_check_nexus = new UpdateCheckNexus($update_check_nexus_response); if ($update_check_nexus->hasError()) { return $update_check_nexus->getErrorMessage(); } diff --git a/custom/templates/Nexus/template_settings/classes/UpdateCheckNexus.php b/custom/templates/Nexus/template_settings/classes/UpdateCheckNexus.php new file mode 100755 index 00000000..bdbb12b1 --- /dev/null +++ b/custom/templates/Nexus/template_settings/classes/UpdateCheckNexus.php @@ -0,0 +1,53 @@ +_raw_response = $update_check_nexus_response->contents(); + $this->_response = json_decode($this->_raw_response, true); + } + + public function hasError(): bool { + return $this->_response === null || !count($this->_response) || $this->_response['error']; + } + + public function getErrorMessage(): string { + if (isset($this->_response['message'])) { + return 'Error from server: ' . $this->_response['message']; + } + + return 'Invalid response from server: ' . $this->_raw_response; + } + + public function updateAvailable(): bool { + return $this->_response['update_available']; + } + + public function isUrgent(): bool { + return $this->_response['urgent']; + } + + public function instructions(): string { + return $this->_response['install_instructions']; + } + + public function version(): string { + return $this->_response['name'] . ' (' . $this->_response['version_tag'] . ')'; + } + + public function upgradeZipLink(): string { + return $this->_response['upgrade_zip_link']; + } + + public function gitHubLink(): string { + return $this->_response['github_link']; + } + + // TODO: @samerton + public function checksum(): string { + return $this->_response['checksum']; + } +} From 2617edefb2692f82ff6796ca5b4b7da2cc3e81dc Mon Sep 17 00:00:00 2001 From: PadowYT2 <71085027+PadowYT2@users.noreply.github.com> Date: Sun, 14 Aug 2022 16:06:39 +0300 Subject: [PATCH 3/5] Bump to NamelessMC 2.0.2 --- .../Nexus/Nexus/navbar/navbar_modern.tpl | 11 ++++++++-- .../Nexus/Nexus/navbar/navbar_normal.tpl | 11 ++++++++-- .../templates/Nexus/forum/forum_edit_post.tpl | 2 +- custom/templates/Nexus/forum/view_topic.tpl | 4 +++- custom/templates/Nexus/js/core/core.js | 13 +++++++++++- custom/templates/Nexus/js/core/pages.js | 2 -- custom/templates/Nexus/navbar.tpl | 12 ++++++++++- custom/templates/Nexus/template.php | 20 +++++++++---------- custom/templates/Nexus/user/settings.tpl | 5 ++++- custom/templates/Nexus/widgets/statistics.tpl | 4 ++-- 10 files changed, 61 insertions(+), 23 deletions(-) diff --git a/custom/templates/Nexus/Nexus/navbar/navbar_modern.tpl b/custom/templates/Nexus/Nexus/navbar/navbar_modern.tpl index 1aea53e0..4ee22b16 100755 --- a/custom/templates/Nexus/Nexus/navbar/navbar_modern.tpl +++ b/custom/templates/Nexus/Nexus/navbar/navbar_modern.tpl @@ -50,8 +50,15 @@ {if isset($dropdown.separator)}
{else} - {$dropdown.icon} - {$dropdown.title} + {if isset($dropdown.action)} + + {$dropdown.icon} {$dropdown.title} + + {else} + + {$dropdown.icon} {$dropdown.title} + + {/if} {/if} {/foreach} diff --git a/custom/templates/Nexus/Nexus/navbar/navbar_normal.tpl b/custom/templates/Nexus/Nexus/navbar/navbar_normal.tpl index 42f61a02..53f9ac65 100755 --- a/custom/templates/Nexus/Nexus/navbar/navbar_normal.tpl +++ b/custom/templates/Nexus/Nexus/navbar/navbar_normal.tpl @@ -46,8 +46,15 @@ {if isset($dropdown.separator)}
{else} - {$dropdown.icon} - {$dropdown.title} + {if isset($dropdown.action)} + + {$dropdown.icon} {$dropdown.title} + + {else} + + {$dropdown.icon} {$dropdown.title} + + {/if} {/if} {/foreach} diff --git a/custom/templates/Nexus/forum/forum_edit_post.tpl b/custom/templates/Nexus/forum/forum_edit_post.tpl index 45547118..8e7c2f0d 100755 --- a/custom/templates/Nexus/forum/forum_edit_post.tpl +++ b/custom/templates/Nexus/forum/forum_edit_post.tpl @@ -27,7 +27,7 @@ {if isset($EDITING_TOPIC)}
- +
{if count($LABELS)}
diff --git a/custom/templates/Nexus/forum/view_topic.tpl b/custom/templates/Nexus/forum/view_topic.tpl index 7febd9d3..a1c61ce0 100755 --- a/custom/templates/Nexus/forum/view_topic.tpl +++ b/custom/templates/Nexus/forum/view_topic.tpl @@ -228,7 +228,9 @@ {/if} {if !empty($reply.signature)}
- {$reply.signature} +
+ {$reply.signature} +
{/if}
diff --git a/custom/templates/Nexus/js/core/core.js b/custom/templates/Nexus/js/core/core.js index 81e462a0..a4ed5ad3 100755 --- a/custom/templates/Nexus/js/core/core.js +++ b/custom/templates/Nexus/js/core/core.js @@ -9,6 +9,17 @@ function redirect(url) { window.location.href = url; } +$(document).ready(function () { + $('[data-action="logout"]').click(function () { + const url = $(this).data('link'); + $.post(url, { + token: csrfToken + }).done(function () { + window.location.reload(); + }); + }); +}); + $(function () { $('.ui.sidebar').sidebar('attach events', '.toc.item'); @@ -33,6 +44,7 @@ $(function () { $(this).closest('.message').transition('fade'); }); + $('.menu.tabular .item').tab(); }); $(function () { @@ -75,7 +87,6 @@ $(function () { timezone.value = timezoneValue; } } - }); const announcements = document.querySelectorAll('[id^="announcement"]'); diff --git a/custom/templates/Nexus/js/core/pages.js b/custom/templates/Nexus/js/core/pages.js index ed6bbcbc..adf550a8 100755 --- a/custom/templates/Nexus/js/core/pages.js +++ b/custom/templates/Nexus/js/core/pages.js @@ -57,8 +57,6 @@ if (page !== '') { }); }); } else if (page === 'profile') { - $('.menu.tabular .item').tab(); - function showBannerSelect() { $('#imageModal').modal({ onVisible: function () { diff --git a/custom/templates/Nexus/navbar.tpl b/custom/templates/Nexus/navbar.tpl index 47870b46..0792f4c1 100755 --- a/custom/templates/Nexus/navbar.tpl +++ b/custom/templates/Nexus/navbar.tpl @@ -62,7 +62,7 @@ id="update-message"> {/if} - + @@ -126,4 +126,14 @@ {$MUST_VALIDATE_ACCOUNT} + {/if} + + {if isset($MAINTENANCE_ENABLED)} +
+ +
+ {$MAINTENANCE_ENABLED} +
+
{/if} \ No newline at end of file diff --git a/custom/templates/Nexus/template.php b/custom/templates/Nexus/template.php index 6b841840..29cb054d 100755 --- a/custom/templates/Nexus/template.php +++ b/custom/templates/Nexus/template.php @@ -2,7 +2,7 @@ /* * Made by Samerton * https://github.com/NamelessMC/Nameless/ - * NamelessMC version 2.0.0-pr13 + * NamelessMC version 2.0.0 * * License: MIT * @@ -29,8 +29,8 @@ public function __construct($cache, $smarty, $language, $user, $pages) { $template = [ 'name' => 'Nexus', - 'version' => '1.7.1', - 'nl_version' => '2.0.0', + 'version' => '1.7.0', + 'nl_version' => '2.0.2', 'author' => 'Vertisan', ]; @@ -68,7 +68,6 @@ public function __construct($cache, $smarty, $language, $user, $pages) if (defined('DARK_MODE') && DARK_MODE == '1') { $smartyDarkMode = true; - define('TEMPLATE_TINY_EDITOR_DARKMODE', true); } $smarty->assign([ @@ -146,7 +145,7 @@ public function onPageLoad() define('PAGE_LOAD_TIME', $this->_language->get('general', 'page_loaded_in', ['time' => round($page_load, 3)])); $this->addCSSFiles([ - $this->_template['path'] . 'css/custom.css?v=2pr13' => [] + $this->_template['path'] . 'css/custom.css?v=200' => [] ]); $route = (isset($_GET['route']) ? rtrim($_GET['route'], '/') : '/'); @@ -154,7 +153,7 @@ public function onPageLoad() $JSVariables = [ 'siteName' => SITE_NAME, 'siteURL' => URL::build('/'), - 'fullSiteUrl' => Util::getSelfURL() . ltrim(URL::build('/'), '/'), + 'fullSiteUrl' => URL::getSelfURL() . ltrim(URL::build('/'), '/'), 'page' => PAGE, 'avatarSource' => AvatarSource::getUrlToFormat(), 'copied' => $this->_language->get('general', 'copied'), @@ -176,7 +175,8 @@ public function onPageLoad() 'loggedIn' => ($this->_user->isLoggedIn() ? '1' : '0'), 'cookie' => (defined('COOKIE_NOTICE') ? '1' : '0'), 'loadingTime' => Util::getSetting('page_loading') === '1' ? PAGE_LOAD_TIME : '', - 'route' => $route + 'route' => $route, + 'csrfToken' => Token::get(), ]; if (strpos($route, '/forum/topic/') !== false || PAGE == 'profile') { @@ -195,9 +195,9 @@ public function onPageLoad() $this->addJSScript($JSVars); $this->addJSFiles([ - $this->_template['path'] . 'js/core/core.js' => [], + $this->_template['path'] . 'js/core/core.js?v=202' => [], $this->_template['path'] . 'js/core/user.js' => [], - $this->_template['path'] . 'js/core/pages.js' => [], + $this->_template['path'] . 'js/core/pages.js?v=202' => [], $this->_template['path'] . 'js/scripts.js' => [], ]); @@ -210,4 +210,4 @@ public function onPageLoad() } $template = new Nexus_Template($cache, $smarty, $language, $user, $pages); -$template_pagination = ['div' => 'ui mini pagination menu', 'a' => '{x}item']; +$template_pagination = ['div' => 'ui mini pagination menu', 'a' => '{x}item']; \ No newline at end of file diff --git a/custom/templates/Nexus/user/settings.tpl b/custom/templates/Nexus/user/settings.tpl index d87bce36..6be82a97 100755 --- a/custom/templates/Nexus/user/settings.tpl +++ b/custom/templates/Nexus/user/settings.tpl @@ -171,7 +171,10 @@ {elseif isset($FORCED)} {else} - {$DISABLE} +
+ + +
{/if} {if isset($CUSTOM_AVATARS)} diff --git a/custom/templates/Nexus/widgets/statistics.tpl b/custom/templates/Nexus/widgets/statistics.tpl index f527d5f6..a34f8415 100755 --- a/custom/templates/Nexus/widgets/statistics.tpl +++ b/custom/templates/Nexus/widgets/statistics.tpl @@ -18,8 +18,8 @@ {$USERS_REGISTERED}
{$USERS_REGISTERED_VALUE}
-
- {$LATEST_MEMBER} +
+ {$LATEST_MEMBER}
{$LATEST_MEMBER_VALUE.nickname} From 6a42bbfaf0b634e29ba3df8e722bbda2ec14168f Mon Sep 17 00:00:00 2001 From: PadowYT2 <71085027+PadowYT2@users.noreply.github.com> Date: Sun, 14 Aug 2022 18:28:42 +0300 Subject: [PATCH 4/5] Module changes * Add WikiPro Module * Update Store Module --- custom/templates/Nexus/store/category.tpl | 16 + custom/templates/Nexus/store/checkout.tpl | 16 + custom/templates/Nexus/store/checkout_add.tpl | 16 + .../Nexus/store/checkout_complete.tpl | 16 + custom/templates/Nexus/store/index.tpl | 16 + custom/templates/Nexus/store/player_login.tpl | 16 + custom/templates/Nexus/store/user/store.tpl | 78 +++++ .../Nexus/store/widgets/latest_purchases.tpl | 2 +- custom/templates/Nexus/wikipro/edit.tpl | 39 +++ custom/templates/Nexus/wikipro/wiki.tpl | 275 ++++++++++++++++++ 10 files changed, 489 insertions(+), 1 deletion(-) create mode 100644 custom/templates/Nexus/store/user/store.tpl create mode 100755 custom/templates/Nexus/wikipro/edit.tpl create mode 100755 custom/templates/Nexus/wikipro/wiki.tpl diff --git a/custom/templates/Nexus/store/category.tpl b/custom/templates/Nexus/store/category.tpl index 13ddb78b..e1507ad2 100755 --- a/custom/templates/Nexus/store/category.tpl +++ b/custom/templates/Nexus/store/category.tpl @@ -116,6 +116,22 @@
{if count($WIDGETS_RIGHT)} + {if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)} +
+
+

{$ACCOUNT}

+
+
+
+ {$CREDITS} +
{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY} +
+
+
+
+
+
+ {/if}
{foreach from=$WIDGETS_RIGHT item=widget} {$widget} diff --git a/custom/templates/Nexus/store/checkout.tpl b/custom/templates/Nexus/store/checkout.tpl index 1c491309..8f832622 100755 --- a/custom/templates/Nexus/store/checkout.tpl +++ b/custom/templates/Nexus/store/checkout.tpl @@ -103,6 +103,22 @@
{if count($WIDGETS_RIGHT)} + {if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)} +
+
+

{$ACCOUNT}

+
+
+
+ {$CREDITS} +
{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY} +
+
+
+
+
+
+ {/if}
{foreach from=$WIDGETS_RIGHT item=widget} {$widget} diff --git a/custom/templates/Nexus/store/checkout_add.tpl b/custom/templates/Nexus/store/checkout_add.tpl index 05e3e065..e4bc04b4 100755 --- a/custom/templates/Nexus/store/checkout_add.tpl +++ b/custom/templates/Nexus/store/checkout_add.tpl @@ -100,6 +100,22 @@
{if count($WIDGETS_RIGHT)} + {if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)} +
+
+

{$ACCOUNT}

+
+
+
+ {$CREDITS} +
{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY} +
+
+
+
+
+
+ {/if}
{foreach from=$WIDGETS_RIGHT item=widget} {$widget} diff --git a/custom/templates/Nexus/store/checkout_complete.tpl b/custom/templates/Nexus/store/checkout_complete.tpl index 45ca6bd5..76e199a2 100755 --- a/custom/templates/Nexus/store/checkout_complete.tpl +++ b/custom/templates/Nexus/store/checkout_complete.tpl @@ -23,6 +23,22 @@
{if count($WIDGETS_RIGHT)} + {if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)} +
+
+

{$ACCOUNT}

+
+
+
+ {$CREDITS} +
{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY} +
+
+
+
+
+
+ {/if}
{foreach from=$WIDGETS_RIGHT item=widget} {$widget} diff --git a/custom/templates/Nexus/store/index.tpl b/custom/templates/Nexus/store/index.tpl index b2fec777..deff2feb 100755 --- a/custom/templates/Nexus/store/index.tpl +++ b/custom/templates/Nexus/store/index.tpl @@ -47,6 +47,22 @@
{if count($WIDGETS_RIGHT)} + {if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)} +
+
+

{$ACCOUNT}

+
+
+
+ {$CREDITS} +
{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY} +
+
+
+
+
+
+ {/if}
{foreach from=$WIDGETS_RIGHT item=widget} {$widget} diff --git a/custom/templates/Nexus/store/player_login.tpl b/custom/templates/Nexus/store/player_login.tpl index 1f6ce79c..e07e28c7 100755 --- a/custom/templates/Nexus/store/player_login.tpl +++ b/custom/templates/Nexus/store/player_login.tpl @@ -50,6 +50,22 @@ {if count($WIDGETS_RIGHT)}
+ {if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)} +
+
+

{$ACCOUNT}

+
+
+
+ {$CREDITS} +
{$CURRENCY_SYMBOL}{$CREDITS_VALUE} + {$CURRENCY}
+
+
+
+
+
+ {/if} {foreach from=$WIDGETS_RIGHT item=widget} {$widget} {/foreach} diff --git a/custom/templates/Nexus/store/user/store.tpl b/custom/templates/Nexus/store/user/store.tpl new file mode 100644 index 00000000..fe193550 --- /dev/null +++ b/custom/templates/Nexus/store/user/store.tpl @@ -0,0 +1,78 @@ +{include file='header.tpl'} +{include file='navbar.tpl'} + +

+ {$TITLE} +

+ +{if isset($SUCCESS)} +
+ +
+ {$SUCCESS} +
+
+{/if} + +{if isset($ERRORS)} +
+ +
+
    + {foreach from=$ERRORS item=error} +
  • {$error}
  • + {/foreach} +
+
+
+{/if} + +
+
+
+ {include file='user/navigation.tpl'} +
+
+
+

{$STORE}

+ +

{$CREDITS}: {$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY}

+
+ +
+

{$MY_TRANSACTIONS}

+ {nocache} + {if count($TRANSACTIONS_LIST)} + + + + + + + + + + {foreach from=$TRANSACTIONS_LIST item=transaction} + + + + + + {/foreach} + +
{$TRANSACTION}{$AMOUNT}{$DATE}
{$transaction.transaction}{$transaction.currency_symbol}{$transaction.amount} {$transaction.currency}{$transaction.date_friendly}
+ {else} +
+
+ {$NO_TRANSACTIONS} +
+
+ {/if} + {/nocache} +
+
+
+
+ +{include file='footer.tpl'} \ No newline at end of file diff --git a/custom/templates/Nexus/store/widgets/latest_purchases.tpl b/custom/templates/Nexus/store/widgets/latest_purchases.tpl index 29893b0f..e1833a4d 100755 --- a/custom/templates/Nexus/store/widgets/latest_purchases.tpl +++ b/custom/templates/Nexus/store/widgets/latest_purchases.tpl @@ -11,7 +11,7 @@ {$purchase.username} - {$purchase.currency_symbol}{$purchase.price} + {$purchase.currency_symbol}{$purchase.price} {$purchase.currency}
diff --git a/custom/templates/Nexus/wikipro/edit.tpl b/custom/templates/Nexus/wikipro/edit.tpl new file mode 100755 index 00000000..6decee3a --- /dev/null +++ b/custom/templates/Nexus/wikipro/edit.tpl @@ -0,0 +1,39 @@ +{include file='header.tpl'} +{include file='navbar.tpl'} + +

+ {$EDITING_POST} +

+ +{if isset($ERRORS)} +
+ +
+
{$ERROR_TITLE}
+ {foreach from=$ERRORS item=error} +
  • {$error}
  • + {/foreach} +
    +
    +{/if} + +
    +
    +
    +
    +
    +
    + + +
    + + + {$CANCEL} +
    +
    +
    +
    +
    + +{include file='footer.tpl'} \ No newline at end of file diff --git a/custom/templates/Nexus/wikipro/wiki.tpl b/custom/templates/Nexus/wikipro/wiki.tpl new file mode 100755 index 00000000..6ccc0c7c --- /dev/null +++ b/custom/templates/Nexus/wikipro/wiki.tpl @@ -0,0 +1,275 @@ +{include file='header.tpl'} {include file='navbar.tpl'} + +

    {$WIKI}

    + +{* Success messages *} +{if isset($SESSION_SUCCESS_POST)} +
    + +
    +
    {$SUCCESS}
    + {$SESSION_SUCCESS_POST} +
    +
    +{/if} + + +
    + + {if count($PAGES)} + {* Display side wiki page menu *} +
    + + + +
    + + + {* Page content and last edited container *} +
    + + {* Page content container*} +
    + + {* Create a content tab for each page *} + {foreach from=$PAGES item=page} + {if empty($page.subpages)} + {* Add Content *} +
    +
    + {$page.content} +
    + +
    + + {* Add Link and Edit button *} +
    +
    + +
    +
    {$COPIED}: {$BASE_URL}{$page.url}
    + {if {$page.can_edit}} + + {/if} +
    +
    + {/if} + + {if !empty($page.subpages)} + {* Create a content tab for each sub page *} + {foreach from=$page.subpages item=subpage} + {* Add Content *} +
    +
    + {$subpage->content} +
    + +
    + + {* Add Link and Edit button *} +
    +
    + +
    +
    {$COPIED}: {$BASE_URL}{$subpage->url}
    + + {if {$subpage->can_edit}} + + {/if} +
    +
    + {/foreach} + {/if} + {/foreach} +
    + + + {* Add the last edited box *} + {foreach from=$PAGES item=page} + + {* Pages *} + {if empty($page.subpages)} +
    + {if isset($page.editor)} +
    +
    +
    + {$page.editor.username} + {$LAST_EDITED_BY} + +
    + {$page.editor.username} + · {$page.editor.date_friendly} +
    +
    + +
    +
    + {/if} +
    + {/if} + + {* Sub pages *} + {if !empty($page.subpages)} + {foreach from=$page.subpages item=subpage} +
    + {if isset($subpage->editor)} +
    +
    +
    + {$subpage->editor.username} + {$LAST_EDITED_BY} + +
    + {$subpage->editor.username} + · {$subpage->editor.date_friendly} +
    +
    +
    +
    + {/if} +
    + {/foreach} + {/if} + + {/foreach} +
    + + {else} + {* If can't view any pages *} + + {* Add left widgets*} + {if count($WIDGETS_LEFT)} +
    + {foreach from=$WIDGETS_LEFT item=widget} + {$widget} + {/foreach} +
    + {/if} + {* Add message *} +
    +
    + {$NO_PAGES_AVAILABLE} +
    +
    + {/if} + + + {* Right side widgets *} + {if count($WIDGETS_RIGHT)} + +
    + + {if count($WIDGETS_RIGHT) > 1} + {* Disable sticky for right widgets if more than 1 to prevent scrolling issues *} + {foreach from=$WIDGETS_RIGHT item=widget} + {$widget} + {/foreach} + {else} + {* Enable sticky right hand side widgets *} +
    + {foreach from=$WIDGETS_RIGHT item=widget} + {$widget} + {/foreach} +
    + {/if} +
    + {/if} + +
    + +{include file='footer.tpl'} \ No newline at end of file From af77359d3fb4fab3ca1d30dcde2249d9528f08f7 Mon Sep 17 00:00:00 2001 From: PadowYT2 <71085027+PadowYT2@users.noreply.github.com> Date: Sun, 14 Aug 2022 18:29:58 +0300 Subject: [PATCH 5/5] 1.7.1 --- custom/templates/Nexus/ghost/index.tpl | 2 +- custom/templates/Nexus/header.tpl | 2 +- custom/templates/Nexus/template.php | 4 ++-- .../templates/Nexus/template_settings/classes/NexusUtil.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/custom/templates/Nexus/ghost/index.tpl b/custom/templates/Nexus/ghost/index.tpl index 5dd89443..d3806822 100755 --- a/custom/templates/Nexus/ghost/index.tpl +++ b/custom/templates/Nexus/ghost/index.tpl @@ -1,4 +1,4 @@ {include file='ghost/post-list.tpl'} -{* Will be in 1.7.1 +{* Will be in 1.7.x {$PAGINATION} *} \ No newline at end of file diff --git a/custom/templates/Nexus/header.tpl b/custom/templates/Nexus/header.tpl index c4bfeb57..bbdea764 100755 --- a/custom/templates/Nexus/header.tpl +++ b/custom/templates/Nexus/header.tpl @@ -13,7 +13,7 @@ value="{$PAGE_KEYWORDS}"}{else}{assign var="PAGEKEYWORDS" value=" "}{/if} - + diff --git a/custom/templates/Nexus/template.php b/custom/templates/Nexus/template.php index 29cb054d..c5edaa96 100755 --- a/custom/templates/Nexus/template.php +++ b/custom/templates/Nexus/template.php @@ -29,7 +29,7 @@ public function __construct($cache, $smarty, $language, $user, $pages) { $template = [ 'name' => 'Nexus', - 'version' => '1.7.0', + 'version' => '1.7.1', 'nl_version' => '2.0.2', 'author' => 'Vertisan', ]; @@ -55,7 +55,7 @@ public function __construct($cache, $smarty, $language, $user, $pages) $this->addJSFiles([ $template['path'] . 'js/fomantic.min.js' => [], - $template['path'] . 'js/nexus.js?v=1.7.0' => [], + $template['path'] . 'js/nexus.js?v=1.7.1' => [], ]); $smarty->assign('TEMPLATE', $template); diff --git a/custom/templates/Nexus/template_settings/classes/NexusUtil.php b/custom/templates/Nexus/template_settings/classes/NexusUtil.php index 548b516e..56cd7076 100755 --- a/custom/templates/Nexus/template_settings/classes/NexusUtil.php +++ b/custom/templates/Nexus/template_settings/classes/NexusUtil.php @@ -182,7 +182,7 @@ public static function initialise() */ public static function updateCheckNexus() { - $update_check_nexus_response = HttpClient::get('https://updates.wemx.net/api/v2/Nexus/updateCheck&version=1.7.0'); + $update_check_nexus_response = HttpClient::get('https://updates.wemx.net/api/v2/Nexus/updateCheck&version=1.7.1'); if ($update_check_nexus_response->hasError()) { return $update_check_nexus_response->getError();