[ewiki] Re: UserVars Dependant plugins
- From: Andy Fundinger <andy@xxxxxxxxxxx>
- To: "'ewiki@xxxxxxxxxxxxx'" <ewiki@xxxxxxxxxxxxx>
- Date: Wed, 12 May 2004 10:28:30 -0400
Delay and move sound fine.
> But, whatever, I still favour simply using a $_EWIKI[]
> uservars array instead of the _uservar_stubs() - which add
> only little value, since this is mainly about persistent
> data. (Only the random user variables access really needs a
> _uservars API, which didn't need to be a core feauture anyhow.)
The problems I see with this are:
1. When should it be loaded - first init plugin I presume? What if the
_auth code would like to use it immediately after establishing the identity
in global code? Maybe the auth code should call the loader? How does it
know which one?
2. When should it be saved? The last page_final plugin I presume?
3. (The big one) How do I access someone else's uservars? I expect I'll
need to get, set, and search for values on another user. Is this the same
case you see as random access?
Looking at the API then we could:
* Add a ['uservars_retrieve'] hook and expect it to be called by auth
plugins when they set $ewiki_auth_user.
* Call a ['uservars_store'] hook (if set) at the end of ewiki_page() and
ewiki_binary(). This could be a page_final plugin, but should be called in
ewiki_binary() too.
* Make $ewiki_uservars[] available for calls by definition. I already have
it buried in my uservars_pages plugin
* Move ewiki_getall_uservar(), ewiki_get_uservar(), ewiki_set_uservar(),
ewiki_search_uservar(), and ewiki_clear_uservar() to lib/uservars.php.
Require this plugin whenever we have related calls.
* Revised uservars_pages to remove retrieve/store calls on accesses to the
current user.
I don't clearly see the problem with the function based api, but if we split
it, that seems the way to go.
Andy
- Follow-Ups:
- [ewiki] Re: UserVars Dependant plugins
- From: Mario Salzer
Other related posts:
- » [ewiki] UserVars Dependant plugins
- » [ewiki] Re: UserVars Dependant plugins
- » [ewiki] Re: UserVars Dependant plugins
- » [ewiki] Re: UserVars Dependant plugins
- [ewiki] Re: UserVars Dependant plugins
- From: Mario Salzer