bookmark_borderHorde Configuration: How to move passwd app into settings menu

The passwd app is a password management/changing utility for Horde which normally lives in a menu “my account” in the toolbar.

While it has been released and is in production use at many sites, it is also under development to expand and improve the module.Bankdrukken training + kogelvrije schouders bouwen – Lee Hayward’s totale fitness bodybuilding drostanolone kratom-effecten op fitness, pre-workout en bodybuilding.

Passwd provides fairly complete support for changing passwords via Poppassd, LDAP, Unix expect scripts, SMB/CIFS (under unix), Kolab, ADSI, Pine, Serv-U FTP, VMailMgr, vpopmail, SQL passwords and other more complicated setups.For a certain horde 5 installation, I needed to move the passwd app under the gearwheel/settings menu and out of the toolbar. After setting up passwd to work correctly, I added only one line to the registry.local.php file:

<?php
$this->applications['passwd']['menu_parent'] = 'settings';
?>

Everything you put into the menu labelled “settings” automatically appears in the gearwheel menu.

Fitness gym workout beste bodybuilding workout routines beschikbaarheid van primobolan depot cable rope triceps curl – jefit oefendatabase – beste app voor training, fitness, lichaamsbeweging en bodybuilding voor android en iphone beste software voor het volgen van trainingen.

bookmark_borderInstalling Horde 4 pear packages to a custom pear location (SUSE)

When installing horde to a custom pear location, you need to run the pear of your custom location, not the system pear with the custom location’s config.

So the steps would be:

 
1  mkdir /srv/horde 
2  pear config-create /srv/horde/ /srv/horde/pear.conf 
3  pear -c /srv/horde/pear.conf install PEAR 

as the install docs say but then:

4 /srv/horde/pear/pear -c /srv/horde/pear.conf channel-discover pear.horde.org 
5 /srv/horde/pear/pear -c /srv/horde/pear.conf run-scripts horde/Horde_Role 
6 /srv/horde/pear/pear -c /srv/horde/pear.conf install --alldeps horde/groupware 

Otherwise running the Horde_Role script will fail saying

config-set (horde_dir, /srv/horde/, user) failed, channel pear.php.net

This was experienced on SLES11SP1, SLES11SP2 and openSUSE Factory.

I did not test this for any debian based products yet.

bookmark_borderHorde Config: How to fill dropdowns with application data with configspecial

Horde provides system wide customisation and configuration of applications through php configuration files. These files can be edited by hand or written from an administrator config UI. This ui is automatically generated from a file called conf.xml located in your $application/config/ directory.

The config xml allows dropdowns, multiselect fields, tick boxes, radio buttons and even conditionally adding or removing a field or inserting a valid php expression.

For example a  dropdown box in the horde base application’s config is generated by this snippet:

<configenum name="use_ssl" quote="false" desc="Determines how we generate
  full URLs (for location headers and such).">2
   <values>
    <value desc="Assume that we are not using SSL and never generate https
    URLs.">0</value>
    <value desc="Assume that we are using SSL and always generate https
    URLs.">1</value>
    <value desc="Attempt to auto-detect, and generate URLs
    appropriately">2</value>
    <value desc="Assume that we are not using SSL and generate https URLs only
    for login.">3</value>
   </values>
  </configenum>

This is all nice but what if you need to provide application data rather than static values? The answer is configspecial

<values>
    <configspecial application="turba" name="sources" />
</values>

How does that work?

<configspecial> calls the horde api. the “application” part tells you which application’s api to call. You can either reference an application by its registry name (horde, imp, kronolith, turba…) or by its api name (horde,mail, calendar, addressbook)

What’s the difference? When you call turba, you get turba. When you call addressbook, you can hook into whatever application provides addressbook. For example, spam handling and ticket queues have been implemented by multiple applications. You can even implement your own handlers for any existing api.

