New social link to reference the owner's website
This commit is contained in:
parent
5d94c7963f
commit
894a693a65
10 changed files with 67 additions and 53 deletions
|
@ -51,14 +51,14 @@ ini_set('url_rewriter.tags', '');
|
|||
$conf = array(
|
||||
// Site main values:
|
||||
'site_name' => 'My SuiteDesk site',
|
||||
# 'anonymous' => 'Visitor',
|
||||
|
||||
// Social links:
|
||||
# 'site_twitter' => 'http://twitter.com/username',
|
||||
# 'site_facebook' => 'http://facebook.com/userpage',
|
||||
# 'site_linkedin' => 'http://linkedin.com/in/username',
|
||||
# 'site_contact' => 'https://www.example.com/contact',
|
||||
# 'site_rss' => 'https://www.example.com/feed',
|
||||
# 'social_website' => 'http://www.example.com',
|
||||
# 'social_rss' => 'http://www.example.com/feed',
|
||||
# 'social_twitter' => 'http://twitter.com/username',
|
||||
# 'social_facebook' => 'http://facebook.com/userpage',
|
||||
# 'social_linkedin' => 'http://linkedin.com/in/username',
|
||||
# 'social_contact' => 'http://www.example.com/contact',
|
||||
|
||||
// Reverse proxy:
|
||||
# 'reverse_proxy' => TRUE,
|
||||
|
|
|
@ -1178,36 +1178,44 @@ function system_site_information_settings() {
|
|||
'#default_value' => variable_get('site_mission', ''),
|
||||
'#description' => t("Your site's mission or focus statement (often prominently displayed on the front page).")
|
||||
);
|
||||
$form['site_twitter'] = array(
|
||||
|
||||
$form['social_website'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Twitter URL'),
|
||||
'#default_value' => variable_get('site_twitter', ''),
|
||||
'#description' => t('URL address of your Twitter account.')
|
||||
'#title' => t('Website URL'),
|
||||
'#default_value' => variable_get('social_website', ''),
|
||||
'#description' => t('Your main website.')
|
||||
);
|
||||
$form['site_facebook'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Facebook URL'),
|
||||
'#default_value' => variable_get('site_facebook', ''),
|
||||
'#description' => t('URL address of your Facebook page.')
|
||||
);
|
||||
$form['site_linkedin'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('LinkedIn URL'),
|
||||
'#default_value' => variable_get('site_linkedin', ''),
|
||||
'#description' => t('URL address of your LinkedIn account.')
|
||||
);
|
||||
$form['site_contact'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Web contact URL'),
|
||||
'#default_value' => variable_get('site_contact', ''),
|
||||
'#description' => t('URL address of your contact page.')
|
||||
);
|
||||
$form['site_rss'] = array(
|
||||
$form['social_rss'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Feed URL'),
|
||||
'#default_value' => variable_get('site_rss', ''),
|
||||
'#default_value' => variable_get('social_rss', ''),
|
||||
'#description' => t('Source feed of your main website.')
|
||||
);
|
||||
$form['social_twitter'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Twitter URL'),
|
||||
'#default_value' => variable_get('social_twitter', ''),
|
||||
'#description' => t('URL address of your Twitter account.')
|
||||
);
|
||||
$form['social_facebook'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Facebook URL'),
|
||||
'#default_value' => variable_get('social_facebook', ''),
|
||||
'#description' => t('URL address of your Facebook page.')
|
||||
);
|
||||
$form['social_linkedin'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('LinkedIn URL'),
|
||||
'#default_value' => variable_get('social_linkedin', ''),
|
||||
'#description' => t('URL address of your LinkedIn account.')
|
||||
);
|
||||
$form['social_contact'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Web contact URL'),
|
||||
'#default_value' => variable_get('social_contact', ''),
|
||||
'#description' => t('URL address of your contact page.')
|
||||
);
|
||||
|
||||
$form['site_footer'] = array(
|
||||
'#type' => 'textarea',
|
||||
'#title' => t('Footer message'),
|
||||
|
@ -1245,11 +1253,11 @@ function system_site_information_settings_validate($form, &$form_state) {
|
|||
}
|
||||
// Validate social links.
|
||||
unset($_SESSION['socialmenu']);
|
||||
_system_site_information_validate_url($form_state, 'site_twitter');
|
||||
_system_site_information_validate_url($form_state, 'site_facebook');
|
||||
_system_site_information_validate_url($form_state, 'site_linkedin');
|
||||
_system_site_information_validate_url($form_state, 'site_contact');
|
||||
_system_site_information_validate_url($form_state, 'site_rss');
|
||||
_system_site_information_validate_url($form_state, 'social_twitter');
|
||||
_system_site_information_validate_url($form_state, 'social_facebook');
|
||||
_system_site_information_validate_url($form_state, 'social_linkedin');
|
||||
_system_site_information_validate_url($form_state, 'social_contact');
|
||||
_system_site_information_validate_url($form_state, 'social_rss');
|
||||
// Validate front page path.
|
||||
$item = array('link_path' => $form_state['values']['site_frontpage']);
|
||||
$normal_path = drupal_get_normal_path($item['link_path']);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@font-face {
|
||||
font-family: 'fonticons';
|
||||
src: url('../font/fonticons.eot?27716456');
|
||||
src: url('../font/fonticons.eot?27716456#iefix') format('embedded-opentype'),
|
||||
url('../font/fonticons.woff2?27716456') format('woff2'),
|
||||
url('../font/fonticons.woff?27716456') format('woff'),
|
||||
url('../font/fonticons.ttf?27716456') format('truetype'),
|
||||
url('../font/fonticons.svg?27716456#fonticons') format('svg');
|
||||
src: url('../font/fonticons.eot?63556011');
|
||||
src: url('../font/fonticons.eot?63556011#iefix') format('embedded-opentype'),
|
||||
url('../font/fonticons.woff2?63556011') format('woff2'),
|
||||
url('../font/fonticons.woff?63556011') format('woff'),
|
||||
url('../font/fonticons.ttf?63556011') format('truetype'),
|
||||
url('../font/fonticons.svg?63556011#fonticons') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
|||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fonticons';
|
||||
src: url('../font/fonticons.svg?27716456#fonticons') format('svg');
|
||||
src: url('../font/fonticons.svg?63556011#fonticons') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -102,6 +102,7 @@
|
|||
.icon-reply:before { content: '\e82c'; } /* '' */
|
||||
.icon-help:before { content: '\e82d'; } /* '' */
|
||||
.icon-pdf:before { content: '\e82e'; } /* '' */
|
||||
.icon-www:before { content: '\e82f'; } /* '' */
|
||||
.icon-ticket:before { content: '\e830'; } /* '' */
|
||||
.icon-print:before { content: '\e831'; } /* '' */
|
||||
.icon-project:before { content: '\e832'; } /* '' */
|
||||
|
|
Binary file not shown.
|
@ -100,6 +100,8 @@
|
|||
|
||||
<glyph glyph-name="pdf" unicode="" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-287 331q18-14 47-31 33 4 65 4 82 0 99-27 9-13 1-29 0-1-1-1l-1-2v0q-3-21-39-21-27 0-64 11t-73 29q-123-13-219-46-85-146-135-146-8 0-15 4l-14 7q0 0-3 2-6 6-4 20 5 23 32 51t73 54q8 5 13-3 1-1 1-2 29 47 60 110 38 76 58 146-13 46-17 89t4 71q6 22 23 22h12q13 0 20-8 10-12 5-38-1-3-2-4 0-2 0-5v-17q-1-68-8-107 31-91 82-133z m-321-229q29 13 76 88-29-22-49-47t-27-41z m222 513q-9-23-2-73 1 4 4 24 0 2 4 24 1 3 3 5-1 0-1 1-1 1-1 2 0 12-7 20 0-1 0-1v-2z m-70-368q76 30 159 45-1 0-7 5t-9 8q-43 37-71 98-15-48-46-110-17-31-26-46z m361 9q-13 13-78 13 42-16 69-16 8 0 10 1 0 0-1 2z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="www" unicode="" d="M224 504q-22 0-42-10-48 52-92 128 54 74 128 118 92-38 152-82-6-16-6-32 0-6 4-22-62-48-116-104-16 4-28 4z m-98-98q0-34 20-60-60-114-80-232-66 106-66 236 0 110 50 206 38-62 84-112-8-24-8-38z m336 318q-28 0-50-14-58 42-114 70 84 30 162 30 120 0 230-62-76-14-162-50-26 26-66 26z m146-460q-160 24-290 112 4 20 4 30 0 24-14 52 38 44 98 90 26-20 56-20 14 0 38 8 94-108 134-240-16-14-26-32z m128-132q38 14 54 60 58 4 108 18-46-146-166-232 6 48 6 98 0 10-1 28t-1 28z m-150 66q-190-96-304-272-90 36-158 110 12 144 80 274 6-2 20-2 30 0 52 14 142-98 310-124z m184 492q150-136 150-340 0-22-4-66-64-18-130-24-24 56-88 60-48 146-148 264 10 20 10 42l0 10q100 42 210 54z m-136-544q14-10 32-18 2-18 2-52 0-80-14-144-86-42-194-42-58 0-112 12 110 160 286 244z" horiz-adv-x="920" />
|
||||
|
||||
<glyph glyph-name="ticket" unicode="" d="M155 506q-8-8-11-22t-3-25-2-11q-2-2-17-15t-19-17q-16-14-28 4l-70 76q-11 12 2 24 2 2 18 14t20 16q6 6 27 6t37 14q14 14 18 38t10 30q2 0 9 7t26 22 41 31q134 90 186 96 122 0 148-2 12 0-8-8-120-52-152-76-80-56-36-114 34-46 38-48 8-8-2-14-2-2-38-35t-38-35q-14-8-18-4-42 48-71 60t-67-12z m286-26l410-476q18-22-2-38l-48-42q-22-14-38 4l-414 472q-8 8 0 20l72 62q12 8 20-2z m554 202q16-104-16-166-50-88-154-62-56 12-100-32l-82-78-68 78 68 70q24 24 31 53t6 65 5 58q12 56 140 112 12 6 18-3t2-15q-12-12-46-80-14-10-12-35t40-53q58-40 96 22 6 12 26 41t22 33q4 10 13 9t11-17z m-858-684l254 248 76-86-246-242q-20-20-38-4l-46 46q-22 18 0 38z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="print" unicode="" d="M214-7h500v143h-500v-143z m0 357h500v214h-89q-22 0-38 16t-16 38v89h-357v-357z m643-36q0 15-10 25t-26 11-25-11-10-25 10-25 25-10 26 10 10 25z m72 0v-232q0-7-6-12t-12-6h-125v-89q0-22-16-38t-38-16h-536q-22 0-37 16t-16 38v89h-125q-7 0-13 6t-5 12v232q0 44 32 76t75 31h36v304q0 22 16 38t37 16h375q23 0 50-12t42-26l85-85q15-16 27-43t11-49v-143h35q45 0 76-31t32-76z" horiz-adv-x="928.6" />
|
||||
|
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -227,13 +227,14 @@ function zuitedesk_preprocess_page(&$vars, $hook) {
|
|||
$vars['primary_links'] .= '<ul id="main-menu" class="nav navbar-nav navbar-right clearfix">' . $pl . '</ul>';
|
||||
|
||||
// Social menu: secondary links.
|
||||
if (empty($_SESSION['socialmenu'])) {
|
||||
if (user_is_anonymous() || empty($_SESSION['socialmenu'])) {
|
||||
$sl = '';
|
||||
$sl .= _zuitedesk_social_link('site_rss', 'Rss', 'rss');
|
||||
$sl .= _zuitedesk_social_link('site_twitter', 'Twitter', 'twitter');
|
||||
$sl .= _zuitedesk_social_link('site_facebook', 'Facebook', 'facebook');
|
||||
$sl .= _zuitedesk_social_link('site_linkedin', 'Linkedin', 'linkedin');
|
||||
$sl .= _zuitedesk_social_link('site_contact', 'Mail', 'mail');
|
||||
$sl .= _zuitedesk_social_link('social_website', t('Website'), 'www');
|
||||
$sl .= _zuitedesk_social_link('social_rss', 'Rss', 'rss');
|
||||
$sl .= _zuitedesk_social_link('social_twitter', 'Twitter', 'twitter');
|
||||
$sl .= _zuitedesk_social_link('social_facebook', 'Facebook', 'facebook');
|
||||
$sl .= _zuitedesk_social_link('social_linkedin', 'Linkedin', 'linkedin');
|
||||
$sl .= _zuitedesk_social_link('social_contact', 'Mail', 'mail');
|
||||
$_SESSION['socialmenu'] = $sl;
|
||||
}
|
||||
$vars['secondary_links'] = $_SESSION['socialmenu'];
|
||||
|
@ -294,12 +295,14 @@ function _zuitedesk_submenu(&$submenu, $text) {
|
|||
return !empty($submenu) ? '<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $text . ' <span class="caret"></span></a><ul class="dropdown-menu">' . $submenu . '</ul></li>' : '';
|
||||
}
|
||||
|
||||
function _zuitedesk_social_link($site_field, $title, $class) {
|
||||
function _zuitedesk_social_link($social_field, $title, $class) {
|
||||
global $conf;
|
||||
|
||||
$link = '';
|
||||
$site_link = variable_get($site_field, '');
|
||||
if (!empty($site_link)) {
|
||||
$social_link = variable_get($social_field, $conf[$social_field]);
|
||||
if (!empty($social_link)) {
|
||||
$link .= '<li class="social-link-' . $class . '">';
|
||||
$link .= '<a href="' . $site_link . '" title="' . $title . '" class="icon-' . $class . '">';
|
||||
$link .= '<a href="' . $social_link . '" title="' . $title . '" class="icon-' . $class . '">';
|
||||
$link .= '<span class="element-invisible">' . $title . '</span></a>';
|
||||
$link .= '</li>';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name = SuiteDesk Theme
|
||||
description = SuiteDesk Theme Zen.
|
||||
version = 0.2.38
|
||||
version = 0.2.39
|
||||
|
||||
screenshot = screenshot.png
|
||||
|
||||
|
|
Reference in a new issue