Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #2

Open
wants to merge 47 commits into
base: develop-3.2.x
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
82693c0
Add version check. Closes #68.
rxu Jul 15, 2018
3dce150
Temporarily allow master branch to fail because of the tests framewor…
rxu Jul 15, 2018
cd76971
Update thanks_mod.php
SiavaRu Nov 9, 2018
bd4e39c
Merge pull request #102 from SiavaRu/patch-2
rxu Nov 9, 2018
ffef971
Fix possible incorrect topics rating displaying issue in template.
rxu Jun 12, 2019
74528b8
Update Tracis-CI config.
rxu Jun 14, 2019
9832a80
Fix pt_br translation, add Turkish (thanks to awr).
rxu Nov 25, 2019
10dfe47
Fix custom rating images displaying in posts. Adjust testing.
rxu Jan 12, 2020
046f9e6
Fix thankslist bug and tests.
rxu Jan 12, 2020
1a309f7
fix czech subject
stanley89 Jan 9, 2019
9b2ad27
Use language service instead of deprecated add_lang on user
JulienTant May 31, 2018
e663394
Merge branch 'JulienTant-develop-3.2.x' into develop-3.2.x
rxu Feb 7, 2020
9b0ea08
Cache thanks toplist on index page for 24 hours
rxu Apr 16, 2020
f2ec095
Use native FontAwesome thumbs icons. Remove unused custom theme files.
rxu Apr 20, 2020
f119843
Add more type casting.
rxu Apr 29, 2020
f4411b4
Adjust migrations effectively_installed methods to ensure correct run…
rxu Apr 29, 2020
0ff9a44
General code cleanup
rxu Apr 30, 2020
156bc3d
Add ACP tests
rxu Apr 30, 2020
5431e0f
Add user profile test
rxu Apr 30, 2020
eedbd75
Fix minor flaws
rxu Apr 30, 2020
67d1def
Restore thanks counting in user profile thanks list
rxu May 1, 2020
e64077c
Fix 'and more' received and given thanks count info in user profile t…
rxu May 1, 2020
1e4b813
Fix thankslist sorting regression
rxu May 2, 2020
f4c227d
Add thankslist sorting tests
rxu May 3, 2020
097c92d
Fix toplist displaying titles with no toplists
rxu May 3, 2020
14dddb0
Fix extension validation issues.
rxu Jul 12, 2020
9d4a36c
Fix v_1_2_8 migration SQL error for MS SQL server.
rxu Dec 12, 2020
e36c7f4
Fix #111.
rxu Dec 16, 2020
ffec3f2
Add PHP 8.0 test build.
rxu Dec 16, 2020
fab0860
Migrate to Github Actions testing
rxu Feb 6, 2021
e1fc078
Update info_acp_thanks.php - typo fix
Scanialady Feb 6, 2021
53ce324
Merge branch 'Scanialady-develop-3.2.x' into develop-3.2.x
rxu Feb 6, 2021
8d67bbe
Temporarily disable PHP 8.1 builds as unstable
rxu Apr 4, 2021
2f6e695
Fixes and new event
Tatiana5 Apr 2, 2021
a333285
Merge branch 'develop-3.2.x-tatiana5' into develop-3.2.x
rxu Apr 4, 2021
40169ac
Update indexes to better filter thanks by user and forum
JoshyPHP Dec 18, 2021
248a45d
Merge branch 'JoshyPHP-develop-3.2.x' into develop-3.2.x
rxu Dec 18, 2021
b0e48cc
Made danish translation and the same time changed "Thanks" to "Like" …
rudibr Nov 4, 2022
a1ace21
Rename language folder in according to Danish ISO code (da)
rxu Nov 7, 2022
0276da5
Merge branch 'rudibr-develop-3.2.x' into develop-3.2.x
rxu Nov 7, 2022
9cb17c4
Add Slovak translation by msc@msc.sk
rxu Apr 18, 2023
1807fd1
Update tests env
rxu Apr 18, 2023
09e87df
Optimize thankslist code, fix MSSQL errors.
rxu Oct 8, 2023
398aa61
Optimize toplist code, fix MSSQL errors.
rxu Oct 8, 2023
13216d0
Improve toplist on index code
rxu Oct 8, 2023
6e331c8
Fix SQL syntax for user profile thanks lists.
rxu Oct 8, 2023
7b1e773
Adjust toplist controller code.
rxu Oct 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
547 changes: 547 additions & 0 deletions .github/workflows/tests.yml

Large diffs are not rendered by default.

76 changes: 0 additions & 76 deletions .travis.yml

This file was deleted.

28 changes: 15 additions & 13 deletions acp/acp_thanks_info.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

class acp_thanks_info
{
function module()
{
return array(
return [
'filename' => '\gfksx\thanksforposts\acp\acp_thanks_module',
'title' => 'ACP_THANKS_SETTINGS',
'version' => '1.3.4',
'modes' => array(
'thanks' => array('title' => 'ACP_THANKS_SETTINGS', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => array('ACP_THANKS')),
),
);
'version' => '2.0.7',
'modes' => [
'thanks' => ['title' => 'ACP_THANKS_SETTINGS', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => ['ACP_THANKS']],
],
];
}
}
112 changes: 66 additions & 46 deletions acp/acp_thanks_module.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

