Difference between revisions of "Pandora - Update User Setting"
From SmartWiki
Andy Nguyen (talk | contribs) (→Key and Value options) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 22: | Line 22: | ||
|} | |} | ||
− | + | ||
− | + | ==Key and Value options== | |
* Key: '''DEFAULT-LANG''' - user's language preference | * Key: '''DEFAULT-LANG''' - user's language preference | ||
* Values: | * Values: | ||
Line 34: | Line 34: | ||
::* 8 = Finnish | ::* 8 = Finnish | ||
::* 9 = Spanish (Ecuador) | ::* 9 = Spanish (Ecuador) | ||
− | ::* 10 = | + | ::* 10 = Vietnamese |
− | |||
==Example== | ==Example== | ||
Line 42: | Line 41: | ||
ss_developer_key="745757jj3389dl8783"; | ss_developer_key="745757jj3389dl8783"; | ||
var rs=usersetting_update(false,"",@me.userid@,"DEFAULT-LANG",2); | var rs=usersetting_update(false,"",@me.userid@,"DEFAULT-LANG",2); | ||
− | alert("Your language preference has been updated to French. Please | + | alert("Your language preference has been updated to French. Please refresh the page for the change to take effect."); |
} | } | ||
[[Category: Pandora]] | [[Category: Pandora]] |
Latest revision as of 13:32, 6 April 2011
This function will update a single user record or create a new user record.
usersetting_update(flag,callbackfunc,userid,key,value)
Parameter | Description |
---|---|
Flag | Asynchronous processing Flag
Set to False for synchronous processing. Set to True for asynchronous processing. |
Callbackfunc | User created Java function to manage the callback from an asynchronous function. |
userid | userid of the user to be updated |
key | Key to the setting to be updated |
value | The value to be written to the database |
Key and Value options
- Key: DEFAULT-LANG - user's language preference
- Values:
- 1 = English
- 2 = French (Canada)
- 3 = Traditional Chinese
- 4 = German
- 6 = French (France)
- 7 = Japanese
- 8 = Finnish
- 9 = Spanish (Ecuador)
- 10 = Vietnamese
Example
function updatelanguage() { ss_developer_key="745757jj3389dl8783"; var rs=usersetting_update(false,"",@me.userid@,"DEFAULT-LANG",2); alert("Your language preference has been updated to French. Please refresh the page for the change to take effect."); }