Version 5.0.0 beta 2

This commit is contained in:
Neo committed 2025-12-19 16:39:01 -08:00
1 parent 15c7beabc5
commit f61b0da85d
181 files changed
+3182 -1533

No files matched your search

@@ -77,56 +77,11 @@ class emoticons extends Controller
*/
protected function manage() : void
{
$tabs = array(
'standard' => 'standard_emoji',
'custom' => 'custom_emoji',
);
$activeTab = ( isset( Request::i()->tab ) and array_key_exists( Request::i()->tab, $tabs ) ) ? Request::i()->tab : 'standard';
if ( $activeTab == 'standard' )
{
if ( Settings::i()->getFromConfGlobal('sql_utf8mb4') === TRUE )
{
$form = new Form;
$form->add( new Radio( 'emoji_style', Settings::i()->emoji_style, FALSE, array(
'options' => array(
'native' => 'emoji_style_native',
'twemoji' => 'emoji_style_twemoji',
'disabled' => 'emoji_style_disabled',
),
) ) );
Member::loggedIn()->language()->get( 'emoji_style_native' ); // We need to preload the word before we can add more text to it.
Member::loggedIn()->language()->words['emoji_style_native'] .= "<div class='i-font-size_2 i-margin-top_1'><span class='ipsEmoji'>😀</span><span class='ipsEmoji'>😉</span><span class='ipsEmoji'>😂</span><span class='ipsEmoji'>😍</span><span class='ipsEmoji'>🤘</span><span class='ipsEmoji'>🤦‍♀️</span><span class='ipsEmoji'>🤷‍♂️</span><span class='ipsEmoji'>🍿</span><span class='ipsEmoji'>🚀</span><span class='ipsEmoji'>🎉</span><span class='ipsEmoji'>🏳️‍🌈</span></div>"; // Have to do this here because if we try to put it in the actual language string, that will cause an error if not utf8mb4
$form->add( new YesNo( 'emoji_shortcodes', Settings::i()->emoji_shortcodes, FALSE, array(), NULL, NULL, NULL, 'emoji_shortcodes' ) );
if ( $values = $form->values() )
{
$values['emoji_cache'] = time();
$form->saveAsSettings( $values );
Output::i()->redirect( Url::internal( 'app=core&module=editor&controller=emoticons&tab=standard' ), 'saved' );
}
$activeTabContents = $form;
}
else
{
$activeTabContents = Theme::i()->getTemplate( 'global' )->message( CIC ? 'emoji_utf8mb4_required_cic' : 'emoji_utf8mb4_required', 'error', NULL, TRUE, TRUE );
}
}
else
{
$activeTabContents = Theme::i()->getTemplate( 'customization' )->emoticons( $this->_getEmoticons() );
}
Output::i()->title = Member::loggedIn()->language()->addToStack('menu__core_editor_emoticons');
$activeTabContents = Theme::i()->getTemplate( 'customization' )->emoticons( $this->_getEmoticons() );
Output::i()->title = Member::loggedIn()->language()->addToStack('custom_emoji');
Output::i()->jsFiles = array_merge( Output::i()->jsFiles, Output::i()->js('admin_customization.js', 'core', 'admin') );
if( Request::i()->isAjax() )
{
Output::i()->output = $activeTabContents;
}
else
{
Output::i()->output = Theme::i()->getTemplate( 'global' )->tabs( $tabs, $activeTab, $activeTabContents, Url::internal( "app=core&module=editor&controller=emoticons" ) );
}
Output::i()->output = $activeTabContents; // @todo Mayyyyyyybe we should make one tab per set, but I really think custom emoticons are too dumb for all that
}
/**