Roundcube Community Forum

Themes & Styling => Theme Releases => Topic started by: gysmo on May 20, 2007, 04:37:25 PM

Title: Choose your skin
Post by: gysmo on May 20, 2007, 04:37:25 PM
Hi,

I have add the features to choose skin by user in pref panel.

I hope it will be usefull for someone :)


Maybe it is possible to think about improvement and try to create a page to regroup all skins in RC

Wait for yours comments
Title: Re: Choose your skin
Post by: mpallo on May 25, 2007, 01:55:41 PM
Do I include this code somewhere or do I name it something and add it to a directory?

Looking to get this to work.
Please help.
Title: Re: Choose your skin
Post by: gysmo on May 26, 2007, 06:32:46 AM
this is a patch file just patch your version of roundcube
Title: Re: Choose your skin
Post by: rockwilda on May 26, 2007, 07:49:23 AM
For which version is this patch?
Title: Re: Choose your skin
Post by: gysmo on May 26, 2007, 01:45:10 PM
It is working with the latest svn version
Title: Re: Choose your skin
Post by: euptech on June 04, 2007, 12:42:13 PM
ok, just to sound like a total noob. Patch it where, how, with what?
Title: Re: Choose your skin
Post by: ludatbooick on June 09, 2007, 08:44:42 PM
I tried the patch with RC1 and i am getting a "[skins]" dropdown box in the preferences but there is nothing in it. i noticed that there was a reference to $INSTALL_PATH.'skins/index.inc' but the index.inc file is in the localization folder. any ideas? has anoyone gotten this to work with RC1?
Title: Re: Choose your skin
Post by: flosoft on June 15, 2007, 03:57:16 AM
It would be great if this could be implemented into RC. Maybe contact the devs and send them the patch with a request to add it to RC.
Title: Re: Choose your skin
Post by: till on October 18, 2007, 08:52:32 PM
Quote from: flosoft
It would be great if this could be implemented into RC. Maybe contact the devs and send them the patch with a request to add it to RC.

You could open a ticket on trac so someone reviews it and sees about inclusion. :)
Title: Re: Choose your skin
Post by: FlexV on November 21, 2007, 08:37:19 AM
Getting error with tortoise svn...
Error on line 50...

It seems if tortoise svn saying the wrong line because deleting is not changing the eroor anyway!
Title: Re: Choose your skin
Post by: SMiTTY on December 01, 2007, 05:04:49 PM
Quote from: ludatbooick
I tried the patch with RC1 and i am getting a "[skins]" dropdown box in the preferences but there is nothing in it. i noticed that there was a reference to $INSTALL_PATH.'skins/index.inc' but the index.inc file is in the localization folder. any ideas? has anoyone gotten this to work with RC1?

 Create a index.inc in the skins directory....Something that looks like this.

 $rcube_skins = array (
    'BlueTabby' => 'skins/BlueTabby',
    'GreenTabby' => 'skins/GreenTabby'
);


Works great with rc2 ... Had to manually patch the files

- SMiTTY
Title: Re: Choose your skin
Post by: kool_zero on January 07, 2008, 02:30:15 PM
can someone please be more specific on which files to patch and how? or possibly provide a pre-patched file? thanks!
Title: Re: Choose your skin
Post by: daniel.reyland on January 13, 2008, 05:21:03 PM
Quote from: kool_zero
can someone please be more specific on which files to patch and how? or possibly provide a pre-patched file? thanks!

ok from what I can figure it goes like this.

In the skin.txt file there are the following sections
Index: trunk/roundcubemail/program/include/main.inc
Index: trunk/roundcubemail/program/localization/fr/labels.inc
Index: trunk/roundcubemail/program/localization/en_GB/labels.inc
Index: trunk/roundcubemail/program/steps/settings/func.inc
Index: trunk/roundcubemail/program/steps/settings/save_prefs.inc

these are the files that need to modified. If the line doesn't have a - or a + next to it its jused for a referance to the location to either delete (-) or add (+) code.

remember to use your php tags in the index.inc file.

Then find the referenced area and add or delete the code. Seems to work for me but I have one problem

I don't get anything in my list of skins. No errors just nothing in the list. any reason why?
Title: Re: Choose your skin
Post by: coog on January 15, 2008, 09:22:29 AM
Quote from: daniel.reyland
I don't get anything in my list of skins. No errors just nothing in the list. any reason why?

I had the same problem, once I named everything the same it started working for me.
So skin dir is 'default' and index.inc for that theme is 'default'=> 'skins/default'

Going to look at it more later, this is awesome though and should be implemented :)
Title: Re: Choose your skin
Post by: sassoscritto on February 01, 2008, 06:17:29 PM
Hi all,
first, let me say a BIG thank oyu to all the developers and contributors...
I've just set up 0.1RC2 with courier-imap-ssl, and everything works like a charm...

Stumbled upon this add-on, while looking for skins... awesome! After just a bit of effort, I eventually managed to get it running.. If you ever need my vote, I'm for inclusion too!!

Only thing I miss, is a refresh of the page after saving the preferences for new skin... It only gets caught when changing page or manually refreshing...

Thank you again,
Stefano
Title: Re: Choose your skin
Post by: gysmo 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 :)

Title: Re: Choose your skin
Post by: btcentral 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
Title: Re: Choose your skin
Post by: Sir Savant 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
Title: Choose your skin
Post by: Makc666 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:
 
$skins = array (
    'Test' => 'test',
    'Default' => 'default'
);
 
?>

This is for cases when you have a lot of skins on "skins" directory.