Forum OpenACS Q&A: wap module in Openacs ?

Collapse
Posted by loris bason on
Hi all.
In Acs there is a wap module that allows to serve content to wireless
devices.
Does anybody think to port it in Openacs ?
Collapse
Posted by Ryan Campbell on
You can download it here. This is my first port (if you can call it that, there wasn't all that much to do) so feedback is appreciated.

Installation directions:

  1. expand the tar file into the directory /webroot/server
  2. move the ad-abstract-url.tcl file to /tcl. I didn't put it there in the tar file in case you have a modified version of that file. A diff will tell you which line you need to change.
  3. run the datamodel creation script (/www/doc/sql/wap.sql)
  4. restart-aolserver so that the tcl libraries can be sourced.

WinWap works well for testing this module. I've also tested it with Phone.com 3.17 (on my Qualcomm phone), but it doesn't seem to support cookies, so login is impossible.

Collapse
Posted by Ryan Campbell on
Sorry, that URL should be http://www.winwap.org.
Collapse
Posted by Andrew Grumet on
but it doesn't seem to support cookies, so login is impossible.
I don't know if this applies to OpenACS, but we originally couldn't get cookies to work in ACS Classic due to the use of commas. I believe all cookies are URLencoded as of ACS3.3, but it might be worth double checking.
Collapse
5: login problem fixed (response to 1)
Posted by Ryan Campbell on
I believe all cookies are URLencoded as of ACS3.3, but it might be worth double checking.
Thanks for the pointer on this, Andrew. Your suggestion fixed the problem with logging in that I was encountering on my phone.

Since we're working off of the ACS3.2 code base, cookies are not URL encoded. To fix this, I have included a modified version of ad-security.tcl in the latest version which ns_urlencodes and decodes the ad_user_login and ad_session_id cookies. The modifications to ad-security.tcl also take into account the fact that you might have users running around with non-ns_urlencoded cookies.

Again, ad-security.tcl is not placed in the ./tcl directory by default, JIC you happen to have a modified version. Also, one thing I forgot to mention in my previous post: you must copy parameter file settings for this module from the ./doc/wap.html file into your ./parameters/servername.ini file.