Drop the default top-right 'SquirrelMail' name and link, as discussed
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 8 Feb 2007 14:47:23 +0000 (14:47 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 8 Feb 2007 14:47:23 +0000 (14:47 +0000)
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
config/config_default.php
contrib/RPM/config.php.redhat
functions/page_header.php
templates/default/page_header.tpl
templates/default_advanced/page_header.tpl

index 0f3c4c3fa6cb42e7f28cae9b4f6f420a397870a7..148b6615f6eb1c5ccbaa90fe59044f10709c7cb6 100755 (executable)
@@ -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 );
 $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) ;
 $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 "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";
 
         print "\n";
         print "R   Return to Main Menu\n";
@@ -1107,8 +1107,8 @@ sub command6 {
 
 # Default link to provider
 sub command7 {
 
 # 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 = <STDIN>;
     print "\n";
     print "[$WHT$provider_uri$NRM]: $WHT";
     $new_provider_uri = <STDIN>;
@@ -1122,13 +1122,13 @@ sub command7 {
 }
 
 sub command8 {
 }
 
 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 = <STDIN>;
     if ( $new_provider_name eq "\n" ) {
     print "\n";
     print "[$WHT$provider_name$NRM]: $WHT";
     $new_provider_name = <STDIN>;
     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;
     } else {
         $new_provider_name =~ s/[\r\n]//g;
         $new_provider_name =~ s/^\s+$//g;
index a90fd687da2fa13e2d759d95383c5d40b5196487..0ede1844ac6fe66a0a917c57bd0a110ef80745f3 100644 (file)
@@ -86,21 +86,23 @@ $frame_top = '_top';
 /**
  * Provider name
  *
 /**
  * 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
  */
  * @global string $provider_name
  */
-$provider_name = 'SquirrelMail';
+$provider_name = '';
 
 /**
  * Provider URI
  *
 
 /**
  * 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 = '';
  * @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"
  * 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
  */
  * @global bool $hide_sm_attributions
  * @since 1.2.0
  */
index e6d35ebc73abb676e597319c1d02b63d0f6b1cee..0493df5635dbf73972b586fe6885105b58f1bf7c 100644 (file)
@@ -17,9 +17,8 @@ $org_title     = "SquirrelMail $version";
 $signout_page  = '';
 $frame_top     = '_top';
 
 $signout_page  = '';
 $frame_top     = '_top';
 
-$provider_uri     = 'http://www.squirrelmail.org/';
-
-$provider_name     = 'SquirrelMail';
+$provider_uri     = '';
+$provider_name     = '';
 
 $motd = "";
 
 
 $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.
  */
  * 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
index c81fe67f615b1e41cf7fd4c45954b325a0aa04a8..1581db79543e1f6227821327bfda80ce8b624702 100644 (file)
@@ -239,19 +239,14 @@ function displayPageHeader($color, $mailbox, $sHeaderJs='', $sBodyTagJs = '') {
         $shortBoxName = _("INBOX");
     }
 
         $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('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);
     $oTemplate->assign('frame_top', $frame_top);
     $oTemplate->assign('urlMailbox', $urlMailbox);
     $oTemplate->assign('startMessage', $startMessage);
index f21b45b5058e199cfde096baeafcbe7d412b572e..3860ac1669aeb09953b84a0f8bd6c9ba80dbb620 100644 (file)
@@ -75,7 +75,7 @@ $help_link            = makeInternalLink ('src/help.php', $help_str);
   </td>
  </tr>
  <tr>
   </td>
  </tr>
  <tr>
-  <td class="sqm_topNavigation"<?php echo ($hide_sm_attributions ? ' colspan="2"' : ''); ?>>
+  <td class="sqm_topNavigation"<?php echo (empty($provider_link) ? ' colspan="2"' : ''); ?>>
    <?php echo $compose_link; ?>&nbsp;&nbsp;
    <?php echo $address_link; ?>&nbsp;&nbsp;
    <?php echo $folders_link; ?>&nbsp;&nbsp;
    <?php echo $compose_link; ?>&nbsp;&nbsp;
    <?php echo $address_link; ?>&nbsp;&nbsp;
    <?php echo $folders_link; ?>&nbsp;&nbsp;
@@ -84,9 +84,9 @@ $help_link            = makeInternalLink ('src/help.php', $help_str);
    <?php echo $help_link; ?>&nbsp;&nbsp;
    <?php /* FIXME: no hooks in templates!! */ global $null; do_hook('menuline', $null); ?>
   </td>
    <?php echo $help_link; ?>&nbsp;&nbsp;
    <?php /* FIXME: no hooks in templates!! */ global $null; do_hook('menuline', $null); ?>
   </td>
-  <?php if (!empty($sm_attribute_str))
+  <?php if (!empty($provider_link))
             echo '<td class="sqm_providerInfo">'
             echo '<td class="sqm_providerInfo">'
-               . $sm_attribute_str
+               . $provider_link
                . "</td>\n"; ?>
  </tr>
 </table>
                . "</td>\n"; ?>
  </tr>
 </table>
index 64ac2065032ce04221b2f4c92cd56ab283201af8..d348932e712f798d5db3648c31998312ed5f0f5a 100644 (file)
@@ -95,7 +95,7 @@ $help_link            = makeInternalLink ('src/help.php', $help_str);
   </td>
  </tr>
  <tr>
   </td>
  </tr>
  <tr>
-  <td class="sqm_topNavigation"<?php echo ($hide_sm_attributions ? ' colspan="2"' : ''); ?>>
+  <td class="sqm_topNavigation"<?php echo (empty($provider_link) ? ' colspan="2"' : ''); ?>>
    <?php echo $compose_link; ?>&nbsp;&nbsp;
    <?php echo $address_link; ?>&nbsp;&nbsp;
    <?php echo $folders_link; ?>&nbsp;&nbsp;
    <?php echo $compose_link; ?>&nbsp;&nbsp;
    <?php echo $address_link; ?>&nbsp;&nbsp;
    <?php echo $folders_link; ?>&nbsp;&nbsp;
@@ -104,9 +104,9 @@ $help_link          = makeInternalLink ('src/help.php', $help_str);
    <?php echo $help_link; ?>&nbsp;&nbsp;
    <?php /* FIXME: no hooks in templates!! */ global $null; do_hook('menuline', $null); ?>
   </td>
    <?php echo $help_link; ?>&nbsp;&nbsp;
    <?php /* FIXME: no hooks in templates!! */ global $null; do_hook('menuline', $null); ?>
   </td>
-  <?php if (!empty($sm_attribute_str))
+  <?php if (!empty($provider_link))
             echo '<td class="sqm_providerInfo">'
             echo '<td class="sqm_providerInfo">'
-               . $sm_attribute_str
+               . $provider_link
                . "</td>\n"; ?>
  </tr>
 </table>
                . "</td>\n"; ?>
  </tr>
 </table>