L.S.
The current skins for RoundCube require each there own settings in the configuration file main.inc.php. I.E.:
For skin MVISION: $rcmail_config['list_cols'] = array('subject','from','date');
For skin GROUPVISE: $rcmail_config['list_cols'] = array('flag','size','from','subject','date');
Kees de Keizer kees@de-keizer.net http://www.de-keizer.net/ _______________________________________________ List info: http://lists.roundcube.net/users/
Kees de Keizer (RC) wrote:
L.S.
The current skins for RoundCube require each there own settings in the configuration file main.inc.php. I.E.:
For skin MVISION: $rcmail_config['list_cols'] = array('subject','from','date');
For skin GROUPVISE: $rcmail_config['list_cols'] = array('flag','size','from','subject','date');
How can I apply these settings. when switching skins in the 'Preferences'?
Simply it's not possible, but if you're a programmer you can:
'include' tag in skin template. 2. or extend 'messages' (rcmail_message_list) object to allow setting list_cols via template.
In my opinion the second one is better. If you create a patch it will be applied in trunk.
On Tue, 18 Nov 2008 12:09:20 +0100, "A.L.E.C" alec@alec.pl wrote:
[Skin specific column settings]
Simply it's not possible, but if you're a programmer you can:
- create php file which will overwrite config and include that file by
'include' tag in skin template. 2. or extend 'messages' (rcmail_message_list) object to allow setting list_cols via template.
In my opinion the second one is better. If you create a patch it will be applied in trunk.
When I modify the ./program/steps/mail/func.inc with:
// define list of cols to be displayed if (!strlen($attrib['columns'])) $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); else eval( '$a_show_cols = array('. $attrib['columns'] .');' );
and the mail.html with:
<roundcube:object name="messages" id="messagelist" columns="'flag', 'size', 'from', 'subject', 'date'" cellspacing="0" summary="Message list" messageIcon="/images/icons/dot.png" unreadIcon="/images/icons/unread.png" deletedIcon="/images/icons/deleted.png" repliedIcon="/images/icons/replied.png" forwardedIcon="/images/icons/forwarded.png" forwardedrepliedIcon="/images/icons/forwarded_replied.png" attachmentIcon="/images/icons/attachment.png" flaggedIcon="/images/icons/flagged.png" unflaggedIcon="/images/icons/unflagged.png" />
</div>
I'll get what I want. However, only for the first displayed mailbox. When I switch mailboxes, the settings in my skin are overruled by those in the main config. Does the javascript use another function to show the messagelist?
Kees de Keizer (RC) wrote:
// define list of cols to be displayed if (!strlen($attrib['columns'])) $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); else eval( '$a_show_cols = array('. $attrib['columns'] .');' );
Don't use eval for that, just use columns list comma(or space)-separated and use explode() on it.
I'll get what I want. However, only for the first displayed mailbox. When I switch mailboxes, the settings in my skin are overruled by those in the main config. Does the javascript use another function to show the messagelist?
yes, rcmail_js_message_list(), you'll need to save columns in session
On Wed, 19 Nov 2008 13:44:24 +0100, "A.L.E.C" alec@alec.pl wrote:
// define list of cols to be displayed if (!strlen($attrib['columns'])) $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); else eval( '$a_show_cols = array('. $attrib['columns'] .');' );
Don't use eval for that, just use columns list comma(or space)-separated and use explode() on it.
Thanks.
In function rcmail_message_list($attrib):
// define list of cols to be displayed if (!strlen($attrib['columns'])) $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); else $a_show_cols = explode(',', $attrib['columns']);
$_SESSION['columns'] = $a_show_cols;
Does the javascript use another function to show the messagelist?
yes, rcmail_js_message_list(), you'll need to save columns in session
And in the function rcmail_js_message_list($attrib):
global $CONFIG, $IMAP, $OUTPUT;
if (!strlen($_SESSION['columns'])) $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); else $a_show_cols = $_SESSION['columns'];
And in the mail.html:
<roundcube:object name="messages" id="messagelist" columns="flag,size,from,subject,date" cellspacing="0" summary="Message list" messageIcon="/images/icons/dot.png" unreadIcon="/images/icons/unread.png" deletedIcon="/images/icons/deleted.png" repliedIcon="/images/icons/replied.png" forwardedIcon="/images/icons/forwarded.png" forwardedrepliedIcon="/images/icons/forwarded_replied.png" attachmentIcon="/images/icons/attachment.png" flaggedIcon="/images/icons/flagged.png" unflaggedIcon="/images/icons/unflagged.png" />
</div>
Kees de Keizer kees@de-keizer.net http://www.de-keizer.net/ _______________________________________________ List info: http://lists.roundcube.net/users/
On Wed, 19 Nov 2008 13:44:24 +0100, "A.L.E.C" alec@alec.pl wrote:
// define list of cols to be displayed if (!strlen($attrib['columns'])) $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] :
array('subject');
else eval( '$a_show_cols = array('. $attrib['columns'] .');' );
Don't use eval for that, just use columns list comma(or space)-separated and use explode() on it.
I'll get what I want. However, only for the first displayed mailbox. When I switch mailboxes, the settings in my skin are overruled by those in the main config. Does the javascript use another function to show the messagelist?
yes, rcmail_js_message_list(), you'll need to save columns in session
I've attached a modified ./program/steps/mail/func.inc, based on the latest trunk-version, to this message. The modifications are done in the following functions, when assigning the variable $a_show_cols:
A new session variable is introduced: $_SESSION['list_columns'], to remember the settings in the skin.
In object name="messages", the argument columns= can be used to override the settings in the main configuration:
<roundcube:object name="messages" id="messagelist" cellspacing="0" summary="Message list" columns="flag,size,from,subject,date" messageIcon="/images/icons/dot.png" unreadIcon="/images/icons/unread.png" deletedIcon="/images/icons/deleted.png" repliedIcon="/images/icons/replied.png" forwardedIcon="/images/icons/forwarded.png" forwardedrepliedIcon="/images/icons/forwarded_replied.png" attachmentIcon="/images/icons/attachment.png" flaggedIcon="/images/icons/flagged.png" unflaggedIcon="/images/icons/unflagged.png" />