From 211537f6280c5e09af3ba4c0adb469f0edb1cf49 Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@imag.fr>
Date: Mon, 13 Mar 2017 14:01:05 +0100
Subject: [PATCH] framasphere done right

---
 footer.php    | 6 +++---
 functions.php | 9 +++++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/footer.php b/footer.php
index 8004d8b..deb498b 100644
--- a/footer.php
+++ b/footer.php
@@ -4,6 +4,7 @@
                         <p><?php echo html_meta('contact'); ?></p>
                         <p><?php echo html_meta('site_licence'); ?></p>
                         <p><?php echo html_meta('legal_informations'); ?></p>
+                        <p><?php echo html_meta('w3c'); ?></p>
                     </div>
                     <div class="even">
                     <ul class="navigation">
@@ -11,8 +12,8 @@
                         <?php if(site_meta('github', '')): ?>
                         <li><a href="<?php echo social_url('github'); ?>"><?php echo social_logo('github').site_meta('github', ''); ?></a></li>
                         <?php endif; ?>
-                        <?php if(site_meta('diaspora', '')): ?>
-                        <li><a href="<?php echo social_url('framaphere'); ?>"><?php echo social_logo('diaspora').site_meta('diaspora', ''); ?></a></li>
+                        <?php if(site_meta('framasphere', '')): ?>
+                        <li><a href="<?php echo social_url('framasphere'); ?>"><?php echo social_logo('framasphere').site_meta('framasphere', ''); ?></a></li>
                         <?php endif; ?>
                         <?php if(site_meta('facebook', '')): ?>
                         <li><a href="<?php echo social_url('facebook'); ?>"><?php echo social_logo('facebook').site_meta('facebook', ''); ?></a></li>
@@ -27,7 +28,6 @@
 
                         <li><a href="<?php echo base_url(); ?>" title="Retour &agrave; l'accueil.">Accueil</a></li>
                     </ul>
-                    <p><?php echo html_meta('w3c'); ?></p>
                     </div>
                 </footer>
             </div>
diff --git a/functions.php b/functions.php
index 3e100c8..0cec55d 100644
--- a/functions.php
+++ b/functions.php
@@ -67,11 +67,16 @@ function html_meta($key) {
 function social_url($network) {
     $NETWORKS_URLS = array (
         'github' => 'https://github.com/',
-        'framasphere' => 'https://framasphere.org/',
+        'framasphere' => 'https://framasphere.org/people/',
         'facebook' => 'https://facebook.com/',
         'twitter' => 'https://twitter.com/',
     );
-    return $NETWORKS_URLS[$network].site_meta($network, '');
+    if ($network == "framasphere"){
+        $account = site_meta($network.'_id', '');
+    }else{
+        $account = site_meta($network, '');
+    }
+    return $NETWORKS_URLS[$network].$account;
 }
 
 function social_logo($network) {
-- 
GitLab