• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[MyAAC][Plugin] Most powerful guilds (TFS 0.3/4 and 1.0)

MyAAC

Active Member
Joined
May 4, 2017
Messages
96
Best answers
8
Reaction score
49
This is most powerful guilds plugin for MyAAC. It displays guilds that have most unjustified kills.

Requirements: Any version of MyAAC.

Installation:

Go to Admin Panel, select 'Plugins', and then select powerful-guilds.zip and click upload. That's all!

In config.local.php, optionally add:
Code:
$config['powerful_guilds'] = array(
   'refresh_interval' => 10 * 60, // cache query for 10 minutes (in seconds)
   'amount' => 5, // how many powerful guilds to show
   'page' => 'news' // on what pages most powerful guilds box should appear, for example 'news', or 'guilds' (blank makes it visible on every page)
);
Screenshot:
Bildschirmfoto 2017-10-11 um 16.10.51.png
 

Attachments

cs007

New Member
Joined
Dec 2, 2010
Messages
57
Best answers
0
Reaction score
1
Hey man, you can help me?
PHP:
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'database_ot.g.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /var/www/html/system/libs/pot/OTS_Base_DB.php:101 Stack trace: #0 /var/www/html/system/libs/pot/OTS_Base_DB.php(101): PDO->query('SELECT `g`.`id`...') #1 /var/www/html/plugins/powerful-guilds/powerful-guilds.php(35): OTS_Base_DB->query('SELECT `g`.`id`...') #2 /var/www/html/plugins/powerful-guilds/powerful-guilds.php(70): mostPowerfulGuildsDatabase() #3 /var/www/html/plugins/powerful-guilds/powerful-guilds.php(96): mostPowerfulGuildsList() #4 /var/www/html/system/hooks.php(47): require('/var/www/html/p...') #5 /var/www/html/system/hooks.php(74): Hook->execute(Array) #6 /var/www/html/index.php(384): Hooks->trigger(2) #7 {main} thrown in /var/www/html/system/libs/pot/OTS_Base_DB.php on line 101
 
OP
M

MyAAC

Active Member
Joined
May 4, 2017
Messages
96
Best answers
8
Reaction score
49
Hey man, you can help me?
PHP:
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'database_ot.g.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /var/www/html/system/libs/pot/OTS_Base_DB.php:101 Stack trace: #0 /var/www/html/system/libs/pot/OTS_Base_DB.php(101): PDO->query('SELECT `g`.`id`...') #1 /var/www/html/plugins/powerful-guilds/powerful-guilds.php(35): OTS_Base_DB->query('SELECT `g`.`id`...') #2 /var/www/html/plugins/powerful-guilds/powerful-guilds.php(70): mostPowerfulGuildsDatabase() #3 /var/www/html/plugins/powerful-guilds/powerful-guilds.php(96): mostPowerfulGuildsList() #4 /var/www/html/system/hooks.php(47): require('/var/www/html/p...') #5 /var/www/html/system/hooks.php(74): Hook->execute(Array) #6 /var/www/html/index.php(384): Hooks->trigger(2) #7 {main} thrown in /var/www/html/system/libs/pot/OTS_Base_DB.php on line 101
This seems to be a new behavior introduced in MySQL version 5.7, as stated here: MySQL :: MySQL 5.7 Reference Manual :: 5.1.10 Server SQL Modes

To get around this error, we can change sql_mode to behave like in older MySQL versions. The real solution would be to rewrite the query, but for that I don't have time now.

So, just edit your plugins/powerful-guilds/powerful-guilds.php and replace first line:
PHP:
<?php
with:
PHP:
<?php
$query = $db->query('SELECT @@sql_mode as `mode`')->fetch();
$mode = str_replace('ONLY_FULL_GROUP_BY', '', $query['mode']);

$db->query('set session sql_mode = ' . $db->quote($mode));
And it should work :)
 

cs007

New Member
Joined
Dec 2, 2010
Messages
57
Best answers
0
Reaction score
1
This seems to be a new behavior introduced in MySQL version 5.7, as stated here: MySQL :: MySQL 5.7 Reference Manual :: 5.1.10 Server SQL Modes