@@ -16,55 +18,71 @@
class acp_thanks_module
{
var $u_action;
var $new_config = array();
var $new_config = [];

function main($id, $mode)
{
global $config, $request, $user, $phpbb_container, $template;
global $phpbb_container;

/** @var \phpbb\config\config $config Config object */
$config = $phpbb_container->get('config');

/** @var \phpbb\language\language $language Language object */
$language = $phpbb_container->get('language');

/** @var \phpbb\request\request $request Request object */
$request = $phpbb_container->get('request');

/** @var \phpbb\template\template $template Template object */
$template = $phpbb_container->get('template');

/** @var \phpbb\user $user User object */
$user = $phpbb_container->get('user');

$submit = $request->is_set_post('submit');

$form_key = 'acp_thanks';
add_form_key($form_key);

/**
* Validation types are:
* string, int, bool,
* script_path (absolute path in url - beginning with / and no trailing slash),
* rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
*/
$display_vars = array(
* Validation types are:
* string, int, bool,
* script_path (absolute path in url - beginning with / and no trailing slash),
* rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
*/
$display_vars = [
'title' => 'ACP_THANKS_SETTINGS',
'vars' => array(
'legend' => 'GENERAL_OPTIONS',
'remove_thanks' => array('lang' => 'REMOVE_THANKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_only_first_post' => array('lang' => 'THANKS_ONLY_FIRST_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_global_post' => array('lang' => 'THANKS_GLOBAL_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_info_page' => array('lang' => 'THANKS_INFO_PAGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_postlist_view' => array('lang' => 'THANKS_POSTLIST_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_number_post' => array('lang' => 'THANKS_NUMBER_POST', 'validate' => 'int:1:250', 'type' => 'text:4:6', 'explain' => true),
'thanks_time_view' => array('lang' => 'THANKS_TIME_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_counters_view' => array('lang' => 'THANKS_COUNTERS_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_profilelist_view' => array('lang' => 'THANKS_PROFILELIST_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_number' => array('lang' => 'THANKS_NUMBER', 'validate' => 'int:1', 'type' => 'text:4:4', 'explain' => true),
'thanks_top_number' => array('lang' => 'THANKS_TOP_NUMBER', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
)
);
'vars' => [
'legend' => 'GENERAL_OPTIONS',
'remove_thanks' => ['lang' => 'REMOVE_THANKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_only_first_post' => ['lang' => 'THANKS_ONLY_FIRST_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_global_post' => ['lang' => 'THANKS_GLOBAL_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_info_page' => ['lang' => 'THANKS_INFO_PAGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_postlist_view' => ['lang' => 'THANKS_POSTLIST_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_number_post' => ['lang' => 'THANKS_NUMBER_POST', 'validate' => 'int:1:250', 'type' => 'text:4:6', 'explain' => true],
'thanks_time_view' => ['lang' => 'THANKS_TIME_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_counters_view' => ['lang' => 'THANKS_COUNTERS_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_profilelist_view' => ['lang' => 'THANKS_PROFILELIST_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_number' => ['lang' => 'THANKS_NUMBER', 'validate' => 'int:1', 'type' => 'text:4:4', 'explain' => true],
'thanks_top_number' => ['lang' => 'THANKS_TOP_NUMBER', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true],
]
];

if (isset($display_vars['lang']))
{
$user->add_lang($display_vars['lang']);
$language->add_lang($display_vars['lang']);
}

$this->new_config = $config;
$cfg_array = ($request->is_set('config')) ? $request->variable('config', array('' => ''), true) : $this->new_config;
$error = array();
$cfg_array = ($request->is_set('config')) ? $request->variable('config', ['' => ''], true) : $this->new_config;
$error = [];

// We validate the complete config if whished
validate_config_vars($display_vars['vars'], $cfg_array, $error);

if ($submit && !check_form_key($form_key))
{
$error[] = $user->lang('FORM_INVALID');
$error[] = $language->lang('FORM_INVALID');
}
// Do not write values if there is an error
if (sizeof($error))
@@ -94,20 +112,21 @@ function main($id, $mode)
$phpbb_log = $phpbb_container->get('log');
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_' . strtoupper($mode));

trigger_error($user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
trigger_error($language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
}

$this->tpl_name = 'acp_thanks';
$this->page_title = $display_vars['title'];

$template->assign_vars(array(
'L_TITLE' => $user->lang($display_vars['title']),
'L_TITLE_EXPLAIN' => $user->lang($display_vars['title'] . '_EXPLAIN'),
$template->assign_vars([
'L_TITLE' => $language->lang($display_vars['title']),
'L_TITLE_EXPLAIN' => $language->lang($display_vars['title'] . '_EXPLAIN'),

'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => implode('<br />', $error),

'U_ACTION' => $this->u_action)
'U_ACTION' => $this->u_action,
]
);

// Output relevant page
@@ -120,9 +139,10 @@ function main($id, $mode)

if (strpos($config_key, 'legend') !== false)
{
$template->assign_block_vars('options', array(
$template->assign_block_vars('options', [
'S_LEGEND' => true,
'LEGEND' => $user->lang($vars))
'LEGEND' => $language->lang($vars),
]
);

continue;
@@ -132,11 +152,11 @@ function main($id, $mode)
$l_explain = '';
if ($vars['explain'] && isset($vars['lang_explain']))
{
$l_explain = $user->lang($vars['lang_explain']);
$l_explain = $language->lang($vars['lang_explain']);
}
else if ($vars['explain'])
{
$l_explain = $user->lang($vars['lang'] . '_EXPLAIN');
$l_explain = $language->lang($vars['lang'] . '_EXPLAIN');
}

$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
@@ -146,13 +166,13 @@ function main($id, $mode)
continue;
}

$template->assign_block_vars('options', array(
$template->assign_block_vars('options', [
'KEY' => $config_key,
'TITLE' => $user->lang($vars['lang']),
'TITLE' => $language->lang($vars['lang']),
'S_EXPLAIN' => $vars['explain'],
'TITLE_EXPLAIN' => $l_explain,
'CONTENT' => $content,
)
]
);

unset($display_vars['vars'][$config_key]);
28 changes: 15 additions & 13 deletions acp/acp_thanks_refresh_info.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

class acp_thanks_refresh_info
{
function module()
{
return array(
return [
'filename' => '\gfksx\thanksforposts\acp\acp_thanks_refresh_module',
'title' => 'ACP_THANKS_REFRESH',
'version' => '1.3.4',
'modes' => array(
'thanks' => array('title' => 'ACP_THANKS_REFRESH', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => array('ACP_THANKS')),
),
);
'version' => '2.0.7',
'modes' => [
'thanks' => ['title' => 'ACP_THANKS_REFRESH', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => ['ACP_THANKS']],
],
];
}
}
161 changes: 89 additions & 72 deletions acp/acp_thanks_refresh_module.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

@@ -19,18 +21,36 @@ class acp_thanks_refresh_module

function main($id, $mode)
{
global $db, $user, $request, $template, $cache, $config, $phpbb_container;
global $phpbb_container;

/** @var \phpbb\cache\driver\driver_interface $cache Cache driver object */
$cache = $phpbb_container->get('cache.driver');

/** @var \phpbb\config\config $config Config object */
$config = $phpbb_container->get('config');

/** @var \phpbb\db\driver\driver_interface $db DBAL object */
$db = $phpbb_container->get('dbal.conn');

/** @var \phpbb\language\language $language Language object */
$language = $phpbb_container->get('language');

/** @var \phpbb\request\request $request Request object */
$request = $phpbb_container->get('request');

/** @var \phpbb\template\template $template Template object */
$template = $phpbb_container->get('template');

/** @var string $thanks_table _thanks database table */
$thanks_table = $phpbb_container->getParameter('tables.thanks');

$this->tpl_name = 'acp_thanks_refresh';
$this->page_title = 'ACP_THANKS_REFRESH';

$posts_delete_us = array();
$posts_delete_us = [];
$del_thanks = $end_thanks = $del_uthanks = $end_posts_thanks = $end_users_thanks = $thanks_update = 0;
$all_users_thanks = $all_thanks = $all_posts_number = $all_posts_thanks = 0;

$thanks_table = $phpbb_container->getParameter('tables.thanks');

// check mode
$refresh = $request->variable('refresh', false);
if (!$refresh)
{
@@ -40,7 +60,7 @@ function main($id, $mode)
$cache->destroy('_all_posts');
$cache->destroy('_all_posts_number');

// count all posts, thanks, users
// Count all posts, thanks, users
$sql = 'SELECT COUNT(DISTINCT post_id) as all_posts_thanks
FROM ' . $thanks_table;
$result = $db->sql_query($sql);
@@ -59,21 +79,20 @@ function main($id, $mode)
$all_thanks = (int) $db->sql_fetchfield('total_match_count');
$db->sql_freeresult($result);

$all_posts = array();
$sql_ary = array(
$all_posts = [];
$sql_ary = [
'SELECT' => 't.*',
'FROM' => array(
$thanks_table => 't',
),
'LEFT_JOIN' => array(
array(
'FROM' => array(POSTS_TABLE => 'p'),
'FROM' => [$thanks_table => 't'],
'LEFT_JOIN' => [
[
'FROM' => [POSTS_TABLE => 'p'],
'ON' => 't.post_id = p.post_id',
),
),
],
],
'WHERE' => 'p.post_id IS NULL',
);
];
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));

while ($row = $db->sql_fetchrow($result))
{
$all_posts[] = (int) $row['post_id'];
@@ -88,24 +107,23 @@ function main($id, $mode)
$cache->put('_all_posts', $all_posts);
$cache->put('_all_posts_number', $all_posts_number);

$template->assign_vars(array(
$template->assign_vars([
'S_REFRESH' => false,
'L_WARNING' => sprintf($user->lang['WARNING']),
));
]);
}
//update

// Update
if ($refresh)
{
// check mode
if (confirm_box(true))
{
$all_users_thanks = (int) $cache->get('_all_users_thanks');
$all_thanks = (int) $cache->get('_all_thanks');
$all_posts = $cache->get('_all_posts');
$all_posts = (array) $cache->get('_all_posts');
$all_posts_number = (int) $cache->get('_all_posts_number');
$all_posts_thanks = (int) $cache->get('_all_posts_thanks');

// update delete posts
// Update deleted posts thanks
if (!empty($all_posts))
{
$sql = 'DELETE FROM ' . $thanks_table ."
@@ -115,20 +133,18 @@ function main($id, $mode)
$end_thanks = $all_thanks - $del_thanks;
}

// update delete users
$sql_ary = array(
// Update deleted users thanks
$sql_ary = [
'SELECT' => 't.post_id',
'FROM' => array(
$thanks_table => 't',
),
'LEFT_JOIN' => array(
array(
'FROM' => array(POSTS_TABLE => 'p'),
'FROM' => [$thanks_table => 't'],
'LEFT_JOIN' => [
[
'FROM' => [POSTS_TABLE => 'p'],
'ON' => 't.post_id = p.post_id',
),
),
],
],
'WHERE' => 'p.poster_id = '. ANONYMOUS,
);
];
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));

while ($row = $db->sql_fetchrow($result))
@@ -145,52 +161,52 @@ function main($id, $mode)
$db->sql_query($sql);
}

//update move posts /topics /forums and change posters
$sql_ary = array(
// Update moved posts /topics /forums and changed posters data
$sql_ary = [
'SELECT' => 'p.post_id',
'FROM' => array(
POSTS_TABLE => 'p',
),
'LEFT_JOIN' => array(
array(
'FROM' => array($thanks_table => 't'),
'FROM' => [POSTS_TABLE => 'p'],
'LEFT_JOIN' => [
[
'FROM' => [$thanks_table => 't'],
'ON' => 'p.post_id = t.post_id',
),
),
],
],
'WHERE' => 'p.topic_id <> t.topic_id OR p.forum_id <> t.forum_id OR p.poster_id <> t.poster_id',
);
];
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$thanks_update = 0;

$thanks_updated = 0;
if ($result)
{
while ($row = $db->sql_fetchrow($result))
{
$sql = 'SELECT forum_id, topic_id, poster_id, post_id
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . $row['post_id'];
WHERE post_id = ' . (int) $row['post_id'];
$results = $db->sql_query($sql);
$rows = $db->sql_fetchrow($results);
$db->sql_freeresult($results);

$sql_ary = array(
$sql_ary = [
'post_id' => $rows['post_id'],
'forum_id' => $rows['forum_id'],
'topic_id' => $rows['topic_id'],
'poster_id' => $rows['poster_id'],
);
];

$sql = 'UPDATE ' . $thanks_table . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) .'
WHERE post_id = '. $sql_ary['post_id'];
$db->sql_query($sql);
$thanks_update++;
$thanks_updated++;
}
}
$db->sql_freeresult($result);

$end_thanks = $end_thanks - $del_uthanks;
$del_thanks = $del_thanks + $del_uthanks;
// delete thanks only first post

// Delete topic first posts thanks
if (isset($config['thanks_only_first_post']) ? $config['thanks_only_first_post'] : false)
{
$sql = 'SELECT topic_first_post_id
@@ -212,7 +228,8 @@ function main($id, $mode)
$del_thanks = $del_thanks + $del_nofirst_thanks;
}
}
// delete thanks global announce

// Delete global announces thanks
if (isset($config['thanks_global_post']) ? !$config['thanks_global_post'] : false)
{
$sql = 'SELECT topic_id
@@ -235,12 +252,12 @@ function main($id, $mode)
$del_thanks = $del_thanks + $del_global_thanks;
}
}
// delete selfthanks

// Delete selfthanks
$sql = 'DELETE FROM ' . $thanks_table .'
WHERE poster_id = user_id';
$result = $db->sql_query($sql);
$db->sql_query($sql);
$del_selfthanks = $db->sql_affectedrows();
$db->sql_freeresult($result);

$del_thanks = $del_thanks + $del_selfthanks;
$end_thanks = $end_thanks - $del_selfthanks;
@@ -257,22 +274,22 @@ function main($id, $mode)
$end_users_thanks = (int) $db->sql_fetchfield('end_users_thanks');
$db->sql_freeresult($result);

$template->assign_vars(array(
$template->assign_vars([
'S_REFRESH' => true,
));
]);
}
else
{
$s_hidden_fields = build_hidden_fields(array(
$s_hidden_fields = build_hidden_fields([
'refresh' => true,
)
);
//display mode
]);

// Display mode
confirm_box(false, 'REFRESH_THANKS', $s_hidden_fields);
trigger_error($user->lang['TRUNCATE_NO_THANKS'] . adm_back_link($this->u_action));
trigger_error($language->lang('TRUNCATE_NO_THANKS') . adm_back_link($this->u_action));
}
}
$template->assign_vars(array(
$template->assign_vars([
'POSTS' => $all_posts_number,

'POSTSTHANKS' => $all_posts_thanks,
@@ -285,6 +302,6 @@ function main($id, $mode)
'POSTSEND' => $end_posts_thanks,
'USERSEND' => $end_users_thanks,
'THANKSEND' => $end_thanks,
));
]);
}
}
28 changes: 15 additions & 13 deletions acp/acp_thanks_reput_info.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

class acp_thanks_reput_info
{
function module()
{
return array(
return [
'filename' => '\gfksx\thanksforposts\acp\acp_thanks_reput_module',
'title' => 'ACP_THANKS_REPUT_SETTINGS',
'version' => '1.3.4',
'modes' => array(
'thanks' => array('title' => 'ACP_THANKS_REPUT_SETTINGS', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => array('ACP_THANKS')),
),
);
'version' => '2.0.7',
'modes' => [
'thanks' => ['title' => 'ACP_THANKS_REPUT_SETTINGS', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => ['ACP_THANKS']],
],
];
}
}
144 changes: 82 additions & 62 deletions acp/acp_thanks_reput_module.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

@@ -16,56 +18,75 @@
class acp_thanks_reput_module
{
var $u_action;
var $new_config = array();
var $new_config = [];

function main($id, $mode)
{
global $request, $user, $template, $config, $phpbb_root_path, $phpbb_container;
global $phpbb_container;

/** @var \phpbb\config\config $config Config object */
$config = $phpbb_container->get('config');

/** @var \phpbb\language\language $language Language object */
$language = $phpbb_container->get('language');

/** @var \phpbb\request\request $request Request object */
$request = $phpbb_container->get('request');

/** @var \phpbb\template\template $template Template object */
$template = $phpbb_container->get('template');

/** @var \phpbb\user $user User object */
$user = $phpbb_container->get('user');

/** @var string $phpbb_root_path phpbb_root_path */
$phpbb_root_path = $phpbb_container->getParameter('core.root_path');

$submit = $request->is_set_post('submit');

$form_key = 'acp_thanks_reput';
add_form_key($form_key);

/**
* Validation types are:
* string, int, bool,
* script_path (absolute path in url - beginning with / and no trailing slash),
* rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
*/
$display_vars = array(
* Validation types are:
* string, int, bool,
* script_path (absolute path in url - beginning with / and no trailing slash),
* rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
*/
$display_vars = [
'title' => 'ACP_THANKS_REPUT_SETTINGS',
'vars' => array(
'legend' => 'GENERAL_OPTIONS',
'thanks_post_reput_view' => array('lang' => 'THANKS_POST_REPUT_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_topic_reput_view' => array('lang' => 'THANKS_TOPIC_REPUT_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_forum_reput_view' => array('lang' => 'THANKS_FORUM_REPUT_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_number_digits' => array('lang' => 'THANKS_NUMBER_DIGITS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'thanks_number_row_reput' => array('lang' => 'THANKS_NUMBER_ROW_REPUT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
'legend1' => 'GRAPHIC_OPTIONS',
'thanks_reput_graphic' => array('lang' => 'THANKS_REPUT_GRAPHIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'thanks_reput_height' => array('lang' => 'THANKS_REPUT_HEIGHT', 'validate' => 'int:1:25', 'type' => 'text:4:6', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'thanks_reput_level' => array('lang' => 'THANKS_REPUT_LEVEL', 'validate' => 'int:4:13', 'type' => 'text:4:4', 'explain' => true),
'thanks_reput_image' => array('lang' => 'THANKS_REPUT_IMAGE', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true, 'append' => '<br /><img src="'.(($config['thanks_reput_image']) ? $phpbb_root_path . $config['thanks_reput_image'] : '').'" alt="'.$user->lang['THANKS_REPUT_IMAGE'].'"/>'),
'thanks_reput_image_back' => array('lang' => 'THANKS_REPUT_IMAGE_BACK', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true, 'append' => '<br /><img src="'.(($config['thanks_reput_image_back']) ? $phpbb_root_path . $config['thanks_reput_image_back'] : '').'" alt="'.$user->lang['THANKS_REPUT_IMAGE_BACK'].'"/>'),
'legend2' => 'GRAPHIC_DEFAULT',
)
);
'vars' => [
'legend' => 'GENERAL_OPTIONS',
'thanks_post_reput_view' => ['lang' => 'THANKS_POST_REPUT_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_topic_reput_view' => ['lang' => 'THANKS_TOPIC_REPUT_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_forum_reput_view' => ['lang' => 'THANKS_FORUM_REPUT_VIEW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_number_digits' => ['lang' => 'THANKS_NUMBER_DIGITS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true],
'thanks_number_row_reput' => ['lang' => 'THANKS_NUMBER_ROW_REPUT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true],
'legend1' => 'GRAPHIC_OPTIONS',
'thanks_reput_graphic' => ['lang' => 'THANKS_REPUT_GRAPHIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true],
'thanks_reput_height' => ['lang' => 'THANKS_REPUT_HEIGHT', 'validate' => 'int:1:25', 'type' => 'text:4:6', 'explain' => true, 'append' => ' ' . $language->lang('PIXEL')],
'thanks_reput_level' => ['lang' => 'THANKS_REPUT_LEVEL', 'validate' => 'int:4:13', 'type' => 'text:4:4', 'explain' => true],
'thanks_reput_image' => ['lang' => 'THANKS_REPUT_IMAGE', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true, 'append' => '<br /><img src="' . (($config['thanks_reput_image']) ? $phpbb_root_path . $config['thanks_reput_image'] : '') . '" alt="' . $language->lang('THANKS_REPUT_IMAGE') . '"/>'],
'thanks_reput_image_back' => ['lang' => 'THANKS_REPUT_IMAGE_BACK', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true, 'append' => '<br /><img src="' . (($config['thanks_reput_image_back']) ? $phpbb_root_path . $config['thanks_reput_image_back'] : '') . '" alt="' . $language->lang('THANKS_REPUT_IMAGE_BACK') . '"/>'],
'legend2' => 'GRAPHIC_DEFAULT',
]
];

if (isset($display_vars['lang']))
{
$user->add_lang($display_vars['lang']);
$language->add_lang($display_vars['lang']);
}

$this->new_config = $config;
$cfg_array = ($request->is_set('config')) ? $request->variable('config', array('' => ''), true) : $this->new_config;
$error = array();
$cfg_array = ($request->is_set('config')) ? $request->variable('config', ['' => ''], true) : $this->new_config;
$error = [];

// We validate the complete config if whished
validate_config_vars($display_vars['vars'], $cfg_array, $error);

if ($submit && !check_form_key($form_key))
{
$error[] = $user->lang['FORM_INVALID'];
$error[] = $language->lang('FORM_INVALID');
}

// Do not write values if there is an error
@@ -75,12 +96,13 @@ function main($id, $mode)
}
if (!empty($cfg_array['thanks_reput_image']) && !file_exists($phpbb_root_path . $config['thanks_reput_image']))
{
$error[] = $user->lang['THANKS_REPUT_IMAGE_NOEXIST'];
$error[] = $language->lang('THANKS_REPUT_IMAGE_NOEXIST');
}
if (!empty($cfg_array['thanks_reput_image_back']) && !file_exists($phpbb_root_path . $config['thanks_reput_image_back']))
{
$error[] = $user->lang['THANKS_REPUT_IMAGE_BACK_NOEXIST'];
$error[] = $language->lang('THANKS_REPUT_IMAGE_BACK_NOEXIST');
}

// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $config_name => $null)
{
@@ -103,24 +125,24 @@ function main($id, $mode)
$phpbb_log = $phpbb_container->get('log');
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_' . strtoupper($mode));

trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
trigger_error($language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
}

$this->tpl_name = 'acp_thanks_reput';
$this->page_title = $display_vars['title'];

$template->assign_vars(array(
'L_TITLE' => $user->lang[$display_vars['title']],
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
'GRAPHIC_STAR_BLUE_EXAMPLE' => $phpbb_root_path . $user->lang['GRAPHIC_STAR_BLUE'],
'GRAPHIC_STAR_GOLD_EXAMPLE' => $phpbb_root_path . $user->lang['GRAPHIC_STAR_GOLD'],
'GRAPHIC_STAR_BACK_EXAMPLE' => $phpbb_root_path . $user->lang['GRAPHIC_STAR_BACK'],
'GRAPHIC_BLOCK_RED_EXAMPLE' => $phpbb_root_path . $user->lang['GRAPHIC_BLOCK_RED'],
'GRAPHIC_BLOCK_BACK_EXAMPLE' => $phpbb_root_path . $user->lang['GRAPHIC_BLOCK_BACK'],
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => implode('<br />', $error),
'U_ACTION' => $this->u_action)
);
$template->assign_vars([
'L_TITLE' => $language->lang($display_vars['title']),
'L_TITLE_EXPLAIN' => $language->lang($display_vars['title'] . '_EXPLAIN'),
'GRAPHIC_STAR_BLUE_EXAMPLE' => $phpbb_root_path . $language->lang('GRAPHIC_STAR_BLUE'),
'GRAPHIC_STAR_GOLD_EXAMPLE' => $phpbb_root_path . $language->lang('GRAPHIC_STAR_GOLD'),
'GRAPHIC_STAR_BACK_EXAMPLE' => $phpbb_root_path . $language->lang('GRAPHIC_STAR_BACK'),
'GRAPHIC_BLOCK_RED_EXAMPLE' => $phpbb_root_path . $language->lang('GRAPHIC_BLOCK_RED'),
'GRAPHIC_BLOCK_BACK_EXAMPLE'=> $phpbb_root_path . $language->lang('GRAPHIC_BLOCK_BACK'),
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => implode('<br />', $error),
'U_ACTION' => $this->u_action
]);

// Output relevant page
foreach ($display_vars['vars'] as $config_key => $vars)
@@ -132,40 +154,38 @@ function main($id, $mode)

if (strpos($config_key, 'legend') !== false)
{
$template->assign_block_vars('options', array(
'S_LEGEND' => true,
'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
);
$template->assign_block_vars('options', [
'S_LEGEND' => true,
'LEGEND' => $language->lang($vars),
]);

continue;
}
$type = explode(':', $vars['type']);

$type = explode(':', $vars['type']);
$l_explain = '';
if ($vars['explain'] && isset($vars['lang_explain']))
{
$l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
$l_explain = $language->lang($vars['lang_explain']);
}
else if ($vars['explain'])
{
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
$l_explain = $language->lang($vars['lang'] . '_EXPLAIN');
}

$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);

if (empty($content))
{
continue;
}

$template->assign_block_vars('options', array(
$template->assign_block_vars('options', [
'KEY' => $config_key,
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
'TITLE' => $language->lang($vars['lang']),
'S_EXPLAIN' => $vars['explain'],
'TITLE_EXPLAIN' => $l_explain,
'CONTENT' => $content,
)
);
]);

unset($display_vars['vars'][$config_key]);
}
28 changes: 15 additions & 13 deletions acp/acp_thanks_truncate_info.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

class acp_thanks_truncate_info
{
function module()
{
return array(
return [
'filename' => '\gfksx\thanksforposts\acp\acp_thanks_truncate_module',
'title' => 'ACP_THANKS_TRUNCATE',
'version' => '1.3.4',
'modes' => array(
'thanks' => array('title' => 'ACP_THANKS_TRUNCATE', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => array('ACP_THANKS')),
),
);
'version' => '2.0.7',
'modes' => [
'thanks' => ['title' => 'ACP_THANKS_TRUNCATE', 'auth' => 'ext_gfksx/thanksforposts && acl_a_board', 'cat' => ['ACP_THANKS']],
],
];
}
}
53 changes: 33 additions & 20 deletions acp/acp_thanks_truncate_module.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\acp;

@@ -19,13 +21,26 @@ class acp_thanks_truncate_module

function main($id, $mode)
{
global $db, $request, $user, $template, $phpbb_container;
global $phpbb_container;

$this->tpl_name = 'acp_thanks_truncate';
$this->page_title = 'ACP_THANKS_TRUNCATE';
/** @var \phpbb\db\driver\driver_interface $db DBAL object */
$db = $phpbb_container->get('dbal.conn');

/** @var \phpbb\language\language $language Language object */
$language = $phpbb_container->get('language');

/** @var \phpbb\request\request $request Request object */
$request = $phpbb_container->get('request');

/** @var \phpbb\template\template $template Template object */
$template = $phpbb_container->get('template');

/** @var string $thanks_table _thanks database table */
$thanks_table = $phpbb_container->getParameter('tables.thanks');

$this->tpl_name = 'acp_thanks_truncate';
$this->page_title = 'ACP_THANKS_TRUNCATE';

$sql = 'SELECT COUNT(post_id) as total_match_count
FROM ' . $thanks_table;
$result = $db->sql_query($sql);
@@ -48,12 +63,10 @@ function main($id, $mode)

if ($truncate)
{
// check mode
if (confirm_box(true))
{
$sql = 'DELETE FROM ' . $thanks_table;
$result = $db->sql_query($sql);
$db->sql_freeresult($result);
$db->sql_query($sql);

$sql = 'SELECT COUNT(post_id) as total_match_count
FROM ' . $thanks_table;
@@ -66,24 +79,24 @@ function main($id, $mode)
}
else
{
$s_hidden_fields = build_hidden_fields(array(
$s_hidden_fields = build_hidden_fields([
'truncate' => true,
)
);
//display mode
]);

// Display mode
confirm_box(false, 'TRUNCATE_THANKS', $s_hidden_fields);
trigger_error($user->lang['TRUNCATE_NO_THANKS'] . adm_back_link($this->u_action));
trigger_error($language->lang('TRUNCATE_NO_THANKS') . adm_back_link($this->u_action));
}
}

$template->assign_vars(array(
$template->assign_vars([
'ALLTHANKS' => $all_thanks,
'POSTSTHANKS' => $all_posts_thanks,
'USERSTHANKS' => $all_users_thanks,
'POSTSEND' => $end_posts_thanks,
'USERSEND' => $end_users_thanks,
'THANKSEND' => $end_thanks,
'S_TRUNCATE' => $truncate,
));
]);
}
}
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
"type": "phpbb-extension",
"description": "Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.",
"homepage": "http://www.phpbbguru.net",
"version": "2.0.6",
"license": "GPL-2.0",
"version": "2.0.7",
"license": "GPL-2.0-only",
"authors": [
{
"name": "Палыч",
@@ -24,6 +24,11 @@
"display-name": "Thanks for posts",
"soft-require": {
"phpbb/phpbb": ">=3.2.0"
},
"version-check": {
"host": "rxu.github.io",
"directory": "/versions/thanksforposts",
"filename": "version.json"
}
}
}
9 changes: 3 additions & 6 deletions config/routing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
gfksx_thanksforposts_thankslist_controller_user:
path: /thankslist/{mode}/{author_id}/{give}{tslash}
path: /thankslist/{mode}/{author_id}/{give}
defaults: { _controller: gfksx.thanksforposts.controller.thankslist:main, top: 0, start: 0, sort_key: "a", sort_dir: "d", topic_id: 0, return_chars: 300 }
requirements:
mode: \w+
@@ -11,10 +11,9 @@ gfksx_thanksforposts_thankslist_controller_user:
topic_id: \d+
return_chars: \d+
give: true|false
tslash : "/?"

gfksx_thanksforposts_thankslist_controller:
path: /thankslist{tslash}
path: /thankslist
defaults: { _controller: gfksx.thanksforposts.controller.thankslist:main, mode: "", author_id: 1, give: "", top: 0, start: 0, sort_key: "a", sort_dir: "d", topic_id: 0, return_chars: 300 }
requirements:
mode: \w+
@@ -26,14 +25,12 @@ gfksx_thanksforposts_thankslist_controller:
topic_id: \d+
return_chars: \d+
give: true|false
tslash : "/?"

gfksx_thanksforposts_toplist_controller:
path: /toplist{tslash}
path: /toplist
defaults: { _controller: gfksx.thanksforposts.controller.toplist:main, mode: "", start: 0, topic_id: 0, return_chars: 300 }
requirements:
mode: \w+
start: \d+
topic_id: \d+
return_chars: \d+
tslash : "/?"
11 changes: 10 additions & 1 deletion config/services.yml
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ services:
- '@cache.driver'
- '@request'
- '@controller.helper'
- '@language'
- '%core.root_path%'
- '%core.php_ext%'
- '@gfksx.thanksforposts.helper'
@@ -31,9 +32,10 @@ services:
- '@notification_manager'
- '@controller.helper'
- '@dispatcher'
- '@language'
- '@user_loader'
- '%core.root_path%'
- '%core.php_ext%'
- '%core.table_prefix%'
- '%tables.thanks%'
- '%tables.users%'
- '%tables.posts%'
@@ -46,12 +48,16 @@ services:
- '@auth'
- '@template'
- '@user'
- '@language'
- '@cache.driver'
- '@pagination'
- '@profilefields.manager'
- '@request'
- '@controller.helper'
- '@user_loader'
- '%tables.posts%'
- '%tables.thanks%'
- '%tables.sessions%'
- '%tables.users%'
- '%core.root_path%'
- '%core.php_ext%'
@@ -63,13 +69,16 @@ services:
- '@auth'
- '@template'
- '@user'
- '@language'
- '@cache.driver'
- '%core.root_path%'
- '%core.php_ext%'
- '@pagination'
- '@gfksx.thanksforposts.helper'
- '@request'
- '@controller.helper'
- '@user_loader'
- '%tables.forums%'
- '%tables.thanks%'
- '%tables.users%'
- '%tables.posts%'
335 changes: 197 additions & 138 deletions controller/thankslist.php

Large diffs are not rendered by default.

498 changes: 292 additions & 206 deletions controller/toplist.php

Large diffs are not rendered by default.

640 changes: 301 additions & 339 deletions core/helper.php

Large diffs are not rendered by default.

157 changes: 88 additions & 69 deletions event/listener.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\event;

@@ -18,10 +20,10 @@
class listener implements EventSubscriberInterface
{
/** @var array topic_thanks */
protected $topic_thanks;
protected $topic_thanks = [];

/** @var int max_topic_thanks */
protected $max_topic_thanks;
protected $max_topic_thanks = 0;

/** @var \phpbb\config\config */
protected $config;
@@ -47,6 +49,9 @@ class listener implements EventSubscriberInterface
/** @var \phpbb\controller\helper */
protected $controller_helper;

/** @var \phpbb\language\language */
protected $language;

/** @var string phpbb_root_path */
protected $phpbb_root_path;

@@ -57,21 +62,34 @@ class listener implements EventSubscriberInterface
protected $helper;

/**
* Constructor
*
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db DBAL object
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
* @param \phpbb\cache\driver\driver_interface $cache Cache driver object
* @param \phpbb\request\request_interface $request Request object
* @param string $phpbb_root_path phpbb_root_path
* @param string $php_ext phpEx
* @param rxu\PostsMerging\core\helper $helper The extension helper object
* @access public
*/
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\template\template $template, \phpbb\user $user, \phpbb\cache\driver\driver_interface $cache, \phpbb\request\request_interface $request, \phpbb\controller\helper $controller_helper, $phpbb_root_path, $php_ext, $helper)
* Constructor
*
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db DBAL object
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
* @param \phpbb\cache\driver\driver_interface $cache Cache driver object
* @param \phpbb\request\request_interface $request Request object
* @param \phpbb\controller\helper $controller_helper Controller helper object
* @param \phpbb\language\language $language Language object
* @param string $phpbb_root_path phpbb_root_path
* @param string $php_ext phpEx
* @param rxu\PostsMerging\core\helper $helper The extension helper object
* @access public
*/
public function __construct(
\phpbb\config\config $config,
\phpbb\db\driver\driver_interface $db,
\phpbb\auth\auth $auth,
\phpbb\template\template $template,
\phpbb\user $user,
\phpbb\cache\driver\driver_interface $cache,
\phpbb\request\request_interface $request,
\phpbb\controller\helper $controller_helper,
\phpbb\language\language $language,
$phpbb_root_path, $php_ext, $helper
)
{
$this->config = $config;
$this->db = $db;
@@ -81,51 +99,51 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive
$this->cache = $cache;
$this->request = $request;
$this->controller_helper = $controller_helper;
$this->language = $language;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->helper = $helper;
$this->topic_thanks = array();
$this->max_topic_thanks = 0;
}

static public function getSubscribedEvents()
{
return array(
'core.index_modify_page_title' => 'get_thanks_list',
'core.memberlist_view_profile' => 'memberlist_viewprofile',
'core.delete_posts_in_transaction' => 'delete_post_thanks',
'core.viewforum_modify_topicrow' => 'viewforum_output_topics_reput',
'core.viewforum_modify_topics_data' => 'viewforum_get_topics_reput',
'core.index_modify_page_title' => 'get_thanks_list',
'core.memberlist_view_profile' => 'memberlist_viewprofile',
'core.delete_posts_in_transaction' => 'delete_post_thanks',
'core.viewforum_modify_topicrow' => 'viewforum_output_topics_reput',
'core.viewforum_modify_topics_data' => 'viewforum_get_topics_reput',
// Set lower priority for the case another ext want to change $post_list first
'core.viewtopic_get_post_data' => array('viewtopic_handle_thanks', -2),
'core.viewtopic_modify_post_row' => 'viewtopic_modify_postrow',
'core.display_forums_before' => 'forumlist_display_rating',
'core.display_forums_modify_template_vars' => 'forumlist_modify_template_vars',
'core.user_setup' => 'load_language_on_setup',
'core.page_header_after' => 'add_header_quicklinks',
'core.viewtopic_modify_page_title' => 'markread',
'core.viewtopic_assign_template_vars_before' => 'viewtopic_check_f_thanks_auth',
'paybas.recenttopics.modify_tpl_ary' => 'recenttopics_output_topics_reput',
'paybas.recenttopics.modify_topics_list'=> 'recenttopics_get_topics_reput',
'core.permissions' => 'add_permission',
'core.viewtopic_get_post_data' => ['viewtopic_handle_thanks', -2],
'core.viewtopic_modify_post_row' => 'viewtopic_modify_postrow',
'core.display_forums_before' => 'forumlist_display_rating',
'core.display_forums_modify_template_vars' => 'forumlist_modify_template_vars',
'core.user_setup' => 'load_language_on_setup',
'core.page_header_after' => 'add_header_quicklinks',
'core.viewtopic_modify_page_title' => 'markread',
'core.viewtopic_assign_template_vars_before'=> 'viewtopic_check_f_thanks_auth',
'paybas.recenttopics.modify_tpl_ary' => 'recenttopics_output_topics_reput',
'paybas.recenttopics.modify_topics_list' => 'recenttopics_get_topics_reput',
'core.permissions' => 'add_permission',
);
}

public function get_thanks_list($event)
{
// Generate thankslist if required ...
$thanks_list = '';
// Generate thankslist if required
$thanks_list = [];
$ex_fid_ary = array_keys($this->auth->acl_getf('!f_read', true));
$ex_fid_ary = (sizeof($ex_fid_ary)) ? $ex_fid_ary : 0;
$ex_fid_ary = (count($ex_fid_ary)) ? $ex_fid_ary : [0];
if ($this->config['thanks_top_number'])
{
$thanks_list = $this->helper->get_toplist_index($ex_fid_ary);
}
$this->template->assign_vars(array(
'THANKS_LIST' => ($thanks_list != '') ? $thanks_list : false,
'S_THANKS_LIST' => ($this->config['thanks_top_number'] && $thanks_list != '') ? true : false,
'L_TOP_THANKS_LIST' => $this->config['thanks_top_number'] ? sprintf($this->user->lang['REPUT_TOPLIST'], (int) $this->config['thanks_top_number']) : false,
));
$this->template->assign_vars([
'S_THANKS_LIST' => $this->config['thanks_top_number'] && !empty($thanks_list),
'L_TOP_THANKS_LIST' => $this->config['thanks_top_number'] ? $this->language->lang('REPUT_TOPLIST', (int) $this->config['thanks_top_number']) : false,
]);

$this->template->assign_block_vars_array('toplist', $thanks_list);
}

public function memberlist_viewprofile($event)
@@ -134,7 +152,7 @@ public function memberlist_viewprofile($event)
$user_id = (int) $member['user_id'];

$ex_fid_ary = array_keys($this->auth->acl_getf('!f_read', true));
$ex_fid_ary = (sizeof($ex_fid_ary)) ? $ex_fid_ary : false;
$ex_fid_ary = (count($ex_fid_ary)) ? $ex_fid_ary : false;

if ($this->request->is_set('list_thanks'))
{
@@ -212,7 +230,7 @@ public function forumlist_display_rating($event)
{
$forum_rows = $event['forum_rows'];
$this->helper->get_max_forum_thanks();
$forum_thanks_rating = array();
$forum_thanks_rating = [];
foreach ($forum_rows as $row)
{
$forum_thanks_rating[] = $row['forum_id'];
@@ -237,25 +255,25 @@ public function forumlist_modify_template_vars($event)
public function load_language_on_setup($event)
{
$lang_set_ext = $event['lang_set_ext'];
$lang_set_ext[] = array(
$lang_set_ext[] = [
'ext_name' => 'gfksx/thanksforposts',
'lang_set' => 'thanks_mod',
);
];
$event['lang_set_ext'] = $lang_set_ext;
}

public function add_header_quicklinks($event)
{
$u_thankslist = $this->controller_helper->route('gfksx_thanksforposts_thankslist_controller', array('tslash' => ''));
$u_toplist = $this->controller_helper->route('gfksx_thanksforposts_toplist_controller', array('tslash' => ''));
$this->template->assign_vars(array(
'U_THANKS_LIST' => $u_thankslist,
'U_REPUT_TOPLIST' => $u_toplist,
$u_thankslist = $this->controller_helper->route('gfksx_thanksforposts_thankslist_controller');
$u_toplist = $this->controller_helper->route('gfksx_thanksforposts_toplist_controller');
$this->template->assign_vars([
'U_THANKS_LIST' => $u_thankslist,
'U_REPUT_TOPLIST' => $u_toplist,
'S_DISPLAY_THANKSLIST' => $this->auth->acl_get('u_viewthanks'),
'S_DISPLAY_TOPLIST' => $this->auth->acl_get('u_viewtoplist') && ($this->config['thanks_post_reput_view'] || $this->config['thanks_topic_reput_view'] || $this->config['thanks_forum_reput_view']),
'MINI_THANKS_IMG' => $this->user->img('icon_mini_thanks', $this->user->lang['GRATITUDES']),
'MINI_TOPLIST_IMG' => $this->user->img('icon_mini_toplist', $this->user->lang['TOPLIST']),
));
'MINI_THANKS_IMG' => $this->user->img('icon_mini_thanks', $this->language->lang('GRATITUDES')),
'MINI_TOPLIST_IMG' => $this->user->img('icon_mini_toplist', $this->language->lang('TOPLIST')),
]);
}

public function markread($event)
@@ -267,9 +285,9 @@ public function markread($event)
public function viewtopic_check_f_thanks_auth($event)
{
$forum_id = (int) $event['forum_id'];
$this->template->assign_vars(array(
$this->template->assign_vars([
'S_FORUM_THANKS' => (bool) ($this->auth->acl_get('f_thanks', $forum_id)),
));
]);
}

public function recenttopics_output_topics_reput($event)
@@ -295,11 +313,12 @@ public function recenttopics_get_topics_reput($event)

public function add_permission($event)
{
$permissions = $event['permissions'];
$permissions['f_thanks'] = array('lang' => 'ACL_F_THANKS', 'cat' => 'misc');
$permissions['m_thanks'] = array('lang' => 'ACL_M_THANKS', 'cat' => 'misc');
$permissions['u_viewthanks'] = array('lang' => 'ACL_U_VIEWTHANKS', 'cat' => 'misc');
$permissions['u_viewtoplist'] = array('lang' => 'ACL_U_VIEWTOPLIST', 'cat' => 'misc');
$permissions = array_merge($event['permissions'], [
'f_thanks' => ['lang' => 'ACL_F_THANKS', 'cat' => 'misc'],
'm_thanks' => ['lang' => 'ACL_M_THANKS', 'cat' => 'misc'],
'u_viewthanks' => ['lang' => 'ACL_U_VIEWTHANKS', 'cat' => 'misc'],
'u_viewtoplist' => ['lang' => 'ACL_U_VIEWTOPLIST', 'cat' => 'misc'],
]);
$event['permissions'] = $permissions;
}
}
76 changes: 39 additions & 37 deletions ext.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts;

/**
* Extension class for custom enable/disable/purge actions
*
* NOTE TO EXTENSION DEVELOPERS:
* Normally it is not necessary to define any functions inside the ext class below.
* The ext class may contain special (un)installation commands in the methods
* enable_step(), disable_step() and purge_step(). As it is, these methods are defined
* in phpbb_extension_base, which this class extends, but you can overwrite them to
* give special instructions for those cases. This extension must do this because it uses
* the notifications system, which requires the methods enable_notifications(),
* disable_notifications() and purge_notifications() be run to properly manage the
* notifications created by it when enabling, disabling or deleting this extension.
*/
* Extension class for custom enable/disable/purge actions
*
* NOTE TO EXTENSION DEVELOPERS:
* Normally it is not necessary to define any functions inside the ext class below.
* The ext class may contain special (un)installation commands in the methods
* enable_step(), disable_step() and purge_step(). As it is, these methods are defined
* in phpbb_extension_base, which this class extends, but you can overwrite them to
* give special instructions for those cases. This extension must do this because it uses
* the notifications system, which requires the methods enable_notifications(),
* disable_notifications() and purge_notifications() be run to properly manage the
* notifications created by it when enabling, disabling or deleting this extension.
*/
class ext extends \phpbb\extension\base
{
/**
* Overwrite enable_step to enable notifications
* before any included migrations are installed.
*
* @param mixed $old_state State returned by previous call of this method
* @return mixed Returns false after last step, otherwise temporary state
*/
* Overwrite enable_step to enable notifications
* before any included migrations are installed.
*
* @param mixed $old_state State returned by previous call of this method
* @return mixed Returns false after last step, otherwise temporary state
*/
function enable_step($old_state)
{
switch ($old_state)
@@ -56,12 +58,12 @@ function enable_step($old_state)
}

/**
* Overwrite disable_step to disable notifications
* before the extension is disabled.
*
* @param mixed $old_state State returned by previous call of this method
* @return mixed Returns false after last step, otherwise temporary state
*/
* Overwrite disable_step to disable notifications
* before the extension is disabled.
*
* @param mixed $old_state State returned by previous call of this method
* @return mixed Returns false after last step, otherwise temporary state
*/
function disable_step($old_state)
{
switch ($old_state)
@@ -86,12 +88,12 @@ function disable_step($old_state)
}

/**
* Overwrite purge_step to purge notifications before
* any included and installed migrations are reverted.
*
* @param mixed $old_state State returned by previous call of this method
* @return mixed Returns false after last step, otherwise temporary state
*/
* Overwrite purge_step to purge notifications before
* any included and installed migrations are reverted.
*
* @param mixed $old_state State returned by previous call of this method
* @return mixed Returns false after last step, otherwise temporary state
*/
function purge_step($old_state)
{
switch ($old_state)
22 changes: 12 additions & 10 deletions language/ca/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Gràcies esborrades',
'ACP_POSTS' => 'Tots els missatges',
'ACP_POSTSEND' => 'Missatges agraïts',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Operació cancel·lada',
'ALLOW_THANKS_PM_ON' => 'Envia\'m un PM si s\'agraeix un missatge meu',
'ALLOW_THANKS_EMAIL_ON' => 'Envia\'m un email si s\'agraeix un missatge meu',
));
]);
22 changes: 12 additions & 10 deletions language/ca/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Pot agraïr missatges',
'ACL_M_THANKS' => 'Pot esborrar la llista d\'agraïments',
'ACL_U_VIEWTHANKS' => 'Pot veure la llista de tots els agraïments',
'ACL_U_VIEWTOPLIST' => 'Pot veure la llista de més agraïts',
));
]);
38 changes: 20 additions & 18 deletions language/ca/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Esborrar la llista d\'agraïments',
'CLEAR_LIST_THANKS_CONFIRM' => 'Realment vols esborrar la llista d\'agraïments de l\'usuari?',
'CLEAR_LIST_THANKS_GIVE' => 'S\'ha esborrat la llista d\'agraïments fets per l\'usuari.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Vés al tema',

'FOR_MESSAGE' => ' per missatge',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' i un usuari més',
2 => ' i %d usuaris més',
),
],

'NO_VIEW_USERS_THANKS' => 'No tens permís per veure la llista d\'agraïments.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Agraïment rebut</strong> de %1$s pel missatge:',
2 => '<strong>Agraïments rebuts</strong> de %1$s pel missatge:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Agraïment cancel·lat</strong> de %1$s pel missatge:',
2 => '<strong>Agraïments cancel·lats</strong> de %1$s pel missatge:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Algú ha agraït un missatge teu',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Algú ha cancel·lat un agraïment en un missatge teu',

@@ -97,10 +99,10 @@
'THANK_TEXT_2PL' => ' pel missatge (%d en total):',
'THANK_POST' => 'Agraeix l\'autor del missatge: ',
'THANK_POST_SHORT' => 'Gràcies',
'THANKS' => array(
'THANKS' => [
1 => '%d cop',
2 => '%d cops',
),
],
'THANKS_BACK' => 'Torna',
'THANKS_INFO_GIVE' => 'Acabes d\'agrair el missatge.',
'THANKS_INFO_REMOVE' => 'Acabes de cancel·lar el teu agraïment.',
@@ -111,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Cancel·la l\'agraïment',
'THANKS_USER' => 'Llista d\'agraïments',
'TOPLIST' => 'Llista de més agraïts',
));
]);
2 changes: 1 addition & 1 deletion language/cs/email/user_thanks.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Předmět: {THANKS_SUBG} — "{POST_SUBJECT}"
Subject: {THANKS_SUBG} — "{POST_SUBJECT}"

Dobrý den {POSTER_NAME},

22 changes: 12 additions & 10 deletions language/cs/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Vymazaná zaznamemaná poděkování',
'ACP_POSTS' => 'Celkem příspěvků',
'ACP_POSTSEND' => 'Zbývající příspěvky s poděkováními',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Operace zrušena',
'ALLOW_THANKS_PM_ON' => 'Oznámit mi soukromou zprávou, pokud někdo poděkuje za můj příspěvek',
'ALLOW_THANKS_EMAIL_ON' => 'Oznámit mi e-mailem, pokud někdo poděkuje za můj příspěvek',
));
]);
22 changes: 12 additions & 10 deletions language/cs/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Může děkovat za příspěvky',
'ACL_M_THANKS' => 'Může vymazat seznam poděkování',
'ACL_U_VIEWTHANKS' => 'Může zobrazit seznam poděkování',
'ACL_U_VIEWTOPLIST' => 'Může zobrazit toplist',
));
]);
38 changes: 20 additions & 18 deletions language/cs/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Vymazat seznam poděkování',
'CLEAR_LIST_THANKS_CONFIRM' => 'Opravdu chcete uživatelův seznam poděkování?',
'CLEAR_LIST_THANKS_GIVE' => 'Seznam poděkování udělených uživatelem byl vymazán.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Přejdi na vlákno',

'FOR_MESSAGE' => ' za příspěvěk',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' a jeden další uživatel',
2 => ' a %d dalších uživatelů',
),
],

'NO_VIEW_USERS_THANKS' => 'Nemáte oprávnění zobrazit seznam poděkování.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Obdrženo poděkování </strong> od %1$s za příspěvek:',
2 => '<strong>Obdržena poděkování</strong> od %1$s za příspěvek:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Odebráno poděkování</strong> od %1$s za příspěvěk:',
2 => '<strong>Odebrána poděkování</strong> od %1$s za příspěvek:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Někdo poděkoval za váš příspěvek',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Někdo odebral poděkování za váš příspěvek',

@@ -97,10 +99,10 @@
'THANK_TEXT_2PL' => ' za příspěvky (celkem %d):',
'THANK_POST' => 'Poděkujte autorovi příspěvku: ',
'THANK_POST_SHORT' => 'Poděkujte',
'THANKS' => array(
'THANKS' => [
1 => '%d poděkování',
2 => '%d poděkování',
),
],
'THANKS_BACK' => 'Zpět',
'THANKS_INFO_GIVE' => 'Poděkoval jste za tuto zprávu.',
'THANKS_INFO_REMOVE' => 'Odebral jste poděkování.',
@@ -111,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Odebrané poděkování za příspěvek',
'THANKS_USER' => 'Seznam poděkování',
'TOPLIST' => 'Toplist',
));
]);
10 changes: 10 additions & 0 deletions language/da/email/user_thanks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Subject: {THANKS_SUBG} — "{POST_SUBJECT}"

Hello {POSTER_NAME},

You are receiving this notification because {USERNAME} {POST_THANKS} "{POST_SUBJECT}" at "{SITENAME}".

If you want to view the post, click the following link:
{U_POST_THANKS}

{EMAIL_SIG}
137 changes: 137 additions & 0 deletions language/da/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* rudi_br:
* Translated into danish and the "Thanks" term, which is "Tak" in danish, changed into "syntes godt om" / "Like"
*/
if (!defined('IN_PHPBB'))
{
exit;
}

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

// 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, [
'ACP_DELTHANKS' => 'Slettede gemte syntes godt om',
'ACP_POSTS' => 'Totale indlæg',
'ACP_POSTSEND' => 'Tilbageværende indlæg med syntes godt om',
'ACP_POSTSTHANKS' => 'Total antal indlæg med syntes godt om',
'ACP_THANKS' => 'Syntes godt om indlæg',
'ACP_THANKS_MOD_VER' => 'Extension version: ',
'ACP_THANKS_TRUNCATE' => 'Nulstil listen med syntes godt om',
'ACP_ALLTHANKS' => 'Synten godt om der er taget hensyn til',
'ACP_THANKSEND' => 'Tilbageværende antal syntes godt om der er taget hensyn til',
'ACP_THANKS_REPUT' => 'Rangering Muligheder',
'ACP_THANKS_REPUT_SETTINGS' => 'Rangering Muligheder',
'ACP_THANKS_REPUT_SETTINGS_EXPLAIN' => 'Sæt standard indstillinger for rangering af indlæg, emner og fora, baseret på dette syntes godt om system. <br /> Emne (imdlæg, emne eller forum) med det højeste antal syntes godt om får 100% rangering.',
'ACP_THANKS_SETTINGS' => 'Syntes godty om Indstillinger',
'ACP_THANKS_SETTINGS_EXPLAIN' => 'Standard syntes godt om indlægs indstillinger kan ændres her.',
'ACP_THANKS_REFRESH' => 'Opdater tællere',
'ACP_UPDATETHANKS' => 'Opdater gemte syntes godt om',
'ACP_USERSEND' => 'Tilbageværende brugere som syntes godt om',
'ACP_USERSTHANKS' => 'Total antal brugere som syntes godt om',

'GRAPHIC_BLOCK_BACK' => 'ext/gfksx/thanksforposts/images/rating/reput_block_back.gif',
'GRAPHIC_BLOCK_RED' => 'ext/gfksx/thanksforposts/images/rating/reput_block_red.gif',
'GRAPHIC_DEFAULT' => 'Billeder',
'GRAPHIC_OPTIONS' => 'Billede Muligheder',
'GRAPHIC_STAR_BACK' => 'ext/gfksx/thanksforposts/images/rating/reput_star_back.gif',
'GRAPHIC_STAR_BLUE' => 'ext/gfksx/thanksforposts/images/rating/reput_star_blue.gif',
'GRAPHIC_STAR_GOLD' => 'ext/gfksx/thanksforposts/images/rating/reput_star_gold.gif',

'IMG_THANKPOSTS' => 'Til syntes godt om indlægget',
'IMG_REMOVETHANKS' => 'Annuller syntes godt om',

'LOG_CONFIG_THANKS' => 'Opdaterede konfigurationen af syntes godt om udvidelsen',

'REFRESH' => 'Opdater',
'REMOVE_THANKS' => 'Fjern syntes godt om',
'REMOVE_THANKS_EXPLAIN' => 'Brugere kan fjerne syntes godt om hvis denne option er slået til.',

'STEPR' => ' - udført, skridt %s',

'THANKS_COUNTERS_VIEW' => 'Syntes godt om tællere',
'THANKS_COUNTERS_VIEW_EXPLAIN' => 'Hvis slået til, vil informations blokken for forfatteren vise antal udstedte/modtagne antal syntes godt om.',
'THANKS_FORUM_REPUT_VIEW' => 'Vis forum syntes godt om',
'THANKS_GLOBAL_POST' => 'Syntes godt om i Globale Meddelelser',
'THANKS_GLOBAL_POST_EXPLAIN' => 'Hvis slået til, vil syntes godt om være slået til i Globale Meddelelser.',
'THANKS_FORUM_REPUT_VIEW_EXPLAIN' => 'Hvis slået til, så vil forum rangering blive vist i forum listen.',
'THANKS_INFO_PAGE' => 'Informations beskeder',
'THANKS_INFO_PAGE_EXPLAIN' => 'Hvis slået til, så vil informations beskeder blive vist efter syntes godt om et indlæg er givet eller fjernet.',
'THANKS_NOTICE_ON' => 'Notifikationer er tilgængelige',
'THANKS_NOTICE_ON_EXPLAIN' => 'Hvis slået til, så er notifikationer tilgængelige og brugeren kan konfigurere notifikationen via din profil.',
'THANKS_NUMBER' => 'Antal syntes godt om fra listen vist i profilen',
'THANKS_NUMBER_EXPLAIN' => 'Maximum antal syntes godt om der vises når man ser en profil. <br /> <strong> Husk at det kan sløve forum ned hvis denne værdi sættes til mere end 250. </strong>',
'THANKS_NUMBER_DIGITS' => 'Antal decimaler i rangeringen',
'THANKS_NUMBER_DIGITS_EXPLAIN' => 'Angiv antal decimaler til rangerings værdien.',
'THANKS_NUMBER_ROW_REPUT' => 'Antal rækker i rangering topscope listen',
'THANKS_NUMBER_ROW_REPUT_EXPLAIN' => 'Angiv antal rækker der skal vises i indlæg, emner og fora rangerings topscore liste.',
'THANKS_NUMBER_POST' => 'Antal syntes godt om der vises i et indlæg',
'THANKS_NUMBER_POST_EXPLAIN' => 'Maximum antal syntes godt om der vises når man læser et indlæg. <br /> <strong> Husk at det kan sløve forum ned hvis denne værdi sættes til mere end 250. </strong>',
'THANKS_ONLY_FIRST_POST' => 'Kun for det første indlæg i et emne',
'THANKS_ONLY_FIRST_POST_EXPLAIN' => 'Hvis slået til, så kan brugere kun syntes godt om det første indlæg i et emne.',
'THANKS_POST_REPUT_VIEW' => 'Vis rangering for indlæg',
'THANKS_POST_REPUT_VIEW_EXPLAIN' => 'Hvis slået til, vises indlægs rangering når de vises i et emne.',
'THANKS_POSTLIST_VIEW' => 'Vis syntes godt om i indlæg',
'THANKS_POSTLIST_VIEW_EXPLAIN' => 'Hvis slået til, vises en liste af brugere der har syntes godt om forfatteren af indlæget. <br/> Bemærk at denne mulighed vil kun gælde hvis administratoren har slået rettigheder til at syntes godt om for indlæg i det forum.',
'THANKS_PROFILELIST_VIEW' => 'Vis syntes godt om i profiler',
'THANKS_PROFILELIST_VIEW_EXPLAIN' => 'Hvis slået til, så vises en komplet liste af syntes godt om inclusiv antal syntes godt om og hvilke indlæg en bruger har fået syntes godt om fra.',
'THANKS_REFRESH' => 'Opdater syntes godt om tællere',
'THANKS_REFRESH_EXPLAIN' => 'Herkan du opdatere syntes godt om tællere efter en bulk fjernelse af indlæg/emner/brugere, opdeling/sammenlægning af emner, opslag af eller fjernelse af globale meddelelser, slå muligheden til/fra for ’Kun det første indlæg i emnet’, ændre indlæg osv. Dette kan tage noget tid.<br /><strong>Vigtigt: For at det skal virke korrekt, så skal opdater tæller funktionen anvende MySQL version 4.1 eller senere!<br />Bemærk!<br /> - Opdatering vil slette alle syntes godt om for gæste indlæg!<br /> - Opdatering vil slette alle syntes godt om for globale meddelelser, hvis muligheden ’Syntes godt om i globale meddelelser’ er OFF!<br /> - Opdatering vil slette alle syntes godt om for alle indlæg undtagen det første indlæg i et emne, hvis muligheden ’Kun for det første indlæg i et emne’ er ON!</strong>',
'THANKS_REFRESH_MSG' => 'Dette kan tage et par minutter at fuldføre. Alle inkorrekte poster vil blive slettet! <br /> Handlingen kan ikke fortrydes!',
'THANKS_REFRESHED_MSG' => 'Tøllere opdateret',
'THANKS_REPUT_GRAPHIC' => 'Grafisk visning af rangeringen',
'THANKS_REPUT_GRAPHIC_EXPLAIN' => 'Hvis slået til, så vil rangerings værdien vises grafisk ved anvendelse af billederne nedenfor.',
'THANKS_REPUT_HEIGHT' => 'Grafik højde',
'THANKS_REPUT_HEIGHT_EXPLAIN' => 'Angiv højden af skyderen til rangeringen i pixels. <br /> <strong> Bemærk! For at kunne vises korrekt, skal du angive højden til det samme som højden af det efterfølgende billede! </strong>',
'THANKS_REPUT_IMAGE' => 'Hoved billedet for skyderen',
'THANKS_REPUT_IMAGE_DEFAULT' => '<strong>Grafisk forhåndsvisning</strong>',
'THANKS_REPUT_IMAGE_DEFAULT_EXPLAIN' => 'Selve billedet og stien til vissedet vises her. Billede størrelsen er 15x15 pixels. <br /> Du kan tegne dine egne billeder til forgrunden og baggrunden. <strong>Højden og bredden for billederne skal være ens for at sikre en korrekt skalering af grafikken.</strong>',
'THANKS_REPUT_IMAGE_EXPLAIN' => 'Stien - relativ til phpBB rod folder - til grafik skala billedet.',
'THANKS_REPUT_IMAGE_NOEXIST' => 'Hoved billedet til den grafiske skala findes ikke.',
'THANKS_REPUT_IMAGE_BACK' => 'Baggrunds billedet til den grafiske skyder',
'THANKS_REPUT_IMAGE_BACK_EXPLAIN' => 'Stien - relativ til phpBB installations folder - til den grafiske skala baggrunds billede.',
'THANKS_REPUT_IMAGE_BACK_NOEXIST' => 'Baggrunds billedet til den grafiske skala findes ikke.',
'THANKS_REPUT_LEVEL' => 'Antal billeder i den grafiske skala',
'THANKS_REPUT_LEVEL_EXPLAIN' => 'Max antal billeder svarer til 100% af værdien af rangerings skalaen i grafikken.',
'THANKS_TIME_VIEW' => 'Syntes godt om tid',
'THANKS_TIME_VIEW_EXPLAIN' => 'Hvis slået til, vil indlæg vise tiden for syntes godt om.',
'THANKS_TOP_NUMBER' => 'Antal brugere i top listen',
'THANKS_TOP_NUMBER_EXPLAIN' => 'Angiv antal brugere der skal vises i indexets topliste. 0 - off displaying toplist.',
'THANKS_TOPIC_REPUT_VIEW' => 'Vis emne rangering',
'THANKS_TOPIC_REPUT_VIEW_EXPLAIN' => 'Hvis slået til, så bliver rangering vist når man kikker i et forum.',
'TRUNCATE' => 'Nulstil',
'TRUNCATE_THANKS' => 'Nulstil syntes godt om listen',
'TRUNCATE_THANKS_EXPLAIN' => 'Denne procedure nulstiller alle syntes godt om tællere fuldstændigt (fjerner alle udstedte syntes godt om). <br /> Handlingen kan ikke fortrydes!',
'TRUNCATE_THANKS_MSG' => 'Syntes godt om tællere nulstillet.',
'REFRESH_THANKS_CONFIRM' => 'Vil du virkelig opdatere syntes godt om tællere?',
'TRUNCATE_THANKS_CONFIRM' => 'Vil du virkelig nulstille syntes godt om tællere?',
'TRUNCATE_NO_THANKS' => 'Operationen afbrudt',
'ALLOW_THANKS_PM_ON' => 'Notificer mig med et PM hvis noget syntes godt om mit indlæg',
'ALLOW_THANKS_EMAIL_ON' => 'Notificer mig med en e-mail hvis noget syntes godt om mit indlæg',
]);
44 changes: 44 additions & 0 deletions language/da/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* rudi_br:
* Translated into danish and the "Thanks" term, which is "Tak" in danish, changed into "syntes godt om" / "Like"
*/
if (!defined('IN_PHPBB'))
{
exit;
}

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

