Jump to content

Боковой профиль (Ajax Thanks)

Featured Replies

Доброго времени суток.

Подскажите пожалуйста, где в хуке Ajax Thanks тот кусочек кода куда нужно подставить "Спасибо: " чтобы в боковом профиле только после слова было кол-во. По умолчанию оно выглядит как "кол-во спасибо"

Под спойлером весь код, на всякий случай чтобы не качать, может кому-то удобней будет.

P.S: слово "спасибо" идущее после кол-ва вот:

<word_default>спасибо</word_default>
(его можно просто убрать, остаётся только куда-то подставить - "спасибо:" )

<?xml version="1.0" encoding="utf-8"?>

<hookexport>

  <hookdata>

	<config>

	  <hook_name><![CDATA[[EN32] Ajax Спасибо]]></hook_name>

	  <hook_desc>Добавляет возможность благодарить за сообщение через ajax.</hook_desc>

	  <hook_author>Elad Nava/перевод chuma64rus для (for-ipb.ru)</hook_author>

	  <hook_email>[email protected]</hook_email>

	  <hook_website>__invisionize.com/ts</hook_website>

	  <hook_update_check>__eladnava.com/hooks.php?hook=ajaxthanks</hook_update_check>

	  <hook_requirements><![CDATA[a:3:{s:21:"required_applications";a:0:{}s:20:"hook_php_version_min";s:1:"0";s:20:"hook_php_version_max";s:1:"0";}]]></hook_requirements>

	  <hook_version_human>1.0.6</hook_version_human>

	  <hook_version_long>10006</hook_version_long>

	  <hook_extra_data><![CDATA[a:7:{s:7:"display";a:5:{s:8:"settings";s:35:"Setting groups:  [EN32] Ajax Спасибо";s:8:"language";s:180:"Для forums_public_topic: en30_show, en30_thank, en30_thanked, en30_thanked_by, en30_thanks, en30_thank_author, en30_times, en30_unthank, en30_unthank_author, en30_user, en30_users";s:8:"database";s:105:"ALTER TABLE profile_portal ADD thanked int(10) DEFAULT '0'<br />ALTER TABLE posts ADD thankers mediumtext";s:6:"custom";s:22:"install_ajaxThanks.php";s:9:"templates";s:125:"From skin_topic: ajaxThankedCount, ajaxThankedCountProfile, ajaxThankerLink, ajaxThankersList, ajaxThanksButton, ajaxThanksJS";}s:13:"settingGroups";a:1:{s:0:"";s:15:"en30_ajaxthanks";}s:8:"settings";a:0:{}s:8:"language";a:1:{s:19:"forums_public_topic";a:11:{s:0:"";s:9:"en30_show";i:1;s:10:"en30_thank";i:2;s:12:"en30_thanked";i:3;s:15:"en30_thanked_by";i:4;s:11:"en30_thanks";i:5;s:17:"en30_thank_author";i:6;s:10:"en30_times";i:7;s:12:"en30_unthank";i:8;s:19:"en30_unthank_author";i:9;s:9:"en30_user";i:10;s:10:"en30_users";}}s:9:"templates";a:1:{s:10:"skin_topic";a:6:{s:0:"";s:16:"ajaxThankedCount";i:1;s:23:"ajaxThankedCountProfile";i:2;s:15:"ajaxThankerLink";i:3;s:16:"ajaxThankersList";i:4;s:16:"ajaxThanksButton";i:5;s:12:"ajaxThanksJS";}}s:8:"database";a:1:{s:5:"alter";a:2:{i:0;a:6:{s:9:"altertype";s:3:"add";s:5:"table";s:14:"profile_portal";s:5:"field";s:7:"thanked";s:8:"newfield";s:0:"";s:9:"fieldtype";s:7:"int(10)";s:7:"default";s:3:"'0'";}i:1;a:6:{s:9:"altertype";s:3:"add";s:5:"table";s:5:"posts";s:5:"field";s:8:"thankers";s:8:"newfield";s:0:"";s:9:"fieldtype";s:10:"mediumtext";s:7:"default";s:0:"";}}}s:6:"custom";s:14:"ajaxThanks.php";}]]></hook_extra_data>

	  <hook_key>en30_ajaxthanks</hook_key>

	  <hook_global_caches/>

	</config>

  </hookdata>

  <hookfiles>

	<file>

	  <hook_file_real>ajaxThanksJS.php</hook_file_real>

	  <hook_type>templateHooks</hook_type>

	  <hook_classname>ajaxThanksJS</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:11:"skin_global";s:12:"skinFunction";s:9:"includeJS";s:4:"type";s:2:"if";s:2:"id";s:8:"minifyjs";s:8:"position";s:10:"post.endif";}]]></hook_data>

	  <hooks_source><![CDATA[<?php

class ajaxThanksJS

{

protected $registry;

protected $settings;

public function __construct()

{

  $this->registry   = ipsRegistry::instance();

  $this->settings   =& $this->registry->fetchSettings();

}

public function getOutput()

{

  if ( $this->settings['en30_ajaxthanks'] )

  {

   return $this->registry->getClass('output')->getTemplate('topic')->ajaxThanksJS();

  }

}

}

?>]]></hooks_source>

	</file>

	<file>

	  <hook_file_real>ajaxThanksPostData.php</hook_file_real>

	  <hook_type>commandHooks</hook_type>

	  <hook_classname>ajaxThanksPostData</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:27:"public_forums_forums_topics";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 ajaxThanksPostData extends (~extends~)