To get around this error, we can change sql_mode to behave like in older MySQL versions. The real solution would be to rewrite the query, but for that I don't have time now.

So, just edit your plugins/powerful-guilds/powerful-guilds.php and replace first line:
PHP:
<?php
with:
PHP:
<?php
$query = $db->query('SELECT @@sql_mode as `mode`')->fetch();
$mode = str_replace('ONLY_FULL_GROUP_BY', '', $query['mode']);

$db->query('set session sql_mode = ' . $db->quote($mode));
And it should work :)
Mine was already this way.
3xzwq - Ghostbin
 
OP
M

MyAAC

Active Member
Joined
May 4, 2017
Messages
96
Best answers
8
Reaction score
49
Mine was already this way.
3xzwq - Ghostbin
Which part of my post didn't you understand?

Replace the first line, so it looks like this:
PHP:
<?php
$query = $db->query('SELECT @@sql_mode as `mode`')->fetch();
$mode = str_replace('ONLY_FULL_GROUP_BY', '', $query['mode']);

$db->query('set session sql_mode = ' . $db->quote($mode));

/**
 * Powerful guilds for MyAAC
 *
 * @name      powerful-guilds
 * @author    Slawkens <[email protected]>
 * @version   1.1
 */
 

cs007

New Member
Joined
Dec 2, 2010
Messages
57
Best answers
0
Reaction score
1
Which part of my post didn't you understand?

Replace the first line, so it looks like this:
PHP:
<?php
$query = $db->query('SELECT @@sql_mode as `mode`')->fetch();
$mode = str_replace('ONLY_FULL_GROUP_BY', '', $query['mode']);

$db->query('set session sql_mode = ' . $db->quote($mode));

/**
 * Powerful guilds for MyAAC
 *
 * @name      powerful-guilds
 * @author    Slawkens <[email protected]>
 * @version   1.1
 */
Thank you very much, my friend.
 

dervin13

Active Member
Joined
Apr 26, 2008
Messages
449
Best answers
1
Reaction score
27
I installes here in new ubuntu 18 and nothing happens, do you know how to see errors or what happened? Thanks
 

SixNine

Member
Joined
Dec 12, 2018
Messages
189
Best answers
0
Reaction score
19
I installes here in new ubuntu 18 and nothing happens, do you know how to see errors or what happened? Thanks
If im not wrong its only for old tfs versions
 

dervin13

Active Member
Joined
Apr 26, 2008
Messages
449
Best answers
1
Reaction score
27
I think its some problem with compatibility but I have no idea of what it is, because I was using it without any problems in ubunth 14. I updated my ubuntu to 18 including php to 7 and after that the plugin disapprared

solved just downgraded the hooks in past system
 
Last edited:

Crixpx

New Member
Joined
Jan 11, 2015
Messages
68
Best answers
0
Reaction score
0
i get this for tfs 0.4 what is this column?
1591007743826.png
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
3,010
Best answers
76
Reaction score
521
Location
Germany
Here's version 2.0 of the plugin, with fixed the bug above.

Full changelog:
Code:
* moved html code to Twig
* set sql_mode to fix some errors on newer/older (not sure) MySQL Versions
* add this CHANGELOG and LICENSE
* add make-plugin.sh
i get this for tfs 0.4 what is this column?
View attachment 46209
Download this.
 

Attachments

Nickolas Deluca

New Member
Joined
Dec 7, 2016
Messages
19
Best answers
0
Reaction score
3
Does it work with TFS 1.3?
I know it says TFS 0.3, 0.4 and 1.0 in the title, but doesn't hurt to ask right.
 

Rombadr

Premium User
Premium User
Joined
Jan 19, 2020
Messages
179
Best answers
21
Reaction score
102
Does it work with TFS 1.3?
I know it says TFS 0.3, 0.4 and 1.0 in the title, but doesn't hurt to ask right.
I doubt the title would be misleading, doesn't hurt to test either
 
Top