)441 4451 y()486
-4548 y( {title}<)o(/td>)441
-4645 y( |
)i()486 4742 y( {error})o(td>)441
-4840 y( |
)p Black 3842 5278 a Fa(1)p Black eop
-%%Page: 2 2
-2 1 bop Black 0 TeXcolorgray Black 2778 67 a Fa(phpGr)l(oupW)-8
-b(ar)m(e)19 b(admin/con\002g)o(.php)p Black 396 579 a
-Fb()396 676 y()441
-773 y()486 870 y( | )441 967 y(
)441 1065 y()486 1162 y( {lang_Addressbook}/{)o(lang_C)o(ontact)o(_Setti)o
-(ngs}<)o(/b>)396 1259 y( | )441 1356 y(
)441
-1453 y()486 1550 y
-({lang_Contact_application}: | )486 1647 y( | )441 1745 y(
)396
-1842 y(...)396 2130 y Fe(Note)20 b(the)h(\002eldname,)e(ne)n
-(wsettings[contact_application].)c(This)20 b(array)f(name)h(must)g(be)g
-(used)g(for)g(the)g(form)f(v)n(alues.)396 2238 y(Ne)o(xt,)h(note)g(the)
-g(v)n(alue)f(setting)i(for)e(this)i(form)e(element,)g({v)n
-(alue_contact_application}.)c(This)20 b(indicates)g(that)h(we)396
-2346 y(w)o(ant)g(the)f(current)f(v)n(alue)g(of)h(the)g(con\002g)g
-(setting,)g('contact_application',)c(to)k(be)g(set)h(and)f(displayed)f
-(on)g(the)i(form.)396 2454 y(Lastly)-5 b(,)20 b(look)f(at)i(the)f
-(template)g(element,)f({lang_Contact_application}.)d(Here,)j(the)i(v)n
-(alue)e(from)g(the)i(lang)e(db)h(table)396 2561 y(will)h(be)f(inserted)
-g(if)g(a)n(v)n(ailable.)396 2711 y(Let')-5 b(s)21 b(tak)o(e)f(a)h(look)
-e(at)i(part)f(of)g(the)g(preferences/def)o(ault/con\002g.tpl:)441
-2891 y Fb()486 2988 y
-({lang_Country_Selection})c
-(\({lang_Text_Entry}/{lang_SelectBox}\):)o(td>)486
-3085 y( | )531 3182 y()486 3474
-y( | )441 3571 y(
)396 3859 y Fe(Here,)20 b(we)h(are)f(adding)f
-(a)h(ne)n(w)g(element,)f({hook_country_set}.)d(This)k(brings)f(up)h
-(the)g(ne)o(xt)g(\002le)h(we)f(will)h(need)f(to)396 3967
-y(parse)g(this)h(v)n(alue...)-2 4337 y Fc(1.2.)34 b
-(hook_con\002g.inc.php)j(\(optional\))396 4504 y Fe(At)21
-b(each)f(in)m(v)n(ocation)e(of)i(con\002g.php,)d(a)k(call)g(to)f(the)g
-(common)f(class)i(function)d(hook_single\(\))f(is)k(made.)f(It)g
-(attempts)396 4612 y(to)h(include)e(a)h(\002le,)h
-(hook_con\002g.inc.php)14 b(as)21 b(a)g(set)g(of)f(code)f(for)h
-(con\002g.php)d(to)k(use.)f(In)g(the)g(case)h(of)f(the)g(preferences)
-396 4720 y(e)o(xample)f(abo)o(v)o(e,)f(using)i(hook_country_set,)15
-b(here)20 b(is)h(the)f(corresponding)d(function)i(in)396
-4828 y(preferences/inc/hook_con\002g.)o(inc.p)o(hp)o(:)p
-Black 3842 5278 a Fa(2)p Black eop
-%%Page: 3 3
-3 2 bop Black 0 TeXcolorgray Black 2778 67 a Fa(phpGr)l(oupW)-8
-b(ar)m(e)19 b(admin/con\002g)o(.php)p Black 396 579 a
-Fb(function)44 b(country_set\($config\))396 676 y({)576
-773 y($country)f(=)i(array\()f('user_choice')e(=>)j('Users)f(Choice',)f
-('force_select')f(=>)j('Force)f(Se-)396 870 y(lectbox')g(\);)576
-967 y(while)g(\(list)g(\($key,)f($value\))h(=)h(each)f(\($country\)\))
-576 1065 y({)755 1162 y(if)g(\($config['countrylist'])d(==)k($key\))755
-1259 y({)934 1356 y($selected)f(=)g(')h(selected';)755
-1453 y(})755 1550 y(else)755 1647 y({)934 1745 y($selected)f(=)g(\224;)
-755 1842 y(})755 1939 y($descr)g(=)g(lang\($value\);)755
-2036 y($out)g(.=)h('')f(.)i("\\n";)576
-2133 y(})576 2230 y(return)e($out;)396 2327 y(})396 2615
-y Fe(Note)20 b(again)g(the)g(template)f(v)n(alue)h(we)h(used)e(earlier)
-m(,)h({hook_country_set}.)15 b(This)20 b(causes)h(con\002g.php)c(to)k
-(look)e(for)h(a)396 2723 y(function)f(named)g(country_set\(\).)e(Since)
-j(we)h(included)d(the)j(\002le)g(with)f(this)h(function)d(via)i(the)g
-(hook_single\(\))d(call,)396 2831 y(this)k(function)d(is)k(e)o(x)o
-(ecuted.)c(It')-5 b(s)21 b(return)e(is)i(a)f(string,)g(and)g(the)g
-(function)e(prints)i(nothing)f(itself.)-2 3201 y Fc(1.3.)34
-b(hook_con\002g_v)n(alidate)r(.inc.php)39 b(\(optional\))396
-3369 y Fe(Once)20 b(the)g(admin)g(clicks)g(the)g(submit)g(b)n(utton)f
-(to)i(post)f(the)g(form,)f(we)i(can)f(optionally)e(v)n(alidate)i(their)
-g(input)f(using)396 3477 y(one)h(or)g(man)o(y)f(dif)n(ferent)f
-(functions.)h(This)h(is)h(done)e(by)h(\002rst)h(making)e(another)g
-(call)h(to)h(hook_single\(\))c(in)j(the)g(API)396 3584
-y(common)f(class.)h(This)h(time,)f(the)g(name)g(con\002g_v)n(alidate)d
-(is)k(used,)f(so)h(common)d(tries)j(to)f(include)396
-3692 y('application/inc/hook_con\002g_)o(v)n(a)o(lidate.in)o(c.p)o(hp)o
-('.)396 3842 y(If)g(this)h(\002le)g(e)o(xists,)f(it)h(sets)g(a)g(v)n
-(ar)f(to)g(tell)h(con\002g.php)d(it)i(w)o(as)i(found.)c(F)o(ollo)n
-(wing)h(then)g(are)h(functions)f(named)g(after)396 3950
-y(each)h(con\002g)f(we)i(w)o(ant)f(to)h(v)n(alidate.)e(The)h(follo)n
-(wing)e(e)o(xample)h(is)i(for)f(addressbook:)576 4130
-y Fb($GLOBALS['phpgw_info']['server']['fou)o(nd_val)o(idatio)o(n_hook)o
-('])39 b(=)45 b(True;)576 4227 y(/*)f(Check)g(a)h(specific)e(setting.)h
-(Name)g(must)g(match)g(the)g(setting.)g(*/)576 4324 y(function)f
-(ldap_contact_context\($value=\224\))576 4421 y({)755
-4518 y(if\($value)g(==)i($GLOBALS['phpgw_info']['server']['ldap)o
-(_conte)o(xt']\))755 4616 y({)934 4713 y($GLOBALS['config_error'])c(=)k
-('Contact)e(context)h(for)g(ldap)g(must)g(be)h(differ-)396
-4810 y(ent)g(from)f(the)g(context)g(used)g(for)g(accounts';)p
-Black 3842 5278 a Fa(3)p Black eop
-%%Page: 4 4
-4 3 bop Black 0 TeXcolorgray Black 2778 67 a Fa(phpGr)l(oupW)-8
-b(ar)m(e)19 b(admin/con\002g)o(.php)p Black 755 579 a
-Fb(})755 676 y(elseif\($value)43 b(==)h
-($GLOBALS['phpgw_info']['server']['ldap_g)o(roup_)o(contex)o(t']\))755
-773 y({)934 870 y($GLOBALS['config_error'])d(=)k('Contact)e(context)h
-(for)g(ldap)g(must)g(be)h(differ-)396 967 y(ent)g(from)f(the)g(context)
-g(used)g(for)g(groups';)755 1065 y(})755 1162 y(else)755
-1259 y({)934 1356 y($GLOBALS['config_error'])d(=)k(\224;)755
-1453 y(})576 1550 y(})396 1838 y Fe(Here)20 b(we)f(created)g(a)h
-(function)e(to)i(check)e(the)i(entered)e(v)n(alue)h(for)g(the)g
-(con\002g)g(item,)g(ldap_contact_conte)o(xt.)c(W)-7 b(e)21
-b(w)o(ant)396 1946 y(to)g(mak)o(e)e(sure)h(the)h(admin)e(did)h(not)g
-(set)h(this)f(v)n(alue)g(to)g(one)g(which)g(w)o(ould)f(con\003ict)h
-(with)g(another)f(con\002g)g(item,)h(used)396 2054 y(for)g(accounts)f
-(or)h(groups)f(in)h(phpGroupW)-7 b(are.)396 2204 y(con\002g.php)18
-b(calls)j(this)g(function,)d(sending)h(it)i(the)f(POST)-6
-b(ed)20 b(v)n(alue.)f(con\002g.php)f(continues,)h(adding)g(all)h(other)
-g(con\002g)396 2312 y(items)h(from)e(the)h(POST)-6 b(ed)21
-b(v)n(alues.)396 2461 y(The)f(v)n(ariable)f($GLOB)m
-(ALS['con\002g_error'])c(is)21 b(parsed)f(through)e(lang\(\),)h(then)g
-(appended)f(to)j(the)f(local)g(v)n(ariable,)396 2569
-y($error)-5 b(.)19 b(If)h(this)h(has)f(an)o(y)g(v)n(alue)f(after)h(the)
-g(POST)-6 b(ed)20 b(v)n(ariables)g(are)g(check)o(ed,)f(the)h(form)f
-(then)h(has)g(its)h({error})e(tag)396 2677 y(\002lled)i(with)f(this)h
-(result.)f(The)g(form)f(is)i(displayed)e(again,)g(with)h(the)g(error)-5
-b(.)20 b(If)g($error)e(has)j(no)e(v)n(alue,)h(con\002g.php)396
-2785 y(redirects)g(to)g(admin/inde)o(x.php.)396 2934
-y(Ho)n(we)n(v)o(er)m(,)e(there)i(is)h(one)f(more)f(function)g(that)h
-(may)g(be)g(included)e(in)j(hook_con\002g_v)n(alidate.inc)o(.ph)o(p:)
-576 3114 y Fb(/*)44 b(Check)g(all)g(settings)g(to)g(validate)g(input.)g
-(Name)g(must)g(be)h('final_validation')c(*/)576 3212
-y(function)i(final_validation\($value=\224\))576 3309
-y({)755 3406 y(if\($value['contact_repository'])d(==)k('ldap')g(&&)g
-(!$value['ldap_contact_dn']\))755 3503 y({)934 3600 y
-($GLOBALS['config_error'])d(=)k('Contact)e(dn)i(must)f(be)g(set';)755
-3697 y(})755 3794 y(elseif\($value['contact_repository'])39
-b(==)44 b('ldap')g(&&)h(!$value['ldap_contact_context']\))755
-3891 y({)934 3989 y($GLOBALS['config_error'])c(=)k('Contact)e(context)h
-(must)g(be)h(set';)755 4086 y(})755 4183 y(else)755 4280
-y({)934 4377 y($GLOBALS['config_error'])c(=)k(\224;)755
-4474 y(})576 4571 y(})p Black 3842 5278 a Fa(4)p Black
-eop
-%%Page: 5 5
-5 4 bop Black 0 TeXcolorgray Black 2778 67 a Fa(phpGr)l(oupW)-8
-b(ar)m(e)19 b(admin/con\002g)o(.php)p Black 396 579 a
-Fe(con\002g.php)f(checks)i(for)f(the)h(e)o(xistence)g(of)g(the)g
-(function)e('\002nal_v)n(alidation\(\)'.)f(This)j(function)e(can)i(be)g
-(used)g(to)396 687 y(check)g(all)g(form)g(v)n(alues)f(at)i(once.)e(It)i
-(gets)f(sent)h(the)f(entire)g($ne)n(wsettings)f(array)g(POST)-6
-b(ed)21 b(from)e(the)h(form.)f(As)i(with)396 795 y(the)f(other)g
-(functions)f(in)h(this)h(\002le,)f(\002nal_v)n(alidation\(\))d(should)j
-(set)h($GLOB)m(ALS['con\002g_error'])15 b(if)20 b(there)g(is)h(a)396
-903 y(problem.)p Black 3842 5278 a Fa(5)p Black eop
-%%Page: 6 6
-6 5 bop Black 0 TeXcolorgray Black 2778 67 a Fa(phpGr)l(oupW)-8
-b(ar)m(e)19 b(admin/con\002g)o(.php)p Black Black 3840
-5278 a(6)p Black eop
+1 0 bop Black Black -434 -417 a Fa(phpGroupW)-7 b(are)39
+b(admin/con\002g.php)81 b(A)42 b(brief)f(introduction)f(to)i(writing)f
+(hooks)g(and)g(templates)h(for)f(an)o(y)g(application)f(to)i(use)h
+(this)f(admin)f(interf)o(ace,)-600 -318 y(by)93 b(Miles)47
+b(Lott)g()41 b(Dec)47
+b(22,)f(2001.)91 b(Files)k(con\002g.tpl)45 b(\(required\))91
+b(In)46 b(your)f(application/templates/def)o(ault)e(directory)-5
+b(,)-600 -218 y(create)38 b(a)g(ne)n(w)g(template)g(\002le)h(named)e
+('con\002g.tpl'.)e(This)k(will)g(be)f(included)e(by)i(con\002g.php)d
+(and)j(used)g(to)g(dra)o(w)g(the)g(page.)f(This)h(template)g(should)f
+(include)-600 -118 y(a)45 b(POST)g(method)f(form.)f(The)i(follo)n(wing)
+e(template)h(tags)h(may)f(be)h(used:)89 b({action_url})43
+b(-)i(A)g(phpgw->link)d(to)j(con\002g.php)d(will)k(be)e(inserted.)89
+b({title})-600 -19 y(-)50 b(This)g(will)g(be)f(parsed)g(to)h(display)f
+('Site)h(Con\002guration'.)97 b({th_bg},{th_te)o(xt},{ro)n(w_)o(on})o
+(,{ro)m(w_)o(of)n(f)o(})44 b(-)50 b(Replaced)f(with)h(the)f(current)g
+(theme)g(colors.)-600 81 y(and)c(the)g(follo)n(wing)e(special)i(types:)
+91 b({lang_XXX})44 b(-)h(Filled)h(with)f(lang\('XXX'\).)89
+b({v)n(alue_XXX})43 b(-)i(Filled)h(with)f(the)g(current)f(v)n(alue)h
+(of)f(con\002g)h(item)-600 180 y('XXX'.)95 b({selected_XXX})47
+b(-)h(set)h(to)e(\224,)h(or)g(')g(selected')f(if)h(an)g(option)e(v)n
+(alue)h(is)i(current.)94 b({hook_XXX})46 b(-)i(Calls)h(a)f(function)e
+(named)g(XXX)i(\(will)-600 280 y(be)54 b(discussed)g(later\).)109
+b({check)o(ed_XXX+YYY})51 b(-)k(Handles)f(checkbox/radio)c(v)n(alues)k
+(set)h(to)g(YYY)f(or)g(\224)h(\(will)f(be)h(discussed)f(later\).)108
+b(F)o(ollo)n(wing)-600 380 y(is)70 b(an)f(e)o(xample)e(from)h(the)h
+(addressbook)e(application:)g(