<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	ATTENTION: If you are trying to install this manually, you should try
	the package manager.  If it will not work for you, please take a look
	at the following for information on this format:
		http://www.simplemachines.org/redirect/manual_mod_install
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
	<id>OutofOrder:GoodPostBadPost</id>
	<version>2.0.4</version>

	<file name="$themedir/BoardIndex.template.php" error="skip">
		<operation>
			<search position="after"><![CDATA[	// Show statistical style information...]]></search>
			<add><![CDATA[	// Good Post/Bad Post: Show most recently voted topics...
	if (! empty($modSettings['gpbp_show_best_topics']) && ! empty($context['gpbp_best_topics']))
	{
		echo '
			<h4 class="titlebg"><span class="left"></span>
				<img class="icon" src="', $settings['images_url'], '/icons/gpbp_motw.gif" alt="MOTW" />
				<span>Messages of the Week</span>
			</h4>';
		$odd = 0;
		foreach ($context['gpbp_best_topics'] as $message)
			echo '
			<p class="inline windowbg', $odd++ % 2 ? '' : '2','">
				<a href="', $scripturl, '?topic=', $message['topic'], '.msg', $message['msg'], '#msg', $message['msg'], '">', $message['subject'], '</a> 
				by ', ! empty($message['member_id']) ? '<a href="' . $scripturl . '?action=profile;u=' . $message['member_id'] . '"><strong>' : '', $message['member_name'], ! empty($message['member_id']) ? '</strong></a>' : '', ' 
				(', $message['score'] > 0 ? '+' : '-', $message['score'], ')
			</p>';
	}


]]></add>
		</operation>
	</file>

	<file name="$themedir/Stats.template.php">
		<operation>
			<search position="replace"><![CDATA[<div id="gpbp_top_voters">
				<h3 class="catbg"><span class="left"></span>
					<img src="', $settings['images_url'], '/stats_replies.gif" class="icon" alt="" /> ', $txt['gpbp_top_voters'], '
				</h3>]]></search>
			<add><![CDATA[<div id="gpbp_top_voters">
				<div class="title_bar">
					<h4 class="titlebg">
						<span class="ie6_header floatleft">
							<img src="', $settings['images_url'], '/stats_replies.gif" class="icon" alt="" /> ', $txt['gpbp_top_voters'], '
						</span>
					</h4>
				</div>]]></add>
		</operation>

		<operation>
			<search position="replace"><![CDATA[<div id="gpbp_most_respected">
				<h3 class="catbg"><span class="left"></span>
					<img src="', $settings['images_url'], '/stats_posters.gif" class="icon" alt="" /> ', $txt['gpbp_most_respected'], '
				</h3>]]></search>
			<add><![CDATA[<div id="gpbp_most_respected">
				<div class="title_bar">
					<h4 class="titlebg">
						<span class="ie6_header floatleft">
							<img src="', $settings['images_url'], '/stats_posters.gif" class="icon" alt="" /> ', $txt['gpbp_most_respected'], '
						</span>
					</h4>
				</div>]]></add>
		</operation>
	</file>

	<file name="$languagedir/Modifications.english.php">
		<operation>
			<search position="before"><![CDATA[$txt['gpbp_orphaned_success'] = '%s votes were deleted.';]]></search>
			<add><![CDATA[
$txt['gpbp_totals'] = 'Recount totals';
$txt['gpbp_totals_success'] = 'Finished recounting totals for %s members and %s posts.';
$txt['gpbp_totals_desc'] = 'You may recount all the score and Respect values for messages and members respectively.<br /><strong>Note: </strong>This may be a demanding process so if your forum is really active or you have ran this mod for a long time. Please consider enabling the <em>Maintenance mode</em> first before using this tool.';]]></add>
		</operation>

		<operation>
			<search position="before"><![CDATA[$txt['modlog_ac_gpbp_advanced_settings'] = 'GP/BP: Updated Advanced settings.';]]></search>
			<add><![CDATA[
$txt['modlog_ac_gpbp_totals'] = 'GP/BP: Scores and Respect totals were recounted.';]]></add>
		</operation>
	</file>
	
	<file name="$languagedir/Modifications.english-utf8.php" error="skip">
		<operation>
			<search position="before"><![CDATA[$txt['gpbp_orphaned_success'] = '%s votes were deleted.';]]></search>
			<add><![CDATA[
$txt['gpbp_totals'] = 'Recount totals';
$txt['gpbp_totals_success'] = 'Finished recounting totals for %s members and %s posts.';
$txt['gpbp_totals_desc'] = 'You may recount all the score and Respect values for messages and members respectively.<br /><strong>Note: </strong>This may be a demanding process so if your forum is really active or you have ran this mod for a long time. Please consider enabling the <em>Maintenance mode</em> first before using this tool.';]]></add>
		</operation>

		<operation>
			<search position="before"><![CDATA[$txt['modlog_ac_gpbp_advanced_settings'] = 'GP/BP: Updated Advanced settings.';]]></search>
			<add><![CDATA[
$txt['modlog_ac_gpbp_totals'] = 'GP/BP: Scores and Respect totals were recounted.';]]></add>
		</operation>
	</file>

	<file name="$languagedir/Modifications.spanish_latin.php" error="skip">
		<operation>
			<search position="before"><![CDATA[$txt['gpbp_orphaned_success'] = 'Se eliminaron %s votos.';]]></search>
			<add><![CDATA[
$txt['gpbp_totals'] = 'Volver a contar totales';
$txt['gpbp_totals_success'] = 'Se recontaron los valores para %s miembros y %s mensajes.';
$txt['gpbp_totals_desc'] = 'Puedes recontar los valores de puntuaci&oacute;n y Respeto para todos los mensajes y miembros respectivamente.<br /><strong>Nota: </strong>Este proceso puede ser demandante para el servidor si tus foros son muy activos o si este mod lleva mucho tiempo funcionando. Por favor, considera activar el <em>modo de Mantenimiento</em> antes de utilizar esta herramienta.';]]></add>
		</operation>

		<operation>
			<search position="before"><![CDATA[$txt['modlog_ac_gpbp_advanced_settings'] = 'MB/MM: Opciones avanzadas actualizadas.';]]></search>
			<add><![CDATA[
$txt['modlog_ac_gpbp_totals'] = 'MB/MM: Se recontaron los totales de puntuaci&oacute;n y respeto';]]></add>
		</operation>
	</file>

	<file name="$languagedir/Modifications.spanish_latin-utf8.php" error="skip">
		<operation>
			<search position="before"><![CDATA[$txt['gpbp_orphaned_success'] = 'Se eliminaron %s votos.';]]></search>
			<add><![CDATA[
$txt['gpbp_totals'] = 'Volver a contar totales';
$txt['gpbp_totals_success'] = 'Se recontaron los valores para %s miembros y %s mensajes.';
$txt['gpbp_totals_desc'] = 'Puedes recontar los valores de puntuación y Respeto para todos los mensajes y miembros respectivamente.<br /><strong>Nota: </strong>Este proceso puede ser demandante para el servidor si tus foros son muy activos o si este mod lleva mucho tiempo funcionando. Por favor, considera activar el <em>modo de Mantenimiento</em> antes de utilizar esta herramienta.';]]></add>
		</operation>

		<operation>
			<search position="before"><![CDATA[$txt['modlog_ac_gpbp_advanced_settings'] = 'MB/MM: Opciones avanzadas actualizadas.';]]></search>
			<add><![CDATA[
$txt['modlog_ac_gpbp_totals'] = 'MB/MM: Se recontaron los totales de puntuación y respeto.';]]></add>
		</operation>
	</file>
</modification>