{

public function _getPosts()

{

  $posts = parent::_getPosts();


  //-----------------------------------------

  // [EN31] Ajax Thanks v1.0.6

  //-----------------------------------------


  foreach ( $posts as $pid => $post )

  {

   //-----------------------------------------

   // INIT

   //-----------------------------------------


   $posts[ $pid ]['post']['thanks'] = array(

				  'count'  => 0,

				  'button'  => 0,

				  'thankers'  => array()

				 );


   //-----------------------------------------

   // INIT

   //-----------------------------------------


   $thankButton  = 1;

   $removeThanks  = 0;


   //-----------------------------------------

   // System online?

   //-----------------------------------------


   if ( ! $this->settings['en30_ajaxthanks'] )

   {

	$thankButton = 0;

   }


   //-----------------------------------------

   // Not logged in?

   //-----------------------------------------


   if ( ! $this->memberData['member_id'] )

   {

	$thankButton = 0;

   }

   else

   {

	//-----------------------------------------

	// You can't thank yourself, silly!

	//-----------------------------------------


	if ( $this->memberData['member_id'] == $posts[ $pid ]['post']['author_id'] )

	{

	 $thankButton = 0;

	}

   }


   //-----------------------------------------

   // Only first post can be thanked?

   //-----------------------------------------


   if ( $this->settings['en30_thankfirstonly'] && ! $posts[ $pid ]['post']['new_topic'] )

   {

	$thankButton = 0;

   }


   //-----------------------------------------

   // Forum excluded?

   //-----------------------------------------


   if ( in_array( $post['post']['forum_id'], explode( ",", $this->settings['en30_ajaxthanksforums'] ) ) )

   {

	$thankButton = 0;

   }


   //-----------------------------------------

   // Member group excluded?

   //-----------------------------------------


   if ( in_array( $this->memberData['member_group_id'], explode( ",", $this->settings['en30_ajaxthanksgroups'] ) ) )

   {

	$thankButton = 0;

   }


   //-----------------------------------------

   // Post has been thanked before?

   //-----------------------------------------


   if ( ! empty( $posts[ $pid ]['post']['thankers'] ) )

   {

	//-----------------------------------------

	// Unserialize thankers list

	//-----------------------------------------


	$thankers = unserialize( stripslashes( $posts[ $pid ]['post']['thankers'] ) );


	//-----------------------------------------

	// INIT

	//-----------------------------------------


	$posts[ $pid ]['post']['thanks']['count']  = count( $thankers );

	$posts[ $pid ]['post']['thanks']['thankers'] = "";


	//-----------------------------------------

	// Already thanked this post?

	//-----------------------------------------


	if ( array_key_exists( $this->memberData['member_id'], $thankers ) )

	{

	 $thankButton  = 0;

	 $removeThanks  = 1;

	}


	//-----------------------------------------

	// Link thankers list

	//-----------------------------------------


	foreach ( $thankers as $mid => $name )

	{

	 $posts[ $pid ]['post']['thanks']['thankers'][] = $this->registry->getClass('output')->getTemplate('topic')->ajaxThankerLink( $mid, $name, IPSText::makeSeoTitle( $name ) );

	}

   }


   //-----------------------------------------

   // Show/hide thanks button

   //-----------------------------------------


   if ( $thankButton )

   {

	$posts[ $pid ]['post']['thanks']['button'] = 'thank';

   }

   else if ( $removeThanks )

   {

	$posts[ $pid ]['post']['thanks']['button'] = 'remove';

   }

   else

   {

	$posts[ $pid ]['post']['thanks']['button'] = 'none';

   }

  }


  return $posts;

}

}

