Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

@@ -2,9 +2,9 @@
/**
* @brief Advertisement locations extension
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Announcements Extension
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -0,0 +1,60 @@
<?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
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\BBCode;
/* 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;
}
/**
* BBCode Tag
*/
class _{class}
{
/**
* Permission Check
*
* @param \IPS\Member $member The member
* @param string $area The Editor area
* @return bool
*/
public function permissionCheck( \IPS\Member $member, $area )
{
return \IPS\Text\Parser::canUse( $member, 'ipsLink', $area );
}
/**
* Get Configuration
*
* @code
return array(
'tag' => 'span', // The HTML tag to use
'attributes' => array( ... ) // Key/Value pairs of attributes to use (optional) - can use {option} to get the [tag=option] value
'callback' => function( $node, $matches, $document ) // A callback to modify the DOMNode object
{
...
},
'block' => FALSE, // If this is a block-level tag (optional, default false)
'single' => FALSE, // If this is a single tag, with no content (optional, default false)
)
* @endcode
* @return array
*/
public function getConfiguration()
{
return array( 'tag' => 'span', 'attributes' => array( 'class' => 'example' ) );
}
}
@@ -2,9 +2,9 @@
/**
* @brief Build process plugin
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -36,7 +36,6 @@ class _{class}
/**
* Finish Build
* Moved the pbckcode acs.js file over from development as CKEditor's build routine seems to break it
*
* @return void
*/
@@ -1,10 +1,10 @@
<?php
/**
* @brief Bulk mail extension
* @brief Bulk Mail Extension
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -20,54 +20,34 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
}
/**
* Bulk mail extension
* Bulk Mail Extension
*/
class _{class}
{
/**
* Get Setting Field
* Get tags that can be used in bulk mail
*
* @param mixed $criteria Value returned from the save() method
* @return array Array of form elements
* @return array
*/
public function getSettingField( $criteria )
public function getTags()
{
return array();
return array(
'{some_tag}' => 'Explanation of tag',
);
}
/**
* Save the filter data
/**
* Get value for tags
*
* @param array $post Form values
* @return mixed False, or an array of data to use later when filtering the members
* @throws \LogicException
* @param string $content Bulk Mail Content (passed in case a particular tag is computationally expensive so that the extension may "sniff" for it and elect not to perform the computation if it is not used)
* @param int $type 0=All, 1=Global, 2=Member-specific
* @param NULL|\IPS\Member $member Member object if $type is 0 or 2
* @return array
*/
public function save( $post )
public function returnTagValues( $content, $type, $member )
{
return FALSE;
}
/**
* Get where clause to add to the member retrieval database query
*
* @param mixed $data The array returned from the save() method
* @return string|array|NULL Where clause
*/
public function getQueryWhereClause( $data )
{
return NULL;
}
/**
* Callback for member retrieval database query
* Can be used to set joins
*
* @param mixed $data The array returned from the save() method
* @param \IPS\Db\Query $query The query
* @return void
*/
public function queryCallback( &$query )
{
return NULL;
return array(
'{some_tag}' => 'Value',
);
}
}
@@ -2,9 +2,9 @@
/**
* @brief Community Enhancements
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -0,0 +1,64 @@
<?php
/**
* @brief Contact Us 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
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\ContactUs;
/* 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;
}
/**
* Contact Us extension
*/
class _{class}
{
/**
* Process Form
*
* @param \IPS\Helpers\Form $form The form
* @param array $formFields Additional Configuration Formfields
* @param array $options Type Radio Form Options
* @param array $toggles Type Radio Form Toggles
* @param array $disabled Type Radio Form Disabled Options
* @return void
*/
public function process( &$form, &$formFields, &$options, &$toggles, &$disabled )
{
}
/**
* Allows extensions to do something before the form is shown... e.g. add your own custom fields, or redirect the page
*
* @param \IPS\Helpers\Form $form The form
* @return void
*/
public function runBeforeFormOutput( &$form )
{
}
/**
* Handle the Form
*
* @param array $values Values from form
* @return void
*/
public function handleForm( array $values )
{
return FALSE;
}
}
@@ -2,9 +2,9 @@
/**
* @brief Content Router extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Create Menu Extension : {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Dashboard extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Editor Extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Editor Media: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -27,11 +27,12 @@ class _{class}
/**
* Get Counts
*
* @param \IPS\Member $member The member
* @param bool $images TRUE = Images. FALSE = other attachments.
* @return int array( 'Title' => 0 )
* @param \IPS\Member $member The member
* @param string $postKey The post key
* @param string|null $search The search term (or NULL for all)
* @return int
*/
public function count( $member, $images )
public function count( $member, $postKey, $search=NULL )
{
return array();
}
@@ -40,14 +41,13 @@ class _{class}
* Get Files
*
* @param \IPS\Member $member The member
* @param bool $images TRUE = Images. FALSE = other attachments.
* @param string|null $search The search term (or NULL for all)
* @param string $postKey The post key
* @param int $page Page
* @param int $limit Number to get
* @return array array( 'Title' => array( (IPS\File, \IPS\File, ... ), ... )
* @return array array( 'Title' => array( 'http://www.example.com/file1.txt' => \IPS\File, 'http://www.example.com/file2.txt' => \IPS\File, ... ), ... )
*/
public function get( $member, $images, $search, $postKey, $page, $limit )
public function get( $member, $search, $postKey, $page, $limit )
{
return array();
}
@@ -2,9 +2,9 @@
/**
* @brief File Storage Extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Front Navigation Extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -35,11 +35,23 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
}
/**
* Can access?
* Can this item be used at all?
* For example, if this will link to a particular feature which has been diabled, it should
* not be available, even if the user has permission
*
* @return bool
*/
public function canView()
public static function isEnabled()
{
return TRUE;
}
/**
* Can the currently logged in user access the content this item links to?
*
* @return bool
*/
public function canAccessContent()
{
return TRUE;
}
@@ -73,14 +85,15 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
{
return \IPS\Dispatcher::i()->application->directory === '{app}';
}
/**
* Children
*
* @param bool $noStore If true, will skip datastore and get from DB (used for ACP preview)
* @return array
*/
public function children()
public function children( $noStore=FALSE )
{
return array();
return NULL;
}
}
@@ -2,9 +2,9 @@
/**
* @brief Admin CP Group Form
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Group Limits
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Incoming Email Handler
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief IP Address Lookup extension
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -24,6 +24,28 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
*/
class _{class}
{
/**
* Supported in the ACP IP address lookup tool?
*
* @return bool
* @note If the method does not exist in an extension, the result is presumed to be TRUE
*/
public function supportedInAcp()
{
return TRUE;
}
/**
* Supported in the ModCP IP address lookup tool?
*
* @return bool
* @note If the method does not exist in an extension, the result is presumed to be TRUE
*/
public function supportedInModCp()
{
return TRUE;
}
/**
* Find Records by IP
*
@@ -36,12 +58,12 @@ class _{class}
/* Return count */
if ( $baseUrl === NULL )
{
return \IPS\Db::i()->select( 'COUNT(*)', 'database_table_name', array( "ip_address LIKE CONCAT( ?, '%' )", $ip ) )->first();
return \IPS\Db::i()->select( 'COUNT(*)', 'database_table_name', array( "ip_address LIKE ?", $ip ) )->first();
}
/* Init Table */
// Replace database_table_name with the database table
$table = new \IPS\Helpers\Table\Db( 'database_table_name', $baseUrl, array( "ip_address LIKE CONCAT( ?, '%' )", $ip ) );
$table = new \IPS\Helpers\Table\Db( 'database_table_name', $baseUrl, array( "ip_address LIKE ?", $ip ) );
/* Return */
return (string) $table;
@@ -2,9 +2,9 @@
/**
* @brief ACP Live Search Extension
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -45,14 +45,24 @@ class _{class}
return array();
}
/**
* Check we have access
*
* @return bool
*/
public function hasAccess()
{
/* Check Permissions */
return TRUE;
}
/**
* Check we have access
*
* @return bool
*/
public function hasAccess()
{
/* Check Permissions */
return TRUE;
}
/**
* Is default for current page?
*
* @return bool
*/
public function isDefault()
{
return \IPS\Dispatcher::i()->application->directory == 'myapp';
}
}
@@ -0,0 +1,36 @@
<?php
/**
* @brief Multi-Factor Authentication Area
* @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
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\MFAArea;
/* 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;
}
/**
* Multi-Factor Authentication Area
*/
class _{class}
{
/**
* Is this area available and should show in the ACP configuration?
*
* @return bool
*/
public function isEnabled()
{
return TRUE;
}
}
@@ -0,0 +1,73 @@
<?php
/**
* @brief Member Filter 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
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\MemberFilter;
/* 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;
}
/**
* Member Filter Extension
*/
class _{class}
{
/**
* Get Setting Field
*
* @param mixed $criteria Value returned from the save() method
* @return array Array of form elements
*/
public function getSettingField( $criteria )
{
return array();
}
/**
* Save the filter data
*
* @param array $post Form values
* @return mixed False, or an array of data to use later when filtering the members
* @throws \LogicException
*/
public function save( $post )
{
return FALSE;
}
/**
* Get where clause to add to the member retrieval database query
*
* @param mixed $data The array returned from the save() method
* @return string|array|NULL Where clause
*/
public function getQueryWhereClause( $data )
{
return NULL;
}
/**
* Callback for member retrieval database query
* Can be used to set joins
*
* @param mixed $data The array returned from the save() method
* @param \IPS\Db\Query $query The query
* @return void
*/
public function queryCallback( $data, &$query )
{
return NULL;
}
}
@@ -2,9 +2,9 @@
/**
* @brief Admin CP Member Form
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Member Sync
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -124,5 +124,31 @@ class _{class}
*/
public function onDelete( $member )
{
}
/**
* Email address is changed
*
* @param \IPS\Member $member The member
* @param string $new New email address
* @param string $old Old email address
* @return void
*/
public function onEmailChange( $member, $new, $old )
{
}
/**
* Password is changed
*
* @param \IPS\Member $member The member
* @param string $new New password
* @return void
*/
public function onPassChange( $member, $new )
{
}
}
@@ -2,9 +2,9 @@
/**
* @brief Moderator Control Panel Extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -27,7 +27,7 @@ class _{class}
/**
* Returns the primary tab key for the navigation bar
*
* @return string
* @return string|null
*/
public function getTab()
{
@@ -2,9 +2,9 @@
/**
* @brief Moderator Control Panel Member Management Extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -27,7 +27,7 @@ class _{class}
/**
* Returns the tab key for the navigation bar
*
* @return string
* @return string|null
*/
public function getTab()
{
@@ -2,9 +2,9 @@
/**
* @brief Moderator Permissions
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Notification Options
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -52,7 +52,7 @@ class _{class}
* @code
return array(
'title' => "Mark has replied to A Topic", // The notification title
'url' => new \IPS\Http\Url( ... ), // The URL the notification should link to
'url' => \IPS\Http\Url::internal( ... ), // The URL the notification should link to
'content' => "Lorem ipsum dolar sit", // [Optional] Any appropriate content. Do not format this like an email where the text
// explains what the notification is about - just include any appropriate content.
// For example, if the notification is about a post, set this as the body of the post.
@@ -64,7 +64,7 @@ class _{class}
{
return array(
'title' => "Mark has replied to A Topic", // The notification title
'url' => new \IPS\Http\Url( ... ), // The URL the notification should link to
'url' => \IPS\Http\Url::internal( ... ), // The URL the notification should link to
'content' => "Lorem ipsum dolar sit", // [Optional] Any appropriate content. Do not format this like an email where the text
// explains what the notification is about - just include any appropriate content.
// For example, if the notification is about a post, set this as the body of the post.
@@ -2,9 +2,9 @@
/**
* @brief Template Plugin
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Permissions
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Profile extension: {class}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Background Task
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -24,13 +24,24 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
*/
class _{class}
{
/**
* Parse data before queuing
*
* @param array $data
* @return array
*/
public function preQueueData( $data )
{
return $data;
}
/**
* Run Background Task
*
* @param mixed $data Data as it was passed to \IPS\Task::queue()
* @param int $offset Offset
* @return int|null New offset or NULL if complete
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
* @param mixed $data Data as it was passed to \IPS\Task::queue()
* @param int $offset Offset
* @return int New offset
* @throws \IPS\Task\Queue\OutOfRangeException Indicates offset doesn't exist and thus task is complete
*/
public function run( $data, $offset )
{
@@ -42,11 +53,22 @@ class _{class}
*
* @param mixed $data Data as it was passed to \IPS\Task::queue()
* @param int $offset Offset
* @return array( 'text' => 'Doing something...', 'complete' => 50 ) Text explaning task and percentage complete
* @return array( 'text' => 'Doing something...', 'complete' => 50 ) Text explaining task and percentage complete
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
*/
public function getProgress( $data, $offset )
{
return array( 'text' => 'Doing something...', 'complete' => 50 );
}
}
/**
* Perform post-completion processing
*
* @param array $data
* @return void
*/
public function postComplete( $data )
{
}
}
@@ -2,9 +2,9 @@
/**
* @brief Support {class} in sitemaps
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -2,9 +2,9 @@
/**
* @brief Uninstall callback
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
@@ -43,4 +43,27 @@ class _{class}
public function postUninstall( $application )
{
}
/**
* Code to execute when other applications are uninstalled
*
* @param string $application Application directory
* @return void
* @deprecated This is here for backwards-compatibility - all new code should go in onOtherUninstall
*/
public function onOtherAppUninstall( $application )
{
return $this->onOtherUninstall( $application );
}
/**
* Code to execute when other applications or plugins are uninstalled
*
* @param string $application Application directory
* @param int $plugin Plugin ID
* @return void
*/
public function onOtherUninstall( $application=NULL, $plugin=NULL )
{
}
}