<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="./modx/1.2.5.xsl" ?>
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
  <header>
    <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
    <title lang="en">Quick Title Edition</title>
    <title lang="fr">Quick Title Edition</title>
    <description lang="en">That MOD ensures to add an attribute, generally called tag or prefix, like [Solved], to the topics titles.</description>
    <description lang="fr">Ce MOD permet d'ajouter un attribut, généralement appelé tag ou préfixe, comme [Réglé], aux titres de vos sujets.</description>
    <author-notes lang="en">That MOD works on all database systems supported by phpBB3 and requires PHP 5.2.0 or greater. If your webhost uses a lower version, an alternative fix is available in the "Support" part of the MOD.</author-notes>
    <author-notes lang="fr">Ce MOD fonctionne sur tous les systèmes de base de données supportés par phpBB3 et requiert PHP 5.2.0 ou supérieur. Si votre hébergeur utilise une version inférieure, un correctif alternatif est disponible dans la partie "Support" du MOD.</author-notes>
		<author-group>
			<author>
        <realname>Adrien BONNEL</realname>
        <username>ABDev</username>
        <homepage>http://www.meetgeek.info/</homepage>
     		<contributions-group>
     		  <contributions status="current" from="2008-02-28" position="Developer"/>
     		</contributions-group>
			</author>
			<author>
				<username>PastisD</username>
     		<contributions-group>
     		  <contributions status="current" from="2008-02-28" position="Developer"/>
     		</contributions-group>
			</author>
			<author>
				<username>Jester</username>
				<homepage>http://jesterstyles.free.fr/</homepage>
     		<contributions-group>
     		  <contributions status="current" from="2010-11-30" position="Logo creator"/>
     		</contributions-group>
			</author>
    </author-group>
    <mod-version>1.0.0</mod-version>
    <installation>
      <level>intermediate</level>
      <time>2700</time>
      <target-version>3.0.8</target-version>
    </installation>
    <history>
      <entry>
        <date>2010-12-12</date>
        <rev-version>1.0.0</rev-version>
        <changelog lang="en">
          <change>MOD submitted to validation</change>
        </changelog>
        <changelog lang="fr">
          <change>MOD soumis à la validation</change>
        </changelog>
      </entry>
      <entry>
        <date>2010-12-11</date>
        <rev-version>1.0.0 RC6</rev-version>
        <changelog lang="en">
          <change>Sixth public release candidate</change>
          <change>Fixed issues for validation</change>
          <change>Added the possibility to force attributes application per forum via a setting</change>
          <change>Fixed an issue if Oracle database system is used</change>
          <change>Successfully tested on the following database systems : MySQL, MySQLi, PostgreSQL, Oracle, SQLite, Firebird and MS SQL Server 2008 R2</change>
        </changelog>
        <changelog lang="fr">
          <change>Sixième version publique admissible</change>
          <change>Correction d'erreurs pour la validation</change>
          <change>Possibilité de forcer l'application d'attributs par forum via un réglage</change>
          <change>Correction d'une erreur si le système de base de données Oracle est utilisé</change>
          <change>Fonctionne sur les systèmes de base de données suivants : MySQL, MySQLi, PostgreSQL, Oracle, SQLite, Firebird et MS SQL Server 2008 R2</change>
        </changelog>
      </entry>
      <entry>
        <date>2010-12-03</date>
        <rev-version>1.0.0 RC5</rev-version>
        <changelog lang="en">
          <change>Fifth public release candidate</change>
          <change>Added the search feature</change>
					<change>Changed all files headers for validation</change>
					<change>Minor fixes</change>
        </changelog>
        <changelog lang="fr">
          <change>Cinquième version publique admissible</change>
          <change>Ajout de la fonction de recherche</change>
					<change>Modification de toutes les entêtes des fichiers pour la validation</change>
					<change>Corrections mineurs</change>
        </changelog>
      </entry>
      <entry>
        <date>2010-12-01</date>
        <rev-version>1.0.0 RC4</rev-version>
        <changelog lang="en">
          <change>Fourth public release candidate</change>
					<change>Revized AutoMOD compatibility</change>
					<change>New permissions manager</change>
					<change>Minor fixes</change>
					<change>Added a comment field in order to differentiate the attributes, if some have the same name</change>
        </changelog>
        <changelog lang="fr">
          <change>Quatrième version publique admissible</change>
					<change>Révision de la compatibilité AutoMOD</change>
					<change>Nouveau gestionnaire de permissions</change>
					<change>Corrections mineurs</change>
					<change>Ajout d'un champ de commentaire afin de différencier les attributs, si certains ont le même nom</change>
        </changelog>
      </entry>
      <entry>
        <date>2010-11-23</date>
        <rev-version>1.0.0 RC3</rev-version>
        <changelog lang="en">
          <change>Third public release candidate</change>
					<change>General update of the MOD, there are too changes to be listed</change>
          <change>MODX updated</change>
          <change>Simplified installation through UMIL</change>
          <change>AutoMOD compliant</change>
        </changelog>
        <changelog lang="fr">
          <change>Troisième version publique admissible</change>
					<change>Mise à jour générale du MOD, il y a trop de changements pour pouvoir tout lister</change>
          <change>Mise à jour de MODX</change>
          <change>Installation simplifiée grâce à UMIL</change>
          <change>Compatibilité avec AutoMOD</change>
        </changelog>
      </entry>
      <entry>
        <date>2008-05-04</date>
        <rev-version>1.0.0 RC2</rev-version>
        <changelog lang="en">
          <change>Second public release candidate</change>
          <change>Added: new attributes permissions manager for each forum and each level</change>
          <change>Fixed: mistake on attributes display from the search pages</change>
          <change>Fixed: the attributes displayed on first post of each page</change>
          <change>Fixed: lots of mistakes ...</change>
          <change>Revized: installation procedure</change>
          <change>Revized: installation procedure for "subsilver2" style</change>
        </changelog>
        <changelog lang="fr">
          <change>Deuxième version publique admissible</change>
          <change>Ajouté: nouveau gestionnaire de permissions des attributs pour chaque forum et chaque niveau</change>
          <change>Corrigé: erreur d'affichage sur les attributs depuis les résultats de recherche</change>
          <change>Corrigé: les attributs s'affichaient sur le premier message de chaque page</change>
          <change>Corrigé: plusieurs autres erreurs ...</change>
          <change>Revu: procédure d'installation</change>
          <change>Revu: procédure d'installation pour le style "subsilver2"</change>
        </changelog>
      </entry>
      <entry>
        <date>2008-04-27</date>
        <rev-version>1.0.0 RC1</rev-version>
        <changelog lang="en">
          <change>First public release candidate</change>
          <change>Addded: "subsilver2" style support</change>
          <change>Fixed: attributes can now be applied from the moderator control panel</change>
          <change>Fixed: attribute was lost when it was changed from the posting editor</change>
          <change>Fixed: lots of mistakes ...</change>
        </changelog>
        <changelog lang="fr">
          <change>Première version publique admissible</change>
          <change>Ajouté: support du style "subsilver2"</change>
          <change>Corrigé: les attributs peuvent maintenant être appliqués depuis le panneau de modération</change>
          <change>Corrigé: l'attribut était perdu si celui-ci étant changé depuis l'éditeur de saisie des messages</change>
          <change>Corrigé: plusieurs autres erreurs ...</change>
        </changelog>
      </entry>
      <entry>
        <date>2008-04-12</date>
        <rev-version>1.0.0 Beta 2</rev-version>
        <changelog lang="en">
          <change>Second release (private)</change>
          <change>Fixed: users weren't allowed to apply attributes</change>
          <change>Fixed: lots of mistakes ...</change>
        </changelog>
        <changelog lang="fr">
          <change>Seconde version (privée)</change>
          <change>Corrigé: les utilisateurs n'étaient pas autorisés à appliquer des attributs</change>
          <change>Corrigé: plusieurs autres erreurs ...</change>
        </changelog>
      </entry>
      <entry>
        <date>2008-02-28</date>
        <rev-version>1.0.0 Beta 1</rev-version>
        <changelog lang="en">
          <change>First release (private)</change>
        </changelog>
        <changelog lang="fr">
          <change>Première version (privée)</change>
        </changelog>
      </entry>
    </history>
		<link-group>
			<link type="template" realname="subsilver2" href="contrib/templates/subsilver2.xml" lang="en">Modifications to do for "subsilver2" style</link>
			<link type="language" realname="fr" href="contrib/languages/fr.xml" lang="en">Language files for french boards</link>
			<link type="contrib" href="contrib/updates/changelog_100-beta1_100-beta2.xml" lang="en">Update the MOD from 1.0.0 Beta 1 to 1.0.0 Beta 2</link>
			<link type="contrib" href="contrib/updates/changelog_100-beta2_100-rc1.xml" lang="en">Update the MOD from 1.0.0 Beta 2 to 1.0.0 RC1</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc1_100-rc2.xml" lang="en">Update the MOD from 1.0.0 RC1 to 1.0.0 RC2</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc2_100-rc3.xml" lang="en">Update the MOD from 1.0.0 RC2 to 1.0.0 RC3</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc3_100-rc4.xml" lang="en">Update the MOD from 1.0.0 RC3 to 1.0.0 RC4</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc4_100-rc5.xml" lang="en">Update the MOD from 1.0.0 RC4 to 1.0.0 RC5</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc5_100-rc6.xml" lang="en">Update the MOD from 1.0.0 RC5 to 1.0.0 RC6</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc6_100.xml" lang="en">Update the MOD from 1.0.0 RC6 to 1.0.0</link>
			<link type="contrib" href="contrib/add-ons/allows_author_moderators_to_access_on_reply.xml" lang="en">Allows topic author and moderators to access to selector on reply</link>
			<link type="contrib" href="contrib/add-ons/latest_topic_title.xml" lang="en">Add-on for “Latest Topic Title” MOD</link>
			<link type="contrib" href="contrib/add-ons/phpbb_seo_related_topics.xml" lang="en">Add-on for “phpBB SEO Related Topics” MOD</link>
			<link type="contrib" href="contrib/add-ons/mod_version_check.xml" lang="en">Add-on for “MOD Version Check” MOD</link>
			<link type="template" realname="subsilver2" href="contrib/templates/subsilver2.xml" lang="fr">Modifications à apporter pour le style "subsilver2"</link>
			<link type="language" realname="fr" href="contrib/languages/fr.xml" lang="fr">Fichiers de langue pour les forums francophones</link>
			<link type="contrib" href="contrib/updates/changelog_100-beta1_100-beta2.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 Beta 1 à la version 1.0.0 Beta 2</link>
			<link type="contrib" href="contrib/updates/changelog_100-beta2_100-rc1.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 Beta 1 à la version 1.0.0 RC1</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc1_100-rc2.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 RC1 à la version 1.0.0 RC2</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc2_100-rc3.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 RC2 à la version 1.0.0 RC3</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc3_100-rc4.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 RC3 à la version 1.0.0 RC4</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc4_100-rc5.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 RC4 à la version 1.0.0 RC5</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc5_100-rc6.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 RC5 à la version 1.0.0 RC6</link>
			<link type="contrib" href="contrib/updates/changelog_100-rc6_100.xml" lang="fr">Mette à jour le MOD de la version 1.0.0 RC6 à la version 1.0.0</link>
			<link type="contrib" href="contrib/add-ons/allows_author_moderators_to_access_on_reply.xml" lang="fr">Autoriser L'auteur du sujet et les modérateurs à accéder au sélecteur lors d'une réponse</link>
			<link type="contrib" href="contrib/add-ons/latest_topic_title.xml" lang="fr">Contribution pour le MOD “Latest Topic Title”</link>
			<link type="contrib" href="contrib/add-ons/phpbb_seo_related_topics.xml" lang="fr">Contribution pour le MOD “phpBB SEO Related Topics”</link>
			<link type="contrib" href="contrib/add-ons/mod_version_check.xml" lang="fr">Contribution pour le MOD “MOD Version Check”</link>
		</link-group>
  </header>
  <action-group>
		<copy>
			<file from="root/adm/images/qte_auth_add.gif" to="adm/images/qte_auth_add.gif" />
			<file from="root/adm/images/qte_auth_remove.gif" to="adm/images/qte_auth_remove.gif" />
			<file from="root/adm/style/acp_attributes.js" to="adm/style/acp_attributes.js" />
			<file from="root/adm/style/acp_attributes.html" to="adm/style/acp_attributes.html" />
			<file from="root/adm/style/jquery-1.4.4.min.js" to="adm/style/jquery-1.4.4.min.js" />
			<file from="root/images/qte_logo_small.png" to="images/qte_logo_small.png" />
			<file from="root/includes/acp/info/acp_attributes.php" to="includes/acp/info/acp_attributes.php" />
			<file from="root/includes/acp/acp_attributes.php" to="includes/acp/acp_attributes.php" />
			<file from="root/includes/functions_attributes.php" to="includes/functions_attributes.php" />
			<file from="root/language/en/mods/attributes.php" to="language/en/mods/attributes.php" />
			<file from="root/language/en/mods/info_acp_attributes.php" to="language/en/mods/info_acp_attributes.php" />
			<file from="root/language/en/mods/info_mcp_attributes.php" to="language/en/mods/info_mcp_attributes.php" />
			<file from="root/styles/prosilver/imageset/icon_topic_cancel.gif" to="styles/prosilver/imageset/icon_topic_cancel.gif" />
			<file from="root/styles/prosilver/imageset/icon_topic_solved.gif" to="styles/prosilver/imageset/icon_topic_solved.gif" />
			<file from="root/styles/prosilver/template/attributes.html" to="styles/prosilver/template/attributes.html" />
			<file from="root/styles/prosilver/theme/qte.css" to="styles/prosilver/theme/qte.css" />
			<file from="root/umil/*.*" to="umil/*.*" />
			<file from="root/db_update.php" to="db_update.php" />
		</copy>
    <open src="adm/style/acp_forums.html">
      <edit>
        <find><![CDATA[		<dl>
			<dt><label for="display_recent">{L_ENABLE_RECENT}:</label><br /><span>{L_ENABLE_RECENT_EXPLAIN}</span></dt>]]></find>
        <action type="before-add"><![CDATA[		<dl>
			<dt><label for="force_attr">{L_QTE_FORCE_USERS}:</label><br /><span>{L_QTE_FORCE_USERS_EXPLAIN}</span></dt>
			<dd><label><input type="radio" class="radio" name="force_attr" value="1"<!-- IF S_FORCE_ATTR --> id="force_attr" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
				<label><input type="radio" class="radio" name="force_attr" value="0"<!-- IF not S_FORCE_ATTR --> id="force_attr" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
		</dl>]]></action>
      </edit>
    </open>
    <open src="adm/style/admin.css">
      <edit>
        <find><![CDATA[.phpinfo td, .phpinfo th, .phpinfo h2, .phpinfo h1 {
	text-align: left;
}]]></find>
        <action type="after-add"><![CDATA[/* Class for Quick Title Edition
---------------------------------------- */
#acp_attributes option:disabled {
	color: #808080;
	font-style: italic;
}]]></action>
      </edit>
    </open>
    <open src="includes/acp/acp_forums.php">
      <edit>
        <find>						'forum_password_unset'	=> request_var('forum_password_unset', false),
					);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
					$forum_data += array('force_attr' => request_var('force_attr', false));
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>							'forum_password_confirm'=> '',
						);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
						$forum_data += array('force_attr' => false);
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>					'S_DESC_URLS_CHECKED'		=> ($forum_desc_data['allow_urls']) ? true : false,</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
					'S_FORCE_ATTR' => $forum_data['force_attr'] ? true : false,
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="includes/acp/acp_styles.php">
      <edit>
        <find>		// Execute overall actions</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		$this->imageset_keys['icons'] = array_merge($this->imageset_keys['icons'], array('icon_topic_solved', 'icon_topic_cancel'));
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="includes/mcp/mcp_forum.php">
      <edit>
        <find>	global $phpEx, $phpbb_root_path, $config;</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
	global $qte;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>	$to_topic_id		= request_var('to_topic_id', 0);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
	$attr_id = request_var('attr_id', 0);
	if ( $attr_id )
	{
		$qte->mcp_attr_apply($attr_id, $topic_id_list);
	}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>	// Grab icons</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
	$qte->attr_select($forum_id, $user->data['user_id'], '');
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			'S_UNREAD_TOPIC'		=> $unread_topic,
		);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		if ( !empty($row['topic_attr_id']) )
		{
			$topic_row += array(
				'S_TOPIC_ATTR'	=> true,
				'TOPIC_ATTRIBUTE' => $qte->attr_display($row['topic_attr_id'], $row['topic_attr_user'], $row['topic_attr_time']),
			);
		}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="includes/mcp/mcp_main.php">
      <edit>
        <find>					'poll_last_vote'		=>	(int) $row['poll_last_vote']
				);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
				$shadow += array(
					'topic_attr_id' => (int) $row['topic_attr_id'],
					'topic_attr_user' => (int) $row['topic_attr_user'],
					'topic_attr_time' => (int) $row['topic_attr_time'],
				);
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>				'poll_vote_change'			=> (int) $topic_row['poll_vote_change'],
			);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
			$sql_ary += array(
				'topic_attr_id' => (int) $topic_row['topic_attr_id'],
				'topic_attr_user' => (int) $topic_row['topic_attr_user'],
				'topic_attr_time' => (int) $topic_row['topic_attr_time'],
			);
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="includes/mcp/mcp_queue.php">
      <edit>
        <find>		global $config, $phpbb_root_path, $phpEx, $action;</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		global $qte;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>					'POST_PREVIEW'			=> $message,</find>
        <action type="before-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
					'S_TOPIC_ATTR'	=> (($post_info['topic_first_post_id'] == $post_info['post_id']) && !empty($post_info['topic_attr_id'])) ? true : false,
					'TOPIC_ATTRIBUTE' => $qte->attr_display($post_info['topic_attr_id'], $post_info['topic_attr_user'], $post_info['topic_attr_time']),
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
      <edit>
        <find>					$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);

					$rowset = array();</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
					$sql = str_replace(', t.topic_title AS post_subject', ', t.topic_title AS post_subject, t.topic_attr_id AS post_attr_id, t.topic_attr_user AS post_attr_user, t.topic_attr_time AS post_attr_time', $sql);
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>						'POST_ID'		=> $row['post_id'],</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
						'S_TOPIC_ATTR' => !empty($row['post_attr_id']) ? true : false,
						'TOPIC_ATTRIBUTE' => $qte->attr_display($row['post_attr_id'], $row['post_attr_user'], $row['post_attr_time']),
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="includes/mcp/mcp_topic.php">
      <edit>
        <find>	global $template, $db, $user, $auth, $cache;</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
	global $qte;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			'POST_SUBJECT'	=> $post_subject,</find>
        <action type="after-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
			'S_TOPIC_ATTR'	=> (!empty($topic_info['topic_attr_id']) && !$i) ? true : false,
			'TOPIC_ATTRIBUTE' => $qte->attr_display($topic_info['topic_attr_id'], $topic_info['topic_attr_user'], $topic_info['topic_attr_time']),
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
    </open>
    <open src="includes/ucp/ucp_main.php">
      <edit>
        <find>		global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		global $qte;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>						'TOPIC_TYPE'				=> $topic_type,</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
						'S_TOPIC_ATTR'	=> !empty($row['topic_attr_id']) ? true : false,
						'TOPIC_ATTRIBUTE' => $qte->attr_display($row['topic_attr_id'], $row['topic_attr_user'], $row['topic_attr_time']),
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>		global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx;</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		global $qte;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>				'FORUM_NAME'		=> $row['forum_name'],</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
				'S_TOPIC_ATTR'	=> !empty($row['topic_attr_id']) ? true : false,
				'TOPIC_ATTRIBUTE' => $qte->attr_display($row['topic_attr_id'], $row['topic_attr_user'], $row['topic_attr_time']),
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="includes/search/fulltext_mysql.php">
      <edit>
        <find>function keyword_search(</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
// here we added
//	, $attribute_id = 0
//-- modify</action>
				<inline-edit>
					<inline-find>$per_page</inline-find>
					<inline-action type="after-add">, $attribute_id = 0</inline-action>
				</inline-edit>
        <action type="after-add">//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>		$sql_where_options .= ($join_topic) ? ' AND t.topic_id = p.topic_id' : '';</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		if ( $attribute_id )
		{
			$sql_where_options .= ' AND t.topic_attr_id = ' . (int) $attribute_id;
		}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>function author_search(</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
// here we added
//	, $attribute_id = 0
//-- modify</action>
				<inline-edit>
					<inline-find>$per_page</inline-find>
					<inline-action type="after-add">, $attribute_id = 0</inline-action>
				</inline-edit>
        <action type="after-add">//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			$sql_author = $db->sql_in_set('p.poster_id', $author_ary);
		}</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		if ( $attribute_id )
		{
			$sql_author .= ' AND t.topic_attr_id = ' . (int) $attribute_id;

			$firstpost_only = true;
		}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			break;

			case 't':</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
				if ( $attribute_id )
				{
					$sql_sort_join .= ' AND t.topic_attr_id = ' . (int) $attribute_id;
				}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			break;

			case 'f':</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
				if ( $attribute_id )
				{
					$sql_sort_join .= ' AND t.topic_attr_id = ' . (int) $attribute_id;
				}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			return $result_count;
		}
		return false;
	}</find>
        <action type="after-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
	function attribute_search($sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $attribute_id, &$id_ary, $start, $per_page)
	{
		global $config, $db;

		if ( !$attribute_id )
		{
			return 0;
		}

		// init var and ary
		$total_results = 0;
		$id_ary = array();

		// create some display specific sql strings
		$sql_attribute = 't.topic_attr_id = ' . (int) $attribute_id;
		$sql_fora = sizeof($ex_fid_ary) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
		$sql_time = $sort_days ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';

		// build sql strings for sorting
		$sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
		$sql_sort_table = $sql_sort_join = '';
		switch ( $sql_sort[0] )
		{
			case 'u':
				$sql_sort_table = USERS_TABLE . ' u, ';
				$sql_sort_join = ' AND u.user_id = p.poster_id ';
			break;

			case 'f':
				$sql_sort_table = FORUMS_TABLE . ' f, ';
				$sql_sort_join = ' AND f.forum_id = p.forum_id ';
			break;
		}

		if ( !sizeof($m_approve_fid_ary) )
		{
			$m_approve_fid_sql = ' AND p.post_approved = 1';
		}
		else if ( $m_approve_fid_ary == array(-1) )
		{
			$m_approve_fid_sql = '';
		}
		else
		{
			$m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
		}

		// if the cache was completely empty count the results
		$calc_results = $total_results ? '' : 'SQL_CALC_FOUND_ROWS ';

		$sql = "SELECT {$calc_results}t.topic_id
			FROM " . $sql_sort_table . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
			WHERE $sql_attribute
				$m_approve_fid_sql
				$sql_fora
				AND t.topic_id = p.topic_id
				$sql_sort_join
				$sql_time
			GROUP BY t.topic_id
			ORDER BY $sql_sort";

		// only read one block of posts from the db and then cache it
		$result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
		while ( $row = $db->sql_fetchrow($result) )
		{
			$id_ary[] = (int) $row['topic_id'];
		}
		$db->sql_freeresult($result);

		if ( !$total_results )
		{
			$sql = 'SELECT FOUND_ROWS() as total_results';
			$result = $db->sql_query($sql);
			$total_results = (int) $db->sql_fetchfield('total_results');
			$db->sql_freeresult($result);

			if ( !$total_results )
			{
				return false;
			}
		}

		if ( sizeof($id_ary) )
		{
			$id_ary = array_slice($id_ary, 0, $per_page);

			return $total_results;
		}

		return false;
	}
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
    </open>
    <open src="includes/search/fulltext_native.php">
      <edit>
        <find>function keyword_search(</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
// here we added
//	, $attribute_id = 0
//-- modify</action>
				<inline-edit>
					<inline-find>$per_page</inline-find>
					<inline-action type="after-add">, $attribute_id = 0</inline-action>
				</inline-edit>
        <action type="after-add">//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>		if ($type == 'topics')</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		if ( $attribute_id )
		{
			$sql_where[] = 't.topic_attr_id = ' . (int) $attribute_id;
		}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>function author_search(</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
// here we added
//	, $attribute_id = 0
//-- modify</action>
				<inline-edit>
					<inline-find>$per_page</inline-find>
					<inline-action type="after-add">, $attribute_id = 0</inline-action>
				</inline-edit>
        <action type="after-add">//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			$sql_author = $db->sql_in_set('p.poster_id', $author_ary);
		}</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		if ( $attribute_id )
		{
			$sql_author .= ' AND t.topic_attr_id = ' . (int) $attribute_id;

			$firstpost_only = true;
		}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			break;

			case 'f':</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
				if ( $attribute_id )
				{
					$sql_sort_join .= ' AND t.topic_attr_id = ' . (int) $attribute_id;
				}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			return $total_results;
		}
		return false;
	}</find>
        <action type="after-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
	function attribute_search($sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $attribute_id, &$id_ary, $start, $per_page)
	{
		global $config, $db;

		if ( !$attribute_id )
		{
			return 0;
		}

		// init var and ary
		$total_results = 0;
		$id_ary = array();

		// create some display specific sql strings
		$sql_attribute = 't.topic_attr_id = ' . (int) $attribute_id;
		$sql_fora = sizeof($ex_fid_ary) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
		$sql_time = $sort_days ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';

		// build sql strings for sorting
		$sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
		$sql_sort_table = $sql_sort_join = '';
		switch ( $sql_sort[0] )
		{
			case 'u':
				$sql_sort_table = USERS_TABLE . ' u, ';
				$sql_sort_join = ' AND u.user_id = p.poster_id ';
			break;

			case 'f':
				$sql_sort_table = FORUMS_TABLE . ' f, ';
				$sql_sort_join = ' AND f.forum_id = p.forum_id ';
			break;
		}

		if ( !sizeof($m_approve_fid_ary) )
		{
			$m_approve_fid_sql = ' AND p.post_approved = 1';
		}
		else if ( $m_approve_fid_ary == array(-1) )
		{
			$m_approve_fid_sql = '';
		}
		else
		{
			$m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
		}

		$is_mysql = false;

		// if the cache was completely empty count the results
		if ( !$total_results )
		{
			switch ( $db->sql_layer )
			{
				case 'mysql4':
				case 'mysqli':
					$is_mysql = true;
				break;

				default:

					if ( $db->sql_layer == 'sqlite' )
					{
						$sql = 'SELECT COUNT(topic_id) as total_results
							FROM (SELECT DISTINCT t.topic_id';
					}
					else
					{
						$sql = 'SELECT COUNT(DISTINCT t.topic_id) as total_results';
					}

					$sql .= ' FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
						WHERE $sql_attribute
							$m_approve_fid_sql
							$sql_fora
							AND t.topic_id = p.topic_id
							$sql_time" . (($db->sql_layer == 'sqlite') ? ')' : '');
					$result = $db->sql_query($sql);

					$total_results = (int) $db->sql_fetchfield('total_results');
					$db->sql_freeresult($result);

					if ( !$total_results )
					{
						return false;
					}

				break;
			}
		}

		$sql = "SELECT t.topic_id
			FROM " . $sql_sort_table . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
			WHERE $sql_attribute
				$m_approve_fid_sql
				$sql_fora
				AND t.topic_id = p.topic_id
				$sql_sort_join
				$sql_time
			GROUP BY t.topic_id, " . $sort_by_sql[$sort_key] . '
			ORDER BY ' . $sql_sort;

		// only read one block of posts from the db and then cache it
		$result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
		while ( $row = $db->sql_fetchrow($result) )
		{
			$id_ary[] = (int) $row['topic_id'];
		}
		$db->sql_freeresult($result);

		if ( !$total_results && $is_mysql )
		{
			// count rows for the executed queries
			$sql = str_replace('SELECT t.topic_id', 'SELECT DISTINCT SQL_CALC_FOUND_ROWS p.post_id', $sql);
			$db->sql_query($sql);
			$db->sql_freeresult($result);

			$sql = 'SELECT FOUND_ROWS() as total_results';
			$result = $db->sql_query($sql);
			$total_results = (int) $db->sql_fetchfield('total_results');
			$db->sql_freeresult($result);

			if ( !$total_results )
			{
				return false;
			}
		}

		if ( sizeof($id_ary) )
		{
			$id_ary = array_slice($id_ary, 0, $per_page);

			return $total_results;
		}

		return false;
	}
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
    </open>
    <open src="includes/constants.php">
      <edit>
        <find>// Additional tables</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
define('TOPICS_ATTR_TABLE', $table_prefix . 'topics_attr');
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="includes/functions_posting.php">
      <edit>
        <find>	// We do not handle erasing posts here</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
	global $qte;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>				'topic_attachment'			=> (!empty($data['attachment_data'])) ? 1 : 0,
			);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
			if ( $data['attr_id'] == -1 )
			{
				$sql_data[TOPICS_TABLE]['sql'] += array('topic_attr_id' => 0, 'topic_attr_user' => 0, 'topic_attr_time' => 0);
			}
			else
			{
				$sql_data[TOPICS_TABLE]['sql'] += array(
					'topic_attr_id' => $data['attr_id'],
					'topic_attr_user' => $user->data['user_id'],
					'topic_attr_time' => $current_time,
				);
			}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>				'topic_attachment'			=> (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
			);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
			if ( $data['attr_id'] == -1 )
			{
				$sql_data[TOPICS_TABLE]['sql'] += array('topic_attr_id' => 0, 'topic_attr_user' => 0, 'topic_attr_time' => 0);
			}
			else
			{
				$sql_data[TOPICS_TABLE]['sql'] += array(
					'topic_attr_id' => $data['attr_id'],
					'topic_attr_user' => $user->data['user_id'],
					'topic_attr_time' => $current_time,
				);
			}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
		<open src="styles/prosilver/imageset/imageset.cfg">
			<edit>
				<find>img_icon_user_warn = icon_user_warn.gif*20*20</find>
				<action type="after-add">img_icon_topic_cancel = icon_topic_cancel.gif*16*16
