Forum OpenACS Development: Re: Screen name / real name parameter

Posted by Benjamin Bytheway on
I'm ready for an update on my progress on adding this parameter. I'd also like some comments about my approach.

I've added a ScreenNameP parameter to acs-subsite, which defaults to 0. The registration procedure governed by acs-subsite honors the parameter and will require the user to choose a screen name at the time of registration.

To aid package develpers, I've also modified and added some procs and sql functions (postgres only at this point, but I'll have oracle by the time I'm done). These are all housed in the acs-subsite package:

TCL Procs


Takes no parameters. This proc returns the value of the ScreenNameP parameter of the closes acs-subsite ancestor package.
Requires a user_id and optionally takes a -screen_name_p parameter. If screen_name_p is not provided, it will be found by calling the get_screen_name_p procedure above. If screen_name_p is 0, this proc will turn the real name of the user. If screen_name_p is 1, the screen_name will be returned if it exists, otherwise the real name will be returned.

SQL Function

user_display__get_name (postgres)

This function requires a user_id and screen_name_p. The return for this function is the same as the tcl get_name function.
As a test, I've modified the forum package using both the tcl and sql functions, and it appears to work well. I'm not sure how this approach will affect performance, but we should be able to improve things by caching the tcl procs.

Will this approach be sufficient to allow us to start modifying packages to honor this parameter? I'm interested if this approach is something the community would approve for inclusion into the toolkit.