There are two kind of files:
- the templates located in /usr/share/wikid/lib/apple_templates ( files with extension .xsl)
- the themes in /Library/Application Support/Apple/WikiServer/Themes
On my server the page /groups/ was with the black apple theme so I have modified /usr/share/wikid/lib/appletemplates/grouplisting.xsl to get my theme on every pages.
If you understand french you will find my Wiki about 10.5 Server here : http://notreserveur.org/groups/macosxserver/ and the modified /groups/ page here : http://notreserveur.org/groups
Note that if you modify the files in /usr/share/wikid/lib/apple_templates they will get overwritten in an update. If you want to have your own xsl templates, you can copy the ones you want to modify and place them into a custom theme.
xsl files with the correct names located in theme bundles will get loaded by the wiki server on launch. Then those alternate xsl files will get used when building html pages with that custom theme.
Right now /groups/ won't use a theme other than the black X Server theme, so modifying the file /usr/share/wikid/lib/appletemplates/grouplisting.xsl is the only way to change that page. But note that those files are likely to get overwritten in an update. For pages other than /groups/ and /users/ it is best to go through a custom theme to change the layout of the page.
I've also tried moving the xsl files to within the themes and the edited files do not show as modified in the browser even after restarting the server.
Please can someone check what I have done and let me know whether this is correct.
The first thing that I did was to follow James Craig's instructions in a different post.
James Craig wrote:
cd /Library/Application\ Support/Apple/WikiServer/Themes/
There is a directory for each theme. You can create your own themes here, or create copies of the theme directory. For example:
sudo cp -r float.green.banner.wikitheme/ mytheme.wikitheme
sudo cp wireframe.wikitheme/theme.plist mytheme.wikitheme/
Then edit the theme.plist file copied from the wireframe theme.
1. Change the displayName from "Wireframe Theme" to "My Custom Theme".
2. Change the name from "com.apple.wireframe" to your own unique ID.
3. Change the "selectable" key to true (or remove the key/value pair).
4. Uncomment the "sidebars" key/value pair. NOTE: The "Upcoming Events" sidebar dict needs a UID key/value; either add one or leave that dict commented.
5. Save the file.
The next thing I did was to copy the XSL into the custom theme folder as per John Anderson's instructions.
John Anderson1 wrote:
You should start with the templates already in /usr/share/wikid/lib/apple_templates and copy them into your template folder. Never edit these files in-place -- we will end up overwriting them in a software update! Copy the xsl files into your custom theme. The theme will need to be selected in that specific group wiki's settings in order for the new xsl files to be used.
I have restarted the server with:
sudo serveradmin stop teams;sudo serveradmin start teams
and I have restarted the web service but the changes do not take effect.
If I modify the files directly in /usr/share/wikid/lib/apple_templates then the changes are effected.
So my theme folder looks like this:
pwd: /Library/Application Support/Apple/WikiServer/Themes/ooai.wikitheme
-rwxrwxrwx 1 root _teamsserver 14K Dec 14 23:45 all_settings.xsl*
-rwxrwxrwx 1 root _teamsserver 921B Dec 14 23:45 all_tags.xsl*
-rwxrwxrwx 1 root _teamsserver 2.2K Dec 14 23:45 calendar_entry.xsl*
-rwxrwxrwx 1 root _teamsserver 5.7K Dec 14 23:45 calendar_grid.xsl*
-rwxrwxrwx 1 root _teamsserver 2.1K Dec 14 23:45 comment_entry.xsl*
-rwxrwxrwx 1 root _teamsserver 2.5K Dec 14 23:45 comment_listing.xsl*
drwxrwxrwx 6 root _teamsserver 204B Dec 14 22:59 compressed/
-rwxrwxrwx 1 root _teamsserver 5.3K Dec 14 23:45 content_entry.xsl*
-rwxrwxrwx 1 root _teamsserver 3.9K Dec 14 23:45 contententrylisting.xsl*
-rwxrwxrwx 1 root _teamsserver 12K Dec 14 23:45 default.xsl*
-rwxrwxrwx 1 root _teamsserver 7.9K Dec 14 23:45 directory.xsl*
-rwxrwxrwx 1 root _teamsserver 5.9K Dec 14 23:45 error.xsl*
-rwxrwxrwx 1 root _teamsserver 1.3K Dec 14 23:45 folder_listing.xsl*
-rwxrwxrwx 1 root _teamsserver 9.8K Dec 14 23:45 group_listing.xsl*
-rwxrwxrwx 1 root _teamsserver 2.3K Dec 14 23:45 grouphome.xsl*
-rwxrwxrwx 1 root _teamsserver 760B Dec 14 23:45 loginpage.xsl*
-rwxrwxrwx 1 root _teamsserver 1.2K Dec 14 23:45 mailarchivelisting.xsl*
-rwxrwxrwx 1 root _teamsserver 2.1K Dec 14 23:45 moderate.xsl*
-rwxrwxrwx 1 root _teamsserver 8.0K Dec 14 23:11 preview.png*
-rwxrwxrwx 1 root _teamsserver 119B Dec 14 23:11 print.css*
-rwxrwxrwx 1 root _teamsserver 1.5K Dec 14 23:45 revision_listing.xsl*
-rwxrwxrwx 1 root _teamsserver 117B Dec 14 23:11 screen.css*
-rwxrwxrwx 1 root _teamsserver 5.9K Dec 14 23:45 search.xsl*
-rwxrwxrwx 1 root _teamsserver 365B Dec 14 23:27 theme.plist*
-rwxrwxrwx 1 root _teamsserver 2.3K Dec 14 23:45 weblog_listing.xsl*
In the blog the settings have been changed to load this new theme.
So what am I doing wrong?
I have the same concerns; I chose the route of modifying the default apple templates, so I've made many changes to the default.xsl, group_listings.xsl files, the serverhome CSS files, etc. You can check out my subtle customizations at http://www.newmachinestudios.com/. I've had a **** of a time trying to keep the system running while I made my changes but (knock on wood) I think I've figured out how to resurrect the users/groups functionality every time.
However, I want to immunize my installation from an upgrade as well. I copied the entire contents of the Collaboration directory into my web root folder and eliminated the aliases, so that I could make the changes there and leave the default stuff alone, but I want to be able to have a full compliment of the custom .xsl files there too (contained in a theme) so that no matter what happens I am upgrade immune.
I looked through all of the .xsl files but what I seem to be missing is where does the system tell apache/tomcat to load /usr/share/wikid/lib/apple_templates in the first place, so that I can change it to point to my custom stuff? I want everything to be nicely contained in one place (it seems to be spread all over the system) so that I can back it up easily.
Or, I've read that if you include customized .xsl files in your template, they will supercede the ones found in /usr/share/wikid/lib/apple_templates, but how exactly does this work? Where specifically do I put them in my theme folder? Is it selective? (i.e. can I just put in the ones I've changed or do I have to put the full complement of files in there for it to work?)
Finally, I wanted to be able to put the theme applets from the sidebar into my static html pages (in much the same way that the default apple index pages seems to load a script that creates a list of available group wikis on the fly). How is this done? Is there a reference book I should read (I'm hunting down the O'reilly Tomcat book already) or a web site that could point me in the right direction?
Thanks in advance for any assistance.
Thanks for the info. I think I understand the first paragraph of your answer, and I am going to test this right away. If this is the case then I am very relieved! I will investigate this twisted wiki server (is there a decent mac-aware site where twisted users congregate?)
I'm not a programmer (obviously) so am I way out of my depth here? I have managed to get php/mysql based sites running on my servers no problems, and I've compiled lots of specialty apps (i.e. render farm software) on mac os x so I feel pretty confident that I can figure most things out...?
Getting the sidebar on other pages will be a very complicated process. The XSLT which generates the group homepage relies on sidebar data being present in the raw XML handed to it by the server. That sidebar data is only present on the group homepage, so adding the sidebar XSL to other pages won't do any good (since there's no data to act on.)