Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

@@ -0,0 +1,64 @@
<?php
/**
* @brief Converter Library 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/
{subpackage}
* @since {date}
*/
namespace IPS\{app}\extensions\convert\Library;
use \IPS\convert\Library as CoreLibrary;
/* 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;
}
class {class} extends CoreLibrary
{
/**
* @brief Application
*/
public static string $app = '{app}';
/**
* Returns an array of items that we can convert, including the amount of rows stored in the Community Suite as well as the recommend value of rows to convert per cycle
*
* @param bool $rowCounts enable row counts
* @return array
*/
public function menuRows( bool $rowCounts=FALSE ): array
{
return [];
}
/**
* Returns an array of tables that need to be truncated when Empty Local Data is used
*
* @param string $method Method to truncate
* @return array
*/
protected function truncate( string $method ) : array
{
return [];
}
/**
* This is how the insert methods will work - basically like 3.x, but we should be using the actual classes to insert the data unless there is a real world reason not too.
* Using the actual routines to insert data will help to avoid having to resynchronize and rebuild things later on, thus resulting in less conversion time being needed overall.
* Anything that parses content, for example, may need to simply insert directly then rebuild via a task over time, as HTML Purifier is slow when mass inserting content.
*/
/**
* A note on logging -
* If the data is missing and it is unlikely that any source software would be able to provide this, we do not need to log anything and can use default data (for example, group_layout in convertLeaderGroups).
* If the data is missing and it is likely that a majority of the source software can provide this, we should log a NOTICE and use default data (for example, a_casesensitive in convertAcronyms).
* If the data is missing and it is required to convert the item, we should log a WARNING and return FALSE.
* If the conversion absolutely cannot proceed at all (filestorage locations not writable, for example), then we should log an ERROR and throw an \IPS\convert\Exception to completely halt the process and redirect to an error screen showing the last logged error.
*/
}
@@ -0,0 +1,155 @@
<?php
/**
* @brief Converter Software 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/
{subpackage}
* @since {date}
*/
namespace IPS\{app}\extensions\convert\Software;
use IPS\convert\App;
use IPS\convert\Software as ConverterSoftware;
/* 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;
}
class {class} extends ConverterSoftware
{
/**
* Software Name
*
* @return string
*/
public static function softwareName(): string
{
/* Child classes must override this method */
return "{class}";
}
/**
* Software Key
*
* @return string
*/
public static function softwareKey(): string
{
/* Child classes must override this method */
return mb_strtolower( '{class}' );
}
/**
* Content we can convert from this software.
*
* @return array|null
*/
public static function canConvert(): ?array
{
return [
];
}
/**
* Can we convert passwords from this software.
*
* @return boolean
*/
public static function loginEnabled(): bool
{
return FALSE;
}
/**
* Can we convert settings?
*
* @return boolean
*/
public static function canConvertSettings(): bool
{
return FALSE;
}
/**
* Settings Map
*
* @return array
*/
public function settingsMap(): array
{
return [];
}
/**
* Settings Map Listing
*
* @return array
*/
public function settingsMapList(): array
{
return [];
}
/**
* Returns a block of text, or a language string, that explains what the admin must do to start this conversion
*
* @return string|null
*/
public static function getPreConversionInformation(): ?string
{
return NULL;
}
/**
* List of conversion methods that require additional information
*
* @return array
*/
public static function checkConf(): array
{
return [];
}
/**
* Get More Information
*
* @param string $method Conversion method
* @return array|null
*/
public function getMoreInfo( string $method ): ?array
{
return [];
}
/**
* Finish - Adds everything it needs to the queues and clears data store
*
* @return array Messages to display
*/
public function finish(): array
{
return [];
}
/**
* Pre-process content for the Invision Community text parser
*
* @param string The post
* @param string|null Content Classname passed by post-conversion rebuild
* @param int|null Content ID passed by post-conversion rebuild
* @param App|null App object if available
* @return string The converted post
*/
public static function fixPostData( string $post, ?string $className=null, ?int $contentId=null, ?App $app=null ): string
{
return $post;
}
// Insert convertX methods here
}
Whitespace-only changes.