Roundcube Community Forum

 

Config based on skin

Started by Julius Caesar, November 14, 2008, 07:34:06 AM

Previous topic - Next topic

Julius Caesar

The current skins for RoundCube require each there own settings in the configuration file main.inc.php. However this file is used by all skins.

How can you apply a configuration settings for a specific skin, without interfering with a setting for another skin?
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

xyanide

Hi Julius,

You`d might get a better response to your question through the developers mailing lists (RoundCube Mailing Lists or users mailing list [email protected]).

The devs don`t seem to visit this forum very often :).


- Xyanide

dano

There aren't any skin specific options in the main.inc.php file so I am a bit confused by your question

Julius Caesar

Quote from: dano;15269There aren't any skin specific options in the main.inc.php file so I am a bit confused by your question

I know that. That's why I asked this question. To help you a little:

For skin MVISION:
$rcmail_config['list_cols'] = array('subject', 'from', 'date');

For skin GROUPVISE:
$rcmail_config['list_cols'] = array('flag', 'size', 'from', 'subject', 'date');

Different settings for different skins. So I want to know, how I can apply these settings, so I can use both themes in one installation.
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Julius Caesar

#4
I've found a solution to this:

Modify the ./program/steps/mail/func.inc

Old:

function rcmail_js_message_list($a_headers$insert_top=FALSE)
  {
  global 
$CONFIG$IMAP$OUTPUT;

  
$a_show_cols is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject');


New:

function rcmail_js_message_list($a_headers$insert_top=FALSE)
  {
  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['list_columns'];



Old:

  
// define list of cols to be displayed
  
$a_show_cols is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject');
  
$a_sort_cols = array('subject''date''from''to''size');


New:
   // 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['list_columns'] = $a_show_cols;
  
$a_sort_cols = array('subject''date''from''to''size');


With these modifications, you can provide columns in the mail.html:
<roundcube:object name=messages&quot;
  id=&quot;messagelist&quot;
  cellspacing=&quot;0&quot;
  summary=&quot;Message list&quot;
  [B][COLOR=&quot;Red]columns=&quot;flag,size,from,subject,date&quot;[/COLOR][/B]
  messageIcon=&quot;/images/icons/dot.png&quot;
  unreadIcon=&quot;/images/icons/unread.png&quot;
  deletedIcon=&quot;/images/icons/deleted.png&quot;
  repliedIcon=&quot;/images/icons/replied.png&quot;
  forwardedIcon=&quot;/images/icons/forwarded.png&quot;
  forwardedrepliedIcon=&quot;/images/icons/forwarded_replied.png&quot;
  attachmentIcon=&quot;/images/icons/attachment.png&quot;
  flaggedIcon=&quot;/images/icons/flagged.png&quot;
  unflaggedIcon=&quot;/images/icons/unflagged.png&quot; />
</div>
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he