Author Topic: Config based on skin  (Read 4337 times)

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Config based on skin
« on: November 14, 2008, 07:34:06 AM »
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

Offline xyanide

  • Jr. Member
  • **
  • Posts: 41
Config based on skin
« Reply #1 on: November 14, 2008, 03:43:55 PM »
Hi Julius,

You`d might get a better response to your question through the developers mailing lists (RoundCube Mailing Lists or users mailing list users@lists.roundcube.net).

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


- Xyanide

Offline dano

  • Full Member
  • ***
  • Posts: 124
Config based on skin
« Reply #2 on: November 15, 2008, 11:51:40 AM »
There aren't any skin specific options in the main.inc.php file so I am a bit confused by your question

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Config based on skin
« Reply #3 on: November 15, 2008, 01:04:14 PM »
Quote from: dano;15269
There 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

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Config based on skin
« Reply #4 on: November 19, 2008, 08:46:14 AM »
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:
Code: [Select]
<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>
« Last Edit: November 19, 2008, 05:58:47 PM by Julius Caesar »
Julius Caesar

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