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 Advertisement locations extension
* @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 Forums
* @since 16 Jul 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\AdvertisementLocations;
@@ -0,0 +1,56 @@
<?php
/**
* @brief Advertisement locations extension
* @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 Forums
* @since 16 Jul 2014
*/
namespace IPS\forums\extensions\core\AdvertisementLocations;
/* 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;
}
/**
* Advertisement locations extension
*/
class _IndexView
{
/**
* Get the locations and the additional settings
*
* @param array $settings Current setting values
* @return array Array with two elements: 'locations' which should have keys as the location keys and values as the fields to toggle, and 'settings' which are additional fields to add to the form
*/
public function getSettings( $settings )
{
return array(
'locations' => array( 'ad_fluid_index_view' => array( 'ad_fluid_index_view_number', 'ad_fluid_index_view_repeat' ) ),
'settings' => array(
new \IPS\Helpers\Form\Number( 'ad_fluid_index_view_number', ( isset( $settings['ad_fluid_index_view_number'] ) ) ? $settings['ad_fluid_index_view_number'] : 0, FALSE, array(), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('ad_fluid_index_view_number_suffix'), 'ad_fluid_index_view_number' ),
new \IPS\Helpers\Form\Number( 'ad_fluid_index_view_repeat', ( isset( $settings['ad_fluid_index_view_repeat'] ) ) ? $settings['ad_fluid_index_view_repeat'] : 0, FALSE, array( 'unlimited' => -1 ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('ad_fluid_index_view_repeat_suffix'), 'ad_fluid_index_view_repeat' )
)
);
}
/**
* Return an array of setting values to store
*
* @param array $values Values from the form submission
* @return array Array of setting key => value to store
*/
public function parseSettings( $values )
{
return array(
'ad_fluid_index_view_number' => $values['ad_fluid_index_view_number'],
'ad_fluid_index_view_repeat' => $values['ad_fluid_index_view_repeat']
);
}
}
@@ -1,13 +1,12 @@
<?php
/**
* @brief Advertisement locations extension
* @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 Forums
* @since 16 Jul 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\AdvertisementLocations;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Announcements Extension : Forums
* @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 Forums
* @since 28 Apr 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\Announcements;
@@ -1,13 +1,12 @@
<?php
/**
* @brief BBCode Tag
* @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 Forums
* @since 08 Feb 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\BBCode;
@@ -1,13 +1,12 @@
<?php
/**
* @brief BBCode Tag
* @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 Forums
* @since 08 Feb 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\BBCode;
@@ -1,13 +1,12 @@
<?php
/**
* @brief BBCode Tag
* @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 Forums
* @since 08 Feb 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\BBCode;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Moderator Permissions: Topics
* @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 Forums
* @since 16 Jan 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\ContentModeratorPermissions;
@@ -109,8 +108,8 @@ class _Topics
\IPS\Content\Search\Index::i()->removeClassFromSearchIndex( 'IPS\forums\Topic', $forum->id );
\IPS\Content\Search\Index::i()->removeClassFromSearchIndex( 'IPS\forums\Topic\Post', $forum->id );
}
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\forums\Topic', 'container' => $forum->id ) );
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\forums\Topic\Post', 'container' => $forum->id ) );
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\forums\Topic', 'container' => $forum->id ), 5, 'container' );
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\forums\Topic\Post', 'container' => $forum->id ), 5, 'container' );
}
}
}
@@ -1,13 +1,12 @@
<?php
/**
* @brief Content Router extension: Topics
* @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 Forums
* @since 15 Jan 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\ContentRouter;
@@ -32,10 +31,10 @@ class _Topics
/**
* Constructor
*
* @param \IPS\Member|NULL $member If checking access, the member to check for, or NULL to not check access
* @param \IPS\Member|IPS\Member\Group|NULL $member If checking access, the member/group to check for, or NULL to not check access
* @return void
*/
public function __construct( \IPS\Member $member = NULL )
public function __construct( $member = NULL )
{
if ( $member === NULL or $member->canAccessModule( \IPS\Application\Module::get( 'forums', 'forums', 'front' ) ) )
{
@@ -1,13 +1,12 @@
<?php
/**
* @brief Create Menu Extension : Topic
* @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 Forums
* @since 14 Feb 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\CreateMenu;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Editor Extension: Forums
* @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 Forums
* @since 08 Jan 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\EditorLocations;
@@ -167,6 +166,27 @@ class _Forums
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
*
@@ -186,7 +206,14 @@ class _Forums
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 )
{
@@ -1,13 +1,12 @@
<?php
/**
* @brief File Storage Extension: Icons
* @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 Forums
* @since 06 Feb 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\FileStorage;
@@ -78,7 +77,7 @@ class _Icons
/**
* Check if a file is valid
*
* @param \IPS\Http\Url $file The file to check
* @param string $file The file path to check
* @return bool
*/
public function isValidFile( $file )
@@ -1,13 +1,12 @@
<?php
/**
* @brief Front Navigation Extension: Forums
* @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 Forums
* @since 08 Jan 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\FrontNavigation;
@@ -71,6 +70,6 @@ class _Forums extends \IPS\core\FrontNavigation\FrontNavigationAbstract
*/
public function active()
{
return \IPS\Dispatcher::i()->application->directory === 'forums';
return !\IPS\core\FrontNavigation::$clubTabActive and \IPS\Dispatcher::i()->application->directory === 'forums';
}
}
@@ -1,13 +1,12 @@
<?php
/**
* @brief ACP Live Search Extension
* @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 Forums
* @since 08 Apr 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\LiveSearch;
@@ -54,7 +53,7 @@ class _Forums
$forums = \IPS\Db::i()->select(
"*",
'forums_forums',
array( "word_custom LIKE CONCAT( '%', ?, '%' ) AND lang_id=?", $searchTerm, \IPS\Member::loggedIn()->language()->id ),
array( "club_id IS NULL AND word_custom LIKE CONCAT( '%', ?, '%' ) AND lang_id=?", $searchTerm, \IPS\Member::loggedIn()->language()->id ),
NULL,
NULL
)->join(
@@ -1,13 +1,12 @@
<?php
/**
* @brief Member Sync
* @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 Forums
* @since 14 Jul 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\MemberSync;
@@ -35,6 +34,7 @@ class _Forums
{
\IPS\Db::i()->update( 'forums_answer_ratings', array( 'member' => $member->member_id ), array( 'member=?', $member2->member_id ), array(), NULL, \IPS\Db::IGNORE );
\IPS\Db::i()->update( 'forums_question_ratings', array( 'member' => $member->member_id ), array( 'member=?', $member2->member_id ), array(), NULL, \IPS\Db::IGNORE );
\IPS\Db::i()->update( 'forums_view_method', array( 'member_id' => $member->member_id ), array( 'member_id=?', $member2->member_id ), array(), NULL, \IPS\Db::IGNORE );
\IPS\Db::i()->update( 'forums_rss_import', array( 'rss_import_mid' => $member->member_id ), array( 'rss_import_mid=?', $member2->member_id ) );
if ( \IPS\Settings::i()->archive_on )
@@ -63,6 +63,7 @@ class _Forums
{
\IPS\Db::i()->delete( 'forums_answer_ratings', array( 'member=?', $member->member_id ) );
\IPS\Db::i()->delete( 'forums_question_ratings', array( 'member=?', $member->member_id ) );
\IPS\Db::i()->delete( 'forums_view_method', array( 'member_id=?', $member->member_id ) );
\IPS\Db::i()->update( 'forums_rss_import', array( 'rss_import_mid' => 0 ), array( 'rss_import_mid=?', $member->member_id ) );
}
}
@@ -1,13 +1,12 @@
<?php
/**
* @brief Permissions
* @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 Forums
* @since 16 Apr 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\Permissions;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Background Task
* @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 Forums
* @since 18 Mar 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\Queue;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Background Task
* @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 Forums
* @since 18 Mar 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\Queue;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Background Task
* @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 Forums
* @since 18 Mar 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\Queue;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Background Task
* @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 Converter
* @since 26 Feb 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\Queue;
@@ -1,13 +1,12 @@
<?php
/**
* @brief Background Task
* @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 Forums
* @since 04 Jan 2016
* @version SVN_VERSION_NUMBER
*/
namespace IPS\forums\extensions\core\Queue;