Forum OpenACS Q&A: Re: Current state of theming in OpenACS (without .LRN)

Collapse
Posted by Jim Lynch on

Dave, thanks...

(aside, note to self:

so when you want to extend a package, you would go to the package manager, click on the package, and scroll down to "manage dependencies and provides", and (as of openacs-5.7) you will see four sections... it's not the first one (provides) which you can't edit anyway, it's not the second (depend-on), it's the third one (extend), count one-tuo-three) and then add the package you want to extend. In this case subsite.

Earlier, I tried to create the subsite package -depending- on subsite, that didn't work, then I tried to take the same package and add the extend, database said unique constraint, so I made a new package, -only- extended, and whizbangabbracadabbra. worked.)

I started working on the automation, and since I have no info on the future, it will only work on 5.7.

prelim:

these are the files that have "openacs-default-theme":

jim@amdlap:/web/oacs57tst/packages/openacs-default-theme$ grep -rc openacs-default-theme . | grep -v ":0$"
./www/resources/styles/default-master.css:6
./catalog/openacs-default-theme.en_US.ISO-8859-1.xml:1
./catalog/openacs-default-theme.es_ES.ISO-8859-1.xml:1
./tcl/apm-callback-procs.tcl:8
./openacs-default-theme.info:3
./lib/tabbed-master.adp:1

and these are the files whose name contains openacs-default-theme:

jim@amdlap:/web/oacs57tst/packages/openacs-default-theme$ ls -R | grep  openacs-default-theme 
openacs-default-theme.info
catalog/openacs-default-theme.en_US.ISO-8859-1.xml
catalog/openacs-default-theme.es_ES.ISO-8859-1.xml

I'll start working on the info file, and since it's xml, I'll try to use tdom to parse into something I can look at the pieces.

Progress so far: I did one by hand, and it's working.

To add specifics, after changing files containing "openacs-default-theme", I had to...

  • alter subsite params:
    • DefaultMaster
    • ThemeCSS
    • ThemeKey
  • edit (myPackage)-theme/tcl/apm-callback-procs.tcl:
    • change the name of the namespace
    • alter -key, -name, -template, -css of both calls to subsite::new_subsite_theme
    • get rid of the default parameter setters at bottom of proc

One thing I found, is you have to rename the theme specifier because they have to be unique. In openacs-default-theme, those are named default-plain and default-tabbed. After I copied the package openacs-default-theme to a-site-theme, I renamed default_plain to a_site_plain and default_tabbed to a_site_tabbed in what was originally openacs_default_theme::install::after_install() which I renamed to a_site_theme::install::after_install().