[turba] LDAP attributes
Rick Romero
Rick@valeoinc.com
Thu, 16 Aug 2001 12:14:43 -0500
You suck :)
Ok, I just changed my templates/search/row.inc template to print
both name and surname (my turba addition, in config/sources.php),
instead of just name. If surname doesn't exist it just prints name.
Easy fix. (yeah, my brain's working today :)
Oh. Well, now I understand the key__ tag. Maybe toss a little
blurb in the sources.php header :) (don't change source of key__,
must be unique per result.. ok, well it didn't click for me :)
What/Where is the last step before the search results get passed
back into the Turba 'values'. Is it the:
function search($search_criteria, $sort_criteria = LASTNAME)
in lib/Source.php?
Now, in that function, If I do something like (i'm TOTALLY guessing
here.. I really don't know what I'm doing :)
foreach ($remapped_results as $attributes) {
if $attributes[] = 'email' {
$a_email = explode(",",$attributes['email']);
$list->insert(new Turba_Object($this, $a_email));
}
else{
$list->insert(new Turba_Object($this, $attributes));
}
}
Would we be able to do a foreach, and print each email address in
templates/search/row.inc ?
Obviously, It's not correct, the idea is to print all email addresses
on a seperate line. If email is an array, then even if there's only
one email, only one line should be printed. row.inc could always
be modified fairly easily to just print the first (or all), if that's what
the webmaster wants. (same goes for the 'detail' screen)
If what I think is happening there, really is, I just need help with the
acutal PHP code, and it's really not a major change. Unless I
missed something else, or I have the process totally wrong.
I kind of understand why stuff is where it is, I just can't quite follow
it :)
Rick
On 16 Aug 2001, at 10:33, Chuck Hagenbuch wrote:
> Quoting Rick Romero <Rick@valeoinc.com>:
>
> > Actually, for the email, it would probably be best to have a prefs
> > option to only display the first x number of email addresses...
> >
> > I can work with that :)
>
> Patch? ;)
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck@horde.org>
> Some fallen angels have their good reasons.
>
> --
> Turba mailing list: http://horde.org/turba/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: turba-unsubscribe@lists.horde.org
>
Sincerely,
Rick Romero
IT Manager
Valeo, Inc.
rick@valeoinc.com
262-695-4841