{"id":4725,"date":"2018-10-09T01:55:11","date_gmt":"2018-10-09T01:55:11","guid":{"rendered":"https:\/\/geekdecoder.com\/?p=4725"},"modified":"2018-10-09T01:55:11","modified_gmt":"2018-10-09T01:55:11","slug":"add-custom-fields-horde-turba","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2018\/10\/09\/add-custom-fields-horde-turba\/","title":{"rendered":"Add Custom Fields Horde Turba"},"content":{"rendered":"<p>When you need to add custom fields in Horde (Turba) for additional fields from an Outlook Address Book Export.<\/p>\n<p>Here are the default sections in horde:<\/p>\n<p>Personal<br \/>\n<a href=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/personal.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4742\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/personal.png\" alt=\"\" width=\"415\" height=\"312\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/personal.png 415w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/personal-300x226.png 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<p>Location<br \/>\n<a href=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/location.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4739\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/location.png\" alt=\"\" width=\"424\" height=\"495\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/location.png 424w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/location-257x300.png 257w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/a><\/p>\n<p>Communication<br \/>\n<a href=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/comms.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4738\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/comms.png\" alt=\"\" width=\"420\" height=\"369\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/comms.png 420w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/comms-300x264.png 300w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/a><\/p>\n<p>Organization<br \/>\n<a href=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/org.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-4740\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/org.png\" alt=\"\" width=\"424\" height=\"194\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/org.png 424w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/org-300x137.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/a><\/p>\n<p>Other<br \/>\n<a href=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/other.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4745\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/other.png\" alt=\"\" width=\"421\" height=\"224\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/other.png 421w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/other-300x160.png 300w\" sizes=\"auto, (max-width: 421px) 100vw, 421px\" \/><\/a><\/p>\n<p>Lets say that we need additional fields. We are importing from Outlook and need 2 more email fields as Outlook has the Email fields\u00a0 &#8211; &#8220;E-mail Address,\u00a0E-mail 2 Address and\u00a0E-mail 3 Address. As you can see in the Communication screenshot, there is only 1 Email field. So, we will be adding 2 fields to Horde.<br \/>\n<a href=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/1email.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4748\" src=\"https:\/\/qbytes.cloud\/wp-content\/uploads\/2018\/10\/1email.png\" alt=\"\" width=\"422\" height=\"370\" srcset=\"https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/1email.png 422w, https:\/\/www.qbytes.cloud\/wp-content\/uploads\/2018\/10\/1email-300x263.png 300w\" sizes=\"auto, (max-width: 422px) 100vw, 422px\" \/><\/a><\/p>\n<p>Modifying fields in the Turba addressbook<\/p>\n<p>There are three easy steps to adding the fields you would like in Turba:<\/p>\n<ol>\n<li>Define an attribute (e.g.\u00a0 \u201cE-mail 2 Address and E-mail 3 Address\u201d and is of type \u201cemail\u201d).<\/li>\n<li>Add it to list of fields that Turba uses (so it is displayed in the right place).<\/li>\n<li>Add to\u00a0 the back end storage (database), if not there,\u00a0 (so Turba can query\/save the values).<\/li>\n<\/ol>\n<p>Plesk server. Files of Interest:<\/p>\n<p>Path &#8211; \/usr\/share\/psa-horde\/turba\/config<br \/>\nattributes.php &#8211; copy this to\u00a0attributes.local.php<br \/>\nbackends.php &#8211; copy this file to backends.local.php<\/p>\n<p>Open the\u00a0attributes.local.php file and locate the following. As you note, we do not need to change anything except the label as the fields are there:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\/* Additional attributes supported by some SyncML clients *\/\n$attributes&#x5B;&#039;workEmail&#039;] = array(\n    &#039;label&#039; =&amp;gt; _(&quot;&quot;Work Email&quot;),\n    &#039;type&#039; =&amp;gt; &#039;email&#039;,\n    &#039;required&#039; =&amp;gt; false,\n    &#039;params&#039; =&amp;gt; array(&#039;allow_multi&#039; =&amp;gt; false, &#039;strip_domain&#039; =&amp;gt; false, &#039;link_compose&#039; =&amp;gt; true, &#039;link_name&#039; =&amp;gt; null, &#039;delimiters&#039; =&amp;gt; &#039;,&#039;, &#039;size&#039; =&amp;gt; null)\n);\n$attributes&#x5B;&#039;homeEmail&#039;] = array(\n    &#039;label&#039; =&amp;gt; _(&quot;Home Email&quot;),\n    &#039;type&#039; =&amp;gt; &#039;email&#039;,\n    &#039;required&#039; =&amp;gt; false,\n    &#039;params&#039; =&amp;gt; array(&#039;allow_multi&#039; =&amp;gt; false, &#039;strip_domain&#039; =&amp;gt; false, &#039;link_compose&#039; =&amp;gt; true, &#039;link_name&#039; =&amp;gt; null, &#039;delimiters&#039; =&amp;gt; &#039;,&#039;, &#039;size&#039; =&amp;gt; null)\n);\n\n<\/pre>\n<p>Let&#8217;s change the label to the Outlook labels:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\/* Additional attributes supported by some SyncML clients *\/\n$attributes&#x5B;&#039;workEmail&#039;] = array(\n    &#039;label&#039; =&amp;gt; _(&quot;E-mail 3 Address&quot;),\n    &#039;type&#039; =&amp;gt; &#039;email&#039;,\n    &#039;required&#039; =&amp;gt; false,\n    &#039;params&#039; =&amp;gt; array(&#039;allow_multi&#039; =&amp;gt; false, &#039;strip_domain&#039; =&amp;gt; false, &#039;link_compose&#039; =&amp;gt; true, &#039;link_name&#039; =&amp;gt; null, &#039;delimiters&#039; =&amp;gt; &#039;,&#039;, &#039;size&#039; =&amp;gt; null)\n);\n$attributes&#x5B;&#039;homeEmail&#039;] = array(\n    &#039;label&#039; =&amp;gt; _(&quot;E-mail 2 Address&quot;),\n    &#039;type&#039; =&amp;gt; &#039;email&#039;,\n    &#039;required&#039; =&amp;gt; false,\n    &#039;params&#039; =&amp;gt; array(&#039;allow_multi&#039; =&amp;gt; false, &#039;strip_domain&#039; =&amp;gt; false, &#039;link_compose&#039; =&amp;gt; true, &#039;link_name&#039; =&amp;gt; null, &#039;delimiters&#039; =&amp;gt; &#039;,&#039;, &#039;size&#039; =&amp;gt; null)\n);\n\n<\/pre>\n<p>Now open the backends.local.php file an dlocate the following section:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\/\/ &#039;homeEmail&#039; =&amp;gt; &#039;object_homeemail&#039;,\n\/\/ &#039;workEmail&#039; =&amp;gt; &#039;object_workemail&#039;,\n<\/pre>\n<p>Change to this:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&#039;homeEmail&#039; =&amp;gt; &#039;object_homeemail&#039;,\n&#039;workEmail&#039; =&amp;gt; &#039;object_workemail&#039;,\n<\/pre>\n<p>And save the file.<br \/>\nNow reload the Communications section.<\/p>\n<p>Other Sources:<br \/>\nhttps:\/\/edeca.net\/post\/2010\/01\/modifying-fields-in-the-turba-addressbook\/<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"YQhBUvKVgk\"><p><a href=\"https:\/\/blog.monotok.org\/add-custom-fields-horde-5-turba\/\">Add Custom Fields Horde 5 Turba<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/blog.monotok.org\/add-custom-fields-horde-5-turba\/embed\/#?secret=YQhBUvKVgk\" data-secret=\"YQhBUvKVgk\" width=\"600\" height=\"338\" title=\"&#8220;Add Custom Fields Horde 5 Turba&#8221; &#8212; Monotok\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><br \/>\nhttps:\/\/support.plesk.com\/hc\/en-us\/articles\/213945205-Where-does-Horde-keep-its-address-book-How-to-restore-it-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you need to add custom fields in Horde (Turba) for additional fields from an Outlook Address Book Export. Here are the default sections in horde: Personal<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"class_list":["post-4725","post","type-post","status-publish","format-standard","hentry","category-horde"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=4725"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4725\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=4725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=4725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=4725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}