[imp] logo image regarding....
Anant Athavale
asa at isac.gov.in
Wed Mar 29 20:17:04 PST 2006
I have achieved it by adding the following code in
horde/templates/portal/sidebar.inc file
------------------------------------------------------------------------------
<?
$username = Auth::getAuth();
$filename = '/home/horde/photos/' . $username . '.jpg';
if (file_exists($filename)) {
$conf['logo']['image'] = 'http://isacmail2.isac.dos.gov.in/photos/' .
$username . '.jpg';
} else {
$conf['logo']['image'] = 'http://isacmail2.isac.dos.gov.in/isrologo.bmp';
}
?>
------------------------------------------------------------------------------
I was initially trying to do it in horde conf file itself, which was always
being suggested in the list. As I was not getting the value of Auth::getAuth()
in horde conf file, I had to do this.
Quoting Anant Athavale <asa at isac.gov.in>:
> Dear List:
>
> I am trying to display the photo of the logged in person at the place
> of logo. I
> wrote the following script in horde/conf.php. But, I don't get any data for
> Auth::getAuth? I want to get the username in conf.php and want to
> point to the
> respective jpg file based on username for 'logo''image'.
>
> Please let me know, how will I get username in horde/conf.php?
>
> Regards,
> Anant.
>
>
>
>
> $username = Auth::getAuth();
> $filename = '/home/horde/' . $username . '.jpg';
> if (file_exists($filename)) {
> $conf['logo']['image'] = 'http://isacmail2.isac.dos.gov.in/' .
> $username .
> '.jpg';
> } else {
> $conf['logo']['image'] = 'http://isacmail2.isac.dos.gov.in/isrologo.bmp';
> }
> $conf['logo']['image'] = 'http://isacmail2.isac.dos.gov.in/isrologo.bmp';
>
>
> Regards,
>
> Anant.
>
> ----------------------------------------------------------------
> PLEASE NOTE THE CHANGE IN DOMAIN PART OF THE "FROM :" ADDRESS.
> Our domain is changed to 'isac.gov.in'.
> Kindly update your Address Book accordingly.
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>
Regards,
Anant.
----------------------------------------------------------------
PLEASE NOTE THE CHANGE IN DOMAIN PART OF THE "FROM :" ADDRESS.
Our domain is changed to 'isac.gov.in'.
Kindly update your Address Book accordingly.
More information about the imp
mailing list