Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

+19 -9
View File
@@ -12,27 +12,37 @@
namespace IPS\Content\ShareServices;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Content\ShareServices;
use IPS\core\ShareLinks\Service;
use IPS\Helpers\Form;
use IPS\Helpers\Form\Select;
use IPS\Member\Group;
use IPS\Settings;
use IPS\Theme;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* Facebook share link
*/
class _Facebook extends \IPS\Content\ShareServices
class Facebook extends ShareServices
{
/**
* Add any additional form elements to the configuration form. These must be setting keys that the service configuration form can save as a setting.
*
* @param \IPS\Helpers\Form $form Configuration form for this service
* @param \IPS\core\ShareLinks\Service $service The service
* @param Form $form Configuration form for this service
* @param Service $service The service
* @return void
*/
public static function modifyForm( \IPS\Helpers\Form &$form, $service )
public static function modifyForm( Form &$form, Service $service ): void
{
$form->add( new \IPS\Helpers\Form\Select( 'fbc_bot_group', \IPS\Settings::i()->fbc_bot_group, TRUE, array( 'options' => array_combine( array_keys( \IPS\Member\Group::groups() ), array_map( function( $_group ) { return (string) $_group; }, \IPS\Member\Group::groups() ) ) ) ) );
$form->add( new Select( 'fbc_bot_group', Settings::i()->fbc_bot_group, TRUE, array( 'options' => array_combine( array_keys( Group::groups() ), array_map( function( $_group ) { return (string) $_group; }, Group::groups() ) ) ) ) );
}
/**
@@ -40,8 +50,8 @@ class _Facebook extends \IPS\Content\ShareServices
*
* @return string
*/
public function __toString()
public function __toString(): string
{
return \IPS\Theme::i()->getTemplate( 'sharelinks', 'core' )->facebook( urlencode( $this->url ) );
return Theme::i()->getTemplate( 'sharelinks', 'core' )->facebook( urlencode( $this->url ) );
}
}