Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -0,0 +1,69 @@
<?php
/**
* @brief ACP Member Profile: Block
* @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
* @since 20 Nov 2017
*/
namespace IPS\core\MemberACPProfile;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* @brief ACP Member Profile: Block
*/
abstract class _Block
{
/**
* @brief Member
*/
protected $member;
/**
* Constructor
*
* @param \IPS\Member $member Member
* @return void
*/
public function __construct( \IPS\Member $member )
{
$this->member = $member;
}
/**
* Get Title
*
* @return string
*/
public static function title()
{
$class = get_called_class();
$exploded = explode( '\\', $class );
return \IPS\Member::loggedIn()->language()->addToStack( 'memberACPProfileTitle_' . $exploded[1] . '_' . $exploded[5] );
}
/**
* Get Output
*
* @return string
*/
abstract public function output();
/**
* Edit Window
*
* @return string
*/
public function edit()
{
\IPS\Output::i()->error( 'node_error', '2C114/T', 404, '' );
}
}
@@ -0,0 +1,41 @@
<?php
/**
* @brief ACP Member Profile: Block
* @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
* @since 20 Nov 2017
*/
namespace IPS\core\MemberACPProfile;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* @brief ACP Member Profile: Block
*/
abstract class _LazyLoadingBlock extends Block
{
/**
* Get Output
*
* @return string
*/
public function output()
{
return \IPS\Theme::i()->getTemplate('memberprofile')->lazyLoad( $this->member, get_called_class() );
}
/**
* Get Real Output
*
* @return string
*/
abstract public function lazyOutput();
}
@@ -0,0 +1,94 @@
<?php
/**
* @brief ACP Member Profile: Main Tab
* @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
* @since 20 Nov 2017
*/
namespace IPS\core\MemberACPProfile;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* @brief ACP Member Profile: Main Tab
*/
abstract class _MainTab
{
/**
* @brief Member
*/
protected $member;
/**
* Constructor
*
* @param \IPS\Member $member Member
* @return void
*/
public function __construct( \IPS\Member $member )
{
$this->member = $member;
}
/**
* Get Title
*
* @return string
*/
public static function title()
{
$class = get_called_class();
$exploded = explode( '\\', $class );
return \IPS\Member::loggedIn()->language()->addToStack( 'memberACPProfileTitle_' . $exploded[1] . '_' . $exploded[5] );
}
/**
* Get left-column blocks
*
* @return array
*/
public function leftColumnBlocks()
{
return array();
}
/**
* Get main-column blocks
*
* @return array
*/
public function mainColumnBlocks()
{
return array();
}
/**
* Get Output
*
* @return string
*/
public function output()
{
$leftColumnBlocks = array();
foreach ( $this->leftColumnBlocks() as $class )
{
$leftColumnBlocks[] = new $class( $this->member );
}
$mainColumnBlocks = array();
foreach ( $this->mainColumnBlocks() as $class )
{
$mainColumnBlocks[] = new $class( $this->member );
}
return \IPS\Theme::i()->getTemplate('memberprofile')->tabTemplate( $leftColumnBlocks, $mainColumnBlocks );
}
}
@@ -0,0 +1,82 @@
<?php
/**
* @brief Member Restrictions Extension Base
* @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
* @since 30 Nov 2017
*/
namespace IPS\core\MemberACPProfile;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* @brief Member Restrictions Extension Base
*/
class _Restriction
{
/**
* @brief Member
*/
protected $member;
/**
* Constructor
*
* @param \IPS\Member $member The member
* @return void
*/
public function __construct( \IPS\Member $member )
{
$this->member = $member;
}
/**
* Is this extension available?
*
* @return bool
*/
public function enabled()
{
return TRUE;
}
/**
* Modify Edit Restrictions form
*
* @param \IPS\Helpers\Form $form The form
* @return void
*/
public function form( \IPS\Helpers\Form $form )
{
}
/**
* Save Form
*
* @param array $values Values from form
* @return void
*/
public function save( $values )
{
}
/**
* What restrictions are active on the account?
*
* @return array
*/
public function activeRestrictions()
{
return array();
}
}
@@ -0,0 +1,92 @@
<?php
/**
* @brief ACP Member Profile: Tabbed Block
* @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
* @since 22 Nov 2017
*/
namespace IPS\core\MemberACPProfile;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* @brief ACP Member Profile: Tabbed Block
*/
abstract class _TabbedBlock extends Block
{
/**
* Get Output
*
* @return string
*/
public function output()
{
$tabs = $this->tabs();
if ( !count( $tabs ) )
{
return '';
}
$tabKeys = array_keys( $tabs );
$exploded = explode( '\\', get_called_class() );
$tabParam = $exploded[1] . '_' . $exploded[5];
$activeTabKey = ( isset( \IPS\Request::i()->block[$tabParam] ) and array_key_exists( \IPS\Request::i()->block[$tabParam], $tabs ) ) ? \IPS\Request::i()->block[$tabParam] : array_shift( $tabKeys );
return \IPS\Theme::i()->getTemplate('memberprofile')->tabbedBlock( $this->member, $tabParam, $this->blockTitle(), $tabs, $activeTabKey, $this->tabOutput( $activeTabKey ), $this->showEditLink() ? $this->editLink() : NULL );
}
/**
* Show Edit Link?
*
* @return bool
*/
protected function showEditLink()
{
return false;
}
/**
* Edit Link
*
* @return bool
*/
protected function editLink()
{
return \IPS\Http\Url::internal("app=core&module=members&controller=members&do=editBlock")->setQueryString( array(
'block' => get_called_class(),
'id' => $this->member->member_id
) );
}
/**
* Get Block Title
*
* @return string
*/
public function blockTitle()
{
return NULL;
}
/**
* Get Tab Names
*
* @return string
*/
abstract public function tabs();
/**
* Get output
*
* @return string
*/
abstract public function tabOutput( $tab );
}