phpBB

Code Changes

File: includes/functions_content.php

  Unmodified   Added   Modified   Removed
Line 627Line 627
			}
else
{

			}
else
{

				$bbcode->bbcode($bitfield);

				$bbcode->bbcode_set_bitfield($bitfield);

			}

$bbcode->bbcode_second_pass($text, $uid);

			}

$bbcode->bbcode_second_pass($text, $uid);

Line 1166Line 1166
		$filename = $phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($attachment['physical_filename']);

$upload_icon = '';

		$filename = $phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($attachment['physical_filename']);

$upload_icon = '';

 
		$download_link = '';
$display_cat = false;


if (isset($extensions[$attachment['extension']]))
{


if (isset($extensions[$attachment['extension']]))
{

Line 1345Line 1347
		);
extract($phpbb_dispatcher->trigger_event('core.parse_attachments_modify_template_data', compact($vars)));
$update_count_ary = $update_count;

		);
extract($phpbb_dispatcher->trigger_event('core.parse_attachments_modify_template_data', compact($vars)));
$update_count_ary = $update_count;

		unset($update_count);

		unset($update_count, $display_cat, $download_link);


$template->assign_block_vars('_file', $block_array);



$template->assign_block_vars('_file', $block_array);


Line 1481Line 1483
/**
* Get username details for placing into templates.
* This function caches all modes on first call, except for no_profile and anonymous user - determined by $user_id.

/**
* Get username details for placing into templates.
* This function caches all modes on first call, except for no_profile and anonymous user - determined by $user_id.

 
*
* @html Username spans and links

*
* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link)
* @param int $user_id The users id

*
* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link)
* @param int $user_id The users id

Line 1501Line 1505
	{
global $phpbb_root_path, $phpEx;


	{
global $phpbb_root_path, $phpEx;


 
		/** @html Username spans and links for usage in the template */

		$_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u={USER_ID}');
$_profile_cache['tpl_noprofile'] = '<span class="username">{USERNAME}</span>';
$_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';

		$_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u={USER_ID}');
$_profile_cache['tpl_noprofile'] = '<span class="username">{USERNAME}</span>';
$_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';

Line 1672Line 1677
{
var $data;


{
var $data;


	function bitfield($bitfield = '')

	function __construct($bitfield = '')

	{
$this->data = base64_decode($bitfield);
}

	{
$this->data = base64_decode($bitfield);
}

Line 1756Line 1761
	function merge($bitfield)
{
$this->data = $this->data | $bitfield->get_blob();

	function merge($bitfield)
{
$this->data = $this->data | $bitfield->get_blob();

 
	}
}

/**
* Formats the quote according to the given BBCode status setting
*
* @param phpbb\language\language $language Language class
* @param parse_message $message_parser Message parser class
* @param phpbb\textformatter\utils_interface $text_formatter_utils Text formatter utilities
* @param bool $bbcode_status The status of the BBCode setting
* @param array $quote_attributes The attributes of the quoted post
* @param string $message_link Link of the original quoted post
*/
function phpbb_format_quote($language, $message_parser, $text_formatter_utils, $bbcode_status, $quote_attributes, $message_link = '')
{
if ($bbcode_status)
{
$quote_text = $text_formatter_utils->generate_quote(
censor_text($message_parser->message),
$quote_attributes
);

$message_parser->message = $quote_text . "\n\n";
}
else
{
$offset = 0;
$quote_string = "&gt; ";
$message = censor_text(trim($message_parser->message));
// see if we are nesting. It's easily tricked but should work for one level of nesting
if (strpos($message, "&gt;") !== false)
{
$offset = 10;
}
$message = utf8_wordwrap($message, 75 + $offset, "\n");

$message = $quote_string . $message;
$message = str_replace("\n", "\n" . $quote_string, $message);

$message_parser->message = $quote_attributes['author'] . " " . $language->lang('WROTE') . ":\n" . $message . "\n";
}

if ($message_link)
{
$message_parser->message = $message_link . $message_parser->message;

	}
}


	}
}