From 5810acfad0da5329c455285d6c70f49efc34871d Mon Sep 17 00:00:00 2001 From: kink Date: Thu, 8 Feb 2007 14:47:23 +0000 Subject: [PATCH] Drop the default top-right 'SquirrelMail' name and link, as discussed on squirrelmail-devel. It's overkill anyway to name and link SquirrelMail so prominently on every page. It also confused users who clicked straight through to our site. It will now only display something if provider_name and provider_uri have been set, i.o.w., it's completely optional. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12242 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/conf.pl | 14 +++++++------- config/config_default.php | 20 +++++++++++--------- contrib/RPM/config.php.redhat | 6 ++---- functions/page_header.php | 13 ++++--------- templates/default/page_header.tpl | 6 +++--- templates/default_advanced/page_header.tpl | 6 +++--- 6 files changed, 30 insertions(+), 35 deletions(-) diff --git a/config/conf.pl b/config/conf.pl index 0f3c4c3f..148b6615 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -385,7 +385,7 @@ $delete_folder = 'false' if ( !$delete_folder ); $noselect_fix_enable = 'false' if ( !$noselect_fix_enable ); $frame_top = "_top" if ( !$frame_top ); $provider_uri = '' if ( !$provider_uri ); -$provider_name = '' if ( !$provider_name ); +$provider_name = '' if ( !$provider_name || $provider_name eq 'SquirrelMail'); $no_list_for_subscribe = 'false' if ( !$no_list_for_subscribe ); $allow_charset_search = 'true' if ( !$allow_charset_search ); $allow_advanced_search = 0 if ( !$allow_advanced_search) ; @@ -563,7 +563,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) && ( $command ne ":q" ) ) { print "5. Signout Page : $WHT$signout_page$NRM\n"; print "6. Top Frame : $WHT$frame_top$NRM\n"; print "7. Provider link : $WHT$provider_uri$NRM\n"; - print "8. Provider name : $WHT$provider_name$NRM\n"; + print "8. Provider link text : $WHT$provider_name$NRM\n"; print "\n"; print "R Return to Main Menu\n"; @@ -1107,8 +1107,8 @@ sub command6 { # Default link to provider sub command7 { - print "Here you can set the link on the right of the page.\n"; - print "If empty, it will link to the SquirrelMail About page.\n"; + print "Here you can set the link on the top-right of the message list.\n"; + print "If empty, it will not be displayed.\n"; print "\n"; print "[$WHT$provider_uri$NRM]: $WHT"; $new_provider_uri = ; @@ -1122,13 +1122,13 @@ sub command7 { } sub command8 { - print "Here you can set the name of the link on the right of the page.\n"; - print "The default is 'SquirrelMail'\n"; + print "Here you can set the name of the link on the top-right of the message list.\n"; + print "The default is empty (do not display anything).'\n"; print "\n"; print "[$WHT$provider_name$NRM]: $WHT"; $new_provider_name = ; if ( $new_provider_name eq "\n" ) { - $new_provider_name = 'SquirrelMail'; + $new_provider_name = ''; } else { $new_provider_name =~ s/[\r\n]//g; $new_provider_name =~ s/^\s+$//g; diff --git a/config/config_default.php b/config/config_default.php index a90fd687..0ede1844 100644 --- a/config/config_default.php +++ b/config/config_default.php @@ -86,21 +86,23 @@ $frame_top = '_top'; /** * Provider name * - * Here you can set name of the link displayed on the right side of main page. + * Here you can set the text of the link displayed on the top-right + * of the message list. + * + * Defaults to empty (no link). * - * Link will be displayed only if you have $hide_sm_attributions - * option set to true. * @global string $provider_name */ -$provider_name = 'SquirrelMail'; +$provider_name = ''; /** * Provider URI * - * Here you can set URL of the link displayed on the right side of main page. - * When empty, this refers to the SquirrelMail About page. - * Link will be displayed only if you have $hide_sm_attributions - * option set to true. + * Here you can set URL of the link displayed on the top-right of + * the message list. + * + * Defaults to empty (no link). + * * @global string $provider_uri */ $provider_uri = ''; @@ -562,7 +564,7 @@ $default_use_priority = true; * SquirrelMail Attributions Control * * This option disables display of "created by SquirrelMail developers" - * strings and provider link + * strings and links. * @global bool $hide_sm_attributions * @since 1.2.0 */ diff --git a/contrib/RPM/config.php.redhat b/contrib/RPM/config.php.redhat index e6d35ebc..0493df56 100644 --- a/contrib/RPM/config.php.redhat +++ b/contrib/RPM/config.php.redhat @@ -17,9 +17,8 @@ $org_title = "SquirrelMail $version"; $signout_page = ''; $frame_top = '_top'; -$provider_uri = 'http://www.squirrelmail.org/'; - -$provider_name = 'SquirrelMail'; +$provider_uri = ''; +$provider_name = ''; $motd = ""; @@ -174,4 +173,3 @@ $session_name = 'SQMSESSID'; * sent and regular output to begin, which will majorly screw * things up when we try to send more headers later. */ -?> \ No newline at end of file diff --git a/functions/page_header.php b/functions/page_header.php index c81fe67f..1581db79 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -239,19 +239,14 @@ function displayPageHeader($color, $mailbox, $sHeaderJs='', $sBodyTagJs = '') { $shortBoxName = _("INBOX"); } - $sm_attributes = ''; - if (!$hide_sm_attributions) { - if (empty($provider_uri)) { - $sm_attributes .= create_hyperlink($base_uri . 'src/about.php', 'SquirrelMail'); - } else { - if (empty($provider_name)) $provider_name = 'SquirrelMail'; - $sm_attributes .= create_hyperlink($provider_uri, $provider_name, '_blank'); - } + $provider_link = ''; + if (!empty($provider_uri) && !empty($provider_name) && $provider_name != 'SquirrelMail') { + $provider_link = create_hyperlink($provider_uri, $provider_name, '_blank'); } $oTemplate->assign('body_tag_js', $sBodyTagJs); $oTemplate->assign('shortBoxName', $shortBoxName); - $oTemplate->assign('sm_attribute_str', $sm_attributes); + $oTemplate->assign('provider_link', $provider_link); $oTemplate->assign('frame_top', $frame_top); $oTemplate->assign('urlMailbox', $urlMailbox); $oTemplate->assign('startMessage', $startMessage); diff --git a/templates/default/page_header.tpl b/templates/default/page_header.tpl index f21b45b5..3860ac16 100644 --- a/templates/default/page_header.tpl +++ b/templates/default/page_header.tpl @@ -75,7 +75,7 @@ $help_link = makeInternalLink ('src/help.php', $help_str); - > + >          @@ -84,9 +84,9 @@ $help_link = makeInternalLink ('src/help.php', $help_str);    - ' - . $sm_attribute_str + . $provider_link . "\n"; ?> diff --git a/templates/default_advanced/page_header.tpl b/templates/default_advanced/page_header.tpl index 64ac2065..d348932e 100644 --- a/templates/default_advanced/page_header.tpl +++ b/templates/default_advanced/page_header.tpl @@ -95,7 +95,7 @@ $help_link = makeInternalLink ('src/help.php', $help_str); - > + >          @@ -104,9 +104,9 @@ $help_link = makeInternalLink ('src/help.php', $help_str);    - ' - . $sm_attribute_str + . $provider_link . "\n"; ?> -- 2.25.1