<?xml version="1.0" encoding="utf-8"?>
<hookexport>
  <hookdata>
    <config>
      <hook_name>Update Record Comment Count</hook_name>
      <hook_desc><![CDATA[This hook updates the IP.Content record &#39;number of comments&#39; value when comments are stored in forum topics]]></hook_desc>
      <hook_author>Invision Power Services, Inc</hook_author>
      <hook_email>support@invisionpower.com</hook_email>
      <hook_website>http://invisionpower.com</hook_website>
      <hook_update_check/>
      <hook_requirements><![CDATA[a:4:{s:20:"hook_ipb_version_min";i:0;s:20:"hook_ipb_version_max";i:0;s:20:"hook_php_version_min";s:0:"";s:20:"hook_php_version_max";s:0:"";}]]></hook_requirements>
      <hook_version_human>1.0.0</hook_version_human>
      <hook_version_long>10000</hook_version_long>
      <hook_extra_data/>
      <hook_key>contentTopicContent</hook_key>
    </config>
  </hookdata>
  <hookfiles>
    <file>
      <hook_file_real>contentTopicComment.php</hook_file_real>
      <hook_type>dataHooks</hook_type>
      <hook_classname>contentTopicComment</hook_classname>
      <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:12:"postAddReply";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
      <hooks_source><![CDATA[<?php

class contentTopicComment
{
	/**
	 * Constructor
	 *
	 * @return	@e void
	 */
	public function __construct()
	{
	}

	/**
	 * Execute data hook
	 *
	 * @param	array 		Post data to insert
	 * @return	@e void
	 */
	public function handleData( $insert )
	{
		$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'ccs' ) . '/sources/databases/topics.php', 'topicsLibrary', 'ccs' );
		$_topics	 = new $classToLoad( ipsRegistry::instance() );
		$_topics->checkAndIncrementComments( $insert );
	}
}]]></hooks_source>
    </file>
  </hookfiles>
  <hookextras_settings/>
  <hookextras_language/>
  <hookextras_modules/>
  <hookextras_help/>
  <hookextras_templates/>
  <hookextras_css/>
  <hookextras_tasks/>
  <hookextras_database_create/>
  <hookextras_database_alter/>
  <hookextras_database_update/>
  <hookextras_database_insert/>
</hookexport>
