Customizing the Wiki sidebar step by step
Imported from the Apple Support Forums via the Wayback Machine 🔗
I'm having severe problems with my Wiki-setup. Frankly the worst Apple-experience in my entire life. When I'm done with this thread, I'm certain that a lot of other people will have an easier time configuring a custom sidebar in their own Wiki. At the moment, I'm lost.
*Apple has posted this: "Extending your wiki server"*
http://images.apple.com/server/macosx/docs/ExtendingYour_WikiServer.pdf
Which has a chapter on page 18-23 that takes ut step by step towards a custom wiki sidebar.
This guide is poorly written and takes an abstract approach towards helping the user, in this case, poor me. To summarize:
As far as I know, the relevant files are stored at
*/Library/Application Support/Apple/WikiServer*
(themes, wikicontent and such)
And some files at
/Library/WebServer/Documents
(index file that points towards the correct wiki-dir)
*------ QUOTE: ------*
Creating Sidebars
If you haven’t created a sidebar before, it might be easier to customize an example
sidebar to suit your needs.
In the wireframe theme’s theme.plist file, there is a sidebars section that contains an
array of sidebars you can customize:
<key>sidebars</key>
<array>
<dict>
sidebar keys and values
</dict>
<dict>
sidebar keys and values
</dict>
</array>
*------ END QUOTE: ------*
*I assume...*
That "the wireframe themes theme.plist file" is this file:
/Library/Application Support/Apple/WikiServer/Themes/wireframe.wikitheme
Later down, at page 23, there is a part named *Using the Example Sidebars*
*------ QUOTE: ------*
The wireframe theme’s theme.plist file includes several sidebar examples. All of these
examples are commented out by default. You’ll need to remove the comments marks if
you want to use the example sidebars as custom sidebars. If you don’t add any custom
sidebars, the default sidebars are used. If you use at least one custom sidebar, the
default sidebars don’t appear.
Consider commenting out all sidebars you don’t want to use, and leaving
uncommented all sidebars you want to use. Doing this allows you to choose which
sidebars you want and allows you to easily change sidebar settings later on. To do this,
you must start a comment before the <dict> tag for a sidebar, and end the comment
after the </dict> tag for that sidebar.
*------ END QUOTE: ------*
Do I understand this right? I may just edit this file and it will show up on all my Wiki's? What if I want different sidebars on my different Wiki's? Guess different sidebars should be an easy thing to fix, so I doubt the change is made in this file - which gets me thinking, why do I need to edit this file at all? Well.. Let's do it anyway:
*The original file: /Library/Application Support/Apple/WikiServer/Themes/wireframe.wikitheme/themes.plist*
*------ QUOTE: ------*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bannerImageHeight</key>
<real>99</real>
<key>bannerImageWidth</key>
<real>950</real>
<key>displayName</key>
<string>Wireframe Theme</string>
<key>name</key>
<string>com.apple.wireframe</string>
<!-- remove this selectable key from your theme -->
<key>selectable</key>
<false/>
<!-- example (non-default) sidebars -->
<!--
<key>sidebars</key>
<array>
<dict>
<key>displayName</key>
<string>What's Hot</string>
<key>howMany</key>
<string>5</string>
<key>sortDirection</key>
<array>
<string>reverse</string>
</array>
<key>tag</key>
<array>
<string>hot</string>
</array>
<key>type</key>
<string>search</string>
<key>uid</key>
<string>HotList</string>
</dict>
<dict>
<key>displayName</key>
<string>What’s New</string>
<key>howMany</key>
<string>5</string>
<key>kind</key>
<array>
<string>wiki</string>
<string>weblog</string>
<string>mailinglist</string>
</array>
<key>sort</key>
<array>
<string>createdDate</string>
</array>
<key>sortDirection</key>
<array>
<string>reverse</string>
</array>
<key>type</key>
<string>search</string>
<key>uid</key>
<string>RecentAddsList</string>
</dict>
<dict>
<key>displayName</key>
<string>Useful Links</string>
<key>type</key>
<string>static</string>
<key>uid</key>
<string>UsefulLinks</string>
<key>urls</key>
<array>
<dict>
<key>kind</key>
<string>url</string>
<key>subtitle</key>
<string>Your server's homepage.</string>
<key>title</key>
<string>Server Home</string>
<key>uid</key>
<string>serverhome</string>
<key>url</key>
<string>/</string>
</dict>
<dict>
<key>kind</key>
<string>url</string>
<key>subtitle</key>
<string>List of groups with wikis on this server.</string>
<key>title</key>
<string>Groups</string>
<key>uid</key>
<string>groups</string>
<key>url</key>
<string>/groups/</string>
</dict>
<dict>
<key>kind</key>
<string>url</string>
<key>subtitle</key>
<string>All things related to Mac OS X Server engineering and planning</string>
<key>title</key>
<string>Mac OS X Server wiki</string>
<key>uid</key>
<string>server wiki</string>
<key>url</key>
<string><a class="jive-link-external-small" href="http://serverstoragesoftware.apple.com/groups/macosxservergroup/">http:// serverstoragesoftware.apple.com/groups/macosxservergroup/</a></string>
</dict>
</array>
</dict>
<dict>
<key>displayName</key>
<string>Upcoming Events</string>
<key>howManyDays</key>
<string>5</string>
<key>type</key>
<string>calendar</string>
</dict>
</array>
-->
<key>version</key>
<string>1</string>
</dict>
</plist>
*------ END QUOTE: ------*
OK, so I'll edit the file according to the manual. 1: Remove the comment marks because I want to use the exampe sidebars as custom sidebars. And add a custom sidebar so that the default sidebar will not appear.
*Edited version example, according to documentation of file: /Library/Application Support/Apple/WikiServer/Themes/wireframe.wikitheme/themes.plist*
*------ QUOTE: ------*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bannerImageHeight</key>
<real>99</real>
<key>bannerImageWidth</key>
<real>950</real>
<key>displayName</key>
<string>Wireframe Theme</string>
<key>name</key>
<string>com.apple.wireframe</string>
<!-- remove this selectable key from your theme -->
<key>selectable</key>
<false/>
<!-- example (non-default) sidebars -->
<!-- Testing custom sidebar code here -->
<key>sidebars</key>
<array>
<key>displayName</key>
<string>Custom tags!</string>
<key>howMany</key>
<string>5</string>
<key>sortDirection</key>
<array>
<string>reverse</string>
</array>
<key>tag</key>
<array>
<string>tagtest</string>
</array>
<key>type</key>
<string>search</string>
<key>uid</key>
<string>tagtest</string>
</dict>
</array>
<!--
<dict>
<key>displayName</key>
<string>What's Hot</string>
<key>howMany</key>
<string>5</string>
<key>sortDirection</key>
<array>
<string>reverse</string>
</array>
<key>tag</key>
<array>
<string>hot</string>
</array>
<key>type</key>
<string>search</string>
<key>uid</key>
<string>HotList</string>
</dict>
<dict>
<key>displayName</key>
<string>What’s New</string>
<key>howMany</key>
<string>5</string>
<key>kind</key>
<array>
<string>wiki</string>
<string>weblog</string>
<string>mailinglist</string>
</array>
<key>sort</key>
<array>
<string>createdDate</string>
</array>
<key>sortDirection</key>
<array>
<string>reverse</string>
</array>
<key>type</key>
<string>search</string>
<key>uid</key>
<string>RecentAddsList</string>
</dict>
<dict>
<key>displayName</key>
<string>Useful Links</string>
<key>type</key>
<string>static</string>
<key>uid</key>
<string>UsefulLinks</string>
<key>urls</key>
<array>
<dict>
<key>kind</key>
<string>url</string>
<key>subtitle</key>
<string>Your server's homepage.</string>
<key>title</key>
<string>Server Home</string>
<key>uid</key>
<string>serverhome</string>
<key>url</key>
<string>/</string>
</dict>
<dict>
<key>kind</key>
<string>url</string>
<key>subtitle</key>
<string>List of groups with wikis on this server.</string>
<key>title</key>
<string>Groups</string>
<key>uid</key>
<string>groups</string>
<key>url</key>
<string>/groups/</string>
</dict>
<dict>
<key>kind</key>
<string>url</string>
<key>subtitle</key>
<string>All things related to Mac OS X Server engineering and planning</string>
<key>title</key>
<string>Mac OS X Server wiki</string>
<key>uid</key>
<string>server wiki</string>
<key>url</key>
<string><a class="jive-link-external-small" href="http://serverstoragesoftware.apple.com/groups/macosxservergroup/">http:// serverstoragesoftware.apple.com/groups/macosxservergroup/</a></string>
</dict>
</array>
</dict>
<dict>
<key>displayName</key>
<string>Upcoming Events</string>
<key>howManyDays</key>
<string>5</string>
<key>type</key>
<string>calendar</string>
</dict>
</array>
-->
<key>version</key>
<string>1</string>
</dict>
</plist>
*------ END QUOTE: ------*
Then, to make the changes take effect, I use this command re restart the service:
sudo serveradmin stop teams; sudo serveradmin start teams;
I launched Safari and check the website. Theese changes had NO effect on either of the Wiki's. Which is actually a good result because I want to controll this for each wiki. But there is no documentation about how to do this 😟
Back to the drawingboard....
Well, since I should be able to to control this separately for each wiki maybe I should try to edit the theme.plist file located inside one of the specific themes? Such as one of theese, located at /Library/Application Support/Apple/WikiServer/Themes/
block.green.banner.wikitheme obsidian.blue.banner.wikitheme
block.green.wikitheme horizon.blue.banner.wikitheme obsidian.blue.wikitheme
block.red.banner.wikitheme horizon.blue.wikitheme obsidian.green.banner.wikitheme
block.red.wikitheme horizon.green.banner.wikitheme obsidian.green.wikitheme
float.green.banner.wikitheme horizon.green.wikitheme obsidian.orange.banner.wikitheme
float.green.wikitheme horizon.grey.wikitheme obsidian.orange.wikitheme
float.orange.banner.wikitheme horizon.red.banner.wikitheme
float.orange.wikitheme horizon.red.wikitheme
Well, let's try this.
I'll edit the /Library/Application Support/Apple/WikiServer/Themes/horizon.green.wikitheme/theme.plist file which is from the theme I use for one of my Wikis. Originally, it looks like this:
*------ QUOTE: ------*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>displayName</key>
<string>Horizon Green</string>
<key>name</key>
<string>com.apple.horizon.green</string>
<key>version</key>
<string>1</string>
</dict>
</plist>
*------ END QUOTE: ------*
Let's try to add the sidebar arrays here. Like this:
*------ QUOTE: ------*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>displayName</key>
<string>Horizon Green</string>
<key>name</key>
<string>com.apple.horizon.green</string>
<key>version</key>
<string>1</string>
</dict>
<key>sidebars</key>
<array>
<dict>
<key>displayName</key>
<string>Custom tags</string>
<key>howMany</key>
<string>5</string>
<key>sortDirection</key>
<array>
<string>reverse</string>
</array>
<key>tag</key>
<array>
<string>custom</string>
</array>
<key>type</key>
<string>search</string>
<key>uid</key>
<string>CustomTags</string>
</dict>
</array>
<key>version</key>
<string>1</string>
</plist>
*------END QUOTE: ------*
I'll run this command once again: sudo serveradmin stop teams; sudo serveradmin start teams;
I launch Safari and guess what happens! The Wiki has decided to revert to the theme which I choose as the default theme when I installed Mac Os X Leopard Server! It reverted to the Block Green Books theme, and the sidebar is still not changed. If I go via the Wiki's admin interface to rechoose my origional theme, it's become unavailable.
If i change the /Library/Application Support/Apple/WikiServer/Themes/horizon.green.wikitheme/theme.plist back to it's origional state, then run the sudo serveradmin stop teams; sudo serveradmin start teams;
I'm back with a working Wiki, but still no custom sidebar.
No success. Does anybody have any suggestions, please?
I'm crying my eyes out over here :-/
7 replies
Sign in or join Beachball Help to reply.
- 0
- 0
- 0
- 0
- 0
- 0
- 0