diff options
| -rw-r--r-- | phpBB/assets/javascript/core.js | 4 | ||||
| -rw-r--r-- | phpBB/docs/events.md | 98 | ||||
| -rw-r--r-- | phpBB/includes/functions_privmsgs.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/mcp/mcp_post.php | 21 | ||||
| -rw-r--r-- | phpBB/index.php | 63 | ||||
| -rw-r--r-- | phpBB/memberlist.php | 12 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/ajax.js | 2 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/search_body.html | 13 | ||||
| -rw-r--r-- | phpBB/styles/prosilver/template/viewtopic_body.html | 1 | 
9 files changed, 183 insertions, 33 deletions
| diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 6a008ba1ec..91f5521c7a 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -306,6 +306,10 @@ phpbb.ajaxify = function(options) {  					alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);  				} else {  					$dark.fadeOut(phpbb.alertTime); + +					if ($loadingIndicator) { +						$loadingIndicator.fadeOut(phpbb.alertTime); +					}  				}  				if (typeof phpbb.ajaxCallbacks[callback] === 'function') { diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 59eb92afca..a785c6d81c 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1428,6 +1428,13 @@ quickreply_editor_subject_before  * Since: 3.1.7-RC1  * Purpose: Add content before the quick reply subject textbox +search_body_form_after +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the search form +  search_body_form_before  ===  * Locations: @@ -1435,6 +1442,90 @@ search_body_form_before  * Since: 3.1.5-RC1  * Purpose: Add content before the search form +search_body_recent_search_after +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the recent search queries list + +search_body_recent_search_before +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the recent search queries list + +search_body_search_display_options_append +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the bottom of the search query display options fields set + +search_body_search_display_options_prepend +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the top of the search query display options fields set + +search_body_search_options_after +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the search query options fields set + +search_body_search_options_append +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the bottom of the search query options fields set + +search_body_search_options_before +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the search query options fields set + +search_body_search_options_prepend +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the top of the search query options fields set + +search_body_search_query_after +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the search query fields set + +search_body_search_query_append +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the bottom of the search query fields set + +search_body_search_query_before +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the search query fields set + +search_body_search_query_prepend +=== +* Locations: +    + styles/prosilver/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the top of the search query fields set +  search_results_header_after  ===  * Locations: @@ -2127,6 +2218,13 @@ viewtopic_body_post_buttons_list_before  * Purpose: Add post button custom list to posts (next to edit, quote etc),  before the original list. +viewtopic_body_post_subject_before +=== +* Locations: +    + styles/prosilver/template/viewtopic_body.html +* Since: 3.1.7-RC1 +* Purpose: Add data before post icon and subject +  viewtopic_body_postrow_custom_fields_after  ===  * Locations: diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index b2928d5df8..a54770812e 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1596,7 +1596,7 @@ function get_folder_status($folder_id, $folder)  		'percent'		=> ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? floor(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,  	); -	$return['message']	= $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']); +	$return['message']	= $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), (int) $return['cur'], $return['percent']);  	return $return;  } diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index e59f0abb04..33aebccb22 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -549,16 +549,6 @@ function change_poster(&$post_info, $userdata)  	$from_username = $post_info['username'];  	$to_username = $userdata['username']; -	// Renew post info -	$post_info = phpbb_get_post_data(array($post_id), false, true); - -	if (!sizeof($post_info)) -	{ -		trigger_error('POST_NOT_EXIST'); -	} - -	$post_info = $post_info[$post_id]; -  	/**  	* This event allows you to perform additional tasks after changing a post's poster  	* @@ -566,10 +556,21 @@ function change_poster(&$post_info, $userdata)  	* @var	array	userdata	Information on a post's new poster  	* @var	array	post_info	Information on the affected post  	* @since 3.1.6-RC1 +	* @changed 3.1.7-RC1		Change location to prevent post_info from being set to the new post information  	*/  	$vars = array('userdata', 'post_info');  	extract($phpbb_dispatcher->trigger_event('core.mcp_change_poster_after', compact($vars))); +	// Renew post info +	$post_info = phpbb_get_post_data(array($post_id), false, true); + +	if (!sizeof($post_info)) +	{ +		trigger_error('POST_NOT_EXIST'); +	} + +	$post_info = $post_info[$post_id]; +  	// Now add log entry  	$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_MCP_CHANGE_POSTER', false, array(  		'forum_id' => $post_info['forum_id'], diff --git a/phpBB/index.php b/phpBB/index.php index 73a5989bcb..9939b9ba7f 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -123,7 +123,7 @@ $db->sql_freeresult($result);  $legend = implode($user->lang['COMMA_SEPARATOR'], $legend);  // Generate birthday list if required ... -$birthday_list = array(); +$birthdays = $birthday_list = array();  if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))  {  	$time = $user->create_datetime(); @@ -136,33 +136,66 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('  		$leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";  	} -	$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday -		FROM ' . USERS_TABLE . ' u -		LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid) -		WHERE (b.ban_id IS NULL -			OR b.ban_exclude = 1) +	$sql_ary = array( +		'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_birthday', +		'FROM' => array( +			USERS_TABLE => 'u', +		), +		'LEFT_JOIN' => array( +			array( +				'FROM' => array(BANLIST_TABLE => 'b'), +				'ON' => 'u.user_id = b.ban_userid', +			), +		), +		'WHERE' => "(b.ban_id IS NULL OR b.ban_exclude = 1)  			AND (u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' $leap_year_birthdays) -			AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; +			AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')', +	); + +	/** +	* Event to modify the SQL query to get birthdays data +	* +	* @event core.index_modify_birthdays_sql +	* @var	array	now			The assoc array with the 'now' local timestamp data +	* @var	array	sql_ary		The SQL array to get the birthdays data +	* @var	object	time		The user related Datetime object +	* @since 3.1.7-RC1 +	*/ +	$vars = array('now', 'sql_ary', 'time'); +	extract($phpbb_dispatcher->trigger_event('core.index_modify_birthdays_sql', compact($vars))); + +	$sql = $db->sql_build_query('SELECT', $sql_ary);  	$result = $db->sql_query($sql); +	$rows = $db->sql_fetchrowset($result); +	$db->sql_freeresult($result); -	while ($row = $db->sql_fetchrow($result)) +	foreach ($rows as $row)  	{  		$birthday_username	= get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);  		$birthday_year		= (int) substr($row['user_birthday'], -4);  		$birthday_age		= ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; -		$template->assign_block_vars('birthdays', array( +		$birthdays[] = array(  			'USERNAME'	=> $birthday_username,  			'AGE'		=> $birthday_age, -		)); +		);  		// For 3.0 compatibility -		if ($age = (int) substr($row['user_birthday'], -4)) -		{ -			$birthday_list[] = $birthday_username . (($birthday_year) ? ' (' . $birthday_age . ')' : ''); -		} +		$birthday_list[] = $birthday_username . (($birthday_age) ? " ({$birthday_age})" : '');  	} -	$db->sql_freeresult($result); + +	/** +	* Event to modify the birthdays list +	* +	* @event core.index_modify_birthdays_list +	* @var	array	birthdays		Array with the users birhtdays data +	* @var	array	rows			Array with the birhtdays SQL query result +	* @since 3.1.7-RC1 +	*/ +	$vars = array('birthdays', 'rows'); +	extract($phpbb_dispatcher->trigger_event('core.index_modify_birthdays_list', compact($vars))); + +	$template->assign_block_vars_array('birthdays', $birthdays);  }  // Assign index specific vars diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index c4865ab3c2..c7762d4cef 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1574,12 +1574,12 @@ switch ($mode)  			'U_HIDE_FIND_MEMBER'	=> ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '',  			'U_LIVE_SEARCH'			=> ($config['allow_live_searches']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=livesearch') : false,  			'U_SORT_USERNAME'		=> $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), -			'U_SORT_JOINED'			=> $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), -			'U_SORT_POSTS'			=> $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), -			'U_SORT_EMAIL'			=> $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), -			'U_SORT_ACTIVE'			=> ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '', -			'U_SORT_RANK'			=> $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'), -			'U_LIST_CHAR'			=> $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'), +			'U_SORT_JOINED'			=> $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'd') ? 'a' : 'd'), +			'U_SORT_POSTS'			=> $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'd') ? 'a' : 'd'), +			'U_SORT_EMAIL'			=> $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'd') ? 'a' : 'd'), +			'U_SORT_ACTIVE'			=> ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'd') ? 'a' : 'd') : '', +			'U_SORT_RANK'			=> $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'd') ? 'a' : 'd'), +			'U_LIST_CHAR'			=> $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'd') ? 'a' : 'd'),  			'S_SHOW_GROUP'		=> ($mode == 'group') ? true : false,  			'S_VIEWONLINE'		=> $auth->acl_get('u_viewonline'), diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index e3780f024a..8e1eecf060 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -87,7 +87,7 @@ phpbb.addAjaxCallback('mark_topics_read', function(res, updateTopicLinks) {  	});  	// Remove link to first unread post -	$('a').has('span.icon_topic_newest').remove(); +	$('a').has('i.icon-red').remove();  	// Update mark topics read links  	if (updateTopicLinks) { diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html index 8d56a103d2..618e2680ba 100644 --- a/phpBB/styles/prosilver/template/search_body.html +++ b/phpBB/styles/prosilver/template/search_body.html @@ -9,7 +9,9 @@  	<div class="inner">  	<h3>{L_SEARCH_QUERY}</h3> +	<!-- EVENT search_body_search_query_before -->  	<fieldset> +	<!-- EVENT search_body_search_query_prepend -->  	<dl>  		<dt><label for="keywords">{L_SEARCH_KEYWORDS}{L_COLON}</label><br /><span>{L_SEARCH_KEYWORDS_EXPLAIN}</span></dt>  		<dd><input type="search" class="inputbox" name="keywords" id="keywords" size="40" title="{L_SEARCH_KEYWORDS}" /></dd> @@ -20,7 +22,9 @@  		<dt><label for="author">{L_SEARCH_AUTHOR}{L_COLON}</label><br /><span>{L_SEARCH_AUTHOR_EXPLAIN}</span></dt>  		<dd><input type="search" class="inputbox" name="author" id="author" size="40" title="{L_SEARCH_AUTHOR}" /></dd>  	</dl> +	<!-- EVENT search_body_search_query_append -->  	</fieldset> +	<!-- EVENT search_body_search_query_after -->  	</div>  </div> @@ -30,7 +34,9 @@  	<h3>{L_SEARCH_OPTIONS}</h3> +	<!-- EVENT search_body_search_options_before -->  	<fieldset> +	<!-- EVENT search_body_search_options_prepend -->  	<dl>  		<dt><label for="search_forum">{L_SEARCH_FORUMS}{L_COLON}</label><br /><span>{L_SEARCH_FORUMS_EXPLAIN}</span></dt>  		<dd><select name="fid[]" id="search_forum" multiple="multiple" size="8" title="{L_SEARCH_FORUMS}">{S_FORUM_OPTIONS}</select></dd> @@ -49,9 +55,11 @@  		<dd><label for="sf3"><input type="radio" name="sf" id="sf3" value="titleonly" /> {L_SEARCH_TITLE_ONLY}</label></dd>  		<dd><label for="sf4"><input type="radio" name="sf" id="sf4" value="firstpost" /> {L_SEARCH_FIRST_POST}</label></dd>  	</dl> +	<!-- EVENT search_body_search_options_append -->  	<hr class="dashed" /> +	<!-- EVENT search_body_search_display_options_prepend -->  	<dl>  		<dt><label for="show_results1">{L_DISPLAY_RESULTS}{L_COLON}</label></dt>  		<dd> @@ -74,7 +82,9 @@  		<dt><label>{L_RETURN_FIRST}{L_COLON}</label></dt>  		<dd><select name="ch" title="{L_RETURN_FIRST}">{S_CHARACTER_OPTIONS}</select> {L_POST_CHARACTERS}</dd>  	</dl> +	<!-- EVENT search_body_search_display_options_append -->  	</fieldset> +	<!-- EVENT search_body_search_options_after -->  	</div>  </div> @@ -91,7 +101,9 @@  </div>  </form> +<!-- EVENT search_body_form_after --> +<!-- EVENT search_body_recent_search_before -->  <!-- IF .recentsearch -->  <div class="forumbg forumbg-table">  	<div class="inner"> @@ -119,5 +131,6 @@  	</div>  </div>  <!-- ENDIF --> +<!-- EVENT search_body_recent_search_after -->  <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 0c64adc305..19b52c6ff6 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -222,6 +222,7 @@  			<!-- ENDIF -->  			<div id="post_content{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->> +			<!-- EVENT viewtopic_body_post_subject_before -->  			<h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="{postrow.POST_ICON_IMG_ALT}" title="{postrow.POST_ICON_IMG_ALT}" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>  		<!-- DEFINE $SHOW_POST_BUTTONS = (postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE) --> | 