img_icon_topic_solved = icon_topic_solved.gif*16*16</action>
			</edit>
		</open>
    <open src="styles/prosilver/template/mcp_forum.html">
      <edit>
        <find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></find>
        <action type="before-add"><![CDATA[					<!-- IF topicrow.S_TOPIC_ATTR -->{topicrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></action>
      </edit>
      <edit>
        <find><![CDATA[<fieldset class="display-actions">]]></find>
        <action type="before-add"><![CDATA[<!-- INCLUDE attributes.html -->]]></action>
      </edit>
    </open>
    <open src="styles/prosilver/template/mcp_post.html">
      <edit>
        <find><![CDATA[<a href="{U_VIEW_POST}">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{U_VIEW_POST}">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF S_TOPIC_ATTR -->{TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/mcp_queue.html">
      <edit>
        <find><![CDATA[<a href="{postrow.U_VIEW_DETAILS}" class="topictitle">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{postrow.U_VIEW_DETAILS}" class="topictitle">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF postrow.S_TOPIC_ATTR -->{postrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/mcp_topic.html">
      <edit>
        <find><![CDATA[<a href="{postrow.U_POST_DETAILS}">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{postrow.U_POST_DETAILS}">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF postrow.S_TOPIC_ATTR -->{postrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/posting_editor.html">
      <edit>
        <find><![CDATA[	<!-- INCLUDE posting_buttons.html -->]]></find>
        <action type="before-add"><![CDATA[	<!-- INCLUDE attributes.html -->]]></action>
      </edit>
    </open>
    <open src="styles/prosilver/template/posting_preview.html">
      <edit>
        <find><![CDATA[{PREVIEW_SUBJECT}]]></find>
				<inline-edit>
					<inline-find><![CDATA[{PREVIEW_SUBJECT}]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF S_TOPIC_ATTR -->{TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/search_body.html">
      <edit>
        <find><![CDATA[	</fieldset>

	<span class="corners-bottom"><span></span></span></div>]]></find>
        <action type="before-add"><![CDATA[	<!-- INCLUDE attributes.html -->]]></action>
      </edit>
    </open>
    <open src="styles/prosilver/template/search_results.html">
      <edit>
        <find><![CDATA[<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">]]></find>
        <action type="before-add"><![CDATA[						<!-- IF searchresults.S_TOPIC_ATTR -->{searchresults.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></action>
      </edit>
      <edit>
        <find><![CDATA[<a href="{searchresults.U_VIEW_POST}">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{searchresults.U_VIEW_POST}">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF searchresults.S_TOPIC_ATTR -->{searchresults.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/ucp_main_bookmarks.html">
      <edit>
        <find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF topicrow.S_TOPIC_ATTR -->{topicrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/ucp_main_front.html">
      <edit>
        <find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF topicrow.S_TOPIC_ATTR -->{topicrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/ucp_main_subscribed.html">
      <edit>
        <find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF topicrow.S_TOPIC_ATTR -->{topicrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/viewforum_body.html">
      <edit>
        <find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF topicrow.S_TOPIC_ATTR -->{topicrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
    </open>
    <open src="styles/prosilver/template/viewtopic_body.html">
      <edit>
        <find><![CDATA[<a href="{U_VIEW_TOPIC}">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="{U_VIEW_TOPIC}">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF S_TOPIC_ATTR -->{TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
      <edit>
        <find><![CDATA[<a href="#p{postrow.POST_ID}">]]></find>
				<inline-edit>
					<inline-find><![CDATA[<a href="#p{postrow.POST_ID}">]]></inline-find>
					<inline-action type="before-add"><![CDATA[<!-- IF postrow.S_TOPIC_ATTR -->{postrow.TOPIC_ATTRIBUTE} <!-- ENDIF -->]]></inline-action>
				</inline-edit>
      </edit>
      <edit>
        <find><![CDATA[<!-- INCLUDE jumpbox.html -->]]></find>
        <action type="before-add"><![CDATA[<!-- INCLUDE attributes.html -->]]></action>
      </edit>
    </open>
		<open src="styles/prosilver/theme/stylesheet.css">
			<edit>
				<find>@import url("colours.css");</find>
				<action type="after-add">@import url("qte.css");</action>
			</edit>
		</open>
    <open src="mcp.php">
      <edit>
        <find>// Start session management</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
include $phpbb_root_path . 'includes/functions_attributes.' . $phpEx;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>// Generate urls for letting the moderation control panel being accessed in different modes
$template->assign_vars(array(</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
	'S_MCP' => true,
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="posting.php">
      <edit>
        <find>// Start session management</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
include $phpbb_root_path . 'includes/functions_attributes.' . $phpEx;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>// User own some drafts?</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
if ( in_array($mode, array('edit', 'post')) )
{
	$post_data['attr_id'] = request_var('attr_id', 0);
}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>foreach ($hidden_fields as $name => $default)</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
			$hidden_fields += array('attr_id' => 0);
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>		$post_data['icon_id'] = request_var('icon', (int) $post_data['icon_id']);
	}</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
	$post_data['attr_id'] = request_var('attr_id', 0);
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>	$post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0;</find>
        <action type="before-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
	if ( !$preview && !$refresh && ($post_data['attr_id'] == -1) && $post_data['force_attr'] && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)) )
	{
		$user->add_lang('mods/attributes');

		$error[] = $user->lang['QTE_ATTRIBUTE_UNSELECTED'];

		// init the value
		$post_data['attr_id'] = 0;
	}
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
      <edit>
        <find>				'post_approved'			=> (isset($post_data['post_approved'])) ? $post_data['post_approved'] : false,
			);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
			$data += array('attr_id' => (int) $post_data['attr_id']);
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>	}
}

// Decode text for message display</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		if ( !empty($post_data['attr_id']) )
		{
			$template->assign_vars(array(
				'S_TOPIC_ATTR' => true,
				'TOPIC_ATTRIBUTE' => $qte->attr_display($post_data['attr_id'], $user->data['user_id'], $current_time),
			));
		}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>	$s_topic_icons = posting_gen_topic_icons($mode, $post_data['icon_id']);
}</find>
        <action type="after-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
if ( $mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']) )
{
	$topic_attribute = '';
	if ( !empty($post_data['topic_attr_id']) )
	{
		$topic_attribute = $post_data['topic_attr_id'];
	}
	else if ( $post_data['attr_id'] )
	{
		$topic_attribute = $post_data['attr_id'];
	}
	$qte->attr_select($forum_id, $user->data['user_id'], $topic_attribute);

	$template->assign_vars(array('S_POSTING' => true));
}
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
    </open>
    <open src="search.php">
      <edit>
        <find>// Start session management</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
include $phpbb_root_path . 'includes/functions_attributes.' . $phpEx;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>$search_forum	= request_var('fid', array(0));</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
$attr_id = request_var('attr_id', 0);
$show_results = $attr_id ? 'topics' : $show_results;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>if ($keywords || $author || $author_id || $search_id || $submit)</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
// here we added
//	 || $attr_id
//-- modify</action>
				<inline-edit>
					<inline-find>$submit</inline-find>
					<inline-action type="after-add"> || $attr_id</inline-action>
				</inline-edit>
        <action type="after-add">//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>		$total_match_count = $search->keyword_search(</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
// here we added
//	, $attr_id
//-- modify</action>
				<inline-edit>
					<inline-find>$per_page</inline-find>
					<inline-action type="after-add">, $attr_id</inline-action>
				</inline-edit>
        <action type="after-add">//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>		$total_match_count = $search->author_search(</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
// here we added
//	, $attr_id
//-- modify</action>
				<inline-edit>
					<inline-find>$per_page</inline-find>
					<inline-action type="after-add">, $attr_id</inline-action>
				</inline-edit>
        <action type="after-add">//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
      	<comment lang="en">Be careful on this part, you must add the code just after the first found accolade !</comment>
      	<comment lang="fr">Faites attention sur cette partie, vous devez ajouter le code juste après la première accolade trouvée !</comment>
        <find>	}</find>
        <action type="after-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
	else if ( empty($search_id) && $attr_id )
	{
		$total_match_count = $search->attribute_search($sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $attr_id, $id_ary, $start, $per_page);
	}
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
      <edit>
        <find>		$sql_where .= $db->sql_in_set(($show_results == 'posts') ? 'p.post_id' : 't.topic_id', $id_ary);</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
		if ( $attr_id )
		{
			$sql_where .= (!empty($sql_where) ? ' AND ' : '') . 't.topic_attr_id = ' . $attr_id;
		}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find><![CDATA[	$u_search .= ($return_chars != 300) ? '&amp;ch=' . $return_chars : '';]]></find>
        <action type="after-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
	$u_search .= $attr_id ? '&amp;attr_id=' . $attr_id : '';
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
      <edit>
        <find>			$template->assign_block_vars('searchresults', array_merge($tpl_ary, array(</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
			if ( !empty($row['topic_attr_id']) )
			{
				$tpl_ary += array(
					'S_TOPIC_ATTR' => isset($row['post_id']) ? (($row['topic_first_post_id'] == $row['post_id']) ? true : false) : true,
					'TOPIC_ATTRIBUTE' => $qte->attr_display($row['topic_attr_id'], $row['topic_attr_user'], $row['topic_attr_time']),
				);
			}
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>// only show recent searches to search administrators</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
$qte->attr_search();
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="ucp.php">
      <edit>
        <find>// Basic parameter data</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
include $phpbb_root_path . 'includes/functions_attributes.' . $phpEx;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="viewforum.php">
      <edit>
        <find>// Start session</find>
        <action type="before-add">//-- mod : quick title edition -------------------------------------------------
//-- add
include $phpbb_root_path . 'includes/functions_attributes.' . $phpEx;
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
      <edit>
        <find>			'TOPIC_TYPE'		=> $topic_type,</find>
        <action type="after-add">//-- mod : quick title edition -------------------------------------------------
//-- add
			'S_TOPIC_ATTR'	=> !empty($row['topic_attr_id']) ? true : false,
			'TOPIC_ATTRIBUTE' => $qte->attr_display($row['topic_attr_id'], $row['topic_attr_user'], $row['topic_attr_time']),
//-- fin mod : quick title edition ---------------------------------------------</action>
      </edit>
    </open>
    <open src="viewtopic.php">
      <edit>
        <find>// Does this topic contain a poll?</find>
        <action type="before-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
include $phpbb_root_path . 'includes/functions_attributes.' . $phpEx;

// did the user apply an attribute ? so, let's save it !
$attr_id = request_var('attr_id', 0);
if ( $attr_id )
{
	$qte->attr_apply($attr_id, $topic_id, $forum_id, $topic_data['topic_attr_id']);
}

// show the selector
$qte->attr_select($forum_id, $topic_data['topic_poster'], $topic_data['topic_attr_id']);

$tpl_ary = array('S_QTE_FORM' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id"));
if ( !empty($topic_data['topic_attr_id']) )
{
	$tpl_ary += array(
		'S_TOPIC_ATTR' => true,
		'TOPIC_ATTRIBUTE' => $qte->attr_display($topic_data['topic_attr_id'], $topic_data['topic_attr_user'], $topic_data['topic_attr_time']),
	);
}
$template->assign_vars($tpl_ary);
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
      <edit>
        <find>	// Dump vars into template</find>
        <action type="before-add"><![CDATA[//-- mod : quick title edition -------------------------------------------------
//-- add
	if ( ($topic_data['topic_first_post_id'] == $row['post_id']) && !empty($topic_data['topic_attr_id']) )
	{
		$postrow += array(
			'S_TOPIC_ATTR' => true,
			'TOPIC_ATTRIBUTE' => $qte->attr_display($topic_data['topic_attr_id'], $topic_data['topic_attr_user'], $topic_data['topic_attr_time']),
		);
	}
//-- fin mod : quick title edition ---------------------------------------------]]></action>
      </edit>
    </open>
		<php-installer>db_update.php</php-installer>
		<diy-instructions lang="en">Make sure all files have been uploaded to the proper locations. Run the SQL install file, db_update.php, in your web browser and delete the file upon script completion. Clear your cache and refresh your imagesets from the administration control panel.

You will find the module in the "Posting" tab in the ACP.</diy-instructions>
		<diy-instructions lang="fr">Assurez-vous que tous les fichiers ont bien été transférés dans les bons emplacements. Exécutez ensuite le fichier d'installation, intitulé db_update.php, dans votre navigateur Internet puis supprimez-le une fois l'installation effectuée. Enfin, purgez votre cache et rafraîchissez vos packs d'images depuis le panneau d'administration.

Le module se situe dans l'onglet "Messages" du panneau d'administration.</diy-instructions>
	</action-group>
</mod>
