Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

@@ -1,13 +1,12 @@
<?php
/**
* @brief Editor Extension: Admin
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 18 Mar 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\extensions\core\EditorLocations;
@@ -32,7 +31,7 @@ class _Admin
*/
public function canUseHtml( $member )
{
return TRUE;
return NULL;
}
/**
@@ -151,6 +150,27 @@ class _Admin
return $this->performRebuild( $offset, $max, array( 'IPS\Text\Parser', 'rebuildAttachmentUrls' ) );
}
/**
* @brief Store image proxy status ( true = enabled )
*/
protected $_imageProxyStatus = null;
/**
* Rebuild content to add or remove image proxy
*
* @param int|null $offset Offset to start from
* @param int|null $max Maximum to parse
* @param bool $status Enable/Disable Image Proxy
* @return int Number completed
* @note This method is optional and will only be called if it exists
*/
public function rebuildImageProxy( $offset, $max, $status=TRUE )
{
$this->_imageProxyStatus = $status;
return $this->performRebuild( $offset, $max, 'parseImageProxy' );
}
/**
* Rebuild content post-upgrade
*
@@ -182,7 +202,14 @@ class _Admin
{
try
{
$rebuilt = call_user_func( $callback, $word['word_custom'] );
if( $callback == 'parseImageProxy' )
{
$rebuilt = \IPS\Text\Parser::parseImageProxy( $word['word_custom'], $this->_imageProxyStatus );
}
else
{
$rebuilt = call_user_func( $callback, $word['word_custom'] );
}
}
catch( \InvalidArgumentException $e )
{
@@ -207,7 +234,14 @@ class _Admin
{
try
{
$newMessage = call_user_func( $callback, \IPS\Settings::i()->$k );
if( $callback == 'parseImageProxy' )
{
$newMessage = \IPS\Text\Parser::parseImageProxy( \IPS\Settings::i()->$k, $this->_imageProxyStatus );
}
else
{
$newMessage = call_user_func( $callback, \IPS\Settings::i()->$k );
}
}
catch( \InvalidArgumentException $e )
{
@@ -239,7 +273,14 @@ class _Admin
/* Update */
try
{
$rebuilt = call_user_func( $callback, $package['p_page'] );
if( $callback == 'parseImageProxy' )
{
$rebuild = \IPS\Text\Parser::parseImageProxy( $package['p_page'], $this->_imageProxyStatus );
}
else
{
$rebuilt = call_user_func( $callback, $package['p_page'] );
}
}
catch( \InvalidArgumentException $e )
{
@@ -1,13 +1,12 @@
<?php
/**
* @brief Editor Extension: Customer Fields and Notes
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 29 Aug 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\extensions\core\EditorLocations;
@@ -34,16 +33,21 @@ class _Customer
{
return NULL;
}
/**
* Can we use attachments in this editor?
*
* @param \IPS\Member $member The member
* @param \IPS\Helpers\Form\Editor $field The editor field
* @param \IPS\Member $member The member
* @param \IPS\Helpers\Form\Editor $editor The editor instance
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
*/
public function canAttach( $member, $field )
public function canAttach( $member, $editor )
{
if( !$editor->options['allowAttachments'] )
{
return FALSE;
}
return NULL;
}
@@ -112,6 +116,27 @@ class _Customer
return $this->performRebuild( $offset, $max, array( 'IPS\Text\LegacyParser', 'parseStatic' ) );
}
/**
* @brief Store image proxy status ( true = enabled )
*/
protected $_imageProxyStatus = null;
/**
* Rebuild content to add or remove image proxy
*
* @param int|null $offset Offset to start from
* @param int|null $max Maximum to parse
* @param bool $status Enable/Disable Image Proxy
* @return int Number completed
* @note This method is optional and will only be called if it exists
*/
public function rebuildImageProxy( $offset, $max, $status=TRUE )
{
$this->_imageProxyStatus = $status;
return $this->performRebuild( $offset, $max, 'parseImageProxy' );
}
/**
* Perform rebuild - abstracted as the call for rebuildContent() and rebuildAttachmentImages() is nearly identical
*
@@ -149,7 +174,14 @@ class _Customer
{
try
{
$rebuilt = call_user_func( $callback, $member[ $fieldId ], \IPS\Member::load( $member['member_id'] ) );
if( $callback == 'parseImageProxy' )
{
$rebuilt = \IPS\Text\Parser::parseImageProxy( $member[ $fieldId ], $this->_imageProxyStatus );
}
else
{
$rebuilt = call_user_func( $callback, $member[ $fieldId ], \IPS\Member::load( $member['member_id'] ) );
}
}
catch( \InvalidArgumentException $e )
{
@@ -1,13 +1,12 @@
<?php
/**
* @brief Editor Extension: Purchase Custom Fields
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 23 Feb 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\extensions\core\EditorLocations;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Editor Extension: Product Reviews
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 5 May 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\extensions\core\EditorLocations;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Editor Extension: Support
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 09 Apr 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\extensions\core\EditorLocations;
@@ -48,6 +47,11 @@ class _Support
{
return FALSE;
}
if( !$field->options['allowAttachments'] )
{
return FALSE;
}
return NULL;
}