[horde] turba throws error

Robert Abbate director at ispconcepts.com
Fri Feb 4 05:34:43 PST 2005


That sounds like a great idea, however, once I did that, nothing changed.
:-(

also, when I try to "Add" a listing


There are no writeable address books. None of the available address books
are configured to allow you to add new entries to them. If you believe this
is an error, please contact your system administrator.

  There are no browseable address books.



prefs.php file:

$prefGroups['columns'] = array(
    'column' => _("Display Options"),
    'label' => _("Column Options"),
    'desc' => _("Select which fields to display in the address lists."),
    'members' => array('columnselect'));

$prefGroups['display'] = array(
    'column' => _("Display Options"),
    'label' => _("Default Display"),
    'desc' => _("Select view to display by default."),
    'members' => array('initial_page', 'sortby', 'sortdir', 'maxpage',
'perpage'));

$prefGroups['format'] = array(
    'column' => _("Display Options"),
    'label' => _("Name Format"),
    'desc' => _("Select which format to display names."),
    'members' => array('name_format'));

$prefGroups['search'] = array(
    'column' => _("Display Options"),
    'label' => _("Searching Options"),
    'desc' => _("Choose a default directory for your personal addressbook,
contact lists, and searches."),
    'members' => array('default_dir', 'adv_results_placement')
);

$prefGroups['application'] = array(
    'column' => _("Other Options"),
    'label' => _("Delete Confirmation"),
    'desc' => _("Delete button behaviour"),
    'members' => array('delete_opt')
);


// columns selection widget
$_prefs['columnselect'] = array(
    'locked' => false,
    'type' => 'special'
);

// columns to be displayed
$_prefs['columns'] = array(
    'value' =>
"netcenter\temail\nbigfoot\temail\nverisign\temail\nlocalsql\temail",
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

// user preferred sorting column
// zero based int representing the column number to sort by
$_prefs['sortby'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

// user preferred sorting direction
$_prefs['sortdir'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(0 => _("Ascending"),
                    1 => _("Descending")),
    'desc' => _("Default sorting direction:")
);

// number of maximum pages and items per page
$_prefs['maxpage'] = array(
    'value' => 10,
    'locked' => false,
    'shared' => false,
    'type' => 'number',
    'desc' => _("Maximum number of pages")
);

$_prefs['perpage'] = array(
    'value' => 20,
    'locked' => false,
    'shared' => false,
    'type' => 'number',
    'desc' => _("Number of items per page")
);

// the page to display.  Either 'browse.php' or 'search.php'
$_prefs['initial_page'] = array(
    'value' => 'search.php',
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'desc' => _("View to display by default:"),
    'enum' => array('browse.php' => _("Address Book Listing"),
                    'search.php' => _("Search"))
);

// the format to display names.  Either 'last_first' or 'first_last'
$_prefs['name_format'] = array(
    'value' => 'first_last',
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'desc' => _("Select the format used to display names:"),
    'enum' => array('last_first' => _("\"Lastname, Firstname\" (ie. Doe,
John)"),
                    'first_last' => _("\"Firstname Lastname\"  (ie. John
Doe)"))
);

// Default directory
$_prefs['default_dir'] = array(
    'value' => 'localsql',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'desc' => _("Default directory for your personal addressbook, contact
lists, and searches.")
);

// Advanced search results placement. Are results positioned above or below
the search form?
$_prefs['adv_results_placement'] = array(
    'value' => 'below',
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'desc' => _("Specify where you want advanced search results to
appear."),
    'enum' => array('below' => _("Below search form"),
                    'above'  => _("Above search form"))
);

// preference for holding any preferences-based addressbooks.
$_prefs['prefbooks'] = array(
    'value' => '',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

// preference for delete confirmation dialog.
$_prefs['delete_opt'] = array(
    'value' => '0',
    'locked' => false,
    'shared' => false,
    'type' => 'checkbox',
    'desc' => _("Do you want to confirm deleting entries?")
);



sources.php file:



<?php
$cfgSources['localsql'] = array(
    'title' => _("My Addressbook"),
    'type' => 'sql',
    // The default connection details are pulled from the Horde-wide
    // SQL connection configuration.
    //
    // The old example illustrates how to use an alternate database
    // configuration.
    //
    // New Example:
    'params' => array_merge($conf['sql'], array('table' =>
'turba_objects')),

    // Old Example:
    // 'params' => array(
    //     'phptype' => 'mysql',
     //    'hostspec' => 'localhost',
     //    'username' => 'horde',
     //    'password' => 'tikvah',
     //    'database' => 'horde',
      //   'table' => 'turba_objects',
      //   'charset' => 'iso-8859-1'
    // ),
    'map' => array(
        '__key' => 'object_id',
        '__owner' => 'owner_id',
        '__type' => 'object_type',
        '__members' => 'object_members',
        '__uid' => 'object_uid',
        'name' => 'object_name',
        'email' => 'object_email',
        'alias' => 'object_alias',
        'homeAddress' => 'object_homeaddress',
        'workAddress' => 'object_workaddress',
        'homePhone' => 'object_homephone',
        'workPhone' => 'object_workphone',
        'cellPhone' => 'object_cellphone',
        'fax' => 'object_fax',
        'title' => 'object_title',
        'company' => 'object_company',
        'notes' => 'object_notes',
        'pgpPublicKey' => 'object_pgppublickey',
        'smimePublicKey' => 'object_smimepublickey',
        'freebusyUrl' => 'object_freebusyurl'
    ),
    'search' => array(
        'name',
        'email'
    ),
    'strict' => array(
        'object_id',
        'owner_id',
        'object_type',
    ),
    'public' => false,
    'readonly' => false,
    'admin' => array(),
    'export' => true
);

/**
 * A preferences-based adressbook. This will always be private. You
 * can add any attributes you like to the map and it will just work;
 * you can also create multiple prefs-based addressbooks by changing
 * the 'name' parameter. This is best for addressbooks that are
 * expected to remain small; it's not the most efficient, but it can't
 * be beat for getting up and running quickly, especially if you
 * already have Horde preferences working. Note that it is not
 * searchable, though - searches will simply return the whole
 * addressbook.
 */
$cfgSources['prefs'] = array(
    'title' => _("Private Address Book"),
    'type' => 'prefs',
    'params' => array(
        'name' => 'prefs',
        'charset' => NLS::getCharset()
    ),
    'map' => array(
        '__key' => 'id',
        '__type' => '_type',
        '__members' => '_members',
        '__uid' => 'uid',
        'name' => 'name',
        'email' => 'mail',
        'alias' => 'alias'
    ),
    'search' => array(
        'name',
        'email',
        'alias'
    ),
    'strict' => array(
        'id',
        '_type',
    ),
    'public' => false,
    'readonly' => false,
    'export' => true
);



-----Original Message-----
From: horde-bounces at lists.horde.org
[mailto:horde-bounces at lists.horde.org]On Behalf Of Bo Daley
Sent: Thursday, February 03, 2005 10:48 PM
To: horde at lists.horde.org
Subject: Re: [horde] turba throws error



On Thu, 3 Feb 2005, Robert Abbate wrote:

>   "Failed to access the address book: Unable to load the definition of
> Turba_Driver_."

What happens if you set your default_dir preference to 'localsql' in
prefs.php? ('Default directory' under 'Options')

bo.


--
Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-unsubscribe at lists.horde.org







More information about the horde mailing list