Author Topic: Choose your skin  (Read 23274 times)

Offline gysmo

  • Newbie
  • *
  • Posts: 8
Re: Choose your skin
« Reply #15 on: February 04, 2008, 06:16:35 PM »
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 :)


Offline btcentral

  • Jr. Member
  • **
  • Posts: 26
Re: Choose your skin
« Reply #16 on: March 09, 2008, 06:52:42 PM »
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.

Offline Sir Savant

  • Newbie
  • *
  • Posts: 3
Re: Choose your skin
« Reply #17 on: March 11, 2008, 10:51:54 PM »
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

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
Choose your skin
« Reply #18 on: January 15, 2009, 08:14:37 AM »
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:
Code: [Select]
skins
the file:
Code: [Select]
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.
« Last Edit: January 12, 2012, 09:24:02 AM by Makc666 »
...... ...... "А стукачков мы не любим!"