Page 4 of 10

Re: [RC] Thanks for post by Палыч

Posted: Mon Jun 01, 2009 4:01 pm
by usenet2you
Typo in language file thanks_mod.php: Acknowledgments must be Acknowledgements

Re: [RC] Thanks for post by Палыч

Posted: Mon Jun 01, 2009 10:46 pm
by katib
Actually I am using Thank Post Mod (hide MOD compatible ) 0.2.0
I am quite happy with it, but I liked the more advanced options on Палыч Mod :)
So is it possible toimporte thanks data? I mean to preserve the thanks data received by users in each posts ?
Here is the sql query used by the Thank Post Mod (hide MOD compatible ) 0.2.0 Mod:

Code: Select all

CREATE TABLE `phpbb_thanks` (
  `thanks_id` mediumint(8) unsigned NOT NULL auto_increment,
  `thanks_from` mediumint(8) unsigned NOT NULL,
  `thanks_to` mediumint(8) unsigned NOT NULL,
  `post_id` mediumint(8) unsigned NOT NULL,
  PRIMARY KEY  (`thanks_id`)
);
ALTER TABLE `phpbb_posts` ADD `post_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `phpbb_forums` ADD COLUMN `enable_thanks` TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE `phpbb_users` ADD `user_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0', ADD `user_thanks` INT(11) UNSIGNED NOT NULL DEFAULT '0', ADD `user_thanks_post` INT(11) UNSIGNED NOT NULL DEFAULT '0';

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 1:35 am
by olalavui
How to convert from thank post mod 0.4.0 --> your thanks mod?

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 5:49 am
by usenet2you
look at the contrib folder....

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 8:59 am
by knmt
Ok, here are the modified English language - version 1.2.2:

thanks_mod.php

Code: Select all

