Benches macOS

7

Customizing the Wiki sidebar step by step

apple Verified

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.

  1. 0

    proximity

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Please help me!

  2. 0

    proximity

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Eureka! I found a solution that helped me along the way. I'm now able to add as many Custom Dynamic content in the sidebar as I wish. But I haven't been able to remove "What's hot" and "Upcoming events" yet.

    *THIS is how you customize the sidebar in your wiki server running on Mac Os X 10.5 Leopard*

    1: When you have a working wiki, use you're Terminal.app to access this dir:

    /Library/Collaboration/Groups/[NAME OF YOUR WIKI]

    Inside this foldere there is a file named metadata.plist

    This file is where you add your content. BUT you MUST do this in the correct order to make it work. This is how:

    1. Edit the file and insert content like shown in the example bellow.

    2. Save the metadata.plist file and go to the Application Server Admin and restart the webservice Click stop, what until it's stopped, and click start again.

    (If your're running the server in simplemode, you just use server preferences and stop and start the webservice again).

    3. Run this command in the terminal: sudo serveradmin stop teams; sudo serveradmin start teams;

    4. Now you can se that you're changes have been made.

    Issues: If you access the wiki via you're browser and you get "internal server error" -It's because the syntax in the metadata.plist file is wrong, so revert to your backup and try again.

    If you don't restart the webservice like described in step 2 above, and then try to access the wiki via you're webbrowser, the wiki will overwrite your new settings and you're changes will not be saved.

    This is still by far the stupidest undocumented issue I've experienced with Apple. If Steve S knew about this, he would be ashamed 😀

    The file shown bellow is not entierly like the one that will work in your wiki, this is because the GUID id unique for every wiki - and our file bellow specifies to use the green theme as well. So instead of copy/paste the file I'm showing here, just modify your own by adding lines like this:

    <dict>

    <key>displayName</key>

    <string>Final *** Pro</string>

    <key>howMany</key>

    <string>10</string>

    <key>sort</key>

    <array>

    <string>modifiedDate</string>

    </array>

    <key>sortDirection</key>

    <array>

    <string>reverse</string>

    </array>

    <key>tag</key>

    <array>

    <string>FCP</string>

    </array>

    <key>type</key>

    <string>custom</string>

    <key>uid</key>

    <string>CustomTagSidebar</string>

    </dict>

    Look at my file bellow to learn exacly where to place the lines.

    * ---- 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>GUID</key>

    <string>BFE27CA4-5AB7-455C-B70C-FA86578F6BDB</string>

    <key>LongName</key>

    <string>Our awesome Wiki</string>

    <key>allowComments</key>

    <true/>

    <key>allowUnauthenticatedComments</key>

    <false/>

    <key>allowUnmoderatedComments</key>

    <true/>

    <key>allowUnmoderatedUnauthenticatedComments</key>

    <true/>

    <key>bannerImage</key>

    <string></string>

    <key>indexVersion</key>

    <integer>2</integer>

    <key>name</key>

    <string>macdrift</string>

    <key>podcastCategory</key>

    <string></string>

    <key>podcastEnabled</key>

    <false/>

    <key>sidebars</key>

    <array>

    <dict>

    <key>displayName</key>

    <string>Final *** Pro</string>

    <key>howMany</key>

    <string>10</string>

    <key>sort</key>

    <array>

    <string>modifiedDate</string>

    </array>

    <key>sortDirection</key>

    <array>

    <string>reverse</string>

    </array>

    <key>tag</key>

    <array>

    <string>FCP</string>

    </array>

    <key>type</key>

    <string>custom</string>

    <key>uid</key>

    <string>CustomTagSidebar</string>

    </dict>

    <dict>

    <key>displayName</key>

    <string>Mac generelt</string>

    <key>howMany</key>

    <string>10</string>

    <key>sort</key>

    <array>

    <string>modifiedDate</string>

    </array>

    <key>sortDirection</key>

    <array>

    <string>reverse</string>

    </array>

    <key>tag</key>

    <array>

    <string>mac</string>

    </array>

    <key>type</key>

    <string>custom</string>

    <key>uid</key>

    <string>Mac stuff</string>

    </dict>

    <dict>

    <key>displayName</key>

    <string>Server</string>

    <key>howMany</key>

    <string>10</string>

    <key>sort</key>

    <array>

    <string>modifiedDate</string>

    </array>

    <key>sortDirection</key>

    <array>

    <string>reverse</string>

    </array>

    <key>tag</key>

    <array>

    <string>server</string>

    </array>

    <key>type</key>

    <string>custom</string>

    <key>uid</key>

    <string>Server</string>

    </dict>

    </array>

    <key>themeName</key>

    <string>com.apple.horizon.green</string>

    </dict>

    </plist>

  3. 0

    theRocket

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    proximity,

    I can relate to that emotion. I did not read all your notes, as I finally got my sidebar working the way I wanted, but if you send me your e-mail address I will forward my notes from many weeks of decoding that PDF through trial-and-error. I would post here but they are already nicely formatted in an e-mail to my co-workers.

    I think I have an old post laying around in this forum. Let's see if I can dig that up.

    Thanks,

    RyanR>

    [email protected]

  4. 0

    theRocket

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Here's further discussion and more links to help you:

    http://discussions.apple.com/message.jspa?messageID=8072492

  5. 0

    theRocket

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Also, in my experience the theme will revert to the default when you mess up the syntax of one of the required files. So if you are editing XML by hand and screwed up a closing tag, for example, that might shut off your theme. Try the Property List Editor, or some text editor that provides XML syntax highlighting to reduce errors.

  6. 0

    Angus Fox

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    There must be a better easier way to do this. All I have succeeded in doing is breaking my themes. I want custom sidebars containing google adwords...

  7. 0

    Tim Scully

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I don't believe that you'll be happy with this solution in the long term. From what I understand, the metadata.plist file is updated/rewritten from the theme files located in /Library/Application Support/Apple/WikiServer/Themes/<your theme>.

    If you want to add custom sidebars which will appear on the main page of your wiki, edit the theme.plist files (in WikiServer/Themes/<your theme>) directly and those sidebars will then render correctly when the Wiki service is restarted.

    That's my experience...