[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] proposal for demo sites
From: |
Thorsten Wiggers |
Subject: |
[Phpgroupware-developers] proposal for demo sites |
Date: |
Tue, 9 Mar 2004 14:32:31 +0100 |
Hi,
as we at probusiness noticed that there are often problems,
concerning language preferences settings. Demo users often
change the language to theire needs (as they should do). But
if the language is changed to an other than english e.g.
french, people like me ;) will possibly have problems changing
the language to one they are able to read, as they don't know
where.
I thought it would be a great idea to add an admin option which
is switched on if the site is a demo, and changes the preferences
to predifined ones.
For our needs I have just added 3 lines in the login.php.
It checks which user is going to log in, and if it's a demo
user the database is updated with the predefiened values. This
way every user has a default language like e.g. english.
It's rather a hack then anything else so probably some of you
is interested in writing this little feature!?
It's just an impulse!
Regards Thorsten
<- snip
if
($GLOBALS['phpgw']->accounts->data['userid']=='demo'||$GLOBALS['phpgw']->acc
ounts->data['userid']=='demo2'||$GLOBALS['phpgw']->accounts->data['userid']=
='demo3')
{
$GLOBALS['phpgw']->db->query("UPDATE phpgw_preferences SET
preference_value='a:4:{s:13:\"navbar_format\";s:14:\"icons_and_text\";s:4:\"
lang\";s:2:\"en\";s:12:\"template_set\";s:5:\"idots\";s:5:\"theme\";s:7:\"de
fault\";}' WHERE
preference_owner=".$GLOBALS['phpgw']->accounts->account_id." LIMIT 1");
}
snap ->
- [Phpgroupware-developers] proposal for demo sites,
Thorsten Wiggers <=