Skórka do RoundCube

Na pierwszy ogień należy wykonać kilka modyfikacji RoundCube aby skórka działała poprawnie.

 

1) W config/main.inc.php zmieniamy standardowe wpisy na takie:

 

$rcmail_config['list_cols'] = array('from', 'subject', 'date', 'size');
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Trash', 'Junk');
$rcmail_config['skin_path'] = 'skins/MobileMe/';
$rcmail_config['preview_pane'] = TRUE;

 

Jeśli standardowe wpisy wydają się identyczne z powyższymi i tak należy podmienić ponieważ ważna jest chociażby kolejność elementów w tablicy.

 

2) W /program/js/app.js próbujemy odszukać linijkę:

 

this.button_sel = function(command, id)

 

Poniżej owej lini znajduje się wpis:

 

if (img && button.sel)
  img.src = button.sel;

 

który zamieniamy na:

 

if (img && button.sel) {
  img.src = button.sel;
  if (command == "delete" || command == "reply" || command == "reply-all" || command == "forward" || command == "checkmail" || command == "compose" || command == "viewsource" || (command == "add" && id != "rcmbtn108") || command == "edit" || command == "export")
    img.parentNode.style.backgroundImage = "url(skins/MobileMe/images/buttons/buttonbg_press.png)";
  else if (command != "firstpage" && command != "previouspage" && command != "nextpage" && command != "lastpage" && command != "firstmessage" && command != "previousmessage" && command != "nextmessage" && command != "lastmessage" && command != "add-attachment" && id != "rcmbtn108")
    img.parentNode.style.backgroundImage = "url(skins/MobileMe/images/buttons/buttonbgblue_press.png)";
  else if (id == "rcmbtn113" || id == "rcmbtn114")
    img.parentNode.style.backgroundImage = "url(skins/MobileMe/images/buttons/buttonbgblue_press.png)";
 }

 

Następnie w tym samym pliku odszukujemy:

 

this.button_out = function(command, id)

 

i tak samo jak poprzednio zamieniamy wpis:

 

if (img && button.act)
  img.src = button.act;

 

na:

 

if (img && button.act) {
  img.src = button.act;
  if (command == "delete" || command == "reply" || command == "reply-all" || command == "forward" || command == "checkmail" || command == "compose" || command == "viewsource" || (command == "add" && id != "rcmbtn108") || command == "edit" || command == "export")
    img.parentNode.style.backgroundImage = "url(skins/MobileMe/images/buttons/buttonbg.png)";
  else if (command != "firstpage" && command != "previouspage" && command != "nextpage" && command != "lastpage" && command != "firstmessage" && command != "previousmessage" && command != "nextmessage" && command != "lastmessage" && command != "add-attachment" && id != "rcmbtn108")
    img.parentNode.style.backgroundImage = "url(skins/MobileMe/images/buttons/buttonbgblue.png)";
  else if (id == "rcmbtn113" || id == "rcmbtn114")
    img.parentNode.style.backgroundImage = "url(skins/MobileMe/images/buttons/buttonbgblue.png)";
}

 

3) Żeby nie było za łatwo jeszcze jedna zmiana w plikach ;P Mianowicie w /program/steps/mail/func.inc zamieniamy:

 

$standard_headers = array('subject', 'from', 'organization', 'to', 'cc', 'bcc', 'reply-to', 'date');

 

na:

 

$standard_headers = array('from', 'subject', 'date', 'to', 'organization', 'cc', 'bcc', 'reply-to');

 

4) Na sam koniec należy ściągnąć skórkę  i wrzucić katalog MobileMe do  /skins/

 

PS: Tatko chciałeś i masz ;p , Actives

2008-09-23 21:00