#
# 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>";
#
# 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>";
#
# 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>";
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";
Can we add this to the next SVN?
Is this contribution consistent with the latest stable release. It's not working for me -- significant differences between instructions and what's actually in the files -- e.g., edit, show. :-\
# First posted by Helga as
# [url]http://roundcubeforum.net/forum/index.php?topic=737.msg3238#msg3238[/url]
# Modified by David Loendorf for RC1 and global contact option
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/include/rcube_contacts.inc
#
# Replace Line 31 with
var $table_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# Replace Line 145 with
AND (user_id=? OR global_contact = 1)" .
# Replace Line 216
AND (user_id=? OR global_contact = 1)".
# Replace Line 251 with
AND (user_id=? OR global_contact = 1)
# Replace Line 342 with
AND (user_id=? OR global_contact = 1)
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/include/main.inc
#
# Find the line that reads: if ($type=='checkbox')
# It should be around Line 1230
# Replace with
if($col == "notice")
{
$attrib['rows'] = "8";
$attrib['size'] = "40";
$attrib['cols'] = "40";
$input = new textarea($attrib);
}
elseif($col == "p_address" | $col == "w_address")
{
$attrib['rows'] = "4";
$attrib['size'] = "40";
$attrib['cols'] = "40";
$input = new textarea($attrib);
}
else if ($type=='checkbox')
# -------------------------------------------------------------------------------------------------------------
#
# In File /program/localization/en_US/label.inc
# Insert after line 163
$labels['global_contact'] = 'Global Contact';
$labels['firm'] = 'Organization';
$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';
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/addressbook/edit.inc
# Replace Line 64 with
$a_show_cols = array('name', 'firstname', 'surname', 'global_contact', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# Insert after line that contains: $attrib['id'] = 'rcmfd_'.$col; (should be line 67 or 68)
if($col == "global_contact")
$value = rcmail_get_edit_field($col, $record[$col], $attrib, 'checkbox');
else
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/addressbook/save.inc
# Replace line 40 with
$a_save_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# Replace Line 48 with
if($col == 'global_contact'){
if(isset($_POST[$fname])){
$a_record[$col] = 1;
}else{
$a_record[$col] = 0;
}
} else if (isset($_POST[$fname])){
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/addressbook/show.inc
# Replace Line 46 with
$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";
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
#
# Replace Old Lines that contain the following (beginning around line 59-62)
$out .= sprintf("<tr><td class=\"title\">%s</td><td>%s</td></tr>\n",
Q(rcube_label($col)),
$value);
}
$out .= "\n</table>";
# with these new lines
$title = Q(rcube_label($col));
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($col == "global_contact"){
if($value == 1)
$data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, 'Yes');
else
$data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, 'No');
} 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>";
# -------------------------------------------------------------------------------------------------------------
#
# Database Additions for extended contact information
#
# Run in PhpMyAdmin on the database that holds the RC Contacts table. Change the table name rc_contacts to your contacts table name:
#
ALTER TABLE `rc_contacts` ADD `global_contact` TINYINT(1) NOT NULL default '0';
ALTER TABLE `rc_contacts` ADD `firm` VARCHAR(128) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `position` VARCHAR(50) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `p_tel` VARCHAR(30) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `p_fax` VARCHAR(30) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `p_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `p_address` TEXT NOT NULL;
ALTER TABLE `rc_contacts` ADD `w_tel` VARCHAR(20) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `w_fax` VARCHAR(20) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `w_mob` VARCHAR(20) NOT NULL ;
ALTER TABLE `rc_contacts` ADD `w_address` TEXT NOT NULL;
ALTER TABLE `rc_contacts` ADD `notice` TEXT NOT NULL;
# Support password modification using CPanel 11
#
# Code written by Danny Herran
# with small modification by David Loendorf
# Original post is here [url]http://roundcubeforum.net/forum/index.php?topic=711.msg3155#msg3155[/url]
# You can find original code at [url]http://www.ingeniarte.com/rcpasswd.php[/url]
# All of this is included below plus the few modifications I have made.
# In file /program/js/app.js
# Replace Line 264 with
this.enable_command('preferences', 'identities', 'save', 'folders', 'passwd', true);
# Insert after Line 274
if (this.env.action=='passwd' || this.env.action=='save-passwd')
{
var input_curpasswd = rcube_find_object('_curpasswd');
var input_newpasswd = rcube_find_object('_newpasswd');
var input_confpasswd = rcube_find_object('_confpasswd');
if (input_curpasswd && input_curpasswd.value=='')
input_curpasswd.focus();
else if (input_confpasswd)
input_confpasswd.focus();
this.enable_command('save-passwd', true);
}
# Insert after old Line 932 new Line 945
break;
case 'passwd':
this.goto_url('passwd');
break;
case 'save-passwd':
var input_curpasswd = rcube_find_object('_curpasswd');
var input_newpasswd = rcube_find_object('_newpasswd');
var input_confpasswd = rcube_find_object('_confpasswd');
if (input_curpasswd && input_curpasswd.value=='')
{
alert(this.get_label('nocurrentpassword'));
input_curpasswd.focus();
}
else if ((input_newpasswd && input_newpasswd.value=='') && (input_confpasswd && input_confpasswd.value==''))
{
alert(this.get_label('nopassword'));
input_newpasswd.focus();
}
else if ((input_newpasswd && input_confpasswd) && ( input_newpasswd.value != input_confpasswd.value))
{
alert(this.get_label('passwordinconsistency'));
input_newpasswd.focus();
}
else
this.gui_objects.editform.submit();
# -------------------------------------------------------------------------------------------------------------
# In file /program/localizations/en_US/labels.inc
# Insert before the last line
$labels['changepasswd'] = 'Change Password';
$labels['curpasswd'] = 'Current Password';
$labels['newpasswd'] = 'New Password';
$labels['confpasswd'] = 'Confirm New Password';
# -------------------------------------------------------------------------------------------------------------
# In file /program/localizations/en_US/messages.inc
# Insert after line 78
$messages['nocurrentpassword'] = "Please input current password.";
$messages['nopassword'] = "Please input new password.";
$messages['passwordinconsistency'] = "Inconsistency of password, please try again.";
# -------------------------------------------------------------------------------------------------------------
# Add File /program/steps/settings/passwd.inc that contains
/*
-----------------------------------------------------------------------
| program/steps/settings/passwd.inc |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2007, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Change IMAP user password ONLY FOR cPanel 11 installations! |
| |
| REQUIREMENTS: |
| PHP with cURL installed, cPanel 11 |
| |
-----------------------------------------------------------------------
| Author: Danny Herran -----------------------------------------------------------------------
$Id: passwd.inc,v 0.2 2007/06/08 11:16:03 roundcube Exp $
*/
function rcmail_save_passwd($curpasswd, $newpasswd){
global $CONFIG, $_SESSION, $OUTPUT;
//Basically this sends a request to dopasswdpop.html and change the password for the IMAP account
//this is different from cPanel 10 which uses dowebmailpasswd.cgi instead
$cpaneluser = $_SESSION['username'];
$cpanelpass = $curpasswd;
$data=explode('@', $_SESSION['username']);
$domain=$data[1];
$uname=$data[0];
// First do a check if curl_init exists:
if (function_exists("curl_init")) {
$authstr = "$cpaneluser:$cpanelpass";
$postfields="email=$uname&domain=$domain&password=$newpasswd";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $domain.":2095/webmail/x3/mail/dopasswdpop.html");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERPWD, $authstr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$cbsreturn = curl_exec($ch);
// echo "Result: " . $cbsreturn; // Returns all the html from cPanel, uncomment to view (debugging)
if ((strpos($cbsreturn, "successfully modified")) and (!strpos($cbsreturn, "result in failure"))) {
//We update the password for the current session
$_SESSION['password'] = encrypt_passwd($newpasswd);
curl_close($ch);
return true;
} else {
curl_close($ch);
return false;
}
}
}
function rcmail_passwd_form($attrib){
global $CONFIG, $OUTPUT;
list($form_start, $form_end) = get_form_tags($attrib, 'save-passwd');
unset($attrib['form']);
if (!$attrib['id'])
$attrib['id'] = 'rcmSavepassword';
// allow the following attributes to be added to the tag
$attrib_str = create_attrib_string($attrib, array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary'));
// return the complete edit form as table
$out = "$form_start\n\n";
$a_show_cols = array('curpasswd' => array('type' => 'text'), 'newpasswd' => array('type' => 'text'), 'confpasswd' => array('type' => 'text'));
// show current password field
$field_id = 'curpasswd';
$input_curpasswd = new passwordfield(array('name' => '_curpasswd', 'id' => $field_id, 'size' => 30));
$out .= sprintf("%s \n", $field_id, rep_specialchars_output(rcube_label('curpasswd')), $input_curpasswd->show($CONFIG['curpasswd']));
// show new password selection
$field_id = 'newpasswd';
$input_newpasswd = new passwordfield(array('name' => '_newpasswd', 'id' => $field_id, 'size' => 30));
$out .= sprintf("%s \n", $field_id, rep_specialchars_output(rcube_label('newpasswd')), $input_newpasswd->show($CONFIG['newpasswd']));
// show confirm password selection
$field_id = 'confpasswd';
$input_confpasswd = new passwordfield(array('name' => '_confpasswd', 'id' => $field_id, 'size' => 30));
$out .= sprintf("%s \n", $field_id, rep_specialchars_output(rcube_label('confpasswd')), $input_confpasswd->show($CONFIG['confpasswd']));
$out .= "\n
$form_end";
return $out;
}
// Handle user request
if ($_action=='save-passwd'){
if (!isset($_POST['_curpasswd']))
$OUTPUT->show_message('errorsaving', 'error');
else if (!isset($_POST['_newpasswd']))
$OUTPUT->show_message('errorsaving', 'error');
else if (rcmail_save_passwd(get_input_value('_curpasswd', RCUBE_INPUT_POST), get_input_value('_newpasswd', RCUBE_INPUT_POST))){
$OUTPUT->show_message('successfullysaved', 'confirmation');
} else
$OUTPUT->show_message('errorsaving', 'error');
// overwrite action variable
rcmail_overwrite_action('passwd');
}
// add some labels to client
rcube_add_label('nocurrentpassword');
rcube_add_label('nopassword');
rcube_add_label('passwordinconsistency');
parse_template('passwd');
?>
# -------------------------------------------------------------------------------------------------------------
# In file /skins/default/includes/settingstabs.html
# Insert after Line 2
# -------------------------------------------------------------------------------------------------------------
# Add File /skins/default/templates/passwd.html that contains
[/url]
[/url]
# -------------------------------------------------------------------------------------------------------------
#
# In File index.php
#
# Insert after line that reads: include_once('program/steps/settings/func.inc'); (about line 343)
if (($_action=='passwd') or ($_action=='save-passwd'))
include('program/steps/settings/passwd.inc');
David
-
Title: Re: advanced Adressbook
Post by: Rudy on October 08, 2007, 03:03:51 AM
-
Works like a charm. Thanks a lot! Is there any way to implement multiple E-Mail addresses for one contact in this plugin/mod?
-
Title: Re: advanced Adressbook
Post by: dloendorf on October 08, 2007, 08:46:01 AM
-
Of course, the short answer is Yes - But...
I am leaving for Europe a week from today, so will probably not have a chance to look into adding that function. Come mid-January, when I return, if someone else has not implemented it, I will be happy to make an attempt.
David
-
Title: Re: advanced Adressbook
Post by: Rudy on October 08, 2007, 03:23:09 PM
-
I just found a little typo in your instructions: :)
Code: [Select]# Replace Line 46 with
$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";
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'g_adresse', 'notice');
Last line, there it should say "w_address" instead of "g_adresse".
-
Title: Re: advanced Adressbook
Post by: dloendorf on October 08, 2007, 06:14:58 PM
-
Thank you. Actually that was there in the original post by Helga - I just never caught it.
I have modified my original post to fix it.
David
-
Title: Re: advanced Adressbook
Post by: Gus on October 10, 2007, 09:24:01 AM
-
Thanks for that! i've been after this update for ages.
It all seems to work perfectly, however the layout of the address book panes could do with adjustment.
The 2 panes (Display Name on the left and Contact Details on the right) could do with some resizing. Currently they seem to be set to 50:50 across my screen.
Is there a way to reduce the left pane to say 25% and the right pane to 75% ?
since all my new fields are are all bunched up on the right pane.
I can post a screenshot if all this makes no sense!
cheers
Gus
-
Title: Re: advanced Adressbook
Post by: dloendorf on October 10, 2007, 08:11:01 PM
-
Please post a screen shot.
Thanks - David
-
Title: Re: advanced Adressbook
Post by: Gus on October 11, 2007, 03:28:18 AM
-
Sure, no problem.
attached image shows the left pane "Display Name" and the Right pane "Bruce...."
I would like the left pane to be half the width since it doesn't need the space,
the right pane has forced scroll bars and certain fields now take up 2 lines due to lack of width.
thanks very much!
Gus
-
Title: Re: advanced Adressbook
Post by: dloendorf on October 11, 2007, 06:11:07 AM
-
Look in the file /skins/default/templates/addressbook.html.
Modify lines 31 and 32 to suit your needs. Something like:
#addresslist { left:20px; width:250px }
#contacts-box { left:300px }
Note that #addresslist has an initial left position and width. #contacts-box only the initial left position as it uses the rest of the frame width.
David
-
Title: Re: advanced Adressbook
Post by: Gus on October 11, 2007, 07:31:07 AM
-
Perfect.
Thanks for that!
-
Title: Re: advanced Adressbook
Post by: mrjaguar on October 31, 2007, 03:22:01 AM
-
I'm trying to install this with the youds 3 column outlook hack. I'm not having any luick.. when I click on addressbook all I get is a blank screen. also using svn as of 2 nights ago.. 10-29-07.
thanks.
pat.
-
Title: Re: advanced Adressbook
Post by: starburst on November 09, 2007, 02:43:19 AM
-
French Translation
Quote# In File /program/localization/en_US/label.inc
# Insert after line 163
$labels['global_contact'] = 'Contact Global';
$labels['firm'] = 'Société';
$labels['position'] = 'Fonction';
$labels['p_tel'] = 'Telephone';
$labels['p_fax'] = 'Fax';
$labels['p_mob'] = 'Portable';
$labels['p_address'] = 'Addresse';
$labels['w_tel'] = 'Telephone Société';
$labels['w_fax'] = 'Fax Société';
$labels['w_mob'] = 'Porable Société';
$labels['w_address'] = 'Addresse Société';
$labels['notice'] = 'Note';
-
Title: Re: advanced Adressbook
Post by: cheongseeker on November 12, 2007, 06:29:56 AM
-
I've had managed to modify the address book by following the information given here. Now I'm able to create global contact and the address book contain additional fields.
Is there a way to limit or control creating and deleting of global contact?
I would like to have only the administrator to be able to create and delete global contact. Individual user will still be able to create and delete their own contact.
Would appreciate if anyone can help in this.
-
Title: Re: advanced Adressbook
Post by: grabber on November 12, 2007, 07:48:54 PM
-
Quote from: starburst
French Translation
Quote# In File /program/localization/en_US/label.inc
# Insert after line 163
$labels['global_contact'] = 'Contact Global';
$labels['firm'] = 'Société';
$labels['position'] = 'Fonction';
$labels['p_tel'] = 'Telephone';
$labels['p_fax'] = 'Fax';
$labels['p_mob'] = 'Portable';
$labels['p_address'] = 'Addresse';
$labels['w_tel'] = 'Telephone Société';
$labels['w_fax'] = 'Fax Société';
$labels['w_mob'] = 'Porable Société';
$labels['w_address'] = 'Addresse Société';
$labels['notice'] = 'Note';
OH MY GOD ! As a french guy, I can tell you (with my poor english, soory) that this translation is totally NOT french !!!
En fr maintenant, si c'est pour donner des informations bidons et surtout ne pas savoir écrire français, alors autant s'abstenir...
depuis quand "adresse" prend 2 "D" en français ?
pourquoi mettre des accents à "société" et pas à "téléphone" ?
il me semble qu'un "porable" doit surement vouloir dire "portable" !!!
enfin bref... vraiment énervant de voir ça... en plus d'être inutile bien entendu...
-
Title: Re: advanced Adressbook
Post by: DocNight on November 13, 2007, 06:55:39 AM
-
Hi all,
I got problems integrating the advanced addressbook into v0.1-rc2.
I tried the changes for rc1, but they won't work. In the right column I only got the edit-Button without any entries.
Thx,
Doc.
-
Title: Re: advanced Adressbook
Post by: Mossi on November 14, 2007, 05:25:11 AM
-
same problem here... At the moment I returned to the standard address book, which works just fine. If I will find the reason for the bug, I will post it here
-
Title: Re: advanced Adressbook
Post by: www.velder.li on January 19, 2008, 06:08:44 AM
-
sieht gut aus muss ich mal anschauen
danke ;-)
-
Title: Re: advanced Adressbook
Post by: galdo on February 13, 2008, 04:25:21 AM
-
Hi all together,
whats about including a picture (maybe including an upload feature) for the adress-book?
Thanks a lot, if anyone implements that!
Galdo
PS: Nice work - I like that plugin very well! :D
-
Title: Re: advanced Adressbook
Post by: clicktheo on February 24, 2008, 03:55:59 PM
-
Yeah....is this current for 0.1-RC2? Some of the changes won't work/some of the lines you say to replace can't be found!
-
Title: Re: advanced Adressbook
Post by: Rudy on March 10, 2008, 07:07:47 AM
-
Could someone capable of doing so please update this great mod/plugin to work with 0.1stable?
//EDIT: Ok, everything seems to be working except the global contact feature: You can set a contact as global but you can't undo and save it.
Quote# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/addressbook/save.inc
# Replace line 40 with
$a_save_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# Replace Line 48 with
Code: [Select] if($col == 'global_contact'){
if(isset($_POST[$fname])){
$a_record[$col] = 1;
}else{
$a_record[$col] = 0;
}
} else if (isset($_POST[$fname])){
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}
#
I don't know what line that is in 0.1stable. I replaced the following code (line ~48-50) but than you can't cahnge the "global contact" setting:
Code: [Select] if (isset($_POST[$fname]))
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}
//EDIT2: Never mind, I'm such an idiot. Just replace line 48 and it will work like a charm. :D
It should look like this:
Code: [Select]// read POST values into hash array
foreach ($a_save_cols as $col)
{
$fname = '_'.$col;
if($col == 'global_contact'){
if(isset($_POST[$fname])){
$a_record[$col] = 1;
}else{
$a_record[$col] = 0;
}
} else if (isset($_POST[$fname])){
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}
-
Title: Re: advanced Adressbook
Post by: guilichou on March 18, 2008, 03:23:42 AM
-
Hi Rudy,
I gathered all the lastest infos of this post in order to implement this plugin to rc0.1stable but it doesn't work properly...
Could you tell me what modification you have made in order to make the plugin work?
In the attachement file, are the modifications that I did... but here are all the problems I have:
- When I click directly on a new person to create, I have all the labels, that I can save (saved correctly in the DataBase).
- When I click on a person on my list of contacts, the whole RoundCube freezes without displaying the correct infos. From there on, I cannot do anything... Cannot go back to my mailbox nor preferences nor quit. I simply have to close the Firefox tab and open a new one...
If ever anyone could tell me what is wrong in the attached file or give in this post a new how-to of this advanced address book?
Hope to have an answers...
Thank you for any help...
-
Title: Re: advanced Adressbook
Post by: oldschool on March 18, 2008, 12:08:21 PM
-
Hi!
The 0.1 is out and we have a release to work with.
Could anyone make a working release of this great plugin, please?
Rudy?
:)
Rgds.
-
Title: Re: advanced Adressbook
Post by: Rudy on March 20, 2008, 08:59:24 AM
-
I'll post my code or better the instructions sometime today as I'm still busy doing other stuff right now.
-
Title: Re: advanced Adressbook
Post by: guilichou on March 20, 2008, 09:30:20 AM
-
Thanks in advance for helping us...
-
Title: Re: advanced Adressbook
Post by: Rudy on March 20, 2008, 05:33:51 PM
-
[PLUGIN] Advanced Address Book - "updated"/checked to work with 0.1stable
Give it a try. It should work. ;)
Code: [Select]
+------------------------------------------------------------------------+
| ADVANCED ADDRESSBOOK plugin for RoundCube 0.1stable |
| |
| Use this plugin at your own risk!! BACK UP YOUR FILES AND DATABASE |
| BEFORE SAVING CHANGES!! You've been warned!! |
| |
| PURPOSE: |
| Adds additional fields to RC's addressbook and global contact feature! |
| |
+------------------------------------------------------------------------+
| Author: Helga |
| => [url]http://roundcubeforum.net/forum/index.php?topic=737.msg3238#msg3238[/url] |
| |
| Modified by David Loendorf for RC1 and global contact option |
| Modified/updated by Rudy for 0.1stable |
+------------------------------------------------------------------------+
#
# ------[ 1 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 1.1 ]###
# OPEN
/program/include/rcube_contacts.inc
# FIND (line 37)
var $table_cols = array('name', 'email', 'firstname', 'surname');
# REPLACE with
var $table_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
##################
###[ STEP 1.2 ]###
# FIND (line 159)
AND user_id=?" .
# REPLACE with
AND (user_id=? OR global_contact = 1)" .
##################
###[ STEP 1.2 ]###
# FIND (line 232)
AND user_id=?".
# REPLACE with
AND (user_id=? OR global_contact = 1)".
##################
###[ STEP 1.3 ]###
# FIND (line 267)
AND user_id=?
# REPLACE with
AND (user_id=? OR global_contact = 1)
##################
###[ STEP 1.4 ]###
# FIND (line 358)
AND user_id=?
# REPLACE with
AND (user_id=? OR global_contact = 1)
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 2 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 2.1 ]###
# OPEN
/program/include/main.inc
# FIND (line1327)
if ($type=='checkbox')
# REPLACE with
if($col == "notice")
{
$attrib['rows'] = "8";
$attrib['size'] = "40";
$attrib['cols'] = "40";
$input = new textarea($attrib);
}
elseif($col == "p_address" | $col == "w_address")
{
$attrib['rows'] = "4";
$attrib['size'] = "40";
$attrib['cols'] = "40";
$input = new textarea($attrib);
}
else if ($type=='checkbox')
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 3 . 0 ]----------------------------------------------------------------------------------------------------
#
# NOTE: You have to add (or translate) the following changes to all language files you want to use! Below you'll find the
# English and German translations.
##################
###[ STEP 3.1 ]###
# OPEN (English localization file)
/program/localization/en_US/label.inc
# FIND the line which contains
$labels['email']
# ADD BELOW
$labels['global_contact'] = 'Global Contact?';
$labels['firm'] = 'Organization:';
$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'] = 'Notes:';
##################
###[ STEP 3.2 ]###
# SKIP this step if you don't need the german localization.
# OPEN(German localization file)
/program/localization/de_DE/label.inc
# FIND the line which contains
$labels['email']
# ADD BELOW
$labels['global_contact'] = 'Globaler Kontakt?';
$labels['firm'] = 'Organisation:';
$labels['position'] = 'Position:';
$labels['p_tel'] = 'Telefon:';
$labels['p_fax'] = 'Fax:';
$labels['p_mob'] = 'Mobil:';
$labels['p_address'] = 'Adresse Privat:';
$labels['w_tel'] = 'Telefon Geschäftlich:';
$labels['w_fax'] = 'Fax Geschäftlich:';
$labels['w_mob'] = 'Mobil Geschäftlich:';
$labels['w_address'] = 'Adresse Geschäftlich:';
$labels['notice'] = 'Bemerkung:';
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 4 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 4.1 ]###
# OPEN
/program/steps/addressbook/edit.inc
# FIND (line 64)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# REPLACE with
$a_show_cols = array('name', 'firstname', 'surname', 'global_contact', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
##################
###[ STEP 4.2 ]###
# FIND (line 67)
$attrib['id'] = 'rcmfd_'.$col;
# ADD BELOW
if($col == "global_contact")
$value = rcmail_get_edit_field($col, $record[$col], $attrib, 'checkbox');
else
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 5 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 5.1 ]###
# OPEN
/program/steps/addressbook/save.inc
# FIND (line 40)
$a_save_cols = array('name', 'firstname', 'surname', 'email');
# REPLACE with
$a_save_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
##################
###[ STEP 5.2 ]###
# FIND (line 48)
if (isset($_POST[$fname]))
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
# REPLACE WITH
if($col == 'global_contact'){
if(isset($_POST[$fname])){
$a_record[$col] = 1;
}else{
$a_record[$col] = 0;
}
} else if (isset($_POST[$fname])){
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 6 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 6.1 ]###
# OPEN
/program/steps/addressbook/show.inc
# FIND (line 46)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# REPLACE with (NOTE: Unfortunately the two labels "Data" and "Contact" are not yet included in the roundcube localization
# file. If someone could help me out on this one I would really appreciate it. As it is for now just translate these two
# labels into your default language.
$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";
$a_show_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
# FIND (line 59-64)
$out .= sprintf("<tr><td class=\"title\">%s</td><td>%s</td></tr>\n",
Q(rcube_label($col)),
$value);
}
$out .= "\n</table>";
# REPLACE with
$title = Q(rcube_label($col));
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($col == "global_contact"){
if($value == 1)
$data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, '&#10004;');
else
$data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, '&#10008;');
} 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>";
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 7 . 0 ]----------------------------------------------------------------------------------------------------
#
# MySQL Database Update
#
# Run this code in phpMyAdmin on the database that holds the RoundCube contacts table. If you changed the contact table
# name to something different you need to adjust the following code!
# RUN this SQL code:
ALTER TABLE `contacts` ADD `global_contact` TINYINT(1) NOT NULL default '0';
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;
#
# ------[ THE END =) ]----------------------------------------------------------------------------------------------
#
That's it! You're all set. Have fun and enjoy. Thank you Helga for this essential plugin and many thanks to David Loendor
for updating it to RC1. :D
-
Title: Re: advanced Adressbook
Post by: guilichou on March 21, 2008, 01:46:55 AM
-
It works!!!!!! Thank you so much!
Nevertheless, I have a little question about this part:
Code: [Select]###[ STEP 5.2 ]###
# FIND (line 48)
if (isset($_POST[$fname]))
# REPLACE WITH
if($col == 'global_contact'){
if(isset($_POST[$fname])){
$a_record[$col] = 1;
}else{
$a_record[$col] = 0;
}
} else if (isset($_POST[$fname])){
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
}
Do you replace only the first line?
Code: [Select](original code)
if (isset($_POST[$fname]))
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
I replaced both, everything seems to work, but I was wondering if that was correct. Or else in certain cases, the system will apply twice the line:
Code: [Select]$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
right?
(I might be wrong...)
-
Title: Re: advanced Adressbook
Post by: Rudy on March 21, 2008, 04:26:37 AM
-
Yeah I'm pretty sure this is just a typo. I updated the instructions. Thanks! :)
-
Title: Re: advanced Adressbook
Post by: guilichou on March 22, 2008, 06:00:11 AM
-
Can anyone explain me how to suppress the "Global Contact" option???
I tried to suppress everything concerning the global_contact but it doesn't seem to work...
I've got it not the be listed in others contacts lists and not to be shown in the contact info, but I can't succeed in getting rid of it in the creation or modification page.
I want to get rid of it because I don't really see the need of it, specialy when anyone can suppress it...
-
Title: problem I cannot edit contact
Post by: bobby5959 on March 24, 2008, 10:58:05 AM
-
I ve a problem
I was doing exact all
then i wantet to create a contact, its working, its even in the database, but its not possible to edit this, bcs its not on the screen adn I cannot edit
if I open a mail and press add mailadress to adressbook, its working, but I cannot edit the contactinfo, but its even in the database.
Does anyone know where th problem might be?
Thxs
Bobby
-
Title: found my mistake
Post by: bobby5959 on March 24, 2008, 12:50:53 PM
-
Its working may may thxs
I forgot a barket
-
Title: Re: advanced Adressbook
Post by: cornbread on March 26, 2008, 12:26:36 PM
-
I added this to the feature request!
http://trac.roundcube.net/ticket/1484923
-
Title: Re: advanced Adressbook
Post by: brewnchew on March 30, 2008, 10:33:59 AM
-
If anyone can assist I would really like a function for the address book. Has anyone worked on a function to tie together email addresses to make a distribution list? I would like to make a single 'entry' for a group of addresses that I regularly email. I can update and make small changes but I lack the knowledge to complete this task.
Thank you for any assistance
-
Title: Re: advanced Adressbook
Post by: dukhunter99 on March 31, 2008, 09:05:25 PM
-
I'm with Brewchew - What if you had an address book that had check boxes and you can select (check) multiple recipients.
-
Title: Re: advanced Adressbook
Post by: blove57 on April 01, 2008, 08:53:54 PM
-
HELGA YOU ARE AWESOME!! Thanks a mil. And thanks to Rudy for updating it. I took out the global contact feature because I didn't want different domains sharing contacts. I think somebody asked for the global contact feature to be taken out, so I'm posting it here in case anybody wanted it.
Code: [Select]
+------------------------------------------------------------------------+
| ADVANCED ADDRESS BOOK plugin for RoundCube 0.1stable |
| |
| Use this plugin at your own risk!! BACK UP YOUR FILES AND DATABASE |
| BEFORE SAVING CHANGES!! You've been warned!! |
| |
| PURPOSE: |
| Adds additional fields to RC's addressbook and global contact feature! |
| |
+------------------------------------------------------------------------+
| Author: Helga |
| => [url]http://roundcubeforum.net/forum/index.php?topic=737.msg3238#msg3238[/url] |
| |
| Modified by David Loendorf for RC1 and global contact option |
| Modified/updated by Rudy for 0.1stable |
+------------------------------------------------------------------------+
#
# ------[ 1 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 1.1 ]###
# OPEN
/program/include/rcube_contacts.inc
# FIND (line 37)
var $table_cols = array('name', 'email', 'firstname', 'surname');
# REPLACE with
var $table_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');
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 2 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 2.1 ]###
# OPEN
/program/include/main.inc
# FIND (line1327)
if ($type=='checkbox')
# REPLACE with
if($col == "notice")
{
$attrib['rows'] = "8";
$attrib['size'] = "40";
$attrib['cols'] = "40";
$input = new textarea($attrib);
}
elseif($col == "p_address" | $col == "w_address")
{
$attrib['rows'] = "4";
$attrib['size'] = "40";
$attrib['cols'] = "40";
$input = new textarea($attrib);
}
else if ($type=='checkbox')
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 3 . 0 ]----------------------------------------------------------------------------------------------------
#
# NOTE: You have to add (or translate) the following changes to all language files you want to use! Below you'll find the
# English and German translations.
##################
###[ STEP 3.1 ]###
# OPEN (English localization file)
/program/localization/en_US/label.inc
# FIND the line which contains
$labels['email']
# ADD BELOW
$labels['firm'] = 'Organization:';
$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'] = 'Notes:';
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 4 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 4.1 ]###
# OPEN
/program/steps/addressbook/edit.inc
# FIND (line 64)
$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');
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 5 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 5.1 ]###
# OPEN
/program/steps/addressbook/save.inc
# FIND (line 40)
$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');
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 6 . 0 ]----------------------------------------------------------------------------------------------------
#
##################
###[ STEP 6.1 ]###
# OPEN
/program/steps/addressbook/show.inc
# FIND (line 46)
$a_show_cols = array('name', 'firstname', 'surname', 'email');
# REPLACE with (NOTE: Unfortunately the two labels "Data" and "Contact" are not yet included in the roundcube localization
# file. If someone could help me out on this one I would really appreciate it. As it is for now just translate these two
# labels into your default language.
$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";
$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 59-64)
$out .= sprintf("<tr><td class=\"title\">%s</td><td>%s</td></tr>\n",
Q(rcube_label($col)),
$value);
}
$out .= "\n</table>";
# REPLACE with
$title = Q(rcube_label($col));
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";
}
elseif(!$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>";
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 7 . 0 ]----------------------------------------------------------------------------------------------------
#
# MySQL Database Update
#
# Run this code in phpMyAdmin on the database that holds the RoundCube contacts table. If you changed the contact table
# name to something different you need to adjust the following code!
# RUN this SQL code:
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;
#
# ------[ THE END =) ]----------------------------------------------------------------------------------------------
#
That's it! You're all set. Have fun and enjoy. Thank you Helga for this essential plugin and many thanks to David Loendor
for updating it to RC1. :D
-
Title: Re: advanced Adressbook
Post by: oldschool on April 02, 2008, 12:27:34 PM
-
Thanks alot...
:)
-
Title: Re: advanced Adressbook
Post by: DocNight on April 16, 2008, 03:01:44 PM
-
Hi all,
does anyone already made the stable 0.1.1 upgrade and tried the advanced adressbook?
regards,
DocNight.
-
Title: advanced Adressbook
Post by: ufoonline on June 19, 2008, 02:52:15 AM
-
Hello all,
Someone want to add a group support to the address book?
It well be a nice features wich fullfil the requests of a lot of peoples!
Thank you,
Best Regards
-
Title: advanced Adressbook
Post by: d1msumboi on June 28, 2008, 05:04:33 AM
-
First, I would like to thank you for this awesome hack. However, when I add or edit a contact, the information other than the four default ones (name, email, etc) do not get written to the database. For example, if i type in phone number or address, save it, and check my database via phpmyadmin, those values are not written. Anyone have any idea why? If I manually edit those values via phpmyadmin, they show up just fine. So something is wrong with writing to the database. thanks in advance.
-
Title: Version 2 Also Works
Post by: sam121212 on September 17, 2008, 07:07:30 PM
-
Quote from: Rudy;10975
[PLUGIN] Advanced Address Book - "updated"/checked to work with 0.1stable
Give it a try. It should work. ;)
Code: [Select]
.......................
......................
......................................
#
# ------[ CLOSE & SAVE ]---------------------------------------------------------------------------------------------
#
#
# ------[ 7 . 0 ]----------------------------------------------------------------------------------------------------
#
# MySQL Database Update
#
# Run this code in phpMyAdmin on the database that holds the RoundCube contacts table. If you changed the contact table
# name to something different you need to adjust the following code!
.......................................
.................
.......
#
# ------[ THE END =) ]----------------------------------------------------------------------------------------------
#
That's it! You're all set. Have fun and enjoy. Thank you Helga for this essential plugin and many thanks to David Loendor
for updating it to RC1. :D
Hey Guys its work with roundcubemail version2+ also
-
Title: advanced Adressbook
Post by: glen on October 20, 2008, 10:25:31 AM
-
I cant find this for the latest version of Roundcube.. anyone?
# FIND (line 59-64)
$out .= sprintf("%s %s \n",
Q(rcube_label($col)),
$value);
}
$out .= "\n
";
# REPLACE with
$title = Q(rcube_label($col));
if($col == "notice"){
$out2 = " \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("%s %s \n",$title, $value);
}
}
elseif($col == "p_address"){
$p_address = " \n\n";
}
elseif($col == "w_address"){
$w_address = " \n\n";
}
elseif(!$value == "")
$data .= sprintf("%s %s \n",$title, $value);
}
$data .= "";
$contact .= "";
$out .= "$data$contact\n\n";
$out .= " ";
$out .= "$p_address$w_address\n\n";
$out .= " ";
$out .= $out2;
$out .= "\n ";
I cant find this for the latest version of Roundcube.. anyone?
# FIND (line 59-64)
$out .= sprintf("\n", %s %s
Q(rcube_label($col)),
$value);
}
$out .= "\n";
# REPLACE with
$title = Q(rcube_label($col));
if($col == "notice"){
$out2 = "\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("\n",$title, $value); %s %s
}
}
elseif($col == "p_address"){
$p_address = "\n\n";
}
elseif($col == "w_address"){
$w_address = "\n\n";
}
elseif(!$value == "")
$data .= sprintf("\n",$title, $value); %s %s
}
$data .= "";
$contact .= "";
$out .= "$data$contact\n\n";
$out .= "";
$out .= "$p_address$w_address\n\n";
$out .= ""; ";
$out .= $out2;
$out .= "\n