Author Topic: Display logged account  (Read 24388 times)

Offline rantdepot

  • Newbie
  • *
  • Posts: 5
Re: Display logged account
« Reply #15 on: November 06, 2006, 04:28:03 PM »
Quote from: Scubes13
I like this bit of code. I modified it so that it displays right under the logo. I also added a bit of text to it, including the domain based on the host

...

This line:
Code: [Select]
$_SERVER['HTTP_HOST']);ends up appending the server on which RoundCube is hosted as opposed to the actual IMAP server being connected to.

For example:
RoundCube is hosted on website.com where as the IMAP server is mail.com; when logged in the text shows:
Code: [Select]
User: [email]username@website.com[/email] instead of
Code: [Select]
User: [email]username@mail.com[/email]
Any idea on how to change this so the correct server is reflected?

Offline ashleyfox

  • Newbie
  • *
  • Posts: 4
Re: Display logged account
« Reply #16 on: August 22, 2007, 05:08:46 PM »
Anyone know how to get this to work with the latest roundcube release: 0.1-RC1.

I've added everything it says but it doesnt work. I've narrowed down the problem (I think anyway) to the additions made in main.inc.

Specifically:

Code: [Select]
/***** display user information *****/
function rcmail_user_display($attrib)
 {
 global $OUTPUT, $JS_OBJECT_NAME;

 if (!$attrib['id'])
  $attrib['id'] = 'rcmuserdisplay';

 $OUTPUT->add_script(sprintf("%s.gui_object('userdisplay', '%s');", $JS_OBJECT_NAME, $attrib['id']));

 // allow the following attributes to be added to the <span> tag
 $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id'));

 $out = '<span' . $attrib_str . '>';
 $out = $_SESSION['username'];
 $out .= '</span>';
 return $out;
}

Any help would be appreciated.

Offline ashleyfox

  • Newbie
  • *
  • Posts: 4
Re: Display logged account
« Reply #17 on: August 22, 2007, 05:19:24 PM »
I think I've fixed it. Just changed the code in main.inc. It works now in roundcube release: 0.1-RC1. Changes are shown below:

Code: [Select]
/***** display user information *****/
function rcmail_user_display($attrib)
 {
 global $OUTPUT, $JS_OBJECT_NAME;

 if (!$attrib['id'])
 $attrib['id'] = 'rcmuserdisplay';

 $OUTPUT->add_script(sprintf(&quot;rcmail.gui_object('userdisplay', '%s');&quot;, $JS_OBJECT_NAME, $attrib['id']));

 // allow the following attributes to be added to the <span> tag
 $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id'));

 $out = '<span' . $attrib_str . '>';
 $out = $_SESSION['username'];
 $out .= '</span>';
 return $out;
}

Offline timelord

  • Jr. Member
  • **
  • Posts: 15
Re: Display logged account
« Reply #18 on: September 27, 2007, 02:12:27 AM »
Quote from: SKaero
Thanks for the 2 way it looks nice to, but I have a clock there :(

Any code for that clock? ;)
SCUBA LIBRE :D

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,533
    • http://SKaero.com/
Re: Display logged account
« Reply #19 on: September 27, 2007, 05:20:26 AM »
Yes I think I have it in a old back-up I will see if I can dig it up and get it to work in rc1

Offline seansan

  • Jr. Member
  • **
  • Posts: 84
Re: Display logged account
« Reply #20 on: October 20, 2007, 12:00:49 PM »
Has this been added to SVN - or logged as a patch in trac?

Could by nice to set as an option (to not dustrub users who dont want it)

Offline rsw686

  • Newbie
  • *
  • Posts: 5
Re: Display logged account
« Reply #21 on: October 31, 2007, 01:47:25 PM »
Quote from: seansan
Has this been added to SVN - or logged as a patch in trac?

Could by nice to set as an option (to not dustrub users who dont want it)

I would like to see this added as well. I have multiple accounts I open at the same time and I can never remember which window is what. I have a feeling most would users would appreciate this feature.

Offline njohal

  • Newbie
  • *
  • Posts: 7
Re: Display logged account
« Reply #22 on: November 11, 2007, 09:30:05 PM »
Say you want to display their name rather then the email address that they have typed in the identity.. how can one pursue that??

Offline ricardobond

  • Newbie
  • *
  • Posts: 1
Re: Display logged account
« Reply #23 on: December 05, 2007, 05:57:23 PM »
This code is for rc1 right?
I'm using rc2

Anybody help me?

Sorry, but my english is very poor!

Thx.

Offline luxerama

  • Newbie
  • *
  • Posts: 8
Re: Display logged account
« Reply #24 on: December 13, 2007, 07:56:01 AM »
Quote from: njohal
Say you want to display their name rather then the email address that they have typed in the identity.. how can one pursue that??

Depends what their name is or where it comes from. I have a virtual setup where finding the users name is very easy as its just the string before the @. Which means I can just do:
Code: [Select]
$username = explode('@', $_SESSION['username']);
 $out .= $username[0];
Instead of:
Code: [Select]
$out .= $_SESSION['username'];

Offline luxerama

  • Newbie
  • *
  • Posts: 8
Re: Display logged account
« Reply #25 on: December 15, 2007, 06:03:59 AM »
Quote from: ricardobond
This code is for rc1 right?
I'm using rc2

Anybody help me?

Sorry, but my english is very poor!

Thx.

Still interested? If so let me know and Ill post the information.

Offline dunccs

  • Jr. Member
  • **
  • Posts: 10
Re: Display logged account
« Reply #26 on: January 15, 2008, 08:31:36 AM »
Quote from: luxerama
Quote from: ricardobond
This code is for rc1 right?
I'm using rc2

Anybody help me?

Sorry, but my english is very poor!

Thx.

Still interested? If so let me know and Ill post the information.

He has gone but i sure am intrested int he code. Hope to hear from you Soon, God bless!!

Offline dunccs

  • Jr. Member
  • **
  • Posts: 10
Re: Display logged account
« Reply #27 on: January 15, 2008, 08:33:14 AM »
Quote from: luxerama
Quote from: ricardobond
This code is for rc1 right?
I'm using rc2

Anybody help me?

Sorry, but my english is very poor!

Thx.

Still interested? If so let me know and Ill post the information.

i sure am intrested , please Post !!

Offline jasonar

  • Jr. Member
  • **
  • Posts: 18
Re: Display logged account
« Reply #28 on: January 20, 2008, 05:41:35 PM »
I'm also using RC2 and would like to know how to use it with my version.

Offline bswinnerton

  • Jr. Member
  • **
  • Posts: 49
Re: Display logged account
« Reply #29 on: January 31, 2008, 09:24:37 AM »
For some reason when I do this it greys out all of my icons for checking mail, replying etc. =(. It has something to do with the app.js because once i went back to the old one it worked fine.