[horde] Disable motd for mobile view.

ANANT S ATHAVALE asa at isac.gov.in
Tue Nov 21 03:48:52 UTC 2017


----- Message from Jan Schneider <jan at horde.org> ---------
    Date: Wed, 05 Apr 2017 11:50:09 +0000
    From: Jan Schneider <jan at horde.org>
Subject: Re: [horde] Disable motd for mobile view.
      To: horde at lists.horde.org


> Zitat von ANANT S ATHAVALE <asa at isac.gov.in>:
>
>> Hi list,
>>
>> I want to disable showing motd.local.php content for mobile view  
>> only? Is this configurable?
>
> No, but you can use something like this in motd.local.php to disable  
> output for the mobile login screen:
>
> global $browser, $conf;
>
> if ($browser->isMobile() &&
>     (!isset($conf['user']['force_view']) ||
>      !in_array($conf['user']['force_view'], array('basic', 'dynamic')))) {
>
>
> -- 
> Jan Schneider
> The Horde Project
> https://www.horde.org/
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org


----- End message from Jan Schneider <jan at horde.org> -----

Dear Jan,

I tried the following in motd.local.php,

<?php
/**
  * This file contains any "Message Of The Day" Type information It will be
  * included below the log-in form on the login page.
  *
  * IMPORTANT: DO NOT EDIT THIS FILE!
  * Local overrides MUST be placed in motd.local.php or motd.d/.
  * If the 'vhosts' setting has been enabled in Horde's configuration, you can
  * use motd-servername.php.
  */
global $browser, $conf;

if ($browser->isMobile() &&
     (!isset($conf['user']['force_view']) ||
      !in_array($conf['user']['force_view'], array('basic', 'dynamic')))) {
	ob_start();
}

?>

With this, username and password vanished but motd.local.php was  
shown.  I think, with the condition mentioned above, nothing should be  
done and if condition does not match, ob_start() to be called.

Please clarify.  I don't have a test server right now, so trying out  
is difficult.



-- 
      सादर धन्यवाद/ Thanks & Regards
           अनंत / Anant
------------------------------------------------------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
------------------------------------------------------------------------------



More information about the horde mailing list