Version 4.0.13.1

This commit is contained in:
Neo committed 2025-12-19 04:57:54 -08:00
1 parent f9e857d255
commit c6a86f0d9b
7517 files changed
+597400 -668041

No files matched your search

@@ -0,0 +1,19 @@
//<?php
class nexus_hook_allowStoreRegistrationGuests extends _HOOK_CLASS_
{
/**
* Define that the page should load even if the user is banned and not logged in
*
* @return bool
*/
protected function notAllowedBannedPage()
{
if( $this->application->directory == 'nexus' AND \IPS\Settings::i()->nexus_reg_force AND ( $this->module->key == 'store' OR $this->module->key == 'checkout' ) )
{
return FALSE;
}
return parent::notAllowedBannedPage();
}
}
+106
View File
@@ -0,0 +1,106 @@
//<?php
class nexus_hook_clientAreaLink extends _HOOK_CLASS_
{
/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
return array_merge_recursive( array (
'userBar' =>
array (
0 =>
array (
'selector' => '#elAccountSettingsLink',
'type' => 'add_after',
'content' => '{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'clients\' ) )}}
<li class=\'ipsMenu_item\'><a href=\'{url="app=nexus&module=clients&controller=splash" seoTemplate="clients" protocol="\IPS\Settings::i()->nexus_https"}\' title=\'{lang="module__nexus_clients"}\'>{lang="module__nexus_clients"}</a></li>
{{endif}}',
),
1 =>
array (
'selector' => '#cUserLink',
'type' => 'add_before',
'content' => '{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'store\' ) )}}
{template="cartHeader" app="nexus" group="store" params=""}
{{endif}}',
),
2 =>
array (
'selector' => '#elSignInLink',
'type' => 'add_before',
'content' => '{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'store\' ) )}}
{template="cartHeader" app="nexus" group="store" params=""}
{{endif}}',
),
),
'footer' =>
array (
0 =>
array (
'selector' => '#elFooterLinks',
'type' => 'add_inside_end',
'content' => '{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'clients\' ) ) and settings.network_status}}
<li><a href=\'{url="app=nexus&module=clients&controller=networkStatus" seoTemplate="nexus_network_status"}\'>{lang=\'network_status\'}</a></li>
{{endif}}',
),
),
'mobileNavigation' =>
array (
0 =>
array (
'selector' => '#elAccountSettingsLinkMobile',
'type' => 'add_after',
'content' => '{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'clients\' ) )}}
<li><a href=\'{url="app=nexus&module=clients&controller=splash" seoTemplate="clients" protocol="\IPS\Settings::i()->nexus_https"}\' title=\'{lang="module__nexus_clients"}\'>{lang="module__nexus_clients"}</a></li>
{{endif}}',
),
),
'mobileNavBar' =>
array (
0 =>
array (
'selector' => '#elMobileNav li:last-child',
'type' => 'add_before',
'content' => '{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'store\' ) )}}
{template="cartHeaderMobile" app="nexus" group="store" params=""}
{{endif}}',
),
),
), parent::hookData() );
}
/* End Hook Data */
}
@@ -0,0 +1,16 @@
//<?php
class nexus_hook_clientAreaLinkLoad extends _HOOK_CLASS_
{
/**
* Constructor
* Gets stores which are always needed to save individual queries
*
* @return void
*/
public function __construct()
{
parent::__construct();
$this->templateLoad[] = array( 'nexus', 'front', 'store' );
}
}
View File
Whitespace-only changes.
+19
View File
@@ -0,0 +1,19 @@
//<?php
class nexus_hook_register extends _HOOK_CLASS_
{
/**
* Register
*
* @return void
*/
protected function manage()
{
if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'nexus', 'store' ) ) and ( \IPS\Settings::i()->nexus_reg_force or ( !isset( \IPS\Request::i()->noPurchase ) and \IPS\Db::i()->select( 'COUNT(*)', 'nexus_packages', 'p_reg=1' )->first() ) ) )
{
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=store&controller=store&do=register', 'front', 'store' ) );
}
return call_user_func_array( 'parent::manage', func_get_args() );
}
}