From dfdde8441da40951eaa08301ee0ce54c7f919469 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Wed, 15 Oct 2014 18:41:11 +0300 Subject: [PATCH] add github, etc. icons to speakers --- css/styles.css | 7 +++++-- load-speakers.php | 8 +++++++- page-speakers.php | 24 ++++++++++++++++++++++-- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/css/styles.css b/css/styles.css index e197e2a..677d80e 100644 --- a/css/styles.css +++ b/css/styles.css @@ -569,8 +569,6 @@ footer .content li a { margin: 0 1em 2em 0; } .speaker .icons { - font-size: 0.8em; - width: 122px; text-align: center; display: inline-block; margin: 0 0 0 0.1em; @@ -667,6 +665,11 @@ a.button:hover { opacity: 0.8; } display: block; } +.member .icons a { + display: inline-block; + margin: 0 0.3em 0 0; +} + /* from the old site */ .program a:visited { color:#004B91; diff --git a/load-speakers.php b/load-speakers.php index b40a6bd..56be74d 100644 --- a/load-speakers.php +++ b/load-speakers.php @@ -26,7 +26,7 @@ } $spk = pg_query("select - distinct sp.user_id, sp.id, sp.first_name, sp.last_name, e.language, picture, biography, github, twitter + distinct sp.user_id, sp.id, sp.first_name, sp.last_name, e.language, picture, biography, github, twitter, public_email from speaker_profiles sp join events_speaker_profiles esp on sp.id=esp.speaker_profile_id join events e on esp.event_id=e.id @@ -62,6 +62,12 @@ add_post_meta($postid_en, '_thumbnail_id', $attid); pll_set_post_language($postid_en, 'en'); + foreach (array($postid, $postid_en) as $v) { + if (strlen($row->github)>1) add_post_meta ($v, 'github', $row->github); + if (strlen($row->twitter)>1) add_post_meta ($v, 'twitter', $row->twitter); + if (strlen($row->public_email)>1) add_post_meta ($v, 'public_email', $row->public_email); + } + pll_save_post_translations(array($postid => 'bg', $postid_en => '$en')); } diff --git a/page-speakers.php b/page-speakers.php index d856ad2..41a1dd8 100644 --- a/page-speakers.php +++ b/page-speakers.php @@ -35,8 +35,19 @@ if ( preg_match('/^(schedule|programa|speakers|halls)/', $pagename) ) { -
+ +
+ '; + if (!empty($custom['github'])) echo ''; + if (!empty($custom['public_email'])) echo ''; +?> +
+ + +

+
+ '; + if (!empty($custom['github'])) echo ''; + if (!empty($custom['public_email'])) echo ''; +?> +
+ -