From 87f35da3b62fb0bf79833d7c7ab23e58e42622d3 Mon Sep 17 00:00:00 2001 From: Fernando Matos Date: Sat, 26 Dec 2020 18:04:22 -0300 Subject: [PATCH 1/3] Fix network box showing without social networks specified --- templates/tibiacom/boxes/templates/networks.html.twig | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/templates/tibiacom/boxes/templates/networks.html.twig b/templates/tibiacom/boxes/templates/networks.html.twig index c1b8c768..3e377d5a 100644 --- a/templates/tibiacom/boxes/templates/networks.html.twig +++ b/templates/tibiacom/boxes/templates/networks.html.twig @@ -1,22 +1,20 @@ +{% if config['network_facebook'] != '' or config['network_twitter'] != '' %}
{% if config['network_facebook'] is not empty %}
- - +
- - +
- - +
@@ -29,3 +27,4 @@ {% endif %}
+{% endif %} From daaa472dfef5268e610dab780453de24ef564cab Mon Sep 17 00:00:00 2001 From: Fernando Matos Date: Sat, 26 Dec 2020 18:14:36 -0300 Subject: [PATCH 2/3] Remove unnecessary top player retrievement at network box --- templates/tibiacom/boxes/networks.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/tibiacom/boxes/networks.php b/templates/tibiacom/boxes/networks.php index 7f1faee7..d0fa9dc1 100644 --- a/templates/tibiacom/boxes/networks.php +++ b/templates/tibiacom/boxes/networks.php @@ -1,5 +1,3 @@ display('networks.html.twig', array( - 'topPlayers' => getTopPlayers(5) -)); +$twig->display('networks.html.twig'); From 8f345126f79716e7ff91d40bb98c509dfde3a1d8 Mon Sep 17 00:00:00 2001 From: Fernando Matos Date: Sat, 26 Dec 2020 18:30:26 -0300 Subject: [PATCH 3/3] Add conditional script loading for social networks --- templates/tibiacom/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/tibiacom/index.php b/templates/tibiacom/index.php index d6379c8a..ef01eeec 100644 --- a/templates/tibiacom/index.php +++ b/templates/tibiacom/index.php @@ -12,9 +12,16 @@ if(isset($config['boxes'])) + + + + + + +