templates/prefs/overview.inc

Joshua E Warchol jwarchol@dsl.net
Tue, 2 Apr 2002 18:42:14 -0500


Greetings,

I was talking to Chuck Hagenbuch on the [IMP] list about making it easier
for admins to add custom entries in IMP's "Options" page. Right now support
exists for adding any custom "prefGroups" you want. And you can define 
indivitual "_prefs" as links to other pages. But if the only entries in
a prefGroup are links, you get an awkward page that lists only links, yet
still has "Save Options" and "Undo Changes" buttons. There are no actual 
Horde Preferences on the page. 

Someone correctly pointed out that if you're not saving a pref, don't 
use prefs.php.  After a bit of going around I saw the error of my ways. 
But I was left with a problem. There is no "nice" way to put custom
links in the "Options" page. 

So I propose a change to $HORDE_BASE/templates/prefs/overview.inc to allow
prefGroups entries to have a "url" attribute. If this attribute is present, 
the value is used in place of "prefs.php?group=..."

I have written the following chunk of code, insert it into the file at 
line 25 (below groupIsEditable):

    <? if (isset ($gvals['url'])): ?>
        <tr><td class="control"><a class="widget" href="<?= Horde::applicationUrl($gvals['url']) ?>"><b><?= $gvals['label'] ?></b></a></td></tr>
    <? else: ?>
        <tr><td class="control"><a class="widget" href="<?= Horde::applicationUrl('prefs.php?group=' . $group) ?>"><b><?= $gvals['label'] ?></b></a></td></tr>
    <? endif; ?>

I know 3.1 is feature frozen (darn... just missed it), please consider this
change for future releases. Here is an example prefGroups entry:

$prefGroups['dsloom'] = array(
    'column' => _("Your Information"),
    'label' => "Configure Away Message",
    'desc' => "Set an out-of-office message.",
    'members' => array(''),
    'url' => "dslautoresponder.php"
);

$prefGroups['dslforw'] = array(
    'column' => _("Your Information"),
    'label' => "Configure Forwarding",
    'desc' => "Set addresses to forward copies of your email to.",
    'members' => array(''),
    'url' => "dslforwarders.php"
);

Comments?

-- 
Joshua Warchol
UNIX Systems Administrator
DSL.net


>From chuck@horde.org Date: Tue,  2 Apr 2002 23:26:51 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 62575 invoked from network); 3 Apr 2002 04:27:15 -0000
Received: from h00104bc60b3c.ne.client2.attbi.com (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 3 Apr 2002 04:27:15 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 617C13CD2; Tue,  2 Apr 2002 23:26:51 -0500 (EST)
Received: from 192.168.0.135 ( [192.168.0.135])
	as user chuck@localhost by marina.horde.org with HTTP;
	Tue,  2 Apr 2002 23:26:51 -0500
Message-ID: <1017808011.3caa848b357c4@marina.horde.org>
Date: Tue,  2 Apr 2002 23:26:51 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <1017763002.3ca9d4ba29934@www.kurogane.net>
In-Reply-To: <1017763002.3ca9d4ba29934@www.kurogane.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] Multilingual Horde

Quoting Akira Kurogane <akira@kurogane.net>:

>      I have recently finished an alteration of Horde/IMP that works
> effectively for japanese users, both for reading and composition. That's 
> good, but I've used the "mbstring" functions to achieve this, which 
> means recompiling php using the "--enable-mbstring" configuration 
> option. Hence, these changes cannot be merged without forcing _everyone_ 
> else to recompile, as I see it.
> 
>     So, what to do? Is japanese (and, further down the track, more
> advanced options such as specifying charset for mime parts) worth it? Or 
> should I go my seperate, multi-byte way?

Let's see the changes - this is definitely something we should support 
down the road.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"A dream which helps you to live your reality with dignity
 and justice is a good dream." - Tariq Ramadan


>From chuck@horde.org Date: Wed,  3 Apr 2002 00:10:22 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 66167 invoked from network); 3 Apr 2002 05:15:56 -0000
Received: from h00104bc60b3c.ne.client2.attbi.com (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 3 Apr 2002 05:15:56 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 121633CCC; Wed,  3 Apr 2002 00:10:23 -0500 (EST)
Received: from 192.168.0.135 ( [192.168.0.135])
	as user chuck@localhost by marina.horde.org with HTTP;
	Wed,  3 Apr 2002 00:10:22 -0500
Message-ID: <1017810622.3caa8ebed3c13@marina.horde.org>
Date: Wed,  3 Apr 2002 00:10:22 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <20020331182123.A60138@graf.pompo.net>
In-Reply-To: <20020331182123.A60138@graf.pompo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] [Troll] Adding prefs + misc fixes

Quoting Thierry Thomas <thierry@pompo.net>:

> I have duplicated the preferences editing module from IMP to Troll +
> use these prefs when posting + add sig + do not quote sig + misc fixes.

Committed, thanks.

> It requires a prefs.gif which can be copied from
> horde/graphics/prefs.gif to troll/graphics.

No, you just have to tell it to use Horde's.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"A dream which helps you to live your reality with dignity
 and justice is a good dream." - Tariq Ramadan