phpBB

Code Changes

File: includes/functions_content.php

  Unmodified   Added   Modified   Removed
Line 679Line 679
	* @var string	uid				The BBCode UID
* @var string bitfield The BBCode Bitfield
* @var int flags The BBCode Flags

	* @var string	uid				The BBCode UID
* @var string bitfield The BBCode Bitfield
* @var int flags The BBCode Flags

 
	* @var string	message_parser	The message_parser object

	* @since 3.1.0-a1

	* @since 3.1.0-a1

 
	* @changed 3.1.11-RC1			Added message_parser to vars

	*/

	*/

	$vars = array('text', 'uid', 'bitfield', 'flags');

	$vars = array('text', 'uid', 'bitfield', 'flags', 'message_parser');

	extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars)));

return $message_parser->warn_msg;

	extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars)));

return $message_parser->warn_msg;

Line 980Line 982
*/
function smiley_text($text, $force_option = false)
{

*/
function smiley_text($text, $force_option = false)
{

	global $config, $user, $phpbb_path_helper;

	global $config, $user, $phpbb_path_helper, $phpbb_dispatcher;


if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
{


if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
{

Line 989Line 991
	else
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();

	else
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();

 

/**
* Event to override the root_path for smilies
*
* @event core.smiley_text_root_path
* @var string root_path root_path for smilies
* @since 3.1.11-RC1
*/
$vars = array('root_path');
extract($phpbb_dispatcher->trigger_event('core.smiley_text_root_path', compact($vars)));

		return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
}
}

		return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
}
}