The called application must have a method configSpecialValues() in its lib/Application.php class file. This method gets called and its only parameter is the “name” property from the xml. In our example it’s “sources”. This method will return an array of source names to use in your config screen.

    /**
     * Returns values for <configspecial> configuration settings.
     *
     * @param string $what  The configuration setting to return.
     *
     * @return array  The values for the requested configuration setting.
     */

    public function configSpecialValues($what)
    {
        switch ($what) {
        case sources:
            try {
                $addressbooks = Turba::getAddressBooks(Horde_Perms::READ);
            } catch (Horde_Exception $e) {
                return array();
            }
            foreach ($addressbooks as &$addressbook) {
                $addressbook = $addressbook['title'];
            }

            $addressbooks[''] = _("None");
            return $addressbooks;
        }
    }

Et voila – you have a list of addressbooks to choose from.

bookmark_borderHowto: Packaging 3rd party pear channel software with %php_pear_gen_filelist macro

The %php_pear_gen_filelist macro, maintained by Christian Wittmer, is really handy for packaging php pear software packages. It generates rpmlint-happy filelists and if you manage to get the dependencies right, packaging pear stuff for rpm is really a no-brainer. But the standard recipe for using this macro has one drawback: It’s ignorant of installed 3rd party roles and channels. 3rd party pear packages which depend on their channel being registered normally fail.

The workaround is easy: Copy the channel file to the build location.

Example:

#
# spec file for package php5-pear-Horde_Auth (Version 1.0.3)
#
# Copyright (c) 2011 Ralf Lang.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An “Open Source License” is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative
# Please submit bugfixes or comments via http://bugs.opensuse.org/

# norootforbuild

Name: php5-pear-Horde_Auth
%define pear_name Horde_Auth
%define pear_sname horde_auth
Summary: PEAR: Horde Authentication API
Version: 1.0.3
Release: 1
License: LGPL
Group: Development/Libraries/PHP
Source0: http://pear.horde.org/get/Horde_Auth-%.tgz
BuildRoot: %/%-%-root-%(% -n)
URL: http://pear.horde.org/package/Horde_Auth
BuildRequires: php5-pear >= 1.4.7
Requires: php5-pear-Horde_Exception < 2.0.0, php5-pear-Horde_Util < 2.0.0, php5-pear >= 1.7.0
Conflicts: php5-pear-Horde_Exception = 2.0.0, php5-pear-Horde_Util = 2.0.0
BuildRequires: php5-pear-channel-horde
Requires: php5-pear-channel-horde
BuildArch: noarch
BuildRequires: php-macros

# Fix for renaming (package convention)
Provides: php5-pear-% = %
Provides: php-pear-% = %
Provides: pear-% = %
Obsoletes: php5-pear-% < %
Obsoletes: php-pear-% < %
Obsoletes: pear-% < %

%description
The Horde_Auth package provides a common interface into the various
backends for the Horde authentication system.

%prep
%setup -c

%build
%install
% package*.xml %-%
cd %-%
PHP_PEAR_PHP_BIN=”$(which php) -d memory_limit=50m”
% %%/.channels/
% %/.channels/pear.horde.org.reg \
%%/.channels/

% -v \
-d doc_dir=/doc \
-d bin_dir=% \
-d data_dir=%/data \
-d test_dir=%/tests \
install –offline –nodeps -R “%” package.xml

% -D -m 0644 package.xml %%/%.xml

% -rf %/{doc,tmp}
% -rf %%/.{filemap,lock,registry,channels,depdb,depdblock}

cd ..

%php_pear_gen_filelist

%clean
rm -rf %

%post
if [ “$1” = “1” ]; then
% install –nodeps –soft –force –register-only %/%.xml
fi
if [ “$1” = “2” ]; then
% upgrade –offline –register-only %/%.xml
fi

%postun
if [ “$1” = “0” ]; then
% uninstall –nodeps –ignore-errors –register-only pear.horde.org/%
fi

%files -f %.files
%defattr(-,root,root)

Two parts are marked black: First you have to include the channel package with “BuildRequires:”. Second marked part copies the channel file from the installed location to the buildroot location.
Feel free to reuse or criticise this solution.

Jean claude van damme bodybuilding workout dianabol of dbol training met de beste bodybuilding-supplementen – fitness fectory.