![]() |
|
|
|||||||
For more information about the ads and why they're here, please see the FAQ
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
sorry for my Bad English. I'm from Germany ![]() her my advanced Adressbook: Screen + Download: |
|
#2
|
|||
|
|||
|
A sligt modification in this Plug-In:
- Translated it to english - Made it like a "How To" Code:
#
# Open: program/localization/en_GB/labels.inc
#
# Find: (line: 149)
// address boook
# After add:
$labels['firm'] = 'Organisation';
$labels['position'] = 'Position';
$labels['p_tel'] = 'Telephone';
$labels['p_fax'] = 'Fax';
$labels['p_mob'] = 'Mobile';
$labels['p_address'] = 'Address';
$labels['w_tel'] = 'Business Telephone';
$labels['w_fax'] = 'Business Fax';
$labels['w_mob'] = 'Business Mobile';
$labels['w_address'] = 'Business Address';
$labels['notice'] = 'Notice';
#
# Open: program/localization/nl_NL/labels.inc
#
# Find: (line: 149)
// address book
# After add:
$labels['firm'] = 'Organistatie';
$labels['position'] = 'Functie';
$labels['p_tel'] = 'Telefoon';
$labels['p_fax'] = 'Fax';
$labels['p_mob'] = 'GSM';
$labels['p_address'] = 'Adres';
$labels['w_tel'] = 'Zakelijk Telefoon';
$labels['w_fax'] = 'Zakelijk Fax';
$labels['w_mob'] = 'Zakelijk GSM';
$labels['w_address'] = 'Zakelijk Adres';
$labels['notice'] = 'Opmerkingen';
#
# Open: program/localization/de_DE/labels.inc
#
# Find: (line: 149)
// address book
# After add:
$labels['firm'] = 'Organisation';
$labels['position'] = 'Position';
$labels['p_tel'] = 'Telefon Privat';
$labels['p_fax'] = 'Fax Privat';
$labels['p_mob'] = 'Funk Privat';
$labels['p_address'] = 'Adresse Privat';
$labels['g_tel'] = 'Telefon Geschäftlich';
$labels['g_fax'] = 'Fax Geschäftlich';
$labels['g_mob'] = 'Funk Geschäftlich';
$labels['w_address'] = 'Adresse Geschäftlich';
$labels['notice'] = 'Bemerkungen';
#
# Run in PhpMyAdmin:
#
ALTER TABLE `contacts` ADD `firm` VARCHAR(128) NOT NULL ;
ALTER TABLE `contacts` ADD `position` VARCHAR(50) NOT NULL ;
ALTER TABLE `contacts` ADD `p_tel` VARCHAR(30) NOT NULL ;
ALTER TABLE `contacts` ADD `p_fax` VARCHAR(30) NOT NULL ;
ALTER TABLE `contacts` ADD `p_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `p_address` TEXT NOT NULL;
ALTER TABLE `contacts` ADD `w_tel` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_fax` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_address` TEXT NOT NULL;
ALTER TABLE `contacts` ADD `notice` TEXT NOT NULL;
#
# Open: program/steps/addressbook/edit.inc
#
# Find: (line: 68)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# Find: (line: 72)
$title = rcube_label($col);
# After add:
if($col == "notice"){
$typ = "textarea";
$attrib['rows'] = "8";
$attrib['size'] = "70";
}
elseif($col == "p_address" | $col == "w_address"){
$typ = "textarea";
$attrib['rows'] = "4";
$attrib['size'] = "50";
}
else{
$typ = "text";
}
# Find: (line: 86)
$value = rcmail_get_edit_field($col, $CONTACT_RECORD[$col], $attrib);
# Replace with:
$value = rcmail_get_edit_field($col, $CONTACT_RECORD[$col], $attrib, $typ);
#
# Open: program/steps/addressbook/save.inc
#
# Find: (line: 31)
$a_save_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_save_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
#
# Open: program/steps/addressbook/show.inc
#
# Find: (line: 54)
$out = "<table>\n\n";
# After add:
$data ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Data</b></legend><table>\n\n";
$contact ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Contact</b></legend><table>\n\n";
# Find: (line: 58)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_adresse', 'w_tel', 'w_fax', 'w_mob', 'g_adresse', 'notice');
# Find: (line: 71)
$out .= sprintf("<tr><td class=\"title\">%s</td><td>%s</td></tr>\n", $title, $value);
}
$out .= "\n</table>";
# Replace with:
if($col == "notice"){
$out2 = "<td colspan=\"3\" width=\"100%\" valign=\"top\"><fieldset width=\"100%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$out2 .= sprintf("<tr><td>%s</td></tr>\n", $value);
$out2 .= "</table></fieldset></td>\n\n";
}
elseif($col == "p_tel" | $col == "p_fax" | $col == "p_mob" | $col == "w_tel" | $col == "w_fax" | $col == "w_mob"){
if(!$value == ""){
$contact .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value);
}
}
elseif($col == "p_address"){
$p_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$p_address .= sprintf("<tr><td>%s</td></tr>\n", $value);
$p_address .= "</table></fieldset></td>\n\n";
}
elseif($col == "w_address"){
$w_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$w_address .= sprintf("<tr><td>%s</td></tr>\n", $value);
$w_address .= "</table></fieldset></td>\n\n";
}
else{
if(!$value == ""){
$data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value);
}
}
}
$data .= "</table></td>";
$contact .= "</table></td>";
$out .= "$data<td width=\"2%\">$contact\n\n";
$out .= "</tr><tr>";
$out .= "$p_address<td width=\"2%\">$w_address\n\n";
$out .= "</tr><tr>";
$out .= $out2;
$out .= "\n</tr></table>";
Peace.
|
|
#3
|
|||
|
|||
|
Well, I'd translate the english "Mobile" with "Mobil" in german instead of "Funk":
Code:
#
# Open: program/localization/en_GB/labels.inc
#
# Find: (line: 149)
// address boook
# After add:
$labels['firm'] = 'Organisation';
$labels['position'] = 'Position';
$labels['p_tel'] = 'Telephone';
$labels['p_fax'] = 'Fax';
$labels['p_mob'] = 'Mobile';
$labels['p_address'] = 'Address';
$labels['w_tel'] = 'Business Telephone';
$labels['w_fax'] = 'Business Fax';
$labels['w_mob'] = 'Business Mobile';
$labels['w_address'] = 'Business Address';
$labels['notice'] = 'Notice';
#
# Open: program/localization/nl_NL/labels.inc
#
# Find: (line: 149)
// address book
# After add:
$labels['firm'] = 'Organistatie';
$labels['position'] = 'Functie';
$labels['p_tel'] = 'Telefoon';
$labels['p_fax'] = 'Fax';
$labels['p_mob'] = 'GSM';
$labels['p_address'] = 'Adres';
$labels['w_tel'] = 'Zakelijk Telefoon';
$labels['w_fax'] = 'Zakelijk Fax';
$labels['w_mob'] = 'Zakelijk GSM';
$labels['w_address'] = 'Zakelijk Adres';
$labels['notice'] = 'Opmerkingen';
#
# Open: program/localization/de_DE/labels.inc
#
# Find: (line: 149)
// address book
# After add:
$labels['firm'] = 'Organisation';
$labels['position'] = 'Position';
$labels['p_tel'] = 'Telefon Privat';
$labels['p_fax'] = 'Fax Privat';
$labels['p_mob'] = 'Mobil Privat';
$labels['p_address'] = 'Adresse Privat';
$labels['g_tel'] = 'Telefon Geschäftlich';
$labels['g_fax'] = 'Fax Geschäftlich';
$labels['g_mob'] = 'Mobil Geschäftlich';
$labels['w_address'] = 'Adresse Geschäftlich';
$labels['notice'] = 'Bemerkungen';
#
# Run in PhpMyAdmin:
#
ALTER TABLE `contacts` ADD `firm` VARCHAR(128) NOT NULL ;
ALTER TABLE `contacts` ADD `position` VARCHAR(50) NOT NULL ;
ALTER TABLE `contacts` ADD `p_tel` VARCHAR(30) NOT NULL ;
ALTER TABLE `contacts` ADD `p_fax` VARCHAR(30) NOT NULL ;
ALTER TABLE `contacts` ADD `p_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `p_address` TEXT NOT NULL;
ALTER TABLE `contacts` ADD `w_tel` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_fax` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_address` TEXT NOT NULL;
ALTER TABLE `contacts` ADD `notice` TEXT NOT NULL;
#
# Open: program/steps/addressbook/edit.inc
#
# Find: (line: 68)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# Find: (line: 72)
$title = rcube_label($col);
# After add:
if($col == "notice"){
$typ = "textarea";
$attrib['rows'] = "8";
$attrib['size'] = "70";
}
elseif($col == "p_address" | $col == "w_address"){
$typ = "textarea";
$attrib['rows'] = "4";
$attrib['size'] = "50";
}
else{
$typ = "text";
}
# Find: (line: 86)
$value = rcmail_get_edit_field($col, $CONTACT_RECORD[$col], $attrib);
# Replace with:
$value = rcmail_get_edit_field($col, $CONTACT_RECORD[$col], $attrib, $typ);
#
# Open: program/steps/addressbook/save.inc
#
# Find: (line: 31)
$a_save_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_save_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
#
# Open: program/steps/addressbook/show.inc
#
# Find: (line: 54)
$out = "<table>\n\n";
# After add:
$data ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Data</b></legend><table>\n\n";
$contact ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Contact</b></legend><table>\n\n";
# Find: (line: 58)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_adresse', 'w_tel', 'w_fax', 'w_mob', 'g_adresse', 'notice');
# Find: (line: 71)
$out .= sprintf("<tr><td class=\"title\">%s</td><td>%s</td></tr>\n", $title, $value);
}
$out .= "\n</table>";
# Replace with:
if($col == "notice"){
$out2 = "<td colspan=\"3\" width=\"100%\" valign=\"top\"><fieldset width=\"100%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$out2 .= sprintf("<tr><td>%s</td></tr>\n", $value);
$out2 .= "</table></fieldset></td>\n\n";
}
elseif($col == "p_tel" | $col == "p_fax" | $col == "p_mob" | $col == "w_tel" | $col == "w_fax" | $col == "w_mob"){
if(!$value == ""){
$contact .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value);
}
}
elseif($col == "p_address"){
$p_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$p_address .= sprintf("<tr><td>%s</td></tr>\n", $value);
$p_address .= "</table></fieldset></td>\n\n";
}
elseif($col == "w_address"){
$w_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$w_address .= sprintf("<tr><td>%s</td></tr>\n", $value);
$w_address .= "</table></fieldset></td>\n\n";
}
else{
if(!$value == ""){
$data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value);
}
}
}
$data .= "</table></td>";
$contact .= "</table></td>";
$out .= "$data<td width=\"2%\">$contact\n\n";
$out .= "</tr><tr>";
$out .= "$p_address<td width=\"2%\">$w_address\n\n";
$out .= "</tr><tr>";
$out .= $out2;
$out .= "\n</tr></table>";
|
|
#4
|
|||
|
|||
|
Swedish
Code:
#
# Open: program/localization/se_SE/labels.inc
#
# Find: (line: 149)
// address boook
# After add:
$labels['firm'] = 'Organisation';
$labels['position'] = 'Position';
$labels['p_tel'] = 'Telefon';
$labels['p_fax'] = 'Fax';
$labels['p_mob'] = 'Mobil';
$labels['p_address'] = 'Adress';
$labels['w_tel'] = 'Telefon arbete';
$labels['w_fax'] = 'Fax arbete';
$labels['w_mob'] = 'Mobil arbete';
$labels['w_address'] = 'Adress arbete';
$labels['notice'] = 'Anteckning';
#
#
# Run in PhpMyAdmin:
#
ALTER TABLE `contacts` ADD `firm` VARCHAR(128) NOT NULL ;
ALTER TABLE `contacts` ADD `position` VARCHAR(50) NOT NULL ;
ALTER TABLE `contacts` ADD `p_tel` VARCHAR(30) NOT NULL ;
ALTER TABLE `contacts` ADD `p_fax` VARCHAR(30) NOT NULL ;
ALTER TABLE `contacts` ADD `p_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `p_address` TEXT NOT NULL;
ALTER TABLE `contacts` ADD `w_tel` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_fax` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `contacts` ADD `w_address` TEXT NOT NULL;
ALTER TABLE `contacts` ADD `notice` TEXT NOT NULL;
#
# Open: program/steps/addressbook/edit.inc
#
# Find: (line: 68)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# Find: (line: 72)
$title = rcube_label($col);
# After add:
if($col == "notice"){
$typ = "textarea";
$attrib['rows'] = "8";
$attrib['size'] = "70";
}
elseif($col == "p_address" | $col == "w_address"){
$typ = "textarea";
$attrib['rows'] = "4";
$attrib['size'] = "50";
}
else{
$typ = "text";
}
# Find: (line: 86)
$value = rcmail_get_edit_field($col, $CONTACT_RECORD[$col], $attrib);
# Replace with:
$value = rcmail_get_edit_field($col, $CONTACT_RECORD[$col], $attrib, $typ);
#
# Open: program/steps/addressbook/save.inc
#
# Find: (line: 31)
$a_save_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_save_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
#
# Open: program/steps/addressbook/show.inc
#
# Find: (line: 54)
$out = "<table>\n\n";
# After add:
$data ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Data</b></legend><table>\n\n";
$contact ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Contact</b></legend><table>\n\n";
# Find: (line: 58)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# Replace with:
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_adresse', 'w_tel', 'w_fax', 'w_mob', 'g_adresse', 'notice');
# Find: (line: 71)
$out .= sprintf("<tr><td class=\"title\">%s</td><td>%s</td></tr>\n", $title, $value);
}
$out .= "\n</table>";
# Replace with:
if($col == "notice"){
$out2 = "<td colspan=\"3\" width=\"100%\" valign=\"top\"><fieldset width=\"100%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$out2 .= sprintf("<tr><td>%s</td></tr>\n", $value);
$out2 .= "</table></fieldset></td>\n\n";
}
elseif($col == "p_tel" | $col == "p_fax" | $col == "p_mob" | $col == "w_tel" | $col == "w_fax" | $col == "w_mob"){
if(!$value == ""){
$contact .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value);
}
}
elseif($col == "p_address"){
$p_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$p_address .= sprintf("<tr><td>%s</td></tr>\n", $value);
$p_address .= "</table></fieldset></td>\n\n";
}
elseif($col == "w_address"){
$w_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n";
$w_address .= sprintf("<tr><td>%s</td></tr>\n", $value);
$w_address .= "</table></fieldset></td>\n\n";
}
else{
if(!$value == ""){
$data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value);
}
}
}
$data .= "</table></td>";
$contact .= "</table></td>";
$out .= "$data<td width=\"2%\">$contact\n\n";
$out .= "</tr><tr>";
$out .= "$p_address<td width=\"2%\">$w_address\n\n";
$out .= "</tr><tr>";
$out .= $out2;
$out .= "\n</tr></table>";
I like smaller boxes so I added this: Code:
if($col == "notice"){
$typ = "textarea";
$attrib['rows'] = "2";
$attrib['size'] = "40";
}
elseif($col == "p_address" | $col == "w_address"){
$typ = "textarea";
$attrib['rows'] = "3";
$attrib['size'] = "40";
|
|
#5
|
|||
|
|||
|
Can we add this to the next SVN?
|
|
#6
|
|||
|
|||
|
We'll you're free to use my translation. As for the code you'll have to ask helga.
|
|
#7
|
|||
|
|||
|
Quote:
|
|
#8
|
|||
|
|||
|
Hello... I think I got most of what I needed to copy/paste and change and run on phpMyAdmin, but I went wrong somewhere and lost my address book I did have. So I guess what I did was blank out my entire contacts list. Which is fine for now. I can always replace that. But I just don't know where I went wrong.
Would there be a security isssue if the entire code for each file was put out there for us to just copy the entire file and paste it into our own and save? Then go to our phpMyAdmin and run... I'm not even sure how to do that part. LOL. (Yeah.. amatuer over here. But I do manage to learn enough to want to get myself into more trouble.) |
|
#9
|
|||
|
|||
|
A couple of mistakes in the English version:
program/steps/addressbook/show.inc line 58 was: $a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_adresse', 'w_tel', 'w_fax', 'w_mob', 'g_adresse', 'notice'); should be: $a_show_cols = array('name', 'firstname', 'surname', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice'); This only caused the addresses to not show, no biggie but thought you should know. |
|
#10
|
|||
|
|||
|
Has this functionality been added to the latest version (in SVN) already?
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|