Forum OpenACS Q&A: Dose already acs-lang work?

Collapse
Posted by H. shefaat on
Hi,

1)I was wondering if the new package acs-lang (Localization module) work? I know it work on dotlrn very well but I dont know if it is already implemented in openacs_4.6.

2)My secound question is about skins: Is the new skin (like new openacs.org) somehow available?

Thanks in advance

Collapse
2: Re: skin (response to 1)
Posted by Ola Hansson on
As for the skin, you will find the templates and include files (widgets) that are in use on this site at this address:

http://dev.openacs.org:8000//cvs/openacs.org-dev/www/templates/

We have changed the sitemap parameter for the "Main Site" that specifies the "DefaultMaster" here on openacs.org from /www/default-master.adp to /www/templates/general-master.adp ...

Mainly take a look at general-master.adp and the files under widgets/.

Collapse
Posted by Lars Pind on
The new and improved version of acs-lang, which we've been working on for a few months now isn't going to be in the 4.6 release, but in the up-coming 4.7 release.

But it works pretty well if you do a cvs checkout from HEAD.

Collapse
Posted by xx xx on
Lars,

When do you think you'll trust acs-lang enough to release it for use on a live server. I would need a dotLRN release like the translation server and will just add a custom package.

Collapse
Posted by H. shefaat on
Hi Ola, thanks for respod. I downloaded the templates and set the DefaultMaster to templates. I got this error, any Idea what is wrong?
Thanks in advanc

Request Error
invalid command name "oacs_set_login_vars"
    while executing
"oacs_set_login_vars"
    ("uplevel" body line 26)
    invoked from within
"uplevel {
    	  ad_page_contract {

    OpenACS.org  general master 

    @author modified by Patrick Colgan pat pat@museatech.net
    @author modifi..."
    (procedure "code::tcl::/web/openacs_test/www/templates/general-master" line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse $__adp_master  [concat [list __adp_slave $__adp_output] [array get __adp_properties]"
    (procedure "template::adp_parse" line 63)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	$handler
      } ad_script_abort val {
	# do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	rp_serve_abstract_file "$root/$path"
	set tcl_url2file([ad_conn url]) [ad_conn file]
	set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."
Collapse
Posted by Ola Hansson on
The "oacs_set_login_vars" procedure looks like something that was added just to the openacs.org instance and not to the general toolkit - I am not sure what it does. Try to comment it out and see what happens...

Anyway, I think I forgot to mention a few things in my earlier reply:

Please excuse me if I am pointing out the obvious.

If we take the default home page that you get after you have installed OpenACS as an example, you can change the <master> tag at the top of index.adp so that it reads <master src="homepage-new-index">. This file (and I forgot to mention it earlier) is an intermediate template which renders the boxes. This is how we do it here on openacs.org, except we have an etp instance serving the content of the home page (the main text between the boxes) instead of an index.tcl/adp pair. The concept is still the same, however.

When someone requests '/' on your server the index page (the main content) will wrap itself in the homepage-new-index template (think spiffy boxes) which can (and does) contain both HTML/ADP code as well as several different include calls that point to the desired widgets. The widgets provide content to the homepage-new-index template, but before they do at least some of the widgets (recent news and new postings for instance) wrap _themselves_ in a template that yields the box frame which should be consistent among all boxes. This box-template (in the widgets/ dir) returns the finalized boxes to homepage-new-index.

The homepage-new-index.adp file should just have a plain <master> tag at the top so it will wrap the general-master over itself, and a <slave> tag where you want the template that "called it" to appear.

The general-master is *our* default-master because we figured it would be smoother to switch to a new default-master than to start hacking on the existing and working one. And since it is possible to easily switch the master via a parameter in the site sitemap you could have a bunch of them lying prepared if you want to switch later on.

So, to sum it up:

- Pages that want the pretty little boxes might call a template similar to homepage-new-index.adp but with another set of includes, obviously.

- Most pages will probably only want the header and footer, so they will just call the default-master (general-master in our case).

It is rather nice to be able to use intermediate templates that will in turn call a general "default-master" so you can reuse the least common denominator - header and footer for example.

Also, look at the code in the cvs repository as example code only... It will probably not work on your site without pretty heavy modification. But if you want to quickly simulate the structure of openacs.org on your site you could try to remove the .tcl files in the template pairs and replace every occurence of @whatever@ with some static text and fill in the blanks later...

Hope this helps,

Collapse
Posted by Peter Marklund on
Aldert, we are wrapping up the development of acs-lang right now (as in before christmas). In the coming months we must all work together to find and fix bugs to get OpenACS 4.7 and dotLRN 1.1 as stable as possible. It will depend mainly on the adoption of dotLRN how quickly bugs are fixed. Heidelberg is launching on I18N dotLRN in the spring and before then the quality level will have been raised considerably. I have setup testing servers that we will be able to use to measure the stability of the platform.