[RCU] Skin specific configuration

Kees de Keizer (RC) kees at de-keizer.net
Wed Nov 19 14:30:00 CET 2008


On Wed, 19 Nov 2008 13:44:24 +0100, "A.L.E.C" <alec at 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>

Gives me what I want.
-- 
Kees de Keizer
kees at de-keizer.net
http://www.de-keizer.net/
_______________________________________________
List info: http://lists.roundcube.net/users/



More information about the users mailing list