?>]]></hooks_source>

	</file>

	<file>

	  <hook_file_real>ajaxThanksDummy.php</hook_file_real>

	  <hook_type>templateHooks</hook_type>

	  <hook_classname>ajaxThanksDummy</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:10:"skin_topic";s:12:"skinFunction";s:4:"post";s:4:"type";s:2:"if";s:2:"id";s:7:"canEdit";s:8:"position";s:11:"pre.startif";}]]></hook_data>

	  <hooks_source><![CDATA[<?php

class ajaxThanksDummy

{

public function __construct()

{

  // The purpose of this file is to prevent IPB from skipping

  // hook duties for the Topic View -> 'post' template bit

}

public function getOutput()

{

}

}

?>]]></hooks_source>

	</file>

	<file>

	  <hook_file_real>ajaxThanksButton.php</hook_file_real>

	  <hook_type>templateHooks</hook_type>

	  <hook_classname>ajaxThanksButton</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:10:"skin_topic";s:12:"skinFunction";s:17:"topicViewTemplate";s:4:"type";s:7:"foreach";s:2:"id";s:9:"post_data";s:8:"position";s:10:"outer.post";}]]></hook_data>

	  <hooks_source><![CDATA[<?php

class ajaxThanksButton

{

protected $registry;

protected $settings;

public function __construct()

{

  $this->registry   = ipsRegistry::instance();

  $this->settings   =& $this->registry->fetchSettings();

}

public function getOutput()

{

}

public function replaceOutput( $output, $key )

{

  $tag  = '<!--hook.if.skin_topic.post.canEdit.pre.startif-->';

  $lastFound   = 0;


  foreach( $this->registry->output->getTemplate('topic')->functionData['topicViewTemplate'][0]['post_data'] as $post )

  {

   if ( ! $post['post']['_isDeleted'] )

   {

	$pos   = strpos( $output, $tag, $lastFound );

	$strToInsert = $this->registry->output->replaceMacros( $this->registry->getClass('output')->getTemplate('topic')->ajaxThanksButton( $post ) );

	if ( $pos )

	{

	 $output  = substr_replace( $output, $strToInsert . $tag, $pos, strlen( $tag ) );

	 $lastFound  = $pos + strlen( $tag . $strToInsert );

	}

   }

  }


  return $output;

}

}

?>]]></hooks_source>

	</file>

	<file>

	  <hook_file_real>ajaxThanksProfileView.php</hook_file_real>

	  <hook_type>templateHooks</hook_type>

	  <hook_classname>ajaxThanksProfileView</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:12:"skin_profile";s:12:"skinFunction";s:13:"profileModern";s:4:"type";s:2:"if";s:2:"id";s:8:"pcfields";s:8:"position";s:10:"post.endif";}]]></hook_data>

	  <hooks_source><![CDATA[<?php

class ajaxThanksProfileView

{

protected $registry;

protected $DB;

protected $request;

protected $settings;

protected $memberData;

public function __construct()

{

  $this->registry   = ipsRegistry::instance();

  $this->DB	 = $this->registry->DB();

  $this->request   =& $this->registry->fetchRequest();

  $this->settings   =& $this->registry->fetchSettings();

  $this->memberData =& $this->registry->member()->fetchMemberData();

}

public function getOutput()

{

  if ( $this->settings['en30_ajaxthanks'] )

  {

   //-----------------------------------------

   // Load public_topic lang file

   //-----------------------------------------


   $this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_topic' ), 'forums' );


   //-----------------------------------------

   // Get the member array

   //-----------------------------------------

   $member = $this->registry->output->getTemplate('profile')->functionData['profileModern'][0]['member'];


   //-----------------------------------------

   // Show thanked count

   //-----------------------------------------

   return $this->registry->getClass('output')->getTemplate('topic')->ajaxThankedCountProfile( $member );

  }

}

}

?>]]></hooks_source>

	</file>

	<file>

	  <hook_file_real>ajaxThankersList.php</hook_file_real>

	  <hook_type>templateHooks</hook_type>

	  <hook_classname>ajaxThankersList</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:10:"skin_topic";s:12:"skinFunction";s:17:"topicViewTemplate";s:4:"type";s:7:"foreach";s:2:"id";s:9:"post_data";s:8:"position";s:10:"inner.post";}]]></hook_data>

	  <hooks_source><![CDATA[<?php

class ajaxThankersList

{

protected $registry;

protected $settings;

public function __construct()

{

  $this->registry   = ipsRegistry::instance();

  $this->settings   =& $this->registry->fetchSettings();

}

public function getOutput()

{

}

public function replaceOutput( $output, $key )

{

  $tag  = '<!--hook.'.$key.'-->';

  $lastFound   = 0;


  foreach( $this->registry->output->getTemplate('topic')->functionData['topicViewTemplate'][0]['post_data'] as $pid => $post )

  {

   $pos = strpos( $output, $tag, $lastFound );

   $strToInsert = $this->registry->output->replaceMacros( $this->registry->getClass('output')->getTemplate('topic')->ajaxThankersList( $post ) );


   if ( $pos )

   {

	$output   = substr_replace( $output, $strToInsert . $tag, $pos, strlen( $tag ) );

	$lastFound  = $pos + strlen( $tag . $strToInsert );


   }

  }


  return $output;

}

}

?>]]></hooks_source>

	</file>

	<file>

	  <hook_file_real>ajaxThanksInfoPane.php</hook_file_real>

	  <hook_type>templateHooks</hook_type>

	  <hook_classname>ajaxThanksInfoPane</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:11:"skin_global";s:12:"skinFunction";s:12:"userInfoPane";s:4:"type";s:2:"if";s:2:"id";s:9:"postCount";s:8:"position";s:10:"post.endif";}]]></hook_data>

	  <hooks_source><![CDATA[<?php

class ajaxThanksInfoPane

{

protected $registry;

protected $settings;

public function __construct()

{

  $this->registry   = ipsRegistry::instance();

  $this->settings   =& $this->registry->fetchSettings();

}

public function getOutput()

{

}

public function replaceOutput( $output, $key )

{

  $tag  = '<!--hook.'.$key.'-->';

  $lastFound   = 0;


  foreach( $this->registry->output->getTemplate('global')->functionData['userInfoPane'] as $mid => $author )

  {

   $author = $author['author'];


   $pos = strpos( $output, $tag, $lastFound );

   $strToInsert = $this->registry->output->replaceMacros( $this->registry->getClass('output')->getTemplate('topic')->ajaxThankedCount( $author ) );


   if ( $pos )

   {

	$output   = substr_replace( $output, $strToInsert . $tag, $pos, strlen( $tag ) );

	$lastFound  = $pos + strlen( $tag . $strToInsert );


   }

  }


  return $output;

}

}

?>]]></hooks_source>

	</file>

	<file>

	  <hook_file_real>ajaxThanksAdd.php</hook_file_real>

	  <hook_type>commandHooks</hook_type>

	  <hook_classname>ajaxThanksAdd</hook_classname>

	  <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:24:"public_forums_ajax_stats";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 ajaxThanksAdd extends (~extends~)

{

public $registry;


public function doExecute( ipsRegistry $registry )

{

  switch( $this->request['do'] )

  {

   case 'ajaxThanks':

	$this->doAjaxThanks( $registry );

   break;

   case 'ajaxRemoveThanks':

	$this->removeAjaxThanks( $registry );

   break;

   default:

	parent::doExecute( $registry );

   break;

  }

}


private function removeAjaxThanks( ipsRegistry $registry )

{

  //-----------------------------------------

  // INIT

  //-----------------------------------------

  $pid = intval( $this->request['pid'] );

  $fid = intval( $this->request['fid'] );

  $tid = intval( $this->request['tid'] );


  //-----------------------------------------

  // Permissions

  //-----------------------------------------

  if ( ! $pid || ! $tid || ! $fid )

  {

   $this->returnJsonError( 'No post/topic/forum passed.' );

  }


  $pass = 1;


  if ( ! $this->settings['en30_ajaxthanks'] )

  {

   // Mod is off

   $pass = 0;

  }


  if ( ! $this->memberData['member_id'] )

  {

   // Must be logged in

   $pass = 0;

  }


  if ( in_array( $fid, explode( ",", $this->settings['en30_ajaxthanksforums'] ) ) )

  {

   // Forum excluded

   $pass = 0;

  }


  if ( in_array( $this->memberData['member_group_id'], explode( ",", $this->settings['en30_ajaxthanksgroups'] ) ) )

  {

   // Group excluded

   $pass = 0;

  }

	 if ( ! $pass )

	 {

   $this->returnJsonError( 'Несанкционированное действие.' );

	 }


  $post = $this->DB->buildAndFetch( array( 'select' => 'author_id, thankers, new_topic', 'from' => 'posts', 'where' => "pid = '{$pid}' AND topic_id = '{$tid}'" ) );


	 if ( ! $this->DB->getTotalRows() )

	 {

   $this->returnJsonError( 'Недопустимое сообщение или ID темы.' );

	 }


  if ( ! empty( $post['thankers'] ) )

  {

   $post['thankers'] = unserialize( stripslashes( $post['thankers'] ) );

   if ( ! array_key_exists( $this->memberData['member_id'], $post['thankers'] ) )

   {

	$this->returnJsonError( "Вы еще не благодарили эту тему." );

   }


   unset( $post['thankers'][ $this->memberData['member_id'] ] );

  }

  else

  {

   $this->returnJsonError( "Никто еще не благодарил эту тему." );

  }


  $serialized = addslashes( serialize( $post['thankers'] ) );


  $this->DB->update( 'posts', array( 'thankers' => $serialized ), 'pid='.$pid );

  $this->DB->update( 'profile_portal', 'thanked=thanked-1', 'pp_member_id='.$post['author_id'], false, true );

  foreach ( $post['thankers'] as $mid => $name )

  {

   $thankers .= $this->registry->getClass('output')->getTemplate('topic')->ajaxThankerLink( $mid, $name, IPSText::makeSeoTitle( $name ) );

  }


  $this->returnJsonArray( array( 'member_id'	  => $this->memberData['member_id'],

			 'members_display_name' => $this->memberData['members_display_name'],

			 'thankers'	   => $thankers

		   )	);

}

private function doAjaxThanks( ipsRegistry $registry )

{

  //-----------------------------------------

  // INIT

  //-----------------------------------------

  $pid = intval( $this->request['pid'] );

  $fid = intval( $this->request['fid'] );

  $tid = intval( $this->request['tid'] );


  //-----------------------------------------

  // Permissions

  //-----------------------------------------

  if ( ! $pid || ! $tid || ! $fid )

  {

   $this->returnJsonError( 'No post/topic/forum passed.' );

  }


  $pass = 1;


  if ( ! $this->settings['en30_ajaxthanks'] )

  {

   // Mod is off

   $pass = 0;

  }


  if ( ! $this->memberData['member_id'] )

  {

   // Must be logged in

   $pass = 0;

  }


  if ( in_array( $fid, explode( ",", $this->settings['en30_ajaxthanksforums'] ) ) )

  {

   // Forum excluded

   $pass = 0;

  }


  if ( in_array( $this->memberData['member_group_id'], explode( ",", $this->settings['en30_ajaxthanksgroups'] ) ) )

  {

   // Group excluded

   $pass = 0;

  }

	 if ( ! $pass )

	 {

   $this->returnJsonError( 'Несанкционированное действие.' );

	 }


  $post = $this->DB->buildAndFetch( array( 'select' => 'author_id, thankers, new_topic', 'from' => 'posts', 'where' => "pid = '{$pid}' AND topic_id = '{$tid}'" ) );


	 if ( ! $this->DB->getTotalRows() )

	 {

   $this->returnJsonError( 'Недопустимое сообщение или тема ID.' );

	 }


  if ( $post['author_id'] == $this->memberData['member_id'] )

  {

   $this->returnJsonError( 'Вы не можете благодарить себя!' );

  }


  if ( $this->settings['en30_thankfirstonly'] && ! $post['new_topic'] )

  {

   $this->returnJsonError( 'You are not allowed to thank topic replies.' );

  }


  $thankers = array( $this->memberData['member_id'] => $this->memberData['members_display_name'] );

  if ( ! empty( $post['thankers'] ) )

  {

   $post['thankers'] = unserialize( stripslashes( $post['thankers'] ) );

   if ( array_key_exists( $this->memberData['member_id'], $post['thankers'] ) )

   {

	$this->returnJsonError( 'Вы уже благодарили эту тему.' );

   }


   foreach ( $post['thankers'] as $k => $v )

   {

	$thankers[ $k ] = $v;

   }

  }


  $thankers = addslashes( serialize( $thankers ) );


  $this->DB->update( 'posts', array( 'thankers' => $thankers ), 'pid='.$pid );

  $this->DB->update( 'profile_portal', 'thanked=thanked+1', 'pp_member_id='.$post['author_id'], false, true );


  $postContent = "";


  if ( $this->settings['en30_ajaxthankshidehack'] && isset( $this->settings['tb_hc_groups'] ) )

  {

   $this->DB->build( array( 'select' => '*', 'from' => 'posts', 'where' => 'pid='.$pid ) );

   $this->DB->execute();


   $row = $this->DB->fetch();


   if ( ! is_object( $this->postClass ) )

   {

	require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/post/classPost.php" );

	require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/post/classPostForms.php" );


	$this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_editors' ), 'core' );


	$this->postClass =  new classPostForms( $this->registry );

   }


   $this->cache->updateCacheWithoutSaving( 'tb_hide_topic', array( 'tid' => $tid, 'starter_id' => $post['author_id'], 'last_poster_id' => $this->memberData['member_id'] ) );


   //-----------------------------------------

   // Pre-display-parse

   //-----------------------------------------


   IPSText::getTextClass( 'bbcode' )->parse_smilies	 = $row['use_emo'];

   IPSText::getTextClass( 'bbcode' )->parse_html	  = ( $this->registry->getClass('class_forums')->forum_by_id[ $fid ]['use_html'] and $this->memberData['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;

   IPSText::getTextClass( 'bbcode' )->parse_nl2br	  = $row['post_htmlstate'] == 2 ? 1 : 0;

   IPSText::getTextClass( 'bbcode' )->parse_bbcode	 = 1;

   IPSText::getTextClass( 'bbcode' )->parsing_section	= 'topics';

   IPSText::getTextClass( 'bbcode' )->parsing_mgroup	= $this->postClass->getAuthor('member_group_id');

   IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->postClass->getAuthor('mgroup_others');


   $row['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] );


   $postContent = $row['post'];

  }


  $this->returnJsonArray( array( 'member_id'	  => $this->memberData['member_id'],

			 'members_display_name' => $this->memberData['members_display_name'],

			 'post'		 => $postContent

		   )	);

}

}

?>]]></hooks_source>

	</file>

  </hookfiles>

  <hookextras_custom>

	<file>

	  <filename>ajaxThanks.php</filename>

	  <source><![CDATA[<?php

class ajaxThanks

{

protected $registry;

protected $DB;

public function __construct( ipsRegistry $registry )

{

  $this->registry = $registry;

  $this->DB   = $this->registry->DB();

}

public function install()

{

  //-----------------------------------------

  // Migrate thanked count to profile_portal

  //-----------------------------------------


  $prefix = $this->registry->dbFunctions()->getPrefix();


  //-----------------------------------------

  // Is this a fresh install?

  //-----------------------------------------


  $post = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'posts', 'limit' => array( 0, 1 ) ) );


  if ( isset( $post['thanked'] ) )

  {

   $this->DB->build( array(

			 'update'  => "profile_portal p, {$prefix}members m",

				   'set'   => 'p.thanked = m.thanked',

					  'where'   => 'm.thanked > 0 AND p.pp_member_id = m.member_id'

		   )   );


   $this->DB->execute();

  }

}

public function uninstall()

{

}

}

?>]]></source>

	</file>

  </hookextras_custom>

  <hookextras_settings>

	<setting>

	  <conf_is_title>1</conf_is_title>

	  <conf_title_title><![CDATA[ [EN32] Ajax Спасибо]]></conf_title_title>

	  <conf_title_desc><![CDATA[Настройки для [EN32] Ajax Спасибо мод от Elad Nava.]]></conf_title_desc>

	  <conf_title_noshow>0</conf_title_noshow>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_title_app>core</conf_title_app>

	  <conf_title_tab>Хуки</conf_title_tab>

	</setting>

	<setting>

	  <conf_id>315</conf_id>

	  <conf_title>Включить систему?</conf_title>

	  <conf_description>Включение и выключение системы.</conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>yes_no</conf_type>

	  <conf_key>en30_ajaxthanks</conf_key>

	  <conf_value/>

	  <conf_default>1</conf_default>

	  <conf_extra/>

	  <conf_evalphp/>

	  <conf_protected>1</conf_protected>

	  <conf_position>1</conf_position>

	  <conf_start_group>Функциональность</conf_start_group>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

	<setting>

	  <conf_id>319</conf_id>

	  <conf_title>Свернуть благодарности?</conf_title>

	  <conf_description>Эта настройка будет сворачивать окно благодарностей, если количество благодарностей превышает числа, указанного в настройках ниже.</conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>yes_no</conf_type>

	  <conf_key>en30_ajaxthankscollapse</conf_key>

	  <conf_value/>

	  <conf_default>1</conf_default>

	  <conf_extra/>

	  <conf_evalphp/>

	  <conf_protected>1</conf_protected>

	  <conf_position>5</conf_position>

	  <conf_start_group>Collapsing</conf_start_group>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

	<setting>

	  <conf_id>317</conf_id>

	  <conf_title>Отключить благодарности в определенных темах</conf_title>

	  <conf_description>Выберите форум в котором не хотите, чтобы пользователь голосовал за сообщение.</conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>multi</conf_type>

	  <conf_key>en30_ajaxthanksforums</conf_key>

	  <conf_value/>

	  <conf_default/>

	  <conf_extra>#show_forums#</conf_extra>

	  <conf_evalphp><![CDATA[if ( $save == 1)

{

	if ( is_array($_POST['en30_ajaxthanksforums']) )

	{

		$_POST['en30_ajaxthanksforums'] = implode(",",$_POST['en30_ajaxthanksforums']);

	}

	else

	{

		$_POST['en30_ajaxthanksforums'] = "";

	}


	$key = 'en30_ajaxthanksforums';

}

if ( $show == 1 )

{

	$key = 'en30_ajaxthanksforums[]';

}]]></conf_evalphp>

	  <conf_protected>1</conf_protected>

	  <conf_position>4</conf_position>

	  <conf_start_group/>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

	<setting>

	  <conf_id>316</conf_id>

	  <conf_title>Исключить из группы?</conf_title>

	  <conf_description>Выберите группу (ы), которые не смогут поблагодарить сообщения.</conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>multi</conf_type>

	  <conf_key>en30_ajaxthanksgroups</conf_key>

	  <conf_value/>

	  <conf_default/>

	  <conf_extra>#show_groups#</conf_extra>

	  <conf_evalphp><![CDATA[if ( $save == 1)

{

	if ( is_array($_POST['en30_ajaxthanksgroups']) )

	{

		$_POST['en30_ajaxthanksgroups'] = implode(",",$_POST['en30_ajaxthanksgroups']);

	}

	else

	{

		$_POST['en30_ajaxthanksgroups'] = "";

	}


	$key = 'en30_ajaxthanksgroups';

}

if ( $show == 1 )

{

	$key = 'en30_ajaxthanksgroups[]';

}]]></conf_evalphp>

	  <conf_protected>1</conf_protected>

	  <conf_position>3</conf_position>

	  <conf_start_group>Разрешения</conf_start_group>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

	<setting>

	  <conf_id>318</conf_id>

	  <conf_title>Включить интеграцию?</conf_title>

	  <conf_description><![CDATA[Показать скрытые сообщения автоматически, поблагодарив сообщение, если <a href="__www.invisionbyte.net/index.php?showtopic=3055" target="_blank" title="(T30) Хайд Контент">(T30) Хайд Контент</a> установлен?]]></conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>yes_no</conf_type>

	  <conf_key>en30_ajaxthankshidehack</conf_key>

	  <conf_value/>

	  <conf_default>1</conf_default>

	  <conf_extra/>

	  <conf_evalphp/>

	  <conf_protected>1</conf_protected>

	  <conf_position>7</conf_position>

	  <conf_start_group>(T30) Хайд Контент Интеграция</conf_start_group>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

	<setting>

	  <conf_id>320</conf_id>

	  <conf_title>Количество благодарностей, чтобы вызвать сворачивание</conf_title>

	  <conf_description>Укажите минимальное количество Благодарностей для того чтобы свернуть окно.Настройка выше должна быть включена иначе эта функция не будет работать.</conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>input</conf_type>

	  <conf_key>en30_ajaxthanksmaxthankers</conf_key>

	  <conf_value/>

	  <conf_default>25</conf_default>

	  <conf_extra/>

	  <conf_evalphp/>

	  <conf_protected>1</conf_protected>

	  <conf_position>6</conf_position>

	  <conf_start_group/>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

	<setting>

	  <conf_id>321</conf_id>

	  <conf_title>Отключить ответы с благодарностями в темах?</conf_title>

	  <conf_description>Разрешить благодарить только первое сообщение в теме?</conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>yes_no</conf_type>

	  <conf_key>en30_thankfirstonly</conf_key>

	  <conf_value/>

	  <conf_default>0</conf_default>

	  <conf_extra/>

	  <conf_evalphp/>

	  <conf_protected>1</conf_protected>

	  <conf_position>2</conf_position>

	  <conf_start_group/>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

	<setting>

	  <conf_id>322</conf_id>

	  <conf_title>Разрешить пользователям удалять сообщения?</conf_title>

	  <conf_description>Вы хотите, позволить пользователям удалять свои благодарности, если они нажали кнопку случайно?</conf_description>

	  <conf_group>31</conf_group>

	  <conf_type>yes_no</conf_type>

	  <conf_key>en31_remove_thanks</conf_key>

	  <conf_value/>

	  <conf_default>1</conf_default>

	  <conf_extra/>

	  <conf_evalphp/>

	  <conf_protected>1</conf_protected>

	  <conf_position>8</conf_position>

	  <conf_start_group>Удалить спасибо</conf_start_group>

	  <conf_add_cache>1</conf_add_cache>

	  <conf_keywords/>

	  <conf_title_keyword>en30_ajaxthanks</conf_title_keyword>

	  <conf_is_title>0</conf_is_title>

	</setting>

  </hookextras_settings>

  <hookextras_language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_user</word_key>

	  <word_default>Пользователь:</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_users</word_key>

	  <word_default>Пользователи:</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_unthank_author</word_key>

	  <word_default>Не благодарить автора этого поста</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_unthank</word_key>

	  <word_default>Удалить спасибо</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_times</word_key>

	  <word_default>время</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_thanked_by</word_key>

	  <word_default>Спасибо от</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_thank_author</word_key>

	  <word_default>Спасибо автору этого поста</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_thanks</word_key>

	  <word_default>спасибо</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_thanked</word_key>

	  <word_default>Поблагодарили</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_thank</word_key>

	  <word_default>Спасибо</word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

	<language>

	  <word_app>forums</word_app>

	  <word_pack>public_topic</word_pack>

	  <word_key>en30_show</word_key>

	  <word_default><![CDATA[[Вид]]]></word_default>

	  <word_custom/>

	  <word_js>0</word_js>

	</language>

  </hookextras_language>

  <hookextras_modules/>

  <hookextras_help/>

  <hookextras_templates>

	<templates>

	  <template_group>skin_topic</template_group>

	  <template_content><![CDATA[   <if test="ajaxThanksEnabled:|:$this->settings['en30_ajaxthanks']">

	<li class="post_count desc lighter">

	 {$author['thanked']} {$this->lang->words['en30_thanks']}

	</li>

   </if>

   ]]></template_content>

	  <template_name>ajaxThankedCount</template_name>

	  <template_data>$author</template_data>

	  <template_updated>1311325211</template_updated>

	  <template_removable>1</template_removable>

	  <template_added_to>0</template_added_to>

	  <template_user_added>1</template_user_added>

	  <template_user_edited>1</template_user_edited>

	  <template_master_key>root</template_master_key>

	  <template_set_id>0</template_set_id>

	</templates>

	<templates>

	  <template_group>skin_topic</template_group>

	  <template_content><![CDATA[		 <li>

		  <span class='row_title'>{$this->lang->words['en30_thanked']}</span>

		  <span class='row_data'>{$member['thanked']} {$this->lang->words['en30_times']}</span>

		 </li>]]></template_content>

	  <template_name>ajaxThankedCountProfile</template_name>

	  <template_data>$member</template_data>

	  <template_updated>1311324842</template_updated>

	  <template_removable>1</template_removable>

	  <template_added_to>0</template_added_to>

	  <template_user_added>1</template_user_added>

	  <template_user_edited>1</template_user_edited>

	  <template_master_key>root</template_master_key>

	  <template_set_id>0</template_set_id>

	</templates>

	<templates>

	  <template_group>skin_topic</template_group>

	  <template_content><![CDATA[<php>$member = array( 'member_id' => $mid, 'members_display_name' => $name, 'members_seo_name' => $seoName );</php>

<span class="author vcard">{parse template="userHoverCard" group="global" params="$member"}</span>]]></template_content>

	  <template_name>ajaxThankerLink</template_name>

	  <template_data>$mid, $name, $seoName</template_data>

	  <template_updated>1311257015</template_updated>

	  <template_removable>1</template_removable>

	  <template_added_to>0</template_added_to>

	  <template_user_added>1</template_user_added>

	  <template_user_edited>1</template_user_edited>

	  <template_master_key>root</template_master_key>

	  <template_set_id>0</template_set_id>

	</templates>

	<templates>

	  <template_group>skin_topic</template_group>

	  <template_content><![CDATA[<if test="ajaxThanksEnabled:|:$this->settings['en30_ajaxthanks'] && $post['post']['thanks']['count'] != 0">

<div class="row2" id="thankersBox_{$post['post']['pid']}" title="visible" style="padding: 4px 0 4px 0">

  <table class="ipb_table" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">

   <tbody>

	<tr valign="top">

	 <td width="1%" nowrap="nowrap">

	  <div id="thankedBy_{$post['post']['pid']}" title="{$post['post']['thanks']['count']}" style="font-weight: bold">{$this->lang->words['en30_thanked_by']} {$post['post']['thanks']['count']} <if test="isPlural:|:$post['post']['thanks']['count'] == 1">{$this->lang->words['en30_user']}<else />{$this->lang->words['en30_users']}</if></div>

	 </td>

	 <td width="99%">

	  <div id="thankers_{$post['post']['pid']}" <if test="collapseThankers:|:$this->settings['en30_ajaxthankscollapse'] && $post['post']['thanks']['count'] > $this->settings['en30_ajaxthanksmaxthankers']">style="display: none;"</if>>

		{parse expression="implode( ", ", $post['post']['thanks']['thankers'] )"}

	  </div>

	  <if test="collapseThankers2:|:$this->settings['en30_ajaxthankscollapse'] && $post['post']['thanks']['count'] > $this->settings['en30_ajaxthanksmaxthankers']">

	   <div id="show_thankers_{$post['post']['pid']}">

		<a href="javascript: ajaxThanksExpand( '{$post['post']['pid']}' );">{$this->lang->words['en30_show']}</a>

	   </div>

	  <else />

	   <div id="show_thankers_{$post['post']['pid']}" style="display: none;"></div>

	  </if>

	 </td>

	</tr>

   </tbody>

  </table>

  </div>

<else />

<div class="row2" id="thankersBox_{$post['post']['pid']}" title="hidden" style="padding: 4px 0 4px 0; display: none">

  <table class="ipb_table" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">

   <tbody>

	<tr valign="top">

	 <td width="1%" nowrap="nowrap">

	  <div id="thankedBy_{$post['post']['pid']}" title="0" style="font-weight: bold">{$this->lang->words['en30_thanked_by']} 1 {$this->lang->words['en30_user']}</div>

	 </td>

	 <td width="99%">

	  <div id="thankers_{$post['post']['pid']}">{$post['post']['thankers']}</div>

	 </td>

	</tr>

   </tbody>

  </table>

</div>

</if>]]></template_content>

	  <template_name>ajaxThankersList</template_name>

	  <template_data>$post</template_data>

	  <template_updated>1311256223</template_updated>

	  <template_removable>1</template_removable>

	  <template_added_to>0</template_added_to>

	  <template_user_added>1</template_user_added>

	  <template_user_edited>1</template_user_edited>

	  <template_master_key>root</template_master_key>

	  <template_set_id>0</template_set_id>

	</templates>

	<templates>

	  <template_group>skin_topic</template_group>

	  <template_content><![CDATA[	 <if test="ajaxThanksButton:|:$post['post']['thanks']['button'] == 'thank'">

	  <li class='ajax_thanks' id='ajaxThanks_{$post['post']['pid']}'>

	   <a href="javascript: ajaxThanks( '{$post['post']['pid']}' );" title='{$this->lang->words['en30_thank_author']}' class='ipsButton_secondary'>{$this->lang->words['en30_thank']}</a>

	  </li>

	 </if>

	 <if test="ajaxThanksButton:|:$post['post']['thanks']['button'] == 'remove' && $this->settings['en31_remove_thanks']">

	  <li class='ajax_thanks' id='ajaxRemoveThanks_{$post['post']['pid']}'>

	   <a href="javascript: ajaxRemoveThanks( '{$post['post']['pid']}' );" title='{$this->lang->words['en30_unthank_author']}' class='ipsButton_secondary'>{$this->lang->words['en30_unthank']}</a>

	  </li>

	 </if>]]></template_content>

	  <template_name>ajaxThanksButton</template_name>

	  <template_data>$post</template_data>

	  <template_updated>1311257864</template_updated>

	  <template_removable>1</template_removable>

	  <template_added_to>0</template_added_to>

	  <template_user_added>1</template_user_added>

	  <template_user_edited>1</template_user_edited>

	  <template_master_key>root</template_master_key>

	  <template_set_id>0</template_set_id>

	</templates>

	<templates>

	  <template_group>skin_topic</template_group>

	  <template_content><![CDATA[<script type='text/javascript'>

ipb.lang['en30_thanked_by']  = "{$this->lang->words['en30_thanked_by']}";

ipb.lang['en30_thank']  = "{$this->lang->words['en30_thank']}";

ipb.lang['en30_thank_author'] = "{$this->lang->words['en30_thank_author']}";

ipb.lang['en30_user']  = "{$this->lang->words['en30_user']}";

ipb.lang['en30_users']  = "{$this->lang->words['en30_users']}";

ipb.lang['en30_thanked'] = "{$this->lang->words['en30_thanked']}";

function ajaxThanksExpand( pid )

{

var thankersBox   = $( 'thankers_' + pid );

var showThankers  = $( 'show_thankers_' + pid );

showThankers.style.display = "none";

thankersBox.style.display = "block";

}

function ajaxRemoveThanks( pid )

{

  // Kill the thanks button of this specific post


  new Effect.DropOut( 'ajaxRemoveThanks_' + pid );

  var url = ipb.vars['base_url'] + 'app=forums&module=ajax&section=stats&do=ajaxRemoveThanks';


  new Ajax.Request( url,

	   {

		method: 'post',

		evalJSON: 'force',

		parameters: {

		 md5check:   ipb.vars['secure_hash'],

		 pid:   pid,

		 tid:   ipb.topic.topic_id,

		 fid:   ipb.topic.forum_id

		},

		onSuccess: function(t)

		{

		 if( t.responseJSON['error'] )

		 {

		  alert( t.responseJSON['error'] );

		 }

		 else

		 {

		  var thankers = $( 'thankers_' + pid );

		  var thankedBy = $( 'thankedBy_' + pid );

		  var thankersBox = $( 'thankersBox_' + pid );

		  if ( thankersBox.getAttribute( 'title' ) == 'hidden' )

		  {

		   thankersBox.style.display = "block";


		   thankers.innerHTML = t.responseJSON['thankers'];

		  }

		  else

		  {

		   ajaxThanksExpand( pid );

		   thankers.innerHTML = t.responseJSON['thankers'];

		  }


		  if ( thankersBox.getAttribute( 'title' ) == 'hidden' )

		  {

		   thankersBox.style.display = "block";

		  }


		  // Update thanked by text (increment number show plural)


		  if ( thankedBy.title != '0' )

		  {

		   var thankers = parseInt( thankedBy.title ) - 1;


		   if ( thankers > 1 )

		   {

			thankedBy.innerHTML = ipb.lang['en30_thanked_by'] + ' ' + thankers + ' ' + ipb.lang['en30_users'];

			new Effect.Pulsate( thankersBox, { pulses: 3, duration: 1.5 } );

		   }

		   if ( thankers == 1 )

		   {

			thankedBy.innerHTML = ipb.lang['en30_thanked_by'] + ' ' + thankers + ' ' + ipb.lang['en30_user'];

			new Effect.Pulsate( thankersBox, { pulses: 3, duration: 1.5 } );

		   }

		   else

		   {

			thankersBox.style.display = "none";

		   }

		  }

		 }

		}

	   }

	  );

}

function ajaxThanks( pid )

{

  // Kill the thanks button of this specific post


  new Effect.DropOut( 'ajaxThanks_' + pid );

  var url = ipb.vars['base_url'] + 'app=forums&module=ajax&section=stats&do=ajaxThanks';


  new Ajax.Request( url,

	   {

		method: 'post',

		evalJSON: 'force',

		parameters: {

		 md5check:   ipb.vars['secure_hash'],

		 pid:   pid,

		 tid:   ipb.topic.topic_id,

		 fid:   ipb.topic.forum_id

		},

		onSuccess: function(t)

		{

		 if( t.responseJSON['error'] )

		 {

		  alert( t.responseJSON['error'] );

		 }

		 else

		 {

		  var thankers = $( 'thankers_' + pid );

		  var thankedBy = $( 'thankedBy_' + pid );

		  var thankersBox = $( 'thankersBox_' + pid );


		  var newLink = "<a href='" + ipb.vars['base_url'] + "showuser=" + t.responseJSON['member_id'] + "' title='" + t.responseJSON['members_display_name'] + "'>" + t.responseJSON['members_display_name'] + "</a>" + "&nbsp;<a href='" + ipb.vars['base_url'] + "showuser=" + t.responseJSON['member_id'] + "' class='__user __id" + t.responseJSON['member_id'] + "' title='{$this->lang->words['view_profile']}'>{parse replacement="user_popup"}</a>";

		  if ( thankersBox.getAttribute( 'title' ) == 'hidden' )

		  {

		   thankersBox.style.display = "block";


		   thankers.innerHTML = newLink;

		  }

		  else

		  {

		   ajaxThanksExpand( pid );

		   thankers.innerHTML = newLink + ", " + thankers.innerHTML;

		  }


		  if ( thankersBox.getAttribute( 'title' ) == 'hidden' )

		  {

		   thankersBox.style.display = "block";

		  }


		  // Update thanked by text (increment number show plural)


		  if ( thankedBy.title != '0' )

		  {

		   thankedBy.innerHTML = ipb.lang['en30_thanked_by'] + ' ' + ( parseInt( thankedBy.title ) + 1 ) + ' ' + ipb.lang['en30_users'];

		  }


		  // Update post content for hide hack


		  if ( t.responseJSON['post'] != "" )

		  {

		   // Editless attempt to reach the post content

		   var postDivider = $( 'post_id_' + pid ).children[1].children[2].children[1];

		   postDivider.innerHTML = t.responseJSON['post'];


		   new Effect.Pulsate( postDivider, { duration: 1.5,  pulses: 3 } );

		  }

		  new Effect.Pulsate( thankersBox, { pulses: 3, duration: 1.5 } );

		 }

		}

	   }

	  );

}

</script>]]></template_content>

	  <template_name>ajaxThanksJS</template_name>

	  <template_data/>

	  <template_updated>1311252744</template_updated>

	  <template_removable>1</template_removable>

	  <template_added_to>0</template_added_to>

	  <template_user_added>1</template_user_added>

	  <template_user_edited>1</template_user_edited>

	  <template_master_key>root</template_master_key>

	  <template_set_id>0</template_set_id>

	</templates>

  </hookextras_templates>

  <hookextras_css/>

  <hookextras_tasks/>

  <hookextras_database_create/>

  <hookextras_database_alter>

	<alter>

	  <altertype>add</altertype>

	  <table>profile_portal</table>

	  <field>thanked</field>

	  <newfield/>

	  <fieldtype>int(10)</fieldtype>

	  <default><![CDATA['0']]></default>

	</alter>

	<alter>

	  <altertype>add</altertype>

	  <table>posts</table>

	  <field>thankers</field>

	  <newfield/>

	  <fieldtype>mediumtext</fieldtype>

	  <default/>

	</alter>

  </hookextras_database_alter>

  <hookextras_database_update/>

  <hookextras_database_insert/>

</hookexport>

[/code]

[/spoiler]

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/
Share on other sites

В чем проблема? Найдите фразу которую нужно изменить, измените ее и установите хук заново.

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1636
Share on other sites

В чем проблема? Найдите фразу которую нужно изменить, измените ее и установите хук заново.

Сначала идет значение, потом фраза, а мне надо наоборот. Где изменить фразу я знаю.

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1637
Share on other sites

Дайте ссылку на этот хук.

Я скачал но не нашел ф-ии установки в боковом профиле.

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1638
Share on other sites

Дайте ссылку на этот хук.

Я скачал но не нашел ф-ии установки в боковом профиле.

Качал не отсюда, вот залил а обменник: __rghost.ru/pri...960f5a6992899bb

Заранее спасибо :)

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1641
Share on other sites

Качал не отсюда, вот залил а обменник: http://rghost.ru/pri...960f5a6992899bb

Заранее спасибо :)

Сейчас посмотрю, что там...

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1642
Share on other sites

Все равно не вижу, как включить это в боковом блоке?

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1643
Share on other sites

Все равно не вижу, как включить это в боковом блоке?

Он после установки показывается под кол-вом сообщений, у любого профиля в теме )

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1644
Share on other sites

Он после установки показывается под кол-вом сообщений, у любого профиля в теме )

Тьфу ты, я думал, что это в боковой панели форума отображается.

Сейчас посмотрю.

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1645
Share on other sites

{$author['thanked']} {$this->lang->words['en30_thanks']}

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1653
Share on other sites


{$author['thanked']} {$this->lang->words['en30_thanks']}

Оно, спасибо :)

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1655
Share on other sites

Оно, спасибо :)

Тоже самое хотел сказать, только у меня это не работало :) Наверно из-за кэша браузера, закрыто.

Link to comment
https://ipbmafia.ru/topic/470-bokovoj-profil-ajax-thanks/?&do=findComment&comment=1656
Share on other sites
Guest
This topic is now closed to further replies.

Последние посетители 0

  • No registered users viewing this page.