Version 4.0.13.1

This commit is contained in:
Neo committed 2025-12-19 04:57:54 -08:00
1 parent f9e857d255
commit c6a86f0d9b
7517 files changed
+597400 -668041

No files matched your search

@@ -0,0 +1,20 @@
<?php
/**
* @brief {subpackage} Application Class
* @author <a href='{website}'>{author}</a>
* @copyright (c) {year} {author}
* @package IPS Social Suite
* @subpackage {subpackage}
* @since {date}
* @version
*/
namespace IPS\{app};
/**
* {subpackage} Application Class
*/
class _Application extends \IPS\Application
{
}
@@ -0,0 +1,49 @@
<?php
/**
* @brief {controller}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\modules\{location}\{module};
/* 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;
}
/**
* {controller}
*/
class _{controller} extends \IPS\Dispatcher\Controller
{
/**
* Execute
*
* @return void
*/
public function execute()
{
{restriction}
parent::execute();
}
/**
* ...
*
* @return void
*/
protected function manage()
{
// This is the default method if no 'do' parameter is specified
}
// Create new methods with the same name as the 'do' parameter which should execute it
}
@@ -0,0 +1,51 @@
<?php
/**
* @brief {controller}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\modules\{location}\{module};
/* 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;
}
/**
* {controller}
*/
class _{controller} extends \IPS\Dispatcher\Controller
{
/**
* Execute
*
* @return void
*/
public function execute()
{
{restriction}
parent::execute();
}
/**
* Manage
*
* @return void
*/
protected function manage()
{
/* Create the table */
$table = new \IPS\Helpers\Table\Db( '{table_name}', \IPS\Http\Url::internal( 'app={app}&module={module}&controller={controller}' ) );
/* Display */
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->block( 'title', (string) $table );
}
}
@@ -0,0 +1,42 @@
<?php
/**
* @brief {controller}
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\modules\{location}\{module};
/* 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;
}
/**
* {controller}
*/
class _{controller} extends \IPS\Node\Controller
{
/**
* Node Class
*/
protected $nodeClass = '{node_model}';
/**
* Execute
*
* @return void
*/
public function execute()
{
{restriction}
parent::execute();
}
}
+56
View File
@@ -0,0 +1,56 @@
<?php
/**
* @brief {key} Task
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{namespace};
/* 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;
}
/**
* {key} Task
*/
class _{key} extends \IPS\Task
{
/**
* Execute
*
* If ran successfully, should return anything worth logging. Only log something
* worth mentioning (don't log "task ran successfully"). Return NULL (actual NULL, not '' or 0) to not log (which will be most cases).
* If an error occurs which means the task could not finish running, throw an \IPS\Task\Exception - do not log an error as a normal log.
* Tasks should execute within the time of a normal HTTP request.
*
* @return mixed Message to log or NULL
* @throws \IPS\Task\Exception
*/
public function execute()
{
return NULL;
}
/**
* Cleanup
*
* If your task takes longer than 15 minutes to run, this method
* will be called before execute(). Use it to clean up anything which
* may not have been done
*
* @return void
*/
public function cleanup()
{
}
}
@@ -0,0 +1,42 @@
<?php
/**
* @brief {version_human} Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\setup\upg_{version_long};
/* 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;
}
/**
* {version_human} Upgrade Code
*/
class _Upgrade
{
/**
* ...
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step1()
{
return TRUE;
}
// You can create as many additional methods (step2, step3, etc.) as is necessary.
// Each step will be executed in a new HTTP request
}
@@ -0,0 +1,40 @@
//<?php
/**
* @brief {version_human} Upgrade Code
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
/* 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;
}
/**
* {version_human} Upgrade Code
*/
class ips_{app}_setup_upg_{version_long}
{
/**
* ...
*
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step1()
{
return TRUE;
}
// You can create as many additional methods (step2, step3, etc.) as is necessary.
// Each step will be executed in a new HTTP request
}
@@ -0,0 +1,98 @@
<?php
/**
* @brief {key} Widget
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{namespace}\widgets;
/* 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;
}
/**
* {key} Widget
*/
class _{key} extends {class}
{
/**
* @brief Widget Key
*/
public $key = '{key}';
/**
* @brief App
*/
public $app = '{appkey}';
/**
* @brief Plugin
*/
public $plugin = '{pluginid}';
/**
* Initialise this widget
*
* @return void
*/
public function init()
{
// Use this to perform any set up and to assign a template that is not in the following format:
// $this->template( array( \IPS\Theme::i()->getTemplate( 'widgets', $this->app, 'front' ), $this->key ) );
// If you are creating a plugin, uncomment this line:
// $this->template( array( \IPS\Theme::i()->getTemplate( 'plugins', 'core', 'global' ), $this->key ) );
// And then create your template at located at plugins/<your plugin>/dev/html/{key}.phtml
parent::init();
}
/**
* Specify widget configuration
*
* @param null|\IPS\Helpers\Form $form Form object
* @return null|\IPS\Helpers\Form
*/
public function configuration( &$form=null )
{
if ( $form === null )
{
$form = new \IPS\Helpers\Form;
}
// $$form->add( new \IPS\Helpers\Form\XXXX( .... ) );
// return $form;
}
/**
* Ran before saving widget configuration
*
* @param array $values Values from form
* @return array
*/
public function preConfig( $values )
{
return $values;
}
/**
* Render a widget
*
* @return string
*/
public function render()
{
return "";
// Use $this->output( $foo, $bar ); to return a string generated by the template set in init() or manually added via $widget->template( $callback );
// Note you MUST route output through $this->output() rather than calling \IPS\Theme::i()->getTemplate() because of the way widgets are cached
}
}
@@ -0,0 +1,48 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\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 _{class}
{
/**
* 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(), 'settings' => array() );
}
/**
* 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();
}
}
@@ -0,0 +1,41 @@
<?php
/**
* @brief Announcements Extension
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Announcements;
/* 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;
}
/**
* Announcements Extension
*/
class _{class}
{
public static $idField = "id";
public static $controllers = array();
/**
* Get Setting Field
*
* @param \IPS\core\Announcements\Announcement $announcement
* @return Form element
*/
public function getSettingField( $announcement )
{
return new \IPS\Helpers\Form\Node( 'announce_download_categories', ( $announcement ) ? explode( ",", $announcement->ids ) : NULL, FALSE, array( 'class' => 'IPS\downloads\Category', 'zeroVal' => 'any', 'multiple' => TRUE ), NULL, NULL, NULL, 'announce_download_categories' );
}
}
@@ -0,0 +1,46 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Build;
/* 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;
}
/**
* Build process plugin
*/
class _{class}
{
/**
* Build
*
* @return void
* @throws \RuntimeException
*/
public function build()
{
}
/**
* Finish Build
* Moved the pbckcode acs.js file over from development as CKEditor's build routine seems to break it
*
* @return void
*/
protected function finish()
{
}
}
@@ -0,0 +1,73 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\BulkMail;
/* 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;
}
/**
* Bulk mail 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( &$query )
{
return NULL;
}
}
@@ -0,0 +1,124 @@
<?php
/**
* @brief Community Enhancements
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\CommunityEnhancements;
/* 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;
}
/**
* Community Enhancement
*/
class _{class}
{
/**
* @brief Enhancement is enabled?
*/
public $enabled = FALSE;
/**
* @brief IPS-provided enhancement?
*/
public $ips = FALSE;
/**
* @brief Enhancement has configuration options?
*/
public $hasOptions = TRUE;
/**
* @brief Icon data
*/
public $icon = "";
/**
* Constructor
*
* @return void
*/
public function __construct()
{
//$this->enabled = \IPS\Settings::i()->xxxxxx;
}
/**
* Edit
*
* @return void
*/
public function edit()
{
$form = new \IPS\Helpers\Form;
//$form->add( ... );
if ( $form->values() )
{
try
{
$this->testSettings();
$form->saveAsSettings();
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
}
catch ( \LogicException $e )
{
$form->error = $e->getMessage();
}
}
\IPS\Output::i()->sidebar['actions'] = array(
'help' => array(
'title' => 'help',
'icon' => 'question-circle',
'link' => \IPS\Http\Url::internal( "http://www.example.com" ),
'target' => '_blank'
),
);
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'enhancements__{app}_{class}', $form );
}
/**
* Enable/Disable
*
* @param $enabled bool Enable/Disable
* @return void
* @throws \LogicException
*/
public function toggle( $enabled )
{
if ( $enabled )
{
$this->testSettings();
}
//\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $enabled ), array( 'conf_key=?', 'xxxxxx' ) );
//unset( \IPS\Data\Store::i()->settings );
}
/**
* Test Settings
*
* @return void
* @throws \LogicException
*/
protected function testSettings()
{
if ( FALSE )
{
throw new \LogicException( 'error' );
}
}
}
@@ -0,0 +1,31 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\ContentRouter;
/* 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 Content Router extension: {class}
*/
class _{class}
{
/**
* @brief Content Item Classes
*/
public $classes = array( 'IPS\{app}\Example' );
}
@@ -0,0 +1,43 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\CreateMenu;
/* 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;
}
/**
* Create Menu Extension: {class}
*/
class _{class}
{
/**
* Get Items
*
* @return array
*/
public function getItems()
{
return array(
'example_key' => array(
'link' => \IPS\Http\Url::internal( '...', 'front' ),
'title' => 'example',
'flashMessage' => 'saved',
'extraData' => array( 'data-ipsDialog' => true )
)
);
}
}
@@ -0,0 +1,46 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Dashboard;
/* 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 Dashboard extension: {class}
*/
class _{class}
{
/**
* Can the current user view this dashboard item?
*
* @return bool
*/
public function canView()
{
return TRUE;
}
/**
* Return the block HTML show on the dashboard
*
* @return string
*/
public function getBlock()
{
return '';
}
}
@@ -0,0 +1,112 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\EditorLocations;
/* 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;
}
/**
* Editor Extension: {class}
*/
class _{class}
{
/**
* Can we use HTML in this editor?
*
* @param \IPS\Member $member The member
* @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 canUseHtml( $member )
{
return NULL;
}
/**
* Can we use attachments in this editor?
*
* @param \IPS\Member $member The member
* @param \IPS\Helpers\Form\Editor $field The editor field
* @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 )
{
return NULL;
}
/**
* Permission check for attachments
*
* @param \IPS\Member $member The member
* @param int|null $id1 Primary ID
* @param int|null $id2 Secondary ID
* @param string|null $id3 Arbitrary data
* @param array $attachment The attachment data
* @return bool
*/
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
{
return TRUE;
}
/**
* Attachment lookup
*
* @param int|null $id1 Primary ID
* @param int|null $id2 Secondary ID
* @param string|null $id3 Arbitrary data
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
* @throws \LogicException
*/
public function attachmentLookup( $id1, $id2, $id3 )
{
// return \IPS\Http\Url::internal( ... );
}
/**
* Rebuild attachment images in non-content item areas
*
* @param int|null $offset Offset to start from
* @param int|null $max Maximum to parse
* @return int Number completed
* @note This method is optional and will only be called if it exists
*/
//public function rebuildAttachmentImages( $offset, $max )
//{
//}
/**
* Rebuild content post-upgrade
*
* @param int|null $offset Offset to start from
* @param int|null $max Maximum to parse
* @return int Number completed
* @note This method is optional and will only be called if it exists
*/
//public function rebuildContent( $offset, $max )
//{
//}
/**
* Total content count to be used in progress indicator
*
* @return int Total Count
*/
//public function contentCount()
//{
// return \IPS\Db::i()->select( 'COUNT(*) as count', '...', "..." )->setKeyField('count')->first();
//}
}
@@ -0,0 +1,54 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\EditorMedia;
/* 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;
}
/**
* Editor Media: {class}
*/
class _{class}
{
/**
* Get Counts
*
* @param \IPS\Member $member The member
* @param bool $images TRUE = Images. FALSE = other attachments.
* @return int array( 'Title' => 0 )
*/
public function count( $member, $images )
{
return array();
}
/**
* 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, ... ), ... )
*/
public function get( $member, $images, $search, $postKey, $page, $limit )
{
return array();
}
}
@@ -0,0 +1,69 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\FileStorage;
/* 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;
}
/**
* File Storage Extension: {class}
*/
class _{class}
{
/**
* Count stored files
*
* @return int
*/
public function count()
{
return \IPS\Db::i()->select( 'COUNT(*)', '...', '...' )->first();
}
/**
* Move stored files
*
* @param int $offset This will be sent starting with 0, increasing to get all files stored by this extension
* @param int $storageConfiguration New storage configuration ID
* @param int|NULL $oldConfiguration Old storage configuration ID
* @throws \UnderflowException When file record doesn't exist. Indicating there are no more files to move
* @return void|int An offset integer to use on the next cycle, or nothing
*/
public function move( $offset, $storageConfiguration, $oldConfiguration=NULL )
{
\IPS\File::get( $oldConfiguration ?: '{app}_{class}', ... )->move( $storageConfiguration );
}
/**
* Check if a file is valid
*
* @param \IPS\Http\Url $file The file to check
* @return bool
*/
public function isValidFile( $file )
{
}
/**
* Delete all stored files
*
* @return void
*/
public function delete()
{
}
}
@@ -0,0 +1,76 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\FrontNavigation;
/* 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;
}
/**
* Front Navigation Extension: {class}
*/
class _{class}
{
/**
* Can access?
*
* @return bool
*/
public function canView()
{
return TRUE;
}
/**
* Get Title
*
* @return string
*/
public function title()
{
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_{app}');
}
/**
* Get Link
*
* @return \IPS\Http\Url
*/
public function link()
{
return \IPS\Http\Url::internal( "app={app}" );
}
/**
* Is Active?
*
* @return bool
*/
public function active()
{
return \IPS\Dispatcher::i()->application->directory === '{app}';
}
/**
* Children
*
* @return array
*/
public function children()
{
return array();
}
}
@@ -0,0 +1,50 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\GroupForm;
/* 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;
}
/**
* Admin CP Group Form
*/
class _{class}
{
/**
* Process Form
*
* @param \IPS\Form\Tabbed $form The form
* @param \IPS\Member\Group $group Existing Group
* @return void
*/
public function process( &$form, $group )
{
$form->add( new \IPS\Helpers\Form\Text( 'example' ) );
}
/**
* Save
*
* @param array $values Values from form
* @param \IPS\Member\Group $group The group
* @return void
*/
public function save( $values, &$group )
{
$group->example = $values['example'];
}
}
@@ -0,0 +1,44 @@
<?php
/**
* @brief Group Limits
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\GroupLimits;
/* 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;
}
/**
* Group Limits
*
* This extension is used to define which limit values "win" when a user has secondary groups defined
*
*/
class _{class}
{
/**
* Get group limits by priority
*
* @return array
*/
public function getLimits()
{
return array (
'exclude' => array(),
'lessIsMore' => array(),
'neg1IsBest' => array(),
'zeroIsBest' => array(),
);
}
}
@@ -0,0 +1,55 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\IncomingEmail;
/* 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;
}
/**
* Incoming Email Handler
*/
class _{class}
{
/**
* Handle email
*
* @param \IPS\Email\Incoming $email The email
* @return bool
*/
public function process( \IPS\Email\Incoming $email )
{
if ( ... )
{
// Do something with the email...
/* Save attachments */
foreach ( $files as $file )
{
$attachment = $file->makeAttachment('');
\IPS\Db::i()->insert( 'core_attachments_map', array(
'attachment_id' => $attachment['attach_id'],
'location_key' => ...,
'id1' => ...,
'id2' => ...,
) );
}
}
return FALSE; // Must return false if not processing
}
}
@@ -0,0 +1,71 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\IpAddresses;
/* 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;
}
/**
* IP Address Lookup extension
*/
class _{class}
{
/**
* Find Records by IP
*
* @param string $ip The IP Address
* @param \IPS\Http\Url $baseUrl URL table will be displayed on or NULL to return a count
* @return \IPS\Helpers\Table|int|null
*/
public function findByIp( $ip, \IPS\Http\Url $baseUrl = NULL )
{
/* Return count */
if ( $baseUrl === NULL )
{
return \IPS\Db::i()->select( 'COUNT(*)', 'database_table_name', array( "ip_address LIKE CONCAT( ?, '%' )", $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 ) );
/* Return */
return (string) $table;
}
/**
* Find IPs by Member
*
* @code
return array(
'::1' => array(
'ip' => '::1'// string (IP Address)
'count' => ... // int (number of times this member has used this IP)
'first' => ... // int (timestamp of first use)
'last' => ... // int (timestamp of most recent use)
),
...
);
* @endcode
* @param \IPS\Member $member The member
* @return array|NULL
*/
public function findByMember( $member )
{
return array();
}
}
@@ -0,0 +1,58 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\LiveSearch;
/* 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 Live Search Extension
*/
class _{class}
{
/**
* Constructor
*
* @return void
*/
public function __construct()
{
/* Check Permissions */
}
/**
* Get the search results
*
* @param string Search Term
* @return array Array of results
*/
public function getResults( $searchTerm )
{
return array();
}
/**
* Check we have access
*
* @return bool
*/
public function hasAccess()
{
/* Check Permissions */
return TRUE;
}
}
@@ -0,0 +1,68 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\MemberForm;
/* 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;
}
/**
* Admin CP Member Form
*/
class _{class}
{
/**
* Action Buttons
*
* @param \IPS\Member $member The Member
* @return array
*/
public function actionButtons( $member )
{
return array(
'id' => array(
'title' => 'title',
'icon' => 'cog',
'link' => \IPS\Http\Url::internal( "app={app}&module=&controller=&do=&id={$member->member_id}" ),
'class' => ''
)
);
}
/**
* Process Form
*
* @param \IPS\Form\Tabbed $form The form
* @param \IPS\Member $member Existing Member
* @return void
*/
public function process( &$form, $member )
{
$form->add( new \IPS\Helpers\Form\Text( 'example' ) );
}
/**
* Save
*
* @param array $values Values from form
* @param \IPS\Member $member The member
* @return void
*/
public function save( $values, &$member )
{
$member->example = $values['example'];
}
}
@@ -0,0 +1,128 @@
<?php
/**
* @brief Member Sync
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\MemberSync;
/* 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 Sync
*/
class _{class}
{
/**
* Member account has been created
*
* @param $member \IPS\Member New member account
* @return void
*/
public function onCreateAccount( $member )
{
}
/**
* Member has validated
*
* @param \IPS\Member $member Member validated
* @return void
*/
public function onValidate( $member )
{
}
/**
* Member has logged on
*
* @param \IPS\Member $member Member that logged in
* @param \IPS\Http\Url $redirectUrl The URL to send the user back to
* @return void
*/
public function onLogin( $member, $returnUrl )
{
}
/**
* Member has logged out
*
* @param \IPS\Member $member Member that logged out
* @param \IPS\Http\Url $redirectUrl The URL to send the user back to
* @return void
*/
public function onLogout( $member, $returnUrl )
{
}
/**
* Member account has been updated
*
* @param $member \IPS\Member Member updating profile
* @param $changes array The changes
* @return void
*/
public function onProfileUpdate( $member, $changes )
{
}
/**
* Member is flagged as spammer
*
* @param $member \IPS\Member The member
* @return void
*/
public function onSetAsSpammer( $member )
{
}
/**
* Member is unflagged as spammer
*
* @param $member \IPS\Member The member
* @return void
*/
public function onUnSetAsSpammer( $member )
{
}
/**
* Member is merged with another member
*
* @param \IPS\Member $member Member being kept
* @param \IPS\Member $member2 Member being removed
* @return void
*/
public function onMerge( $member, $member2 )
{
}
/**
* Member is deleted
*
* @param $member \IPS\Member The member
* @return void
*/
public function onDelete( $member )
{
}
}
@@ -0,0 +1,45 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\ModCp;
/* 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 Moderator Control Panel Extension: {class}
*/
class _{class}
{
/**
* Returns the primary tab key for the navigation bar
*
* @return string
*/
public function getTab()
{
}
/**
* Manage
*
* @return void
*/
public function manage()
{
}
}
@@ -0,0 +1,44 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\ModCpMemberManagement;
/* 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 Moderator Control Panel Member Management Extension: {class}
*/
class _{class}
{
/**
* Returns the tab key for the navigation bar
*
* @return string
*/
public function getTab()
{
}
/**
* Get content to display
*
* @return string
*/
public function manage()
{
}
}
@@ -0,0 +1,71 @@
<?php
/**
* @brief Moderator Permissions
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\ModeratorPermissions;
/* 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;
}
/**
* Moderator Permissions
*/
class _{class}
{
/**
* Get Permissions
*
* @code
return array(
'key' => 'YesNo', // Can just return a string with type
'key' => array( // Or an array for more options
'YesNo', // Type
array( ... ), // Options (as defined by type's class)
'prefix', // Prefix
'suffix', // Suffix
),
...
);
* @endcode
* @return array
*/
public function getPermissions()
{
return array();
}
/**
* After change
*
* @param array $moderator The moderator
* @param array $changed Values that were changed
* @return void
*/
public function onChange( $moderator, $changed )
{
}
/**
* After delete
*
* @param array $moderator The moderator
* @return void
*/
public function onDelete( $moderator )
{
}
}
@@ -0,0 +1,74 @@
<?php
/**
* @brief Notification Options
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Notifications;
/* 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;
}
/**
* Notification Options
*/
class _{class}
{
/**
* Get configuration
*
* @param \IPS\Member $member The member
* @return array
*/
public function getConfiguration( $member )
{
// Basically just return a list of the keys for the types of notification your app will send
// keys can be anything you want. You can specify what should be the default value and any disabled values (acceptable values are "email" and "inline")
// For each key, create a language string "notifications__<key>" which is what will display in the user's Notification Options screen
return array(
'key' => array( 'default' => array( 'email' ), 'disabled' => array() ),
);
}
// For each type of notification you need a method like this which controls what will be displayed when the user clicks on the notification icon in the header:
// Note that for each type of notification you must *also* create email templates. See documentation for details: https://remoteservices.invisionpower.com/docs/devdocs-notifications
/**
* Parse notification: key
*
* @param \IPS\Notification\Inline $notification The notification
* @return array
* @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
'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.
'author' => \IPS\Member::load( 1 ), // [Optional] The user whose photo should be displayed for this notification
);
* @endcode
*/
public function parse_key( \IPS\Notification\Inline $notification )
{
return array(
'title' => "Mark has replied to A Topic", // The notification title
'url' => new \IPS\Http\Url( ... ), // 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.
'author' => \IPS\Member::load( 1 ), // [Optional] The user whose photo should be displayed for this notification
);
}
}
@@ -0,0 +1,42 @@
<?php
/**
* @brief Template Plugin
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\OutputPlugins;
/* 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;
}
/**
* Template Plugin
*/
class _{class}
{
/**
* @brief Can be used when compiling CSS
*/
public static $canBeUsedInCss = FALSE;
/**
* Run the plug-in
*
* @param string $data The initial data from the tag
* @param array $options Array of options
* @return string Code to eval
*/
public static function runPlugin( $data, $options )
{
}
}
@@ -0,0 +1,37 @@
<?php
/**
* @brief Permissions
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Permissions;
/* 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;
}
/**
* Permissions
*/
class _{class}
{
/**
* Get node classes
*
* @return array
*/
public function getNodeClasses()
{
return array();
}
}
@@ -0,0 +1,62 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Profile;
/* 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 Profile extension: {class}
*/
class _{class}
{
/**
* Member
*/
protected $member;
/**
* Constructor
*
* @param \IPS\Member $member Member whose profile we are viewing
* @return void
*/
public function __construct( \IPS\Member $member )
{
$this->member = $member;
}
/**
* Is there content to display?
*
* @return bool
*/
public function showTab()
{
return TRUE;
}
/**
* Display
*
* @return string
*/
public function render()
{
return 'content to display';
}
}
@@ -0,0 +1,52 @@
<?php
/**
* @brief Background Task
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Queue;
/* 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;
}
/**
* Background Task
*/
class _{class}
{
/**
* 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
*/
public function run( $data, $offset )
{
}
/**
* Get Progress
*
* @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
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
*/
public function getProgress( $data, $offset )
{
return array( 'text' => 'Doing something...', 'complete' => 50 );
}
}
@@ -0,0 +1,71 @@
<?php
/**
* @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.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Sitemap;
/* 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;
}
/**
* Support {class} in sitemaps
*/
class _{class}
{
/**
* @brief Recommended Settings
*/
public $recommendedSettings = array();
/**
* Add settings for ACP configuration to the form
*
* @param IPS\Helpers\Form $form Form to add any settings to
* @return void
*/
public function settings( &$form )
{
}
/**
* Check to see if any settings this extension provides options for have been modified from their default values
*
* @return bool
*/
public function hasModifiedSettings()
{
}
/**
* Get the sitemap filename(s)
*
* @return array
*/
public function getFilenames()
{
return array( 'sitemap_' . mb_strtolower('{class}') );
}
/**
* Generate the sitemap
*
* @param string $filename The sitemap file to build (should be one returned from getFilenames())
* @param \IPS\Sitemap $sitemap Sitemap object reference
* @return void
*/
public function generateSitemap( $filename, $sitemap )
{
}
}
@@ -0,0 +1,46 @@
<?php
/**
* @brief Uninstall callback
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
{subpackage}
* @since {date}
* @version SVN_VERSION_NUMBER
*/
namespace IPS\{app}\extensions\core\Uninstall;
/* 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;
}
/**
* Uninstall callback
*/
class _{class}
{
/**
* Code to execute before the application has been uninstalled
*
* @param string $application Application directory
* @return array
*/
public function preUninstall( $application )
{
}
/**
* Code to execute after the application has been uninstalled
*
* @param string $application Application directory
* @return array
*/
public function postUninstall( $application )
{
}
}
Whitespace-only changes.
Whitespace-only changes.