Forum OpenACS Q&A: Response to Personal/Corporate Calendar in ACS

Collapse
Posted by Vinod Kurup on
I suspect that I have made some wrong descission during this fight, hence the question about a HowTo...

I just downloaded the .apm file and took a look. The major issue is that it's an ACS 3.4.x package and OpenACS is based on 3.2.x. Between those versions, ACS added the package management stuff as well as some new database-access stuff.

So, I don't think you've done anything wrong - you're on the right track. Basically you need to look at each command that is not found and decide if it's needed. If so, you need to figure out how to port it to 3.2.4. As far as I know, there isn't a HOWTO on this, but I'm happy to help here, where I can.

1) ad_library - it looks like this is a documentation routine. Since it's not present in any of the other files in the /web/$openacs-server/tcl directory, I would just delete this call.

2) ad_page_contract - this function specifies the form variables that the page should expect and sets them. It does some documentation stuff as well. You should be able to delete this call and replace it by the simple set_the_usual_form_variables 0. Be aware that this call may do some error-checking as well, so you may need to validate the input yourself. Also, it's a good idea to document what variables you expect in the form.

3) db_1row - This is from the new database access api. Look at this document for some background info. You'll need to convert all the calls starting with db_ to the ns_db equivalent. Plus, you'll need to do your own handle management. So, I would do ...

set db [ns_db gethandle] # now you got a handle. send this to all your db calls in this file ... ns_db 1row $db $sql_query ... # done with db stuff - release your handle ns_db releasehandle $db

Hopefully, this will get you started. Good luck!