// 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, [
'ACL_F_THANKS' => 'Kan syntes godt om indlæg',
'ACL_M_THANKS' => 'Kan nulstille syntes godt om listen',
'ACL_U_VIEWTHANKS' => 'Kan se listen med alle syntes godt om',
'ACL_U_VIEWTOPLIST' => 'Kan se topscore listen',
]);
117 changes: 117 additions & 0 deletions language/da/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* rudi_br:
* Translated into danish and the "Thanks" term, which is "Tak" in danish, changed into "syntes godt om" / "Like"
*/
if (!defined('IN_PHPBB'))
{
exit;
}

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

// 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, [
'CLEAR_LIST_THANKS' => 'Nulstil syntes godt om liste',
'CLEAR_LIST_THANKS_CONFIRM' => 'Vil du virkelig nulstille brugerens syntes godt om liste?',
'CLEAR_LIST_THANKS_GIVE' => 'Syntes godt om listen fra brugeren blev nulstillet.',
'CLEAR_LIST_THANKS_POST' => 'Syntes godt om listen i beskeden blev nulstillet.',
'CLEAR_LIST_THANKS_RECEIVE' => 'Listen af syntes godt om opnået af brugeren blen nulstillet.',

'DISABLE_REMOVE_THANKS' => 'Sletning af syntes godt om er slået fra af administratoren',

'GIVEN' => 'Har&nbsp;syntes godt om',
'GLOBAL_INCORRECT_THANKS' => 'Du kan ikke syntes godt om en Global Meddelelse som ikke refererer til et specifikt forum.',
'GRATITUDES' => 'syntes godt om liste',

'INCORRECT_THANKS' => 'Ugyldigt syntes godt om',

'JUMP_TO_FORUM' => 'Gå til forum',
'JUMP_TO_TOPIC' => 'Gå til topic',

'FOR_MESSAGE' => ' for indlæg',
'FURTHER_THANKS' => [
1 => ' og flere brugere',
2 => ' og %d flere brugere',
],

'NO_VIEW_USERS_THANKS' => 'Du er ikke autoriseret til at se syntes godt om listen.',

'NOTIFICATION_THANKS_GIVE' => [
1 => '%1$s <strong>syntes godt om </strong> dit indlæg:',
2 => '%1$s <strong>syntes godt om</strong> dit indlæg:',
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Fjernede syntes godt om</strong> fra %1$s for indlæget:',
2 => '<strong>Fjernede syntes godt om</strong> fra %1$s for indlæget:',
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Nogen syntes godt om dit indlæg',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Nogen fjernede en syntes godt omfra dit indlæg',

'RECEIVED' => 'Er blevet&nbsp;syntes godt om',
'REMOVE_THANKS' => 'Fjern dit syntes godt om fra indlæg af: ',
'REMOVE_THANKS_CONFIRM' => 'Er du sikker på at du vil fjerne dit syntes godt om?',
'REMOVE_THANKS_SHORT' => 'Fjern syntes godt om',
'REPUT' => 'Rangering',
'REPUT_TOPLIST' => 'Syntes godt om topscore — %d',
'RATING_LOGIN_EXPLAIN' => 'Du er ikke autoriseret til at se topscore.',
'RATING_NO_VIEW_TOPLIST' => 'Du er ikke autoriseret til at se topscore.',
'RATING_VIEW_TOPLIST_NO' => 'Topscore er slået fra af administratoren',
'RATING_FORUM' => 'Forum',
'RATING_POST' => 'Indlæg',
'RATING_TOP_FORUM' => 'Ragnering forums',
'RATING_TOP_POST' => 'Ragnering indlæg',
'RATING_TOP_TOPIC' => 'Ragnering emner',
'RATING_TOPIC' => 'Emne',

'THANK' => 'tid',
'THANK_FROM' => 'fra',
'THANK_TEXT_1' => 'Disse brugere syntes godt om ',
'THANK_TEXT_2' => '&apos;s indlæg: ',
'THANK_TEXT_2PL' => '&apos;s indlæg (total %d):',
'THANK_POST' => 'Syntes godt om indlæget af: ',
'THANK_POST_SHORT' => 'Syntes godt om',
'THANKS' => [
1 => '%d gang',
2 => '%d gange',
],
'THANKS_BACK' => 'Tilbage',
'THANKS_INFO_GIVE' => 'Du har lige syntes godt om indlæget.',
'THANKS_INFO_REMOVE' => 'Du har lige fjernet dit syntes godt om.',
'THANKS_LIST' => 'Se/luk listen',
'THANKS_PM_MES_GIVE' => 'syntes godt om dit indlæg',
'THANKS_PM_MES_REMOVE' => 'har fjernet sit syntes godt om fra indlæget',
'THANKS_PM_SUBJECT_GIVE' => 'Syntes godt om indlæget',
'THANKS_PM_SUBJECT_REMOVE' => 'Fjernede syntes godt om indlæget',
'THANKS_USER' => 'Syntes godt om liste',
'TOPLIST' => 'Syntes godt om topscore',
]);
24 changes: 13 additions & 11 deletions language/de/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Entfernte Danksagungen',
'ACP_POSTS' => 'Beiträge insgesamt',
'ACP_POSTSEND' => 'Verbleibende Beiträge mit Danksagungen',
@@ -99,7 +101,7 @@
'THANKS_PROFILELIST_VIEW' => 'Danksagunsliste im Profil anzeigen',
'THANKS_PROFILELIST_VIEW_EXPLAIN' => 'Falls aktiviert, wird eine Liste aller Danksagungen, inklusive der Anzahl der Danksagungen und für welche Beiträge der Benutzer Danksagungen erhalten hat, angezeigt.',
'THANKS_REFRESH' => 'Danksagungszähler aktualisieren',
'THANKS_REFRESH_EXPLAIN' => 'Hier kannst du die Danksagungszähler aktualisieren, falls viele Beiträge, Themen oder Benutzt gelöscht wurden, Themen geteilt oder zusammengeführt wurden, globale Ankündigungen erstellt oder gelöscht wurden, die Einstellung "Nur für den ersten Beitrag in einem Thema" geändert wurde, Autoren von Themen geändert wurden, usw. Dies kann eine Weile dauern.<br /><strong>Hinweis: Damit diese Funktion richtig funkntioniert, wird MySQL in der Version 4.1 oder höher benötigt!<br />Achtung:<br /> - Das Aktualisieren wird alle Danksagungen in Gastbeiträgen löschen!<br /> - Das Aktualisieren wird alle Danksagungen in globalen Ankündigungen löschen, falls die Einstellung "Danksagungen in globalen Ankündigungen aktivieren" deaktiviert ist!<br /> - Das Aktualisieren wird alle Danksagungen, außer im ersten Beitrag eines Themas löschen, falls die Einstellung "Nur für den ersten Beitrag in einem Thema" aktiviert ist!</strong>',
'THANKS_REFRESH_EXPLAIN' => 'Hier kannst du die Danksagungszähler aktualisieren, falls viele Beiträge, Themen oder Benutzer gelöscht wurden, Themen geteilt oder zusammengeführt wurden, globale Ankündigungen erstellt oder gelöscht wurden, die Einstellung "Nur für den ersten Beitrag in einem Thema" geändert wurde, Autoren von Themen geändert wurden, usw. Dies kann eine Weile dauern.<br /><strong>Hinweis: Damit diese Funktion richtig funkntioniert, wird MySQL in der Version 4.1 oder höher benötigt!<br />Achtung:<br /> - Das Aktualisieren wird alle Danksagungen in Gastbeiträgen löschen!<br /> - Das Aktualisieren wird alle Danksagungen in globalen Ankündigungen löschen, falls die Einstellung "Danksagungen in globalen Ankündigungen aktivieren" deaktiviert ist!<br /> - Das Aktualisieren wird alle Danksagungen, außer im ersten Beitrag eines Themas löschen, falls die Einstellung "Nur für den ersten Beitrag in einem Thema" aktiviert ist!</strong>',
'THANKS_REFRESH_MSG' => 'Dies kann einige Minuten dauern. Alle ungültigen Danksagungen werden gelöscht!<br />Diese Aktion ist nicht umkehrbar!',
'THANKS_REFRESHED_MSG' => 'Danksagungszähler aktualisiert.',
'THANKS_REPUT_GRAPHIC' => 'Grafische Darstellung von Bewertungen',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Aktion wurde abgebrochen',
'ALLOW_THANKS_PM_ON' => 'Mich mittels Privater Nachricht benachrichtigen, wenn sich jemand bei mir bedankt.',
'ALLOW_THANKS_EMAIL_ON' => 'Mich mittels E-Mail benachrichtigen, wenn sich jemand bei mir bedankt.',
));
]);
22 changes: 12 additions & 10 deletions language/de/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Kann sich für Beiträge bedanken',
'ACL_M_THANKS' => 'Kann die Liste der Danksagungen löschen',
'ACL_U_VIEWTHANKS' => 'Kann die Liste aller Danksagungen sehen',
'ACL_U_VIEWTOPLIST' => 'Kann die Topliste sehen',
));
]);
38 changes: 20 additions & 18 deletions language/de/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Die Liste der Danksagungen löschen',
'CLEAR_LIST_THANKS_CONFIRM' => 'Möchtest du wirklich die Liste der Danksagungen des Benutzers löschen?',
'CLEAR_LIST_THANKS_GIVE' => 'Die Liste der Danksagungen des Benutzers wurde gelöscht',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Zum Thema wechseln',

'FOR_MESSAGE' => ' für den Beitrag',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' und ein weiterer Benutzer',
2 => ' und %d weitere Benutzer',
),
],

'NO_VIEW_USERS_THANKS' => 'Du hast keine Berechtigung, die Liste der Danksagungen zu sehen.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Danksagung erhalten</strong> von %1$s für den Beitrag:',
2 => '<strong>Danksagungen erhalten</strong> von %1$s für den Beitrag:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Danksagung entfernt</strong> von %1$s für den Beitrag:',
2 => '<strong>Danksagungen entfernt</strong> von %1$s für den Beitrag:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Jemand hat sich für deinen Beitrag bedankt.',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Jemand hat seine Danksagung für deinen Beitrag entfernt.',

@@ -97,10 +99,10 @@
'THANK_TEXT_2PL' => ' für den Beitrag (Insgesamt %d):',
'THANK_POST' => 'Bedanke dich beim Autor des Beitrags: ',
'THANK_POST_SHORT' => 'Danke',
'THANKS' => array(
'THANKS' => [
1 => '%d Mal',
2 => '%d Mal',
),
],
'THANKS_BACK' => 'Zurück',
'THANKS_INFO_GIVE' => 'Du hast dich für den Beitrag bedankt.',
'THANKS_INFO_REMOVE' => 'Du hast deine Danksagung entfernt.',
@@ -111,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Danksagung entfernt für den Beitrag',
'THANKS_USER' => 'Liste der Danksagungen',
'TOPLIST' => 'Beitragstopliste',
));
]);
22 changes: 12 additions & 10 deletions language/de_x_sie/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Entfernte Danksagungen',
'ACP_POSTS' => 'Beiträge insgesamt',
'ACP_POSTSEND' => 'Verbleibende Beiträge mit Danksagungen',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Aktion wurde abgebrochen',
'ALLOW_THANKS_PM_ON' => 'Mich mittels Privater Nachricht benachrichtigen, wenn sich jemand bei mir bedankt.',
'ALLOW_THANKS_EMAIL_ON' => 'Mich mittels E-Mail benachrichtigen, wenn sich jemand bei mir bedankt.',
));
]);
22 changes: 12 additions & 10 deletions language/de_x_sie/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Kann sich für Beiträge bedanken',
'ACL_M_THANKS' => 'Kann die Liste der Danksagungen löschen',
'ACL_U_VIEWTHANKS' => 'Kann die Liste aller Danksagungen sehen',
'ACL_U_VIEWTOPLIST' => 'Kann die Topliste sehen',
));
]);
38 changes: 20 additions & 18 deletions language/de_x_sie/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Die Liste der Danksagungen löschen',
'CLEAR_LIST_THANKS_CONFIRM' => 'Möchten Sie wirklich die Liste der Danksagungen des Benutzers löschen?',
'CLEAR_LIST_THANKS_GIVE' => 'Die Liste der Danksagungen des Benutzers wurde gelöscht',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Zum Thema wechseln',

'FOR_MESSAGE' => ' für den Beitrag',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' und ein weiterer Benutzer',
2 => ' und %d weitere Benutzer',
),
],

'NO_VIEW_USERS_THANKS' => 'Sie haben keine Berechtigung, die Liste der Danksagungen zu sehen.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Danksagung erhalten</strong> von %1$s für den Beitrag:',
2 => '<strong>Danksagungen erhalten</strong> von %1$s für den Beitrag:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Danksagung entfernt</strong> von %1$s für den Beitrag:',
2 => '<strong>Danksagungen entfernt</strong> von %1$s für den Beitrag:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Jemand hat sich für Ihren Beitrag bedankt.',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Jemand hat seine Danksagung für Ihren Beitrag entfernt.',

@@ -97,10 +99,10 @@
'THANK_TEXT_2PL' => ' für den Beitrag (Insgesamt %d):',
'THANK_POST' => 'Bedanken Sie sich beim Autor des Beitrags: ',
'THANK_POST_SHORT' => 'Danke',
'THANKS' => array(
'THANKS' => [
1 => '%d Mal',
2 => '%d Mal',
),
],
'THANKS_BACK' => 'Zurück',
'THANKS_INFO_GIVE' => 'Sie haben sich für den Beitrag bedankt.',
'THANKS_INFO_REMOVE' => 'Sie haben Ihre Danksagung entfernt.',
@@ -111,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Danksagung entfernt für den Beitrag',
'THANKS_USER' => 'Liste der Danksagungen',
'TOPLIST' => 'Beitragstopliste',
));
]);
24 changes: 13 additions & 11 deletions language/en/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Deleted recorded thanks',
'ACP_POSTS' => 'Total posts',
'ACP_POSTSEND' => 'Remaining posts with thanks',
@@ -99,7 +101,7 @@
'THANKS_PROFILELIST_VIEW' => 'List thanks in profile',
'THANKS_PROFILELIST_VIEW_EXPLAIN' => 'If enabled, a complete list of thanks including number of thanks and which posts a user has been thanked for will be displayed.',
'THANKS_REFRESH' => 'Update thanks counters',
'THANKS_REFRESH_EXPLAIN' => 'Here you can update thanks counters after a mass removal of posts/topics/users, splitting/merging of topics, setting/removing Global Announcement, enabling/disabling option "Only for the first post in the topic", changing posts owners and etc. This may take some time.<br /><strong>Important: To work correctly, the refresh counters function needs MySQL version 4.1 or later!<br />Attention!<br /> - Refreshing will erase all thanks for the guest posts!<br /> - Refreshing will erase all thanks for the Global Announcements, if the option `Thanks in Global Announcements` is OFF!<br /> - Refreshing will erase all thanks for all positions excepting the first in the topic, if the option `Only for the first post in the topic` is ON!</strong>',
'THANKS_REFRESH_EXPLAIN' => 'Here you can update thanks counters after a mass removal of posts/topics/users, splitting/merging of topics, setting/removing Global Announcement, enabling/disabling option Only for the first post in the topic, changing posts owners and etc. This may take some time.<br /><strong>Important: To work correctly, the refresh counters function needs MySQL version 4.1 or later!<br />Attention!<br /> - Refreshing will erase all thanks for the guest posts!<br /> - Refreshing will erase all thanks for the Global Announcements, if the option Thanks in Global Announcements is OFF!<br /> - Refreshing will erase all thanks for all posts except the first post in the topic, if the option Only for the first post in the topic is ON!</strong>',
'THANKS_REFRESH_MSG' => 'This can take a few minutes to complete. All incorrect thanks entries will be deleted! <br /> Action is not reversible!',
'THANKS_REFRESHED_MSG' => 'Counters updated',
'THANKS_REPUT_GRAPHIC' => 'Graphic display of the rating',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Operation canceled',
'ALLOW_THANKS_PM_ON' => 'Notify me PM if someone thanks my post',
'ALLOW_THANKS_EMAIL_ON' => 'Notify me e-mail if someone thanks my post',
));
]);
22 changes: 12 additions & 10 deletions language/en/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Can thank for posts',
'ACL_M_THANKS' => 'Can clear the thanks list',
'ACL_U_VIEWTHANKS' => 'Can view list of all thanks',
'ACL_U_VIEWTOPLIST' => 'Can view toplist',
));
]);
42 changes: 22 additions & 20 deletions language/en/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Clear Thanks List',
'CLEAR_LIST_THANKS_CONFIRM' => 'Do you really want to clear the user`s Thanks List?',
'CLEAR_LIST_THANKS_GIVE' => 'List of thanks issued by the user was cleared.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Jump to topic',

'FOR_MESSAGE' => ' for post',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' and one more user',
2 => ' and %d more users',
),
],

'NO_VIEW_USERS_THANKS' => 'You are not authorised to view the Thanks List.',

'NOTIFICATION_THANKS_GIVE' => array(
1 => '<strong>Received thank</strong> from %1$s for the post:',
2 => '<strong>Received thanks</strong> from %1$s for the post:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '%1$s <strong>has thanked</strong> you for this post:',
2 => '%1$s <strong>has thanked</strong> you for this post:',
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Removed thank</strong> from %1$s for the post:',
2 => '<strong>Removed thanks</strong> from %1$s for the post:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Someone thanks you for a post',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Someone removed thanks for your post',

@@ -97,10 +99,10 @@
'THANK_TEXT_2PL' => ' for the post (total %d):',
'THANK_POST' => 'Say Thanks to the author of the post: ',
'THANK_POST_SHORT' => 'Thanks',
'THANKS' => array(
'THANKS' => [
1 => '%d time',
2 => '%d times',
),
],
'THANKS_BACK' => 'Return',
'THANKS_INFO_GIVE' => 'You have just thanked for the post.',
'THANKS_INFO_REMOVE' => 'You have just removed your thank.',
@@ -111,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Removed thank for the post',
'THANKS_USER' => 'List of thanks',
'TOPLIST' => 'Posts toplist',
));
]);
22 changes: 12 additions & 10 deletions language/es/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Eliminar gracias',
'ACP_POSTS' => 'Mensajes totales',
'ACP_POSTSEND' => 'Mensajes con agradecimientos',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Operación cancelada',
'ALLOW_THANKS_PM_ON' => 'Notificar por MP si se agradece cualquiera de mis mensajes',
'ALLOW_THANKS_EMAIL_ON' => 'Notificar por email si se agradece cualquiera de mis mensajes',
));
]);
22 changes: 12 additions & 10 deletions language/es/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Puede agradecer mensajes',
'ACL_M_THANKS' => 'Puede limpiar la lista de agradecimientos',
'ACL_U_VIEWTHANKS' => 'Puede ver la lista de todos los agradecimientos',
'ACL_U_VIEWTOPLIST' => 'Puede ver la lista TOP',
));
]);
38 changes: 20 additions & 18 deletions language/es/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Limpiar lista de gracias',
'CLEAR_LIST_THANKS_CONFIRM' => '¿De verdad quieren limpiar la lista gracias a un usuario?',
'CLEAR_LIST_THANKS_GIVE' => 'La lista de gracias ha sido limpiada.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Ir al tema',

'FOR_MESSAGE' => ' por mensaje',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' y otro usario',
2 => ' y d% usuarios más',
),
],

'NO_VIEW_USERS_THANKS' => 'No está autorizado para ver la lista de gracias.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Agradecimiento recibido</strong> de %1$s por el mensaje:',
2 => '<strong>Agradecimientos recibidos</strong> de %1$s por el mensaje:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Agradecimiento eliminado</strong> de %1$s por el mensaje:',
2 => '<strong>Agradecimientos eliminados</strong> de %1$s por el mensaje:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Alguien le dio las gracias por su mensaje',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Alguien elimino el agradecimientos por su mensaje',

@@ -97,10 +99,10 @@
'THANK_TEXT_2PL' => ' por el mensaje (total %d):',
'THANK_POST' => 'De las gracias al autor del mensaje: ',
'THANK_POST_SHORT' => 'Gracias',
'THANKS' => array(
'THANKS' => [
1 => '%d vez',
2 => '%d veces',
),
],
'THANKS_BACK' => 'Volver',
'THANKS_INFO_GIVE' => 'Acaba de dar gracias por el mensaje.',
'THANKS_INFO_REMOVE' => 'Acaba de eliminar el agradecimiento.',
@@ -111,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Eliminar gracias',
'THANKS_USER' => 'Lista de gracias',
'TOPLIST' => 'Lista TOP de mensajes',
));
]);
23 changes: 12 additions & 11 deletions language/fr/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php
/**
*
* Thanks for posts extension for the phpBB Forum Software package.
* French translation by Galixte (http://www.galixte.com)
*
* @copyright (c) 2015 rxu
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -19,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -38,7 +39,7 @@
// ’ « » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Nombre de remerciements supprimés',
'ACP_POSTS' => 'Nombre de messages',
'ACP_POSTSEND' => 'Nombre de messages remerciés restants à prendre en compte',
@@ -136,4 +137,4 @@
'TRUNCATE_NO_THANKS' => 'L’opération a été annulée.',
'ALLOW_THANKS_PM_ON' => 'Notifier moi par message privé si quelqu’un remercie un de mes messages',
'ALLOW_THANKS_EMAIL_ON' => 'Notifier moi par e-mail si un quelqu’un remercie un de mes messages',
));
]);
23 changes: 12 additions & 11 deletions language/fr/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php
/**
*
* Thanks for posts extension for the phpBB Forum Software package.
* French translation by Galixte (http://www.galixte.com)
*
* @copyright (c) 2015 rxu
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -19,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -38,9 +39,9 @@
// ’ « » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Peut remercier les messages.',
'ACL_M_THANKS' => 'Peut purger la liste des remerciements.',
'ACL_U_VIEWTHANKS' => 'Peut voir la liste des remerciements.',
'ACL_U_VIEWTOPLIST' => 'Peut voir le Top du classement des remerciements.',
));
]);
39 changes: 20 additions & 19 deletions language/fr/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php
/**
*
* Thanks for posts extension for the phpBB Forum Software package.
* French translation by Galixte (http://www.galixte.com)
*
* @copyright (c) 2015 rxu
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -19,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -38,7 +39,7 @@
// ’ « » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Purger la liste des remerciements',
'CLEAR_LIST_THANKS_CONFIRM' => 'Confirmer la purge de la liste des remerciements.',
'CLEAR_LIST_THANKS_GIVE' => 'La liste des remerciements de cet utilisateur a été purgée.',
@@ -57,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Aller au sujet',

'FOR_MESSAGE' => ' pour le message',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' et un autre utilisateur',
2 => ' et %d autres utilisateurs',
),
],

'NO_VIEW_USERS_THANKS' => 'Vous n’êtes pas autorisé à voir la liste des remerciements.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Remerciement reçu</strong> de %1$s pour le message :',
2 => '<strong>Remerciements reçus</strong> de %1$s pour le message :',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Remerciement retiré</strong> de %1$s pour le message : ',
2 => '<strong>Remerciements retirés</strong> de %1$s pour le message : ',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Quelqu’un vous a remercié pour votre message.',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Quelqu’un a retiré son remerciement pour votre message.',

@@ -98,10 +99,10 @@
'THANK_TEXT_2PL' => ' pour son message (%d au total) : ',
'THANK_POST' => 'Remercier l’auteur de ce message : ',
'THANK_POST_SHORT' => 'Remercier',
'THANKS' => array(
'THANKS' => [
1 => '%d fois',
2 => '%d fois',
),
],
'THANKS_BACK' => 'Retour',
'THANKS_INFO_GIVE' => 'Vous venez de remercier l’auteur de ce message.',
'THANKS_INFO_REMOVE' => 'Vous venez de supprimer votre remerciement pour l’auteur de ce message.',
@@ -112,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Remerciement supprimé pour le message',
'THANKS_USER' => 'Liste des remerciements',
'TOPLIST' => 'Top du classement des remerciements',
));
]);
25 changes: 15 additions & 10 deletions language/hr/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
@@ -29,7 +34,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Obrisanih zapisa zahvala',
'ACP_POSTS' => 'Ukupno postova',
'ACP_POSTSEND' => 'Preostalo postova sa zahvalama',
@@ -121,4 +126,4 @@
'TRUNCATE_NO_THANKS' => 'Operacija poništena',
'ALLOW_THANKS_PM_ON' => 'Obavijesti me u PP ako mi netko zahvali na postu',
'ALLOW_THANKS_EMAIL_ON' => 'Obavijesti me na e-mail ako mi netko zahvali na postu',
));
]);
25 changes: 15 additions & 10 deletions language/hr/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
@@ -29,9 +34,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Možeš zahvaliti na post',
'ACL_M_THANKS' => 'Možeš obrisati listu zahvala',
'ACL_U_VIEWTHANKS' => 'Možeš vidjeti listu svih zahvala',
'ACL_U_VIEWTOPLIST' => 'Možeš vidjeti toplistu',
));
]);
42 changes: 24 additions & 18 deletions language/hr/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
@@ -33,7 +38,7 @@
// Some characters you may want to copy&paste:
// ’ » “ ” …
//
$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Brisanje liste zahvala',
'CLEAR_LIST_THANKS_CONFIRM' => 'Zaista želiš obrisati korisničku listu zahvala?',
'CLEAR_LIST_THANKS_GIVE' => 'Lista zahvala izdana korisnicima je obrisana.',
@@ -47,22 +52,23 @@
'JUMP_TO_FORUM' => 'Prebaci se na forum',
'JUMP_TO_TOPIC' => 'Prebaci se na temu',
'FOR_MESSAGE' => ' za post',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' i još jedan korisnik',
2 => ' i još %d korisnika',
),
],

'NO_VIEW_USERS_THANKS' => 'Nemaš ovlasti vidjeti Listu zahvala.',
'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Primljena zahvala</strong> od %1$s za post:',
2 => '<strong>Primljene zahvale</strong> od %1$s za post:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Uklonjena zahvala</strong> od %1$s za post:',
2 => '<strong>Uklonjene zahvale</strong> od %1$s za post:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Netko je zahvalio na tvojem postu',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Netko je uklonio zahvalu s tvojeg posta',

'RECEIVED' => '&nbsp;pohvaljen',
'REMOVE_THANKS' => 'Ukloni svoje zahvale: ',
'REMOVE_THANKS_CONFIRM' => 'Zaista želiš ukloniti svoje zahvale?',
@@ -86,10 +92,10 @@
'THANK_TEXT_2PL' => ' za post (ukupno %d):',
'THANK_POST' => 'Zahvali se autoru posta: ',
'THANK_POST_SHORT' => 'Hvala',
'THANKS' => array(
'THANKS' => [
1 => '%d put',
2 => '%d puta',
),
],
'THANKS_BACK' => 'Povrat',
'THANKS_INFO_GIVE' => 'Upravo si zahvalio na postu.',
'THANKS_INFO_REMOVE' => 'upravo si uklonio zahvalu.',
@@ -100,4 +106,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Ukloni zahvalu s posta',
'THANKS_USER' => 'Lista zahvala',
'TOPLIST' => 'Toplista postova',
));
]);
22 changes: 12 additions & 10 deletions language/pt/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Registos de mensagens de agradecimento apagados',
'ACP_POSTS' => 'Total de mensagens',
'ACP_POSTSEND' => 'Restantes mensagens com agradecimentos',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Operação cancelada',
'ALLOW_THANKS_PM_ON' => 'Notificar-me por Mensagem Privada dos agradecimentos às minhas mensagens',
'ALLOW_THANKS_EMAIL_ON' => 'Notificar-me por email dos agradecimentos às minhas mensagens',
));
]);
22 changes: 12 additions & 10 deletions language/pt/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Pode agradecer pela mensagem',
'ACL_M_THANKS' => 'Pode eliminar os agradecimentos da lista',
'ACL_U_VIEWTHANKS' => 'Pode ver a lista de todos os agradecimentos',
'ACL_U_VIEWTOPLIST' => 'Pode ver a Toplist',
));
]);
38 changes: 20 additions & 18 deletions language/pt/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Limpar lista de agradecimentos',
'CLEAR_LIST_THANKS_CONFIRM' => 'Tem a certeza que deseja limpar a sua lista de agradecimentos?',
'CLEAR_LIST_THANKS_GIVE' => 'Lista de agradecimentos dados foi limpa.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Ir para o Tópico',

'FOR_MESSAGE' => ' pela mensagem',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' e mais um utilizador',
2 => ' em mais %d utilizadores',
),
],

'NO_VIEW_USERS_THANKS' => 'Não tem autorização para ver a lista de agradecimentos.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Agradecimento recebido</strong> de %1$s pela mensagem:',
2 => '<strong>Agradecimentos recebidos</strong> de %1$s pela mensagem:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Agradecimento eliminado</strong> de %1$s pela mensagem:',
2 => '<strong>Agradecimentos eliminados</strong> de %1$s pela mensagem:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Alguém agradece pela mensagem',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Alguém eliminou o agradecimento da mensagem ',

@@ -97,10 +99,10 @@
'THANK_TEXT_2PL' => ' pela mensagem (total %d):',
'THANK_POST' => 'Agradecer por esta mensagem ao autor: ',
'THANK_POST_SHORT' => 'Obrigado',
'THANKS' => array(
'THANKS' => [
1 => '%d vez',
2 => '%d vezes',
),
],
'THANKS_BACK' => 'Voltar',
'THANKS_INFO_GIVE' => 'Agradeceu ao autor.',
'THANKS_INFO_REMOVE' => 'Retirou agradecimentos ao autor.',
@@ -111,4 +113,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Retirar agradecimento',
'THANKS_USER' => 'Lista de agradecimentos',
'TOPLIST' => 'TOP lista mensagens',
));
]);
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Deleted recorded thanks',
'ACP_POSTS' => 'Total posts',
'ACP_POSTSEND' => 'Remaining posts with thanks',
@@ -99,7 +101,7 @@
'THANKS_PROFILELIST_VIEW' => 'List thanks in profile',
'THANKS_PROFILELIST_VIEW_EXPLAIN' => 'If enabled, a complete list of thanks including number of thanks and which posts a user has been thanked for will be displayed.',
'THANKS_REFRESH' => 'Update thanks counters',
'THANKS_REFRESH_EXPLAIN' => 'Here you can update thanks counters after a mass removal of posts/topics/users, splitting/merging of topics, setting/removing Global Announcement, enabling/disabling option "Only for the first post in the topic", changing posts owners and etc. This may take some time.<br /><strong>Important: To work correctly, the refresh counters function needs MySQL version 4.1 or later!<br />Attention!<br /> - Refreshing will erase all thanks for the guest posts!<br /> - Refreshing will erase all thanks for the Global Announcements, if the option `Thanks in Global Announcements` is OFF!<br /> - Refreshing will erase all thanks for all positions excepting the first in the topic, if the option `Only for the first post in the topic` is ON!</strong>',
'THANKS_REFRESH_EXPLAIN' => 'Here you can update thanks counters after a mass removal of posts/topics/users, splitting/merging of topics, setting/removing Global Announcement, enabling/disabling option Only for the first post in the topic, changing posts owners and etc. This may take some time.<br /><strong>Important: To work correctly, the refresh counters function needs MySQL version 4.1 or later!<br />Attention!<br /> - Refreshing will erase all thanks for the guest posts!<br /> - Refreshing will erase all thanks for the Global Announcements, if the option Thanks in Global Announcements is OFF!<br /> - Refreshing will erase all thanks for all posts except the first post in the topic, if the option Only for the first post in the topic is ON!</strong>',
'THANKS_REFRESH_MSG' => 'This can take a few minutes to complete. All incorrect thanks entries will be deleted! <br /> Action is not reversible!',
'THANKS_REFRESHED_MSG' => 'Counters updated',
'THANKS_REPUT_GRAPHIC' => 'Graphic display of the rating',
@@ -131,4 +133,4 @@
'TRUNCATE_NO_THANKS' => 'Operation canceled',
'ALLOW_THANKS_PM_ON' => 'Notify me PM if someone thanks my post',
'ALLOW_THANKS_EMAIL_ON' => 'Notify me e-mail if someone thanks my post',
));
]);
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Pode agradecer por posts',
'ACL_M_THANKS' => 'Pode limpar a lista de agradecimentos',
'ACL_U_VIEWTHANKS' => 'Pode ver a lista de agradecimentos',
'ACL_U_VIEWTOPLIST' => 'Pode ver a toplist de agradecimentos',
));
]);
38 changes: 20 additions & 18 deletions language/pt-br/thanks_mod.php → language/pt_br/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Limpar Lista de Agradecimento',
'CLEAR_LIST_THANKS_CONFIRM' => 'Quer realmente limpar esta lista?',
'CLEAR_LIST_THANKS_GIVE' => 'Lista de agradecimentos foi limpa.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Ir ao tópico',

'FOR_MESSAGE' => ' pelo post',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' e mais um usuário',
2 => ' e mais %d usuários',
),
],

'NO_VIEW_USERS_THANKS' => 'Você não tem autorização para ver a lista de agradecimentos.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Recebeu agradecimento</strong> de %1$s pelo post:',
2 => '<strong>Recebeu agradecimentos</strong> de %1$s pelo post:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Removido agradecimento</strong> de %1$s pelo post:',
2 => '<strong>Removidos agradecimentos</strong> de %1$s pelo post:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Alguém agradeceu seu post',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Alguém removeu o agradecimento pelo seu post',

@@ -98,10 +100,10 @@
'THANK_TEXT_2PL' => ' pelo post (total %d):',
'THANK_POST' => 'Agradeça ao autor pelo post: ',
'THANK_POST_SHORT' => 'Agradeça',
'THANKS' => array(
'THANKS' => [
1 => '%d vez',
2 => '%d vezes',
),
],
'THANKS_BACK' => 'Voltar',
'THANKS_INFO_GIVE' => 'Você agradeceu o post.',
'THANKS_INFO_REMOVE' => 'Você removeu seu agradecimento.',
@@ -112,4 +114,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Removido agradecimento pelo post',
'THANKS_USER' => 'Lista de agradecimentos',
'TOPLIST' => 'Posts toplist',
));
]);
22 changes: 12 additions & 10 deletions language/ru/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Удалено учтённых благодарностей',
'ACP_POSTS' => 'Всего сообщений',
'ACP_POSTSEND' => 'Осталось сообщений с благодарностями',
@@ -130,4 +132,4 @@
'TRUNCATE_NO_THANKS' => 'Действие отменено',
'ALLOW_THANKS_PM_ON' => 'Получать уведомления о благодарностях в ЛС',
'ALLOW_THANKS_EMAIL_ON' => 'Получать уведомления о благодарностях по Email',
));
]);
22 changes: 12 additions & 10 deletions language/ru/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Может благодарить за сообщения',
'ACL_M_THANKS' => 'Может очищать список благодарностей',
'ACL_U_VIEWTHANKS' => 'Может просматривать лист всех благодарностей',
'ACL_U_VIEWTOPLIST' => 'Может просматривать топлист',
));
]);
38 changes: 20 additions & 18 deletions language/ru/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Очистить список благодарностей',
'CLEAR_LIST_THANKS_CONFIRM' => 'Вы действительно хотите очистить список благодарностей пользователя?',
'CLEAR_LIST_THANKS_GIVE' => 'Cписок благодарностей, выданных пользователем, очищен.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Перейти в тему',

'FOR_MESSAGE' => ' за сообщение',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' и ещё один',
2 => ' и ещё %d',
),
],

'NO_VIEW_USERS_THANKS' => 'У вас нет доступа к просмотру списка благодарностей.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Получена благодарность</strong> от пользователя %1$s за сообщение:',
2 => '<strong>Получены благодарности</strong> от пользователей %1$s за сообщение:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Удалена благодарность</strong> от пользователя %1$s за сообщение:',
2 => '<strong>Удалены благодарности</strong> от пользователей %1$s за сообщение:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Вас поблагодарили за сообщение',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Удалена благодарность за ваше сообщение',

@@ -97,11 +99,11 @@
'THANK_TEXT_1' => 'За это сообщение автора ',
'THANK_TEXT_2' => ' поблагодарил:',
'THANK_TEXT_2PL' => ' поблагодарили (всего %d):',
'THANKS' => array(
'THANKS' => [
1 => '%d раз',
2 => '%d раза',
3 => '%d раз',
),
],
'THANKS_BACK' => 'Вернуться к листу благодарностей',
'THANKS_INFO_GIVE' => 'Вы поблагодарили автора сообщения',
'THANKS_INFO_REMOVE' => 'Вы отменили благодарность автору',
@@ -112,4 +114,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Благодарность за сообщение отменена',
'THANKS_USER' => 'Лист благодарностей',
'TOPLIST' => 'Топлист сообщений',
));
]);
10 changes: 10 additions & 0 deletions language/sk/email/user_thanks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Subject: {THANKS_SUBG} — "{POST_SUBJECT}"

Dobry den {POSTER_NAME},

Obdrzali ste toto upozornenie, pretoze {USERNAME} {POST_THANKS} "{POST_SUBJECT}" na stranke "{SITENAME}".

Pokial chcete prispevok zobrazit, kliknite na nasledujuci odkaz :
{U_POST_THANKS}

{EMAIL_SIG}
136 changes: 136 additions & 0 deletions language/sk/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// 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, [
'ACP_DELTHANKS' => 'Vymazané zaznamenané poďakovania',
'ACP_POSTS' => 'Celkom príspevkov',
'ACP_POSTSEND' => 'Zostávajúce príspevky s poďakovaním',
'ACP_POSTSTHANKS' => 'Celkom príspevkov s poďakovaním',
'ACP_THANKS' => 'Poďakovania za príspevky',
'ACP_THANKS_MOD_VER' => 'Verzia rozšírenia',
'ACP_THANKS_TRUNCATE' => 'Vymazať zoznam poďakovaní',
'ACP_ALLTHANKS' => 'Poďakovania zobraté v úvahu',
'ACP_THANKSEND' => 'Poďakovania, ktoré zostávajú zobrať v úvahu',
'ACP_THANKS_REPUT' => 'Voľby hodnotenia',
'ACP_THANKS_REPUT_SETTINGS' => 'Voľby hodnotenia',
'ACP_THANKS_REPUT_SETTINGS_EXPLAIN' => 'Tu môžete nastaviť predvolené nastavenia pre hodnotenia príspevkov, tém a fór na základe systému poďakovania.<br /> Predmet (príspevok, téma aleboo fórum) s najväčším celkovým počtom poďakovaní bude mať 100 % hodnotenie.',
'ACP_THANKS_SETTINGS' => 'Nastavenie poďakovaní',
'ACP_THANKS_SETTINGS_EXPLAIN' => 'Predvolené nastavenia poďakovaní za príspevky môžu byť zmenené tu.',
'ACP_THANKS_REFRESH' => 'Aktualizovať počítadlá',
'ACP_UPDATETHANKS' => 'Aktualizované zaznamenané poďakovania',
'ACP_USERSEND' => 'Zostávajuci užívatelia, ktorí poďakovali',
'ACP_USERSTHANKS' => 'Celkom užívateľov, ktoří poďakovali',

'GRAPHIC_BLOCK_BACK' => 'ext/gfksx/thanksforposts/images/rating/reput_block_back.gif',
'GRAPHIC_BLOCK_RED' => 'ext/gfksx/thanksforposts/images/rating/reput_block_red.gif',
'GRAPHIC_DEFAULT' => 'Obrázky',
'GRAPHIC_OPTIONS' => 'Voľby grafiky',
'GRAPHIC_STAR_BACK' => 'ext/gfksx/thanksforposts/images/rating/reput_star_back.gif',
'GRAPHIC_STAR_BLUE' => 'ext/gfksx/thanksforposts/images/rating/reput_star_blue.gif',
'GRAPHIC_STAR_GOLD' => 'ext/gfksx/thanksforposts/images/rating/reput_star_gold.gif',

'IMG_THANKPOSTS' => 'Poďakovanie za príspevok',
'IMG_REMOVETHANKS' => 'Zrušenie poďakovania',

'LOG_CONFIG_THANKS' => 'Aktualizovaná konfigurácia rozšírenia "Ďakujeme za príspevok"',

'REFRESH' => 'Obnoviť',
'REMOVE_THANKS' => 'Odobrať poďakovanie',
'REMOVE_THANKS_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, užívatelia môžu odobrať poďakovanie.',

'STEPR' => ' - spustené, krok %s',

'THANKS_COUNTERS_VIEW' => 'Počítadlá poďakovaní',
'THANKS_COUNTERS_VIEW_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, bude sa u autora zobrazovať blok informácií s vydanými a obdržanými poďakovaniami.',
'THANKS_FORUM_REPUT_VIEW' => 'Zobraziť hodnotenia fór',
'THANKS_GLOBAL_POST' => 'Poďakovania v globálnych oznámeniach',
'THANKS_GLOBAL_POST_EXPLAIN' => 'Povolí poďakovania v globálnych oznámeniach',
'THANKS_FORUM_REPUT_VIEW_EXPLAIN' => 'Pokiaľ je táto voľba povolená, v zozname fór se bude zobrazovať hodnotenie fór.',
'THANKS_INFO_PAGE' => 'Informatívne správy',
'THANKS_INFO_PAGE_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, po udelení /odobratí poďakovania sa zobrazí informatívna správa.',
'THANKS_NOTICE_ON' => 'Upozornenia sú dostupné',
'THANKS_NOTICE_ON_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, upozornenia sú dostupné a užívateľ ich môže konfigurovať cez svoj profil.',
'THANKS_NUMBER' => 'Počet poďakovaní zo zoznamu zobrazených v profile',
'THANKS_NUMBER_EXPLAIN' => 'Maximálny počet poďakovaní zobrazený pri prezeraní profilu. <br/> <strong> Pamätajte, že nastavenie hodnoty nad 250 bude znamenať spomalenie. </strong>',
'THANKS_NUMBER_DIGITS' => 'Počet desatinných miest pre hodnotenia',
'THANKS_NUMBER_DIGITS_EXPLAIN' => 'Uveďte počet desatinných miest pre hodnotu hodnotení.',
'THANKS_NUMBER_ROW_REPUT' => 'Počet riadkov hodnotení v topliste',
'THANKS_NUMBER_ROW_REPUT_EXPLAIN' => 'Uveďte počet riadkov v zobrazení v topliste príspevkov, tém a fór.',
'THANKS_NUMBER_POST' => 'Počet poďakovaní zobrazený v príspevku',
'THANKS_NUMBER_POST_EXPLAIN' => 'Maximálny počet poďakovaní zobrazených pri prezeraní príspevku. <br/> <strong> Pamätajte, že nastavenie hodnoty nad 250 bude znamenať spomalenie. </strong>',
'THANKS_ONLY_FIRST_POST' => 'Poďakovať iba za prvný príspevok v téme',
'THANKS_ONLY_FIRST_POST_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, užívatelia môžu poďakovať iba za prvý príspevok v téme.',
'THANKS_POST_REPUT_VIEW' => 'Ukazovať hodnotenie príspevku',
'THANKS_POST_REPUT_VIEW_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, pri zobrazovaní témy bude zobrazené hodnotenie príspevku.',
'THANKS_POSTLIST_VIEW' => 'Zobraziť poďakovania v príspevku',
'THANKS_POSTLIST_VIEW_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, bude zobrazený zoznam užívateľov, ktorí poďakovali autorovi za zobrazený príspevok. <br/>Táto voľba bude mať vplyv iba keď administrátor povolil oprávnenia k udeleniu poďakovaní za príspevok v danom fóre.',
'THANKS_PROFILELIST_VIEW' => 'Zobraziť poďakovania v profile',
'THANKS_PROFILELIST_VIEW_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, bude zobrazený úplný zoznam poďakovaní vrátane počtu poďakovaní a za ktoré prispevky bolo uživateľovi paďakované.',
'THANKS_REFRESH' => 'Obnoviť počítadlá poďakovaní',
'THANKS_REFRESH_EXPLAIN' => 'Tu môžete aktualizovať počítadlá poďakovaní po hromadnom odstránení príspevkov / tém / užívateľov, rozdelení / spojení tém, nastavení / odstránení globálneho oznámenia, povolenie / zakázanie voľby "Iba prvý príspevok v téme", zmene vlastníkov príspevku a podobne. Toto môže nejaký čas trvať.<br/><strong>Dôležité : Aby funkcia obnovenia počítadiel fungovala správne, je potrebné mať verziue MySQL 4.1 alebo vyššiu!<br/>Upozornenie !<br/> - Obnovenie vymaže všetky poďakovania príspevkov od hostí !<br /> - Obnovenie vymaže všetky poďakovania v globálnych oznámeniach ak je voľba `Poďakovania v globálnych oznámeniach` vypnutá !<br/> - Obnovenie odstráni všetky poďakovania s výnimkou poďakovania za prvý príspevok ak je zapnutá volba `Poďakovať iba za prvý príspevok v téme`!</strong>',
'THANKS_REFRESH_MSG' => 'Toto môže trvať niekoľko minút. Všetky nesprávne poďakovania budu vymazané <br/> Akcie je nenávratné !',
'THANKS_REFRESHED_MSG' => 'Počítadlá aktualizované',
'THANKS_REPUT_GRAPHIC' => 'Grafické zobrazenie hodnotení',
'THANKS_REPUT_GRAPHIC_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, hodnotenie bude zobrazené graficky s použitím obrázkov nižšie.',
'THANKS_REPUT_HEIGHT' => 'Výška stupnice',
'THANKS_REPUT_HEIGHT_EXPLAIN' => 'Uveďte výšku stupnice v pixeloch.<br/><strong>Pozor ! Aby sa stupnica v grafike zobrazovala správne, mali by ste uviesť uvést výšku zhodnú s výškou následujúceho obrázku ! </strong>',
'THANKS_REPUT_IMAGE' => 'Hlavný obrázok pre stupnicu',
'THANKS_REPUT_IMAGE_DEFAULT' => '<strong>Náhľad grafiky</strong>',
'THANKS_REPUT_IMAGE_DEFAULT_EXPLAIN' => 'Tu môžete vidieť samostatný obrázok a cestu k obrázku. Jeho veľkosť je 15 x 15 pixelox. <br/> Môžete si nakresliť vlastné obrázky pre popredia a pozadie. K tomu môžete využiť súbor "reput_star_.psd" v adresary "contrib". <strong>Výška a šírka obrázku by mala byť rovnaká pre zaistenie správnej konštrukcie stupnice v grafike.</strong>',
'THANKS_REPUT_IMAGE_EXPLAIN' => 'Cesta (relatívna ku koreňovému adresářu phpBB) k obrázku na stupnici v grafike.',
'THANKS_REPUT_IMAGE_NOEXIST' => 'Hlavný obrázok pre stupnicu nebol nájdený.',
'THANKS_REPUT_IMAGE_BACK' => 'Obrázok na pozadie stupnice v grafike',
'THANKS_REPUT_IMAGE_BACK_EXPLAIN' => 'Cesta (relatívna ku koreňovému adresářu phpBB) k obrázku na pozadie stupnice v grafike.',
'THANKS_REPUT_IMAGE_BACK_NOEXIST' => 'Obrázok na pozadie stupnice nebol nájdený.',
'THANKS_REPUT_LEVEL' => 'Počet obrázkov v stupnici',
'THANKS_REPUT_LEVEL_EXPLAIN' => 'Maximálny počet obrázkov zodpovedajúci 100 % hodnoty hodnotiacej stupnice v grafike',
'THANKS_TIME_VIEW' => 'Čas poďakovania',
'THANKS_TIME_VIEW_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, bude sa u poďakovania zobrazovať čas.',
'THANKS_TOP_NUMBER' => 'Počet užívateľov v topliste',
'THANKS_TOP_NUMBER_EXPLAIN' => 'Uveďte počet užívateľov, ktorí sa majú zobraziť v topliste. 0 - vypnúť zobrazenie topliste.',
'THANKS_TOPIC_REPUT_VIEW' => 'Zobraziť hodnotenie tém',
'THANKS_TOPIC_REPUT_VIEW_EXPLAIN' => 'Pokiaľ je táto možnosť povolená, bude sa pri zobrazení fóra zobrazovať hodnotenie tém.',
'TRUNCATE' => 'Vymazať',
'TRUNCATE_THANKS' => 'Vymazať zoznam poďakovaní',
'TRUNCATE_THANKS_EXPLAIN' => 'Táto procedúra úplne vymaže všetky počítadlá poďakovaní (odstráni všetky udelené poďakovania). <br /> Akcia je nenávratná !',
'TRUNCATE_THANKS_MSG' => 'Počítadlá poďakovaní boli vymazané.',
'REFRESH_THANKS_CONFIRM' => 'Naozaj chcete obnoviť počítadlá poďakovaní ?',
'TRUNCATE_THANKS_CONFIRM' => 'Naozaj chcete vymazať počítadlá poďakovaní ?',
'TRUNCATE_NO_THANKS' => 'Operácia bola zrušená',
'ALLOW_THANKS_PM_ON' => 'Oznámiť mi súkromnou správou, pokiaľ niekto poďakuje za môj príspevok',
'ALLOW_THANKS_EMAIL_ON' => 'Oznámiť mi e-mailom, pokiaľ niekto poďakuje za môj príspevok',
]);
43 changes: 43 additions & 0 deletions language/sk/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// 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, [
'ACL_F_THANKS' => 'Môže poďakovať za príspevky',
'ACL_M_THANKS' => 'Môže vymazať zoznam poďakovaní',
'ACL_U_VIEWTHANKS' => 'Môže zobraziť zoznam poďakovaní',
'ACL_U_VIEWTOPLIST' => 'Môže zobraziť toplist',
]);
116 changes: 116 additions & 0 deletions language/sk/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// 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, [
'CLEAR_LIST_THANKS' => 'Vymazať zoznam poďakovaní',
'CLEAR_LIST_THANKS_CONFIRM' => 'Naozaj chcete vymazať zoznam poďakovaní užívateľa ?',
'CLEAR_LIST_THANKS_GIVE' => 'Zoznam poďakovaní udelený používateľom bol vymazaný.',
'CLEAR_LIST_THANKS_POST' => 'Zoznam poďakovaní v správe bol vymazaný.',
'CLEAR_LIST_THANKS_RECEIVE' => 'Zoznam poďakovaní získaný používateľom bol vymazaný..',

'DISABLE_REMOVE_THANKS' => 'Odstránenie poďakovania je zakázané správcom.',

'GIVEN' => 'Dal&nbsp;poďakovanie',
'GLOBAL_INCORRECT_THANKS' => 'Nemôžete poďakovať za globálne oznámenie, ktoré sa netýka konkrétneho fóra.',
'GRATITUDES' => 'Poďakovanie',

'INCORRECT_THANKS' => 'Neplatné poďakovanie',

'JUMP_TO_FORUM' => 'Prejsť na fórum',
'JUMP_TO_TOPIC' => 'Prejsť na tému',

'FOR_MESSAGE' => ' za príspevok',
'FURTHER_THANKS' => [
1 => ' a daľší užívateľ',
2 => ' a %d daľších užívateľov',
],

'NO_VIEW_USERS_THANKS' => 'Nemáte oprávnenie zobraziť zoznam poďakovaní.',

'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Obdržané poďakovanie</strong> od %1$s za príspevok :',
2 => '<strong>Obdržané poďakovania</strong> od %1$s za príspevok :',
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Odobrané poďakovanie</strong> od %1$s za príspevok :',
2 => '<strong>Odobráné poďakovania</strong> od %1$s za príspevok :',
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Niekto poďakoval za váš príspevok.',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Niekto odobral poďakovanie za váš príspevok.',

'RECEIVED' => 'Dostal&nbsp;poďakovanie',
'REMOVE_THANKS' => 'Odobrať poďakovanie : ',
'REMOVE_THANKS_CONFIRM' => 'Naozaj chcete odobrať poďakovanie ?',
'REMOVE_THANKS_SHORT' => 'Odobrať poďakovanie',
'REPUT' => 'Hodnotenie',
'REPUT_TOPLIST' => 'Toplist — %d',
'RATING_LOGIN_EXPLAIN' => 'Pre zobrazenie toplistu musíte byť prihlásený.',
'RATING_NO_VIEW_TOPLIST' => 'Nemáte oprávnenie na zobrazenie toplistu.',
'RATING_VIEW_TOPLIST_NO' => 'Toplist je prázdny alebo zakázaný administrátorom',
'RATING_FORUM' => 'Fórum',
'RATING_POST' => 'Príspevok',
'RATING_TOP_FORUM' => 'Fóra s najviac poďakovaniami',
'RATING_TOP_POST' => 'Príspevky s najviac poďakovaniami',
'RATING_TOP_TOPIC' => 'Témy s najviac poďakovaniami',
'RATING_TOPIC' => 'Téma',

'THANK' => 'krát',
'THANK_FROM' => 'od',
'THANK_TEXT_1' => 'Títo uživatelia poďakovali autorovi ',
'THANK_TEXT_2' => ' za príspevok : ',
'THANK_TEXT_2PL' => ' za príspevky (celkom %d):',
'THANK_POST' => 'Poďakujte autorovi príspevku : ',
'THANK_POST_SHORT' => 'Poďakujte',
'THANKS' => [
1 => '%d krát',
2 => '%d krát',
],
'THANKS_BACK' => 'Späť',
'THANKS_INFO_GIVE' => 'Poďakoval ste za túto správu.',
'THANKS_INFO_REMOVE' => 'Odobral ste poďakovanie.',
'THANKS_LIST' => 'Zobraz / zavri prehľad',
'THANKS_PM_MES_GIVE' => 'vám poďakoval za príspevok',
'THANKS_PM_MES_REMOVE' => 'odobral poďakovanie za príspevok',
'THANKS_PM_SUBJECT_GIVE' => 'Poďakovanie za príspevok',
'THANKS_PM_SUBJECT_REMOVE' => 'Odobrané poďakovanie za príspevok',
'THANKS_USER' => 'Zoznam poďakovaní',
'TOPLIST' => 'Toplist',
]);
10 changes: 10 additions & 0 deletions language/tr/email/user_thanks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Konu: {THANKS_SUBG} — "{POST_SUBJECT}"

Merhaba {POSTER_NAME},

BU mesajı alma nedeniniz "{SITENAME}" adresinde "{POST_SUBJECT}" mesajınıza {USERNAME} tarafından {POST_THANKS} aldınız.

Teşekkür aldığınız mesajı görmek istiyorsanız, aşağıdaki bağlantıyı tıklayın.:
{U_POST_THANKS}

{EMAIL_SIG}
136 changes: 136 additions & 0 deletions language/tr/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// 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, [
'ACP_DELTHANKS' => 'Kayıtlı teşekkürler silindi',
'ACP_POSTS' => 'Toplam mesaj',
'ACP_POSTSEND' => 'Remaining posts with thanks',
'ACP_POSTSTHANKS' => 'Teşekkür alan toplam mesajlar',
'ACP_THANKS' => 'Mesajlar için teşekkür',
'ACP_THANKS_MOD_VER' => 'Versiyon: ',
'ACP_THANKS_TRUNCATE' => 'Teşekkür listesini temizle',
'ACP_ALLTHANKS' => 'Teşekkürler dikkate alındı',
'ACP_THANKSEND' => 'Dikkate almak için kalan teşekkürler',
'ACP_THANKS_REPUT' => 'Değerlendirme Seçenekleri',
'ACP_THANKS_REPUT_SETTINGS' => 'Değerlendirme Seçenekleri',
'ACP_THANKS_REPUT_SETTINGS_EXPLAIN' => 'Buradaki teşekkür sistemine dayanarak gönderilerin, konuların ve forumların derecelendirmesine ilişkin varsayılan ayarları yapın. <br /> Toplam teşekkür sayısına en çok sahip olan konu (gönderim, konu veya forum) %100 puan alır.',
'ACP_THANKS_SETTINGS' => 'Teşekkür ayarları',
'ACP_THANKS_SETTINGS_EXPLAIN' => 'Varsayılan Mesajlar için teşekkürler ayarları buradan değiştirebilirsiniz.',
'ACP_THANKS_REFRESH' => 'Sayaçları güncelle',
'ACP_UPDATETHANKS' => 'Kayıtlı teşekkürler güncellendi',
'ACP_USERSEND' => 'Teşekkür eden diğer kullanıcılar',
'ACP_USERSTHANKS' => 'Teşekkür edern toplam kullanıcılar',

'GRAPHIC_BLOCK_BACK' => 'ext/gfksx/thanksforposts/images/rating/reput_block_back.gif',
'GRAPHIC_BLOCK_RED' => 'ext/gfksx/thanksforposts/images/rating/reput_block_red.gif',
'GRAPHIC_DEFAULT' => 'Resimler',
'GRAPHIC_OPTIONS' => 'Grafik Seçenekleri',
'GRAPHIC_STAR_BACK' => 'ext/gfksx/thanksforposts/images/rating/reput_star_back.gif',
'GRAPHIC_STAR_BLUE' => 'ext/gfksx/thanksforposts/images/rating/reput_star_blue.gif',
'GRAPHIC_STAR_GOLD' => 'ext/gfksx/thanksforposts/images/rating/reput_star_gold.gif',

'IMG_THANKPOSTS' => 'Mesaja teşekkür et',
'IMG_REMOVETHANKS' => 'Teşekkürü iptal et',

'LOG_CONFIG_THANKS' => 'Eklenti sonrası için teşekkür yapılandırması güncellendi',

'REFRESH' => 'Yenile',
'REMOVE_THANKS' => 'Teşekkürleri kaldır',
'REMOVE_THANKS_EXPLAIN' => 'Bu seçenek etkinse, kullanıcılar teşekkürlerini kaldırabilir.',

'STEPR' => ' - düzenle, adım %s',

'THANKS_COUNTERS_VIEW' => 'Teşekkür sayacı',
'THANKS_COUNTERS_VIEW_EXPLAIN' => 'Etkinleştirilirse, yazar hakkındaki blok bilgileri, verilen/ alınan teşekkür sayısını gösterir.',
'THANKS_FORUM_REPUT_VIEW' => 'Forum derecelendirmesini göster',
'THANKS_GLOBAL_POST' => 'Genel duyurulara teşekkürü aç',
'THANKS_GLOBAL_POST_EXPLAIN' => 'Etkinleştirilirse, Ggenel duyurularda teşekkür verme etkin olur.',
'THANKS_FORUM_REPUT_VIEW_EXPLAIN' => 'Etkinleştirilirse, forum listesinde forum derecelendirmeleri görüntülenir.',
'THANKS_INFO_PAGE' => 'Bilgilendirici mesajlar',
'THANKS_INFO_PAGE_EXPLAIN' => 'Etkinleştirilirse, mesaj için teşekkür ettikten/ çıkardıktan sonra bilgilendirici mesajlar görüntülenir.',
'THANKS_NOTICE_ON' => 'Mevcut bildirimler',
'THANKS_NOTICE_ON_EXPLAIN' => 'Etkinleştirilirse, bildirim kullanılabilir ve kullanıcı bildirimi profiliniz üzerinden yapılandırabilir.',
'THANKS_NUMBER' => 'Profilde gösterilen teşekkürlerin sayısı',
'THANKS_NUMBER_EXPLAIN' => 'Bir profili görüntülerken görüntülenen maksimum teşekkür sayısı. <br /> <strong>Bu değer 250\'nin üzerine ayarlanırsa yavaşlama olabileceğini unutmayın.</strong>',
'THANKS_NUMBER_DIGITS' => 'Derecelendirme için ondalık basamak sayısı',
'THANKS_NUMBER_DIGITS_EXPLAIN' => 'Derecelendirme değeri için ondalık basamak sayısını belirtin.',
'THANKS_NUMBER_ROW_REPUT' => 'Değerlendirme için üst listedeki satır sayısı',
'THANKS_NUMBER_ROW_REPUT_EXPLAIN' => 'Mesajlarda, konularda ve forumlarda en çok oy alan forumlarda gösterilecek satır sayısını belirtin.',
'THANKS_NUMBER_POST' => 'Bir mesajda listelenen teşekkürlerin sayısı',
'THANKS_NUMBER_POST_EXPLAIN' => 'Bir mesajı görüntülerken görüntülenen maksimum teşekkür sayısı. <br /> <strong>Bu değer 250\'nin üzerine ayarlanırsa yavaşlama olabileceğini unutmayın.</strong>',
'THANKS_ONLY_FIRST_POST' => 'Sadece konudaki ilk gönderi için',
'THANKS_ONLY_FIRST_POST_EXPLAIN' => 'Etkinleştirilirse, kullanıcılar yalnızca konudaki ilk gönderim için teşekkür edebilir.',
'THANKS_POST_REPUT_VIEW' => 'Gönderiler için derecelendirmeyi göster',
'THANKS_POST_REPUT_VIEW_EXPLAIN' => 'Etkinleştirilirse, bir konuyu görüntülerken gönderiler derecelendirme görüntülenir.',
'THANKS_POSTLIST_VIEW' => 'Mesajlarda teşekkür listesi',
'THANKS_POSTLIST_VIEW_EXPLAIN' => 'Etkinleştirildiğinde, gönderim için yazara teşekkür eden kullanıcıların listesi görüntülenir. <br/> Bu seçeneğin yalnızca yönetici bu forumdaki yayın için teşekkür izni verme izni verdiğinde etkili olacağını unutmayın.',
'THANKS_PROFILELIST_VIEW' => 'Profilde teşekkür listesi',
'THANKS_PROFILELIST_VIEW_EXPLAIN' => 'Etkinleştirilirse, teşekkür sayısı ve bir kullanıcının teşekkür ettiği mesajları içeren eksiksiz bir teşekkür listesi görüntülenir.',
'THANKS_REFRESH' => 'Teşekkür sayaçlarını güncelle',
'THANKS_REFRESH_EXPLAIN' => 'Burada, gönderilerin/ konuların/ kullanıcıların toplu olarak kaldırılması, konuların bölünmesi/ birleştirilmesi, Global Duyurunun ayarlanması/ kaldırılması, "Yalnızca bu konudaki ilk yazı için" seçeneğinin etkinleştirilmesi/ devre dışı bırakılması, yayın sahiplerinin değiştirilmesi vb. işlemlerden sonra teşekkür sayaçlarını güncelleyebilirsiniz. Bu biraz zaman alabilir.<br /><strong>Önemli: Düzgün çalışabilmesi için sayaç yenileme işlevinin MySQL sürüm 4.1 veya daha yüksek sürümüne ihtiyacı var!<br />Dikkat!<br /> - Yenileme, konuk gönderileriniz için tüm teşekkürleri silecek!<br /> - Global Duyurularda Teşekkürler seçeneği KAPALI ise, yenileme Genel Duyurular için tüm teşekkürleri siler!<br /> - Yalnızca konudaki ilk yazı için seçeneği AÇIK ise, yenileme, konudaki ilk hariç tüm konumlar için tüm teşekkürleri siler!</strong>',
'THANKS_REFRESH_MSG' => 'Bu işlemin tamamlanması birkaç dakika sürebilir. Tüm yanlış teşekkürler girişleri silinecek!<br />İşlem iptal edildi!',
'THANKS_REFRESHED_MSG' => 'Sayaçlar güncellendi',
'THANKS_REPUT_GRAPHIC' => 'Derecelendirmenin grafik görüntüsü',
'THANKS_REPUT_GRAPHIC_EXPLAIN' => 'Etkinleştirilirse, derecelendirme değeri aşağıdaki resimler kullanılarak grafik olarak gösterilir.',
'THANKS_REPUT_HEIGHT' => 'Grafik yüksekliği',
'THANKS_REPUT_HEIGHT_EXPLAIN' => 'Sıralamanın kaydırıcısının yüksekliğini piksel cinsinden belirtin.<br /><strong>Dikkat! Doğru görüntülemek için, aşağıdaki görüntünün yüksekliğine eşit bir yükseklik belirtmelisiniz!</strong>',
'THANKS_REPUT_IMAGE' => 'Kaydırıcının ana görüntüsü',
'THANKS_REPUT_IMAGE_DEFAULT' => '<strong>Grafik Önizlemesi</strong>',
'THANKS_REPUT_IMAGE_DEFAULT_EXPLAIN' => 'Görüntünün kendisi ve görüntünün yolu burada görülebilir. Resim boyutu 15x15 pikseldir.<br />Ön ve arka plan için kendi resimlerinizi çizebilirsiniz.<strong>Görüntünün yüksekliği ve genişliği, grafiksel ölçeğin doğru bir şekilde oluşturulmasını sağlamak için aynı olmalıdır.</strong>',
'THANKS_REPUT_IMAGE_EXPLAIN' => 'Yol - phpBB\'nin kök klasörüne göre - grafik ölçeği görüntüsüne.',
'THANKS_REPUT_IMAGE_NOEXIST' => 'Grafik skalası için ana görüntü bulunamadı.',
'THANKS_REPUT_IMAGE_BACK' => 'Kaydırıcının arka plan resmi',
'THANKS_REPUT_IMAGE_BACK_EXPLAIN' => 'Kök phpBB kurulum klasörüne göre yol - grafik ölçeği arka plan görüntüsüne.',
'THANKS_REPUT_IMAGE_BACK_NOEXIST' => 'Grafik ölçeğinin arka plan görüntüsü bulunamadı.',
'THANKS_REPUT_LEVEL' => 'Grafik ölçeğinde görüntü sayısı',
'THANKS_REPUT_LEVEL_EXPLAIN' => 'Grafikteki derecelendirme ölçeğinin değerinin% 100\'üne karşılık gelen maksimum görüntü sayısı.',
'THANKS_TIME_VIEW' => 'Teşekkür zamanı',
'THANKS_TIME_VIEW_EXPLAIN' => 'Etkinleştirildiğinde, mesajda teşekkür süresini gösterir.',
'THANKS_TOP_NUMBER' => 'toplistteki kullanıcı sayısı',
'THANKS_TOP_NUMBER_EXPLAIN' => 'Dizin listesindeki toplistte gösterilecek kullanıcı sayısını belirtin. 0 (sıfır) toplisti kapatır.',
'THANKS_TOPIC_REPUT_VIEW' => 'Konu derecelendirmesini göster',
'THANKS_TOPIC_REPUT_VIEW_EXPLAIN' => 'Etkinleştirilirse, bir forumu görüntülerken konu değerlendirmesi görüntülenecektir.',
'TRUNCATE' => 'Temizle',
'TRUNCATE_THANKS' => 'Teşekkür elistesini temizle',
'TRUNCATE_THANKS_EXPLAIN' => 'Bu prosedür tüm teşekkür sayaçlarını tamamen siler (verilen tüm teşekkürleri siler).<br />Bu eylem geri alınamaz!',
'TRUNCATE_THANKS_MSG' => 'Teşekkür sayaçları temizlendi.',
'REFRESH_THANKS_CONFIRM' => 'Teşekkür sayaçlarını gerçekten yenilemek istiyor musunuz?',
'TRUNCATE_THANKS_CONFIRM' => 'Teşekkür sayaçlarını gerçekten temizlemek istiyor musunuz?',
'TRUNCATE_NO_THANKS' => 'İşlem iptal edildi',
'ALLOW_THANKS_PM_ON' => 'Mesajıma teşekkür edilirse ÖM ile bildir',
'ALLOW_THANKS_EMAIL_ON' => 'Mesajıma teşekkür edilirse email ile bildir',
]);
43 changes: 43 additions & 0 deletions language/tr/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// 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, [
'ACL_F_THANKS' => 'MEsajlara teşekkür edebilir',
'ACL_M_THANKS' => 'Teşekkür listesini temizleyebilir',
'ACL_U_VIEWTHANKS' => 'Teşekkür listesini görüntüleyebilir',
'ACL_U_VIEWTOPLIST' => 'Toplisti görebilir',
]);
116 changes: 116 additions & 0 deletions language/tr/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

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

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

// 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, [
'CLEAR_LIST_THANKS' => 'Teşekkür Listesini Temizle',
'CLEAR_LIST_THANKS_CONFIRM' => 'Kullanıcı Teşekkür Listesini gerçekten silmek istiyor musunuz?',
'CLEAR_LIST_THANKS_GIVE' => 'Kullanıcı tarafından verilen teşekkürlerin listesi temizlendi.',
'CLEAR_LIST_THANKS_POST' => 'Mesajdaki teşekkür listesi silindi.',
'CLEAR_LIST_THANKS_RECEIVE' => 'Kullanıcı tarafından alınan teşekkürlerin listesi temizlendi.',

'DISABLE_REMOVE_THANKS' => 'Teşekkürleri silme yönetici tarafından devre dışı bırakıldı',

'GIVEN' => 'Edilen teşekkür&nbsp;',
'GLOBAL_INCORRECT_THANKS' => 'Belirli bir foruma referansı olmayan Genel Duyuru için teşekkür edemezsiniz.',
'GRATITUDES' => 'Teşekkür Listesi',

'INCORRECT_THANKS' => 'Geçersiz teşekkür',

'JUMP_TO_FORUM' => 'Foruma git',
'JUMP_TO_TOPIC' => 'Konuya git',

'FOR_MESSAGE' => ' mesaj için',
'FURTHER_THANKS' => [
1 => ' ve bir kullanıcı için',
2 => ' ve %d kullanıcı için',
],

'NO_VIEW_USERS_THANKS' => 'Teşekkürler Listesini görüntüleme izniniz yok.',

'NOTIFICATION_THANKS_GIVE' => [
1 => 'Mesaj için %1$s kişisinden <strong>teşekkür aldı</strong>:',
2 => 'Mesaj için %1$s kişilerden <strong>teşekkür aldı</strong>:',
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => 'Mesajdan %1$s kişisinin <strong>teşekkürü kaldırıldı</strong>:',
2 => 'Mesajdan %1$s kişisinin <strong>teşekkürü kaldırıldı</strong>:',
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Birisi mesajınız için teşekkür ediyor',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Birisi mesajınızdan için teşekkürü kaldırdı',

'RECEIVED' => 'Alınan teşekkür&nbsp;',
'REMOVE_THANKS' => 'Teşekkürleri kaldır: ',
'REMOVE_THANKS_CONFIRM' => 'Teşekkürlerinizi kaldırmak istediğinizden emin misiniz?',
'REMOVE_THANKS_SHORT' => 'Teşekkürleri kaldır',
'REPUT' => 'Değerlendirme',
'REPUT_TOPLIST' => 'Teşekkürler Toplisti — %d',
'RATING_LOGIN_EXPLAIN' => 'Toplisti görüntüleme yetkiniz yok.',
'RATING_NO_VIEW_TOPLIST' => 'Toplisti görüntüleme yetkiniz yok.',
'RATING_VIEW_TOPLIST_NO' => 'Toplist yönetici tarafından boş veya devre dışı',
'RATING_FORUM' => 'Forum',
'RATING_POST' => 'Mesaj',
'RATING_TOP_FORUM' => 'Forumların reytingleri',
'RATING_TOP_POST' => 'Mesajların reytingleri',
'RATING_TOP_TOPIC' => 'Konuların reytingleri',
'RATING_TOPIC' => 'Konu',

'THANK' => 'time',
'THANK_FROM' => 'from',
'THANK_TEXT_1' => 'Bu kullanıcılar yazara teşekkür etti ',
'THANK_TEXT_2' => ' mesaj için: ',
'THANK_TEXT_2PL' => ' mesaj için (toplam %d):',
'THANK_POST' => 'Mesaj yazarına teşekkür et: ',
'THANK_POST_SHORT' => 'Teşekkür et',
'THANKS' => [
1 => '%d',
2 => '%d',
],
'THANKS_BACK' => 'Geri dön',
'THANKS_INFO_GIVE' => 'Mesaja teşekkür ettin.',
'THANKS_INFO_REMOVE' => 'Mesajdan teşekkürü kaldırdın.',
'THANKS_LIST' => 'Listeyi Görüntüle/ Kapat',
'THANKS_PM_MES_GIVE' => 'mesajınız için teşekkür etti',
'THANKS_PM_MES_REMOVE' => 'mesajınızdan teşekkürü kaldırdı',
'THANKS_PM_SUBJECT_GIVE' => 'Mesaj için teşekkür',
'THANKS_PM_SUBJECT_REMOVE' => 'Mesajdan teşekkürü kaldır',
'THANKS_USER' => 'Teşekkür listesi',
'TOPLIST' => 'Mesaj toplisti',
]);
22 changes: 12 additions & 10 deletions language/uk/info_acp_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,7 +35,7 @@
// 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(
$lang = array_merge($lang, [
'ACP_DELTHANKS' => 'Видалено врахованих подяк',
'ACP_POSTS' => 'Всього повідомлень',
'ACP_POSTSEND' => 'Залишилося повідомлень з подяками',
@@ -130,4 +132,4 @@
'TRUNCATE_NO_THANKS' => 'Дія скасована',
'ALLOW_THANKS_PM_ON' => 'Отримувати повідомлення про подяках в ПП',
'ALLOW_THANKS_EMAIL_ON' => 'Отримувати повідомлення про подяках на Email',
));
]);
22 changes: 12 additions & 10 deletions language/uk/permissions_thanks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -33,9 +35,9 @@
// 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(
$lang = array_merge($lang, [
'ACL_F_THANKS' => 'Може дякувати за повідомлення',
'ACL_M_THANKS' => 'Може очищати список подяк',
'ACL_U_VIEWTHANKS' => 'Може переглядати лист всіх подяк',
'ACL_U_VIEWTOPLIST' => 'Може переглядати топ лист',
));
]);
38 changes: 20 additions & 18 deletions language/uk/thanks_mod.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
@@ -18,7 +20,7 @@

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

// DEVELOPERS PLEASE NOTE
@@ -37,7 +39,7 @@
// ’ » “ ” …
//

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'CLEAR_LIST_THANKS' => 'Очистити список подяк',
'CLEAR_LIST_THANKS_CONFIRM' => 'Ви дійсно хочете очистити список подяк користувача?',
'CLEAR_LIST_THANKS_GIVE' => 'Cписок подяк, виданих користувачем, очищений.',
@@ -56,21 +58,21 @@
'JUMP_TO_TOPIC' => 'Перейти в тему',

'FOR_MESSAGE' => ' за повідомлення',
'FURTHER_THANKS' => array(
'FURTHER_THANKS' => [
1 => ' і ще один',
2 => ' і ще %d',
),
],

'NO_VIEW_USERS_THANKS' => 'У вас немає доступу до перегляду списку подяк.',

'NOTIFICATION_THANKS_GIVE' => array(
'NOTIFICATION_THANKS_GIVE' => [
1 => '<strong>Отримана подяка</strong> від користувача %1$s за повідомлення:',
2 => '<strong>Отримані подяки</strong> від користувачів %1$s за повідомлення:',
),
'NOTIFICATION_THANKS_REMOVE'=> array(
],
'NOTIFICATION_THANKS_REMOVE'=> [
1 => '<strong>Вилучена подяка</strong> від користувача %1$s за повідомлення:',
2 => '<strong>Вилучені подяки</strong> від користувачів %1$s за повідомлення:',
),
],
'NOTIFICATION_TYPE_THANKS_GIVE' => 'Вам подякували за повідомлення',
'NOTIFICATION_TYPE_THANKS_REMOVE' => 'Вилучено подяку за ваше повідомлення',

@@ -97,11 +99,11 @@
'THANK_TEXT_1' => 'За це повідомлення автора ',
'THANK_TEXT_2' => ' подякував:',
'THANK_TEXT_2PL' => ' подякували (всього %d):',
'THANKS' => array(
'THANKS' => [
1 => '%d раз',
2 => '%d рази',
3 => '%d разів',
),
],
'THANKS_BACK' => 'Повернутися до листу подяк',
'THANKS_INFO_GIVE' => 'Ви подякували автора повідомлення',
'THANKS_INFO_REMOVE' => 'Ви скасували подяку автору',
@@ -112,4 +114,4 @@
'THANKS_PM_SUBJECT_REMOVE' => 'Подяка за повідомлення скасована',
'THANKS_USER' => 'Лист подяк',
'TOPLIST' => 'Топ лист повідомлень',
));
]);
79 changes: 40 additions & 39 deletions migrations/v_0_4_0.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -19,61 +21,60 @@ public function effectively_installed()

static public function depends_on()
{
return array('\phpbb\db\migration\data\v310\dev');
return ['\phpbb\db\migration\data\v310\dev'];
}

public function update_schema()
{
if (!$this->db_tools->sql_table_exists($this->table_prefix . 'thanks'))
{
return array(
'add_tables' => array(
$this->table_prefix . 'thanks' => array(
'COLUMNS' => array(
'post_id' => array('UINT', 0),
'poster_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
),
'PRIMARY_KEY' => array('post_id', 'user_id'),
),
),
);
return [
'add_tables' => [
$this->table_prefix . 'thanks' => [
'COLUMNS' => [
'post_id' => ['UINT', 0],
'poster_id' => ['UINT', 0],
'user_id' => ['UINT', 0],
],
'PRIMARY_KEY' => ['post_id', 'user_id'],
],
],
];
}
// If the thanks table exists but 'poster_id' column doesn't, most likely this is an upgrade
// from the 3.0 'Thank Post Mod 0.4.0' https://www.phpbb.com/community/viewtopic.php?f=434&t=543797
// by Geoffreak http://www.phpbb.com/phpBB/profile.php?mode=viewprofile&un=Geoffreak
// which is the one 'Thanks for posts MOD' by Палыч was initially based on
else if (!$this->db_tools->sql_column_exists($this->table_prefix . 'thanks', 'poster_id'))
{
return array(
'add_columns' => array(
$this->table_prefix . 'thanks' => array(
'poster_id' => array('UINT', 0),
),
),
'add_primary_keys' => array(
$this->table_prefix . 'thanks' => array('post_id, user_id'),
),
);
return [
'add_columns' => [
$this->table_prefix . 'thanks' => [
'poster_id' => ['UINT', 0],
],
],
'add_primary_keys' => [
$this->table_prefix . 'thanks' =>['post_id, user_id'],
],
];
}

return array(
);
return [];
}

public function revert_schema()
{
return array(
'drop_tables' => array($this->table_prefix . 'thanks'),
);
return [
'drop_tables' => [$this->table_prefix . 'thanks'],
];
}

public function revert_data()
{
return array(
return [
// Remove configs
array('config.remove', array('thanks_for_posts_version')),
array('config.remove', array('thanks_mod_version')),
);
['config.remove', ['thanks_for_posts_version']],
['config.remove', ['thanks_mod_version']],
];
}
}
46 changes: 24 additions & 22 deletions migrations/v_1_2_5.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -22,29 +24,29 @@ public function effectively_installed()

static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_0_4_0');
return ['\gfksx\thanksforposts\migrations\v_0_4_0'];
}

public function update_data()
{
return array(
return [
// Add configs
array('config.add', array('remove_thanks', 1)),
array('config.add', array('thanks_postlist_view', 1)),
array('config.add', array('thanks_profilelist_view', 1)),
array('config.add', array('thanks_counters_view', 1)),
array('config.add', array('thanks_number', 100)),
array('config.add', array('thanks_info_page', 1)),
array('config.add', array('thanks_only_first_post', 0)),
['config.add', ['remove_thanks', 1]],
['config.add', ['thanks_postlist_view', 1]],
['config.add', ['thanks_profilelist_view', 1]],
['config.add', ['thanks_counters_view', 1]],
['config.add', ['thanks_number', 100]],
['config.add', ['thanks_info_page', 1]],
['config.add', ['thanks_only_first_post', 0]],

// Add permissions
array('permission.add', array('f_thanks', false)),
array('permission.add', array('u_viewthanks', true)),
['permission.add', ['f_thanks', false]],
['permission.add', ['u_viewthanks', true]],

// Add permissions sets
array('permission.permission_set', array('ROLE_USER_STANDARD', 'u_viewthanks', 'role', true)),
array('permission.permission_set', array('REGISTERED', 'u_viewthanks', 'group', true)),
array('permission.permission_set', array('ROLE_FORUM_STANDARD', 'f_thanks', 'role', true)),
);
['permission.permission_set', ['ROLE_USER_STANDARD', 'u_viewthanks', 'role', true]],
['permission.permission_set', ['REGISTERED', 'u_viewthanks', 'group', true]],
['permission.permission_set', ['ROLE_FORUM_STANDARD', 'f_thanks', 'role', true]],
];
}
}
26 changes: 14 additions & 12 deletions migrations/v_1_2_6.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -19,17 +21,17 @@ public function effectively_installed()

static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_1_2_5');
return ['\gfksx\thanksforposts\migrations\v_1_2_5'];
}

public function update_data()
{
return array(
return [
// Add configs
array('config.add', array('thanks_number_post', 10)),
['config.add', ['thanks_number_post', 10]],

// Remove ACP module
array('module.remove', array('acp', 'ACP_MESSAGES', 'ACP_THANKS')),
);
['module.remove', ['acp', 'ACP_MESSAGES', 'ACP_THANKS']],
];
}
}
91 changes: 50 additions & 41 deletions migrations/v_1_2_8.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -19,62 +21,62 @@ public function effectively_installed()

static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_1_2_6');
return ['\gfksx\thanksforposts\migrations\v_1_2_6'];
}

public function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'thanks' => array(
'topic_id' => array('UINT', 0),
'forum_id' => array('UINT', 0),
'thanks_time' => array('UINT:11', 0),
),
),
);
return [
'add_columns' => [
$this->table_prefix . 'thanks' => [
'topic_id' => ['UINT', 0],
'forum_id' => ['UINT', 0],
'thanks_time' => ['UINT:11', 0],
],
],
];
}

public function revert_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'thanks' => array(
return [
'drop_columns' => [
$this->table_prefix . 'thanks' => [
'topic_id',
'forum_id',
'thanks_time',
),
),
);
],
],
];
}

public function update_data()
{
return array(
return [
// Add configs
array('config.add', array('thanks_post_reput_view', 1)),
array('config.add', array('thanks_topic_reput_view', 1)),
array('config.add', array('thanks_forum_reput_view', 0)),
array('config.add', array('thanks_reput_height', 15)),
array('config.add', array('thanks_reput_level', 10)),
array('config.add', array('thanks_number_digits', 2)),
array('config.add', array('thanks_number_row_reput', 5)),
array('config.add', array('thanks_reput_graphic', 1)),
array('config.add', array('thanks_reput_image', 'ext/gfksx/thanksforposts/images/rating/reput_star_gold.gif')),
array('config.add', array('thanks_reput_image_back', 'ext/gfksx/thanksforposts/images/rating/reput_star_back.gif')),
array('config.add', array('thanks_time_view', 1)),
array('config.add', array('thanks_top_number', 0)),
['config.add', ['thanks_post_reput_view', 1]],
['config.add', ['thanks_topic_reput_view', 1]],
['config.add', ['thanks_forum_reput_view', 0]],
['config.add', ['thanks_reput_height', 15]],
['config.add', ['thanks_reput_level', 10]],
['config.add', ['thanks_number_digits', 2]],
['config.add', ['thanks_number_row_reput', 5]],
['config.add', ['thanks_reput_graphic', 1]],
['config.add', ['thanks_reput_image', 'ext/gfksx/thanksforposts/images/rating/reput_star_gold.gif']],
['config.add', ['thanks_reput_image_back', 'ext/gfksx/thanksforposts/images/rating/reput_star_back.gif']],
['config.add', ['thanks_time_view', 1]],
['config.add', ['thanks_top_number', 0]],

// Add permissions
array('permission.add', array('u_viewtoplist', true)),
['permission.add', ['u_viewtoplist', true]],

// Add permissions sets
array('permission.permission_set', array('REGISTERED', 'u_viewtoplist', 'group', true)),
array('permission.permission_set', array('ROLE_USER_STANDARD', 'u_viewtoplist', 'role', true)),
['permission.permission_set', ['REGISTERED', 'u_viewtoplist', 'group', true]],
['permission.permission_set', ['ROLE_USER_STANDARD', 'u_viewtoplist', 'role', true]],

// Update thanks for posts table
array('custom', array(array($this, 'update_thanks_table'))),
);
['custom', [[$this, 'update_thanks_table']]],
];
}

public function update_thanks_table()
@@ -101,6 +103,13 @@ public function update_thanks_table()
topic_id = (SELECT p.topic_id FROM ' . POSTS_TABLE . ' p, ' . $thanks_table . ' t WHERE t.post_id = p.post_id)
WHERE EXISTS (SELECT p.* FROM ' . POSTS_TABLE . ' p, ' . $thanks_table . ' t WHERE t.post_id = p.post_id)';
}
else if ($this->db->get_sql_layer() == 'mssql' || $this->db->get_sql_layer() == 'mssqlnative')
{
$sql = 'UPDATE t
SET t.forum_id = p.forum_id, t.topic_id = p.topic_id
FROM ' . POSTS_TABLE . ' p, ' . $thanks_table . ' t
WHERE t.post_id = p.post_id';
}

$this->db->sql_query($sql);
}
28 changes: 15 additions & 13 deletions migrations/v_1_3_1.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

class v_1_3_1 extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_1_2_8');
return ['\gfksx\thanksforposts\migrations\v_1_2_8'];
}

public function update_data()
{
return array(
return [
// Add permissions
array('permission.add', array('m_thanks', true)),
['permission.add', ['m_thanks', true]],

// Add permissions sets
array('permission.permission_set', array('ROLE_MOD_FULL', 'm_thanks', 'role', true)),
array('permission.permission_set', array('GLOBAL_MODERATORS', 'm_thanks', 'group', true)),
);
['permission.permission_set', ['ROLE_MOD_FULL', 'm_thanks', 'role', true]],
['permission.permission_set', ['GLOBAL_MODERATORS', 'm_thanks', 'group', true]],
];
}
}
26 changes: 14 additions & 12 deletions migrations/v_1_3_2.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -19,15 +21,15 @@ public function effectively_installed()

static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_1_3_1');
return ['\gfksx\thanksforposts\migrations\v_1_3_1'];
}

public function update_data()
{
return array(
return [
// Add configs
array('config.add', array('thanks_forum_reput_view_column', 0)),
array('config.add', array('thanks_topic_reput_view_column', 0)),
);
['config.add', ['thanks_forum_reput_view_column', 0]],
['config.add', ['thanks_topic_reput_view_column', 0]],
];
}
}
24 changes: 13 additions & 11 deletions migrations/v_1_3_3.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

class v_1_3_3 extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_1_3_2');
return ['\gfksx\thanksforposts\migrations\v_1_3_2'];
}

public function update_data()
{
return array(
return [
// Add permissions sets
array('permission.permission_set', array('ROLE_FORUM_FULL', 'f_thanks', 'role', true)),
);
['permission.permission_set', ['ROLE_FORUM_FULL', 'f_thanks', 'role', true]],
];
}
}
82 changes: 42 additions & 40 deletions migrations/v_1_3_4.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -19,58 +21,58 @@ public function effectively_installed()

static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_1_3_3');
return ['\gfksx\thanksforposts\migrations\v_1_3_3'];
}

public function update_schema()
{
return array(
'add_index' => array(
$this->table_prefix . 'thanks' => array(
'post_id' => array('post_id'),
'topic_id' => array('topic_id'),
'forum_id' => array('forum_id'),
'user_id' => array('user_id'),
'poster_id' => array('poster_id'),
),
),
);
return [
'add_index' => [
$this->table_prefix . 'thanks' => [
'post_id' => ['post_id'],
'topic_id' => ['topic_id'],
'forum_id' => ['forum_id'],
'user_id' => ['user_id'],
'poster_id' => ['poster_id'],
],
],
];
}

public function revert_schema()
{
return array(
'drop_keys' => array(
$this->table_prefix . 'thanks' => array(
return [
'drop_keys' => [
$this->table_prefix . 'thanks' => [
'post_id',
'topic_id',
'forum_id',
'user_id',
'poster_id',
),
),
);
],
],
];
}

public function update_data()
{
return array(
return [
// Add configs
array('config.add', array('thanks_global_announce', 1)),
['config.add', ['thanks_global_announce', 1]],

// Add permissions sets
array('permission.permission_set', array('ROLE_FORUM_FULL', 'f_thanks', 'role', true)),
array('permission.permission_set', array('ROLE_FORUM_POLLS', 'f_thanks', 'role', true)),
array('permission.permission_set', array('ROLE_FORUM_LIMITED', 'f_thanks', 'role', true)),
array('permission.permission_set', array('ROLE_FORUM_LIMITED_POLLS', 'f_thanks', 'role', true)),
array('permission.permission_set', array('ROLE_USER_FULL', 'u_viewtoplist', 'role', true)),
array('permission.permission_set', array('ROLE_USER_LIMITED', 'u_viewtoplist', 'role', true)),
array('permission.permission_set', array('ROLE_USER_NOPM', 'u_viewtoplist', 'role', true)),
array('permission.permission_set', array('ROLE_USER_NOAVATAR', 'u_viewtoplist', 'role', true)),
array('permission.permission_set', array('ROLE_USER_FULL', 'u_viewthanks', 'role', true)),
array('permission.permission_set', array('ROLE_USER_LIMITED', 'u_viewthanks', 'role', true)),
array('permission.permission_set', array('ROLE_USER_NOPM', 'u_viewthanks', 'role', true)),
array('permission.permission_set', array('ROLE_USER_NOAVATAR', 'u_viewthanks', 'role', true)),
);
['permission.permission_set', ['ROLE_FORUM_FULL', 'f_thanks', 'role', true]],
['permission.permission_set', ['ROLE_FORUM_POLLS', 'f_thanks', 'role', true]],
['permission.permission_set', ['ROLE_FORUM_LIMITED', 'f_thanks', 'role', true]],
['permission.permission_set', ['ROLE_FORUM_LIMITED_POLLS', 'f_thanks', 'role', true]],
['permission.permission_set', ['ROLE_USER_FULL', 'u_viewtoplist', 'role', true]],
['permission.permission_set', ['ROLE_USER_LIMITED', 'u_viewtoplist', 'role', true]],
['permission.permission_set', ['ROLE_USER_NOPM', 'u_viewtoplist', 'role', true]],
['permission.permission_set', ['ROLE_USER_NOAVATAR', 'u_viewtoplist', 'role', true]],
['permission.permission_set', ['ROLE_USER_FULL', 'u_viewthanks', 'role', true]],
['permission.permission_set', ['ROLE_USER_LIMITED', 'u_viewthanks', 'role', true]],
['permission.permission_set', ['ROLE_USER_NOPM', 'u_viewthanks', 'role', true]],
['permission.permission_set', ['ROLE_USER_NOAVATAR', 'u_viewthanks', 'role', true]],
];
}
}
76 changes: 39 additions & 37 deletions migrations/v_2_0_0.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -19,87 +21,87 @@ public function effectively_installed()

static public function depends_on()
{
return array('\gfksx\thanksforposts\migrations\v_1_3_4');
return ['\gfksx\thanksforposts\migrations\v_1_3_4'];
}

public function update_data()
{
// Remove phpBB 3.0 Thanks for posts ACP modules
$remove_modules = array(
array('module.remove', array('acp', 'ACP_THANKS', array(
$remove_modules = [
['module.remove', ['acp', 'ACP_THANKS', [
'module_basename' => 'thanks',
'module_langname' => 'ACP_THANKS_SETTINGS',
'module_mode' => 'thanks',
'module_auth' => 'acl_a_board',
))),
array('module.remove', array('acp', 'ACP_THANKS', array(
]]],
['module.remove', ['acp', 'ACP_THANKS', [
'module_basename' => 'thanks_refresh',
'module_langname' => 'ACP_THANKS_REFRESH',
'module_mode' => 'thanks',
'module_auth' => 'acl_a_board',
))),
array('module.remove', array('acp', 'ACP_THANKS', array(
]]],
['module.remove', ['acp', 'ACP_THANKS', [
'module_basename' => 'thanks_truncate',
'module_langname' => 'ACP_THANKS_TRUNCATE',
'module_mode' => 'thanks',
'module_auth' => 'acl_a_board',
))),
);
]]],
];
if (isset($this->config['thanks_mod_version']) && version_compare($this->config['thanks_mod_version'], '1.2.8', '>='))
{
$remove_modules = array_merge(
$remove_modules,
array(
array('module.remove', array('acp', 'ACP_THANKS', array(
[
['module.remove', ['acp', 'ACP_THANKS', [
'module_basename' => 'thanks_reput',
'module_langname' => 'ACP_THANKS_REPUT_SETTINGS',
'module_mode' => 'thanks',
'module_auth' => 'acl_a_board',
))),
)
]]],
]
);
}
$remove_modules = array_merge(
$remove_modules,
array(
array('module.remove', array('acp', 'ACP_CAT_DOT_MODS', 'ACP_THANKS')),
)
[
['module.remove', ['acp', 'ACP_CAT_DOT_MODS', 'ACP_THANKS']],
]
);

// Add ACP modules
$add_modules = array(
array('module.add', array('acp', 'ACP_CAT_DOT_MODS', 'ACP_THANKS')),
array('module.add', array('acp', 'ACP_THANKS', array(
$add_modules = [
['module.add', ['acp', 'ACP_CAT_DOT_MODS', 'ACP_THANKS']],
['module.add', ['acp', 'ACP_THANKS', [
'module_basename' => '\gfksx\thanksforposts\acp\acp_thanks_module',
'module_langname' => 'ACP_THANKS_SETTINGS',
'module_mode' => 'thanks',
'module_auth' => 'ext_gfksx/thanksforposts && acl_a_board',
))),
array('module.add', array('acp', 'ACP_THANKS', array(
]]],
['module.add', ['acp', 'ACP_THANKS', [
'module_basename' => '\gfksx\thanksforposts\acp\acp_thanks_refresh_module',
'module_langname' => 'ACP_THANKS_REFRESH',
'module_mode' => 'thanks',
'module_auth' => 'ext_gfksx/thanksforposts && acl_a_board',
))),
array('module.add', array('acp', 'ACP_THANKS', array(
]]],
['module.add', ['acp', 'ACP_THANKS', [
'module_basename' => '\gfksx\thanksforposts\acp\acp_thanks_truncate_module',
'module_langname' => 'ACP_THANKS_TRUNCATE',
'module_mode' => 'thanks',
'module_auth' => 'ext_gfksx/thanksforposts && acl_a_board',
))),
array('module.add', array('acp', 'ACP_THANKS', array(
]]],
['module.add', ['acp', 'ACP_THANKS', [
'module_basename' => '\gfksx\thanksforposts\acp\acp_thanks_reput_module',
'module_langname' => 'ACP_THANKS_REPUT_SETTINGS',
'module_mode' => 'thanks',
'module_auth' => 'ext_gfksx/thanksforposts && acl_a_board',
))),
);
]]],
];

// Update config values
$update_config = array(
$update_config = [
// Remove phpBB 3.0 Thanks for posts MOD config entry
array('config.remove', array('thanks_mod_version')),
);
['config.remove', ['thanks_mod_version']],
];

return (isset($this->config['thanks_mod_version']) && version_compare($this->config['thanks_mod_version'], '1.2.7', '>=')) ?
array_merge($remove_modules, $add_modules, $update_config) : array_merge($add_modules, $update_config);
66 changes: 34 additions & 32 deletions migrations/v_2_0_1.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -20,68 +22,68 @@ public function effectively_installed()

static public function depends_on()
{
return array(
return [
'\gfksx\thanksforposts\migrations\v_2_0_0',
'\phpbb\db\migration\data\v310\notifications_use_full_name',
);
];
}

public function update_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'users' => array(
return [
'drop_columns' => [
$this->table_prefix . 'users' => [
'user_allow_thanks_email',
'user_allow_thanks_pm',
),
),
);
],
],
];
}

public function revert_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'users' => array(
'user_allow_thanks_email' => array('BOOL', 0),
'user_allow_thanks_pm' => array('BOOL', 0),
),
),
);
return [
'add_columns' => [
$this->table_prefix . 'users' => [
'user_allow_thanks_email' => ['BOOL', 0],
'user_allow_thanks_pm' => ['BOOL', 0],
],
],
];
}

public function update_data()
{
return array(
return [
// Update notification names
array('custom', array(array($this, 'update_notifications_name'))),
);
['custom', [[$this, 'update_notifications_name']]],
];
}

public function update_notifications_name()
{
// New notification_type_name and re-enable
$sql_ary[] = array(
$sql_ary[] = [
'notification_type_name' => 'gfksx.thanksforposts.notification.type.thanks',
'notification_type_enabled' => 1,
);
$sql_ary[] = array(
];
$sql_ary[] = [
'notification_type_name' => 'gfksx.thanksforposts.notification.type.thanks_remove',
'notification_type_enabled' => 1,
);
];

foreach ($sql_ary as $sql)
{
$notification_type_name = explode('type.', $sql['notification_type_name']);

$sql_update = 'UPDATE ' . NOTIFICATION_TYPES_TABLE . '
SET ' . $this->db->sql_build_array('UPDATE', $sql) . "
WHERE notification_type_name = '" . $notification_type_name[1] . "'";
WHERE notification_type_name = '" . $this->db->sql_escape($notification_type_name[1]) . "'";
$this->db->sql_query($sql_update);

$sql_update = 'UPDATE ' . USER_NOTIFICATIONS_TABLE . "
SET item_type = '" . $this->db->sql_escape($sql['notification_type_name']) . "'
WHERE item_type = '" . $notification_type_name[1] . "'";
WHERE item_type = '" . $this->db->sql_escape($notification_type_name[1]) . "'";
$this->db->sql_query($sql_update);
}
}
26 changes: 13 additions & 13 deletions migrations/v_2_0_2.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -19,17 +21,15 @@ public function effectively_installed()

static public function depends_on()
{
return array(
'\gfksx\thanksforposts\migrations\v_2_0_1',
);
return ['\gfksx\thanksforposts\migrations\v_2_0_1'];
}

public function update_data()
{
return array(
return [
// This config value was missing from the original MOD ver. 1.3.4
// installation script, so fix and add that
array('config.add', array('thanks_global_post', 0)),
);
['config.add', ['thanks_global_post', 0]],
];
}
}
28 changes: 14 additions & 14 deletions migrations/v_2_0_3.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -20,16 +22,14 @@ public function effectively_installed()

static public function depends_on()
{
return array(
'\gfksx\thanksforposts\migrations\v_2_0_2',
);
return ['\gfksx\thanksforposts\migrations\v_2_0_2'];
}

public function update_data()
{
return array(
array('config.remove', array('thanks_topic_reput_view_column')),
array('config.remove', array('thanks_forum_reput_view_column')),
);
return [
['config.remove', ['thanks_topic_reput_view_column']],
['config.remove', ['thanks_forum_reput_view_column']],
];
}
}
32 changes: 16 additions & 16 deletions migrations/v_2_0_6.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Thanks For Posts extension for the phpBB Forum Software package.
*
* @copyright (c) 2013 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

@@ -20,19 +22,17 @@ public function effectively_installed()

static public function depends_on()
{
return array(
'\gfksx\thanksforposts\migrations\v_2_0_3',
);
return ['\gfksx\thanksforposts\migrations\v_2_0_3'];
}

public function update_data()
{
return array(
return [
// Remove stale configs
array('config.remove', array('thanks_for_posts_version')),
array('config.remove', array('thanks_mod_version')),
array('config.update', array('thanks_reput_image', 'ext/gfksx/thanksforposts/images/rating/reput_star_gold.gif')),
array('config.update', array('thanks_reput_image_back', 'ext/gfksx/thanksforposts/images/rating/reput_star_back.gif')),
);
['config.remove', ['thanks_for_posts_version']],
['config.remove', ['thanks_mod_version']],
['config.update', ['thanks_reput_image', 'ext/gfksx/thanksforposts/images/rating/reput_star_gold.gif']],
['config.update', ['thanks_reput_image_back', 'ext/gfksx/thanksforposts/images/rating/reput_star_back.gif']],
];
}
}
53 changes: 53 additions & 0 deletions migrations/v_2_0_8.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/**
*
* Thanks For Posts.
* Adds the ability to thank the author and to use per posts/topics/forum rating system based on the count of thanks.
* An extension for the phpBB Forum Software package.
*
* @copyright (c) 2020, rxu, https://www.phpbbguru.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace gfksx\thanksforposts\migrations;

class v_2_0_8 extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return ['\gfksx\thanksforposts\migrations\v_2_0_6'];
}

public function update_schema()
{
return [
'drop_keys' => [
$this->table_prefix . 'thanks' => ['poster_id'],
$this->table_prefix . 'thanks' => ['user_id'],
],
'add_index' => [
$this->table_prefix . 'thanks' => [
'poster_id' => ['poster_id', 'forum_id'],
'user_id' => ['user_id', 'forum_id'],
],
],
];
}

public function revert_schema()
{
return [
'drop_keys' => [
$this->table_prefix . 'thanks' => ['poster_id'],
$this->table_prefix . 'thanks' => ['user_id'],
],
'add_index' => [
$this->table_prefix . 'thanks' => [
'poster_id' => ['poster_id'],
'user_id' => ['poster_id'],
],
],
];
}
}
64 changes: 33 additions & 31 deletions notification/thanks.php
20 changes: 11 additions & 9 deletions notification/thanks_remove.php
11 changes: 0 additions & 11 deletions styles/bb3-mobi/template/event/overall_header_head_append.html

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions styles/prosilver/template/memberlist_view_thanks.html
2 changes: 1 addition & 1 deletion styles/prosilver/template/topicrow_rating_body.html
3 changes: 1 addition & 2 deletions styles/prosilver/template/toplist_body.html
Binary file not shown.
Binary file not shown.
Binary file not shown.
83 changes: 0 additions & 83 deletions styles/prosilver/theme/thanks.css

This file was deleted.

9 changes: 8 additions & 1 deletion styles/subsilver2/template/index_body_thanks.html
64 changes: 64 additions & 0 deletions tests/functional/acp_test.php
110 changes: 75 additions & 35 deletions tests/functional/controller_test.php
48 changes: 33 additions & 15 deletions tests/functional/thanking_test.php