Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

-23
View File
@@ -1,23 +0,0 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
class nexus_hook_Database extends _HOOK_CLASS_
{
/**
* Constructor
* Gets stores which are always needed to save individual queries
*
*/
public function __construct()
{
$this->initLoad[] = 'nexusPackagesWithReviews';
/* Hand over to normal method */
parent::__construct();
}
}
@@ -1,78 +0,0 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
class nexus_hook_DispatcherAdmin extends _HOOK_CLASS_
{
public function finish()
{
if( !\IPS\Request::i()->isAjax() )
{
$dismiss = [];
$updated = false;
if ( isset( \IPS\Request::i()->cookie['acpDeprecations'] ) )
{
$dismiss = json_decode( \IPS\Request::i()->cookie['acpDeprecations'], TRUE );
if ( ! is_array( $dismiss ) )
{
$dismiss = [];
}
}
if ( isset( \IPS\Request::i()->deprecationDismiss ) )
{
$updated = true;
$dismiss[ \IPS\Request::i()->deprecationDismiss ] = \IPS\DateTime::create()->add( new \DateInterval( 'P1M' ) )->getTimestamp();
}
foreach ( $dismiss as $key => $value )
{
if ( $value < time() )
{
$updated = true;
unset( $dismiss[ $key ] );
}
}
if ( $updated )
{
\IPS\Request::i()->setCookie( 'acpDeprecations', json_encode( $dismiss ), \IPS\DateTime::create()->add( new \DateInterval( 'P1Y' ) ) );
}
if ( isset( \IPS\Request::i()->deprecationDismiss ) )
{
\IPS\Output::i()->redirect( \IPS\Request::i()->url()->stripQueryString( 'deprecationDismiss' ) );
}
if( $this->module->application == 'nexus' AND $this->module->key == 'support' and ! in_array( 'support', array_keys( $dismiss ) ) )
{
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->message( \IPS\Member::loggedIn()->language()->addToStack('nexus_support_deprecated', NULL, [ 'sprintf' => [ \IPS\Request::i()->url()->setQueryString('deprecationDismiss', 'support') ] ] ), 'warning' ) . \IPS\Output::i()->output;
}
if( $this->module->application == 'nexus' AND ( ( $this->module->key == 'payments' AND $this->controller == 'shipping' ) OR ( $this->module->key == 'store' AND $this->controller == 'packages' ) ) and ! in_array( 'physical', array_keys( $dismiss ) ) )
{
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->message( \IPS\Member::loggedIn()->language()->addToStack('nexus_physical_deprecated', NULL, [ 'sprintf' => [ \IPS\Request::i()->url()->setQueryString('deprecationDismiss', 'physical') ] ] ), 'warning' ) . \IPS\Output::i()->output;
}
if( $this->module->application == 'nexus' AND ( $this->module->key == 'payments' AND $this->controller == 'paymentsettings' ) )
{
foreach ( \IPS\nexus\Gateway::roots() as $gateway )
{
if( \in_array( $gateway->gateway, array( 'TwoCheckout', 'Braintree' ) ) AND $gateway->active )
{
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->message( 'nexus_gateways_deprecated', 'warning' ) . \IPS\Output::i()->output;
break;
}
}
}
}
return parent::finish();
}
}
-129
View File
@@ -1,129 +0,0 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
class nexus_hook_clientAreaLink extends _HOOK_CLASS_
{
/* !Hook Data - DO NOT REMOVE */
public static function hookData() {
return array_merge_recursive( array (
'userBar' =>
array (
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}}',
),
),
'mobileNavigation' =>
array (
0 =>
array (
'selector' => '#elUserNav_mobile',
'type' => 'add_inside_end',
'content' => '{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'store\' ) )}}
{template="cartHeaderMobile" app="nexus" group="store" params=""}
{{endif}}',
),
1 =>
array (
'selector' => '#elMobileDrawer > div.ipsDrawer_menu > div.ipsDrawer_content',
'type' => 'add_inside_start',
'content' => '{{if !\IPS\Member::loggedIn()->member_id AND \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( \'nexus\', \'store\' ) )}}
<ul id=\'elUserNav_mobile\' class=\'ipsList_inline signed_in ipsClearfix\'>
{template="cartHeaderMobile" app="nexus" group="store" params=""}
</ul>
{{endif}}',
),
),
'globalTemplate' =>
array (
0 =>
array (
'selector' => 'html > head',
'type' => 'add_inside_end',
'content' => '{{if \IPS\Settings::i()->maxmind_key and \IPS\Settings::i()->maxmind_id and \IPS\Settings::i()->maxmind_tracking_code}}
<script>
(function() {
var mmapiws = window.__mmapiws = window.__mmapiws || {};
mmapiws.accountId = "{expression=\'\IPS\Settings::i()->maxmind_id\'}";
var loadDeviceJs = function() {
var element = document.createElement(\'script\');
element.async = true;
element.src = \'https://device.maxmind.com/js/device.js\';
document.body.appendChild(element);
};
if (window.addEventListener) {
window.addEventListener(\'load\', loadDeviceJs, false);
} else if (window.attachEvent) {
window.attachEvent(\'onload\', loadDeviceJs);
}
})();
</script>
{{endif}}',
),
),
), parent::hookData() );
}
/* End Hook Data */
}
@@ -1,22 +0,0 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
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' );
}
}
-29
View File
@@ -1,29 +0,0 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
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\nexus\Package::haveRegistrationProducts() )
{
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=store&controller=store&do=register', 'front', 'store' ) );
}
else if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'nexus', 'subscriptions' ) ) and \IPS\Settings::i()->nexus_subs_enabled and \IPS\Settings::i()->nexus_subs_register )
{
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=subscriptions&controller=subscriptions&register=1', 'front', 'nexus_subscriptions' ) );
}
return parent::manage();
}
}