<?php
/**
*
* thanks_mod[English]
*
* @package language
* @version $Id: thanks.php,v 122 2009-04-19 10:02:51Палыч $
* @copyright (c) 2008 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
   exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	'REMOVE_THANKS'				=> 'To remove the thanks you gave',
	'THANK_POST'				=> 'To thank for the message of the author: ',
	'THANK_FROM'				=> 'from',
	'THANK_TEXT_1'				=> 'For this message the author ',
	'THANK_TEXT_2'				=> ' has received gratitude ',
	'THANK_TEXT_2pl'			=> ' has received thanks - ',
	'RECEIVED'					=> 'Have&nbsp;thanks',
	'THANKS'					=> 'time',
	'GIVEN'						=> 'Has&nbsp;thanked',
	'GRATITUDES'				=> 'Gratitudes',
	'FOR_MESSAGE'				=> ' for post',
	'THANKS_LIST'				=> 'View/Close list',
	'THANKS_PM_SUBJECT_GIVE'	=> 'Thanks for the message',
	'THANKS_PM_SUBJECT_REMOVE'	=> 'Remove thank',
	'THANKS_PM_MES_GIVE'		=> 'Thanks for the message',
	'THANKS_PM_MES_REMOVE'		=> 'Remove thank',
	'THANKS_INFO_GIVE'			=> 'You have just thanked for the message.',
	'THANKS_INFO_REMOVE'		=> 'You have just removed your thank.',
	'RETURN_POST'				=> 'Return to post',
	'THANKS_USER'				=> 'List of thanks',
	'THANKS_BACK'				=> 'Return',
	'JUMP_TO_FORUM'				=> 'Jump to forum',
	'JUMP_TO_TOPIC'				=> 'Jump to topic',
	'INCORRECT_THANKS'			=> 'Invalid thanks',
	'REMOVE_THANKS_CONFIRM'		=> 'Are you sure you want to remove your thanks?',
));
?>
info_acp_thanks.php

Code: Select all

<?php
/**
*
* mod_thanks [English]
*
* @package language
* @version $Id: info_acp_thanks.php 122 2009-04-19 10:02:51Палыч $
* @copyright (c) 2008 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
   exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
	'acl_f_thanks' 						=> array('lang' => 'Can thanks for posts', 'cat' => 'misc'),
	'acl_u_viewthanks' 					=> array('lang' => 'Can view list of thanks', 'cat' => 'misc'),
	'IMG_THANKPOSTS'					=> 'To thank for the message',
	'IMG_REMOVETHANKS'					=> 'To delete gratitude',
	'THANKS_POSTLIST_VIEW'				=> 'List thanks in topic',
	'THANKS_PROFILELIST_VIEW'			=> 'List thanks in profile',
	'THANKS_NUMBER'						=> 'Number of thanks in list',
	'THANKS_POSTLIST_VIEW_EXPLAIN'		=> 'If this option is enabled, thanks info like who have thanked and how many thanks a user has received or given will be displayed when you view a topic. <br/> Please note that the thanks info will be displayed only if users have the right to thank for post in that forum.',
	'THANKS_PROFILELIST_VIEW_EXPLAIN'	=> 'If this option is enabled, complete thanks info including number of thanks and which posts a user received thanks from will be displayed.',
	'THANKS_NUMBER_EXPLAIN'				=> 'The maximum number of thanks displayed in either viewing topic or viewing profile. <br /> <strong> Remember that slow down will be noticed if this value is set over 250. </strong>',
	'ACP_THANKS'						=> 'Thanks for posts',
	'ACP_THANKS_SETTINGS'				=> 'Thanks Settings',
	'ACP_THANKS_SETTINGS_EXPLAIN'		=> 'Here you can install values of customisations of function of thanks for messages',
	'THANKS_REFRESH_MSG'				=> 'Upgrade performance can take a few minutes',
	'THANKS_REFRESH'					=> 'Recount all thanks',
	'REFRESH'							=> 'Refresh',
	'MCP_THANKS_REFRESHED'				=> 'Counts refreshed',
	'ACP_POST'							=> 'Total number of posts',
	'ACP_THANKSPOST'					=> 'Total number of thanked posts',
	'ACP_DELPOST'						=> 'Deleted thanked posts',
	'REMOVE_THANKS'						=> 'Remove thanks',
	'REMOVE_THANKS_EXPLAIN'				=> 'If enabled users can remove thanks',
));
?>
info_ucp_thanks.php

Code: Select all

<?php
/**
*
* mod_thanks [English]
*
* @package language
* @version $Id: info_ucp_thanks.php 122 2009-04-19 10:02:51Палыч $
* @copyright (c) 2008 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
   exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
	'ALLOW_THANKS_PM'			=> 'Notify me if someone thanks my post',
	'ALLOW_THANKS_PM_EXPLAIN'	=> 'You will receive a PM if someone says thank you for any of your post.',
));

?>
I am no native English speaker, but I am sure this is better.

BTW, there's two more things I would like to mention about this mod, the first one is the option to send a user a PM if someone thanks him/her. If that "someone" removes the thanks and thanks the author again, there will be another PM, eh? The second one is about grammar lol, if it is more than 1 thank, it should be thank"s" so ah...

Hehe...

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 5:20 pm
by Палыч
knmt wrote:Ok, here are the modified English language - version 1.2.2:
Thank you very much! Excellent! :)
knmt wrote:if it is more than 1 thank, it should be thank"s" so ah...
No. Text of PM contains a link to a specific post for which granted / revoked thanks. One Post - One PM

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 7:03 pm
by usenet2you
Do you already found a solution to let this MOD work with the Simple Hide BBCode? so if the users press Thank the author, the hide wil unhide and we can the information under the hide?

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 7:17 pm
by Палыч
katib wrote:So is it possible toimporte thanks data? I mean to preserve the thanks data received by users in each posts ?
I think this is possible.

Code: Select all

ALTER TABLE `phpbb_thanks` CHANGE `thanks_from` `user_id` mediumint(8);
ALTER TABLE `phpbb_thanks` CHANGE `thanks_to` `poster_id` mediumint(8);
ALTER TABLE `phpbb_thanks` DROP PRIMARY KEY;
ALTER TABLE `phpbb_thanks` DROP COLUMN `thanks_id`;
ALTER TABLE `phpbb_thanks` ADD PRIMARY KEY ( `post_id` , `user_id` );
Do not forget to backup!

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 7:19 pm
by Палыч
usenet2you wrote:Do you already found a solution to let this MOD work with the Simple Hide BBCode? so if the users press Thank the author, the hide wil unhide and we can the information under the hide?
Sorry, no. But I will try to invent a solution.

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 7:23 pm
by Палыч
usenet2you wrote:won't work, you can thank the 2nd only instead of the 1st only, and I even think the user will be able to thank other posts then the 2nd one with your modification for this, simple change post_id. With my modification you wouldn't be able to thank the 2nd post.
I test on the local host - it works.

Re: [RC] Thanks for post by Палыч

Posted: Tue Jun 02, 2009 7:29 pm
by Палыч
usenet2you wrote:When I use already_thanked in viewtopic.php, it will give me an error, why?
The function has two arguments

Code: Select all

// check if the user has already thanked that post
function already_thanked($post_id, $user_id)
{

Re: [RC] Thanks for post by Палыч

Posted: Wed Jun 03, 2009 8:50 pm
by Палыч
zach' wrote:but i just see a minor issue with bbcode in the messages from thanks_results.html, all bbcode are modify so they cant't be see, for examples :

Code: Select all

[quote="molotov":1rbs1tj4] ..... [/quote:1rbs1tj4]
[u:2alp7jag] ..... [/u:2alp7jag]
[img:2alp7jag] ....[/img:2alp7jag]
I think the install is fine, so i dont see what can do that, perhaps it came from {searchresults.MESSAGE}

could you help me about this minor issue, please

Thanks a lot
Fixed. Link to file thankslist.php in the first post

Re: [RC] Thanks for post by Палыч

Posted: Wed Jun 03, 2009 11:00 pm
by katib
Hi Палыч
sbasiba :)
Палыч wrote:
katib wrote:So is it possible toimporte thanks data? I mean to preserve the thanks data received by users in each posts ?
I think this is possible.

Code: Select all

ALTER TABLE `phpbb_thanks` CHANGE `thanks_from` `user_id` mediumint(8);
ALTER TABLE `phpbb_thanks` CHANGE `thanks_to` `poster_id` mediumint(8);
ALTER TABLE `phpbb_thanks` DROP PRIMARY KEY;
ALTER TABLE `phpbb_thanks` DROP COLUMN `thanks_id`;
ALTER TABLE `phpbb_thanks` ADD PRIMARY KEY ( `post_id` , `user_id` );
Do not forget to backup!
what about this SQL quiry from your Mod? do I need to run it also ?

Code: Select all

ALTER TABLE phpbb_users ADD user_allow_thanks_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL; 

Re: [RC] Thanks for post by Палыч

Posted: Thu Jun 04, 2009 1:14 pm
by Палыч
katib wrote:what about this SQL quiry from your Mod? do I need to run it also ?

Code: Select all

ALTER TABLE phpbb_users ADD user_allow_thanks_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL; 
Yes, it adds a field management function notification of gratitude

Re: [RC] Thanks for post by Палыч

Posted: Thu Jun 04, 2009 1:38 pm
by IPB_Refugee
@katib:

And you also need the 4 inserts in table phpbb_config:

Code: Select all

INSERT INTO phpbb_config (config_name, config_value) VALUES ('remove_thanks', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('thanks_postlist_view', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('thanks_profilelist_view', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('thanks_number', '100');
On the other hand you do not need the columns

Code: Select all

ALTER TABLE `phpbb_posts` ADD `post_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `phpbb_forums` ADD COLUMN `enable_thanks` TINYINT(1) DEFAULT '0' NOT NULL;
ALTER TABLE `phpbb_users` ADD `user_thanked` INT(11) UNSIGNED NOT NULL DEFAULT '0', ADD `user_thanks` INT(11) UNSIGNED NOT NULL DEFAULT '0', ADD `user_thanks_post` INT(11) UNSIGNED NOT NULL DEFAULT '0';
anymore. You can delete these columns with

Code: Select all

ALTER TABLE `phpbb_posts` DROP COLUMN `post_thanked`;
and so on. Don't forget to make a backup of your DB first!

Regards
Wolfgang