diff options
Diffstat (limited to 'phpBB/includes/functions_content.php')
| -rw-r--r-- | phpBB/includes/functions_content.php | 42 | 
1 files changed, 25 insertions, 17 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 72fca905e0..ee78364083 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -174,8 +174,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list  			$template->assign_block_vars('jumpbox_forums', array(  				'FORUM_ID'		=> ($select_all) ? 0 : -1,  				'FORUM_NAME'	=> ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'], -				'S_FORUM_COUNT'	=> $iteration) -			); +				'S_FORUM_COUNT'	=> $iteration, +				'LINK'			=> $phpbb_path_helper->append_url_params($action, array('f' => $forum_id)), +			));  			$iteration++;  			$display_jumpbox = true; @@ -188,8 +189,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list  			'S_FORUM_COUNT'	=> $iteration,  			'S_IS_CAT'		=> ($row['forum_type'] == FORUM_CAT) ? true : false,  			'S_IS_LINK'		=> ($row['forum_type'] == FORUM_LINK) ? true : false, -			'S_IS_POST'		=> ($row['forum_type'] == FORUM_POST) ? true : false) -		); +			'S_IS_POST'		=> ($row['forum_type'] == FORUM_POST) ? true : false, +			'LINK'			=> $phpbb_path_helper->append_url_params($action, array('f' => $row['forum_id'])), +		));  		for ($i = 0; $i < $padding; $i++)  		{ @@ -773,44 +775,47 @@ function make_clickable($text, $server_url = false, $class = 'postlink')  	static $static_class;  	static $magic_url_match_args; -	if (!is_array($magic_url_match_args) || $static_class != $class) +	if (!isset($magic_url_match_args[$server_url]) || $static_class != $class)  	{  		$static_class = $class;  		$class = ($static_class) ? ' class="' . $static_class . '"' : '';  		$local_class = ($static_class) ? ' class="' . $static_class . '-local"' : ''; -		$magic_url_match_args = array(); +		if (!is_array($magic_url_match_args)) +		{ +			$magic_url_match_args = array(); +		}  		// relative urls for this board -		$magic_url_match_args[] = array( +		$magic_url_match_args[$server_url][] = array(  			'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#i',  			MAGIC_URL_LOCAL,  			$local_class,  		);  		// matches a xxxx://aaaaa.bbb.cccc. ... -		$magic_url_match_args[] = array( +		$magic_url_match_args[$server_url][] = array(  			'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#i',  			MAGIC_URL_FULL,  			$class,  		);  		// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing -		$magic_url_match_args[] = array( +		$magic_url_match_args[$server_url][] = array(  			'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#i',  			MAGIC_URL_WWW,  			$class,  		);  		// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode. -		$magic_url_match_args[] = array( +		$magic_url_match_args[$server_url][] = array(  			'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/i',  			MAGIC_URL_EMAIL,  			'',  		);  	} -	foreach ($magic_url_match_args as $magic_args) +	foreach ($magic_url_match_args[$server_url] as $magic_args)  	{  		if (preg_match($magic_args[0], $text, $matches))  		{ @@ -1331,9 +1336,9 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',  		global $phpbb_root_path, $phpEx;  		$_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u={USER_ID}'); -		$_profile_cache['tpl_noprofile'] = '{USERNAME}'; +		$_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['tpl_profile'] = '<a href="{PROFILE_URL}">{USERNAME}</a>'; +		$_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}" class="username">{USERNAME}</a>';  		$_profile_cache['tpl_profile_colour'] = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>';  	} @@ -1449,16 +1454,19 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',  /**   * Add an option to the quick-mod tools.   * + * @param string $url The recepting URL for the quickmod actions.   * @param string $option The language key for the value of the option.   * @param string $lang_string The language string to use.   */ -function phpbb_add_quickmod_option($option, $lang_string) +function phpbb_add_quickmod_option($url, $option, $lang_string)  { -	global $template, $user; +	global $template, $user, $phpbb_path_helper; +  	$lang_string = $user->lang($lang_string);  	$template->assign_block_vars('quickmod', array( -		'VALUE'  => $option, -		'TITLE'    => $lang_string, +		'VALUE'		=> $option, +		'TITLE'		=> $lang_string, +		'LINK'		=> $phpbb_path_helper->append_url_params($url, array('action' => $option)),  	));  }  | 
