diff --git a/includes/theme.inc b/includes/theme.inc index 19e5b2e..2cf7205 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1878,7 +1878,7 @@ function template_preprocess_page(&$variables) { $head_title[] = variable_get('site_slogan', ''); } } - $variables['head_title'] = implode(' | ', $head_title); + $variables['head_title'] = implode(' - ', $head_title); $variables['base_path'] = base_path(); $variables['front_page'] = url(); $variables['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb()); diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index 10b3c1a..10bb8f9 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -241,7 +241,7 @@ function template_preprocess_maintenance_page(&$variables) { $head_title[] = variable_get('site_slogan', ''); } } - $variables['head_title'] = implode(' | ', $head_title); + $variables['head_title'] = implode(' - ', $head_title); $variables['base_path'] = base_path(); $variables['breadcrumb'] = ''; $variables['feed_icons'] = ''; diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 315390c..0a1fde9 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1155,7 +1155,7 @@ function system_site_information_settings() { $form['site_name'] = array( '#type' => 'textfield', '#title' => t('Name'), - '#default_value' => variable_get('site_name', 'Drupal'), + '#default_value' => variable_get('site_name', 'SuiteDesk'), '#description' => t('The name of this website.'), '#required' => TRUE ); @@ -1178,6 +1178,36 @@ 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( + '#type' => 'textfield', + '#title' => t('Twitter URL'), + '#default_value' => variable_get('site_twitter', ''), + '#description' => t('URL address of your Twitter account.') + ); + $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( + '#type' => 'textfield', + '#title' => t('Feed URL'), + '#default_value' => variable_get('site_rss', ''), + '#description' => t('Source feed of your main website.') + ); $form['site_footer'] = array( '#type' => 'textarea', '#title' => t('Footer message'), @@ -1213,6 +1243,13 @@ function system_site_information_settings_validate($form, &$form_state) { if ($error = user_validate_mail($form_state['values']['site_mail'])) { form_set_error('site_mail', $error); } + // 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'); // Validate front page path. $item = array('link_path' => $form_state['values']['site_frontpage']); $normal_path = drupal_get_normal_path($item['link_path']); @@ -1225,6 +1262,12 @@ function system_site_information_settings_validate($form, &$form_state) { } } +function _system_site_information_validate_url(&$form_state, $site_field) { + if (!empty($form_state['values'][$site_field]) && !valid_url($form_state['values'][$site_field], TRUE)) { + form_set_error($site_field, t("The path '@path' is not valid.", array('@path' => $form_state['values'][$site_field]))); + } +} + /** * Form builder; Configure error reporting settings. * diff --git a/modules/user/user.module b/modules/user/user.module index 20cbbf4..2162395 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1317,7 +1317,7 @@ function user_login(&$form_state) { '#required' => TRUE, ); - $form['name']['#description'] = t('Enter your @s username.', array('@s' => variable_get('site_name', 'Drupal'))); + $form['name']['#description'] = t('Enter your @s username.', array('@s' => variable_get('site_name', 'SuiteDesk'))); $form['pass'] = array('#type' => 'password', '#title' => t('Password'), '#description' => t('Enter the password that accompanies your username.'), @@ -2184,7 +2184,7 @@ function user_mail_tokens($account, $language) { global $base_url; $tokens = array( '!username' => $account->name, - '!site' => variable_get('site_name', 'Drupal'), + '!site' => variable_get('site_name', 'SuiteDesk'), '!login_url' => user_pass_reset_url($account), '!uri' => $base_url, '!uri_brief' => preg_replace('!^https?://!', '', $base_url), diff --git a/themes/zuitedesk/template.php b/themes/zuitedesk/template.php index bd2839b..a1f7ff5 100644 --- a/themes/zuitedesk/template.php +++ b/themes/zuitedesk/template.php @@ -140,7 +140,7 @@ function zuitedesk_preprocess_page(&$vars, $hook) { if (!$vars['logged_in']) { $vars['head_title'] = t('Welcome to @site_name', array('@site_name' => $vars['site_name'] ? $vars['site_name'] : 'SuiteDesk')); } - elseif ($vars['head_title'] == 'SuiteDesk | SuiteDesk') { + elseif ($vars['head_title'] == 'SuiteDesk - SuiteDesk') { $vars['head_title'] = 'SuiteDesk'; } else { @@ -221,6 +221,18 @@ function zuitedesk_preprocess_page(&$vars, $hook) { $vars['primary_links'] = '

' . t('Main menu') . '

'; $vars['primary_links'] .= ''; + // Social menu: secondary links. + if (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'); + $_SESSION['socialmenu'] = $sl; + } + $vars['secondary_links'] = $_SESSION['socialmenu']; + // Special class and bootstrap tour for SuiteDesk pages: $vars['classes_array'][] = 'suitedesk'; @@ -277,6 +289,18 @@ function _zuitedesk_submenu(&$submenu, $text) { return !empty($submenu) ? '' : ''; } +function _zuitedesk_social_link($site_field, $title, $class) { + $link = ''; + $site_link = variable_get($site_field, ''); + if (!empty($site_link)) { + $link .= ''; + } + return $link; +} + /** * Override or insert variables into the node templates. * diff --git a/themes/zuitedesk/templates/page-front.tpl.php b/themes/zuitedesk/templates/page-front.tpl.php index 6f32e3c..8706400 100644 --- a/themes/zuitedesk/templates/page-front.tpl.php +++ b/themes/zuitedesk/templates/page-front.tpl.php @@ -59,11 +59,7 @@ if ($site_name) print '' . $ESlink . ''; print '
  • ' . $ENlink . '
  • '; ?> - - - - - + @@ -430,13 +426,11 @@ if ($site_name) print '
    + +
    diff --git a/themes/zuitedesk/templates/page.tpl.php b/themes/zuitedesk/templates/page.tpl.php index 1da5316..8054383 100644 --- a/themes/zuitedesk/templates/page.tpl.php +++ b/themes/zuitedesk/templates/page.tpl.php @@ -153,11 +153,7 @@ if ($site_name) print '' . $ESlink . ''; print '
  • ' . $ENlink . '
  • '; ?> - - - - - + @@ -259,13 +255,11 @@ if ($site_name) print '
    + +
    diff --git a/themes/zuitedesk/zuitedesk.info b/themes/zuitedesk/zuitedesk.info index d35c749..1c4a2e6 100644 --- a/themes/zuitedesk/zuitedesk.info +++ b/themes/zuitedesk/zuitedesk.info @@ -1,6 +1,6 @@ name = SuiteDesk Theme description = SuiteDesk Theme Zen. -version = 0.2.23 +version = 0.2.24 screenshot = screenshot.png @@ -101,15 +101,16 @@ regions[page_closure] = Page closure ; http://drupal.org/node/171205#features features[] = logo +features[] = favicon + ; features[] = name ; features[] = slogan ; features[] = mission -features[] = node_user_picture -features[] = comment_user_picture -features[] = search -features[] = favicon -features[] = primary_links -features[] = secondary_links +; features[] = node_user_picture +; features[] = comment_user_picture +; features[] = search +; features[] = primary_links +; features[] = secondary_links