Roundcube Community Forum

 

Choose your skin

Started by gysmo, May 20, 2007, 04:37:25 PM

Previous topic - Next topic

gysmo

Hi,

I'm glad to see that some people use it :)

I'll improse and post a better version and hope that will ba added in RC :)


btcentral

Quote from: gysmo Hi,

I'm glad to see that some people use it :)

I'll improse and post a better version and hope that will ba added in RC :)



Great feature, works just fine with the latest version of RC after manually patching.

Cheers,
BTCentral
http://www.btcentral.org.uk - Cheap, Top Quality Web-design.

Sir Savant

I can't seem to get this working. I have the theme items appearing now but whenever I choose a theme and save it does not reload the page properly and never uses the skin I chose. I am using Trunk r1190

Makc666

#18
There is must be some way to switch off this Skin Chooser or set onky skins you want your users to use...

The change is to add:

@include(INSTALL_PATH 'skins/index.inc'); 

in function:
function rcmail_get_skins() 
  {
... 
  }


So you will get this one:
function rcmail_get_skins() 
  { 
  
$path 'skins'
  
$skins = array(); 
 
  
$dir opendir($path); 
   
  if (!
$dir
        return 
false
   
  while ((
$file readdir($dir)) !== false
    { 
    
$filename $path.'/'.$file;                
    if (
is_dir($filename) && is_readable($filename)  
        && !
in_array($file, array('.''..''.svn'))) 
      
$skins[] = $file;                         
    }                                           
                                                
  
closedir($dir);                               
 
  @include(
INSTALL_PATH 'skins/index.inc'); 
 
  return 
$skins
  }


After that you can create in directory:
skins
the file:
index.inc
with code like:
<?php 
 
$skins 
= array ( 
    
'Test' => 'test'
    
'Default' => 'default' 
); 
 
?>


This is for cases when you have a lot of skins on "skins" directory.
...... ...... "А стукачков мы не любим!"