Apple Computer Hardware manual Creating a Theme, Terminal, enter the following commands

Page 12

Creating a Theme

The easiest way to create a theme is to take the existing wireframe theme, make a copy of it with permissions intact, and then customize the copy.

If you edit the included themes instead of copying them to new themes, your edits may be overwritten later by a software update.

To create a copy of the wireframe theme with permissions intact:

1In Terminal, enter the following commands:

$ cd /Library/Application\ Support/Apple/WikiServer/Themes/ $ sudo ditto wireframe.wikitheme/ theme_name.wikitheme/

Replace theme_name with the name of the theme you’re creating. If prompted, enter your administrator account password.

2If you’re going to use Property List Editor or a non–command-line tool, copy the theme.plist file to your Documents folder.

To copy this file, enter:

$ cp theme_name.wikitheme/theme.plist /Users/user_name/Documents/

Replace user_name with the short name of the user you’re logged in as. For information about Property List Editor, see “About Property List Editor.”

3Open theme.plist in Property List Editor or a text editor.

To open this file in a command-line text editor, enter:

$ sudo nano theme_name.wikitheme/theme.plist

If prompted, enter your administrator account password.

You can use any command-line text editor, as long as you precede the command to run the text editor with sudo.

If you’re using Property List Editor or a non–command-line tool, open the theme.plist located in your Documents folder.

4Remove the selectable key and its value, and then save the plist.

To remove the key using Property List Editor, select the selectable key and then click Delete.

To remove the key using a text editor, remove the following lines:

<!-- remove this selectable key from your theme --> <key>selectable</key>

<false/>

5If you copied theme.plist to your Documents folder, copy it back to the theme folder.

To copy this file, enter:

$ cp /Users/user_name/Documents/theme.plist theme_name.wikitheme/

12

Chapter 1    Customizing How the Wiki Looks

Image 12
Contents Mac OS X Server 019-1252/2008-04-24 Contents Managing Wiki Content Getting Additional Information PrefacePreface About This Guide This chapter describes how to customize a wiki’s appearance Theme File Structure OverviewCustomizing How the Wiki Looks Variant Theme File Structure Overview Wireframe Theme File Structure Overview File or Folder Name PurposeBorders, and positioning for comment entry Terminal, enter the following commands Creating a ThemeEditing CSS Files WebsiteEditing Property List Files About Property List EditorAbout Property List Files About Property List Keys and ValuesAbout Strings About DictionariesAbout Errors Here is the sidebars array in a plain text editorHere is an example of an array with a single string Here is an example of an array with multiple stringsChanging General Theme Settings Key Default Value Possible ValuesDescription Creating Sidebars Understanding the Types of SidebarsShared Keys All sidebars require the following keysStatic Unique Keys Each dictionary entry has the following keysKey Example Value Possible Values Optional or Required Search Unique Keys Calendar Unique Keys Overview of the Example Sidebars Tag Unique KeysRecent Activity Unique Keys Sidebar Name DescriptionUsing the Example Sidebars Terminal, enter the following commandTo comment out specific sidebars To this Adding JavaScript and XSL Files To add JavaScript files or XSL files to a themePut JavaScript .js files or XSL .xsl files in this folder About JavaScript Here are some published JavaScript guidesTopic About XSL JavaScript ExampleCreate a plain text file with the following content Viewing Dynamic XMLTo view context $ sudo serveradmin stop teams sudo serveradmin start teams Attributes Creating a Custom Whitelist About the Custom Whitelist’s Structure Allowing Specific URL ProtocolsAllowing Specific CSS Styles Allowing Specific Html Tags and Attributes To allow specific Html tags and attributesTag Attributes About the Built-in Whitelist Protocols Allowed in the Built-in WhitelistBuilt-in whitelist allows these protocols ProtocolCSS Styles Allowed in the Built-in Whitelist Html Tags and Attributes Allowed in the Built-in WhitelistBuilt-in whitelist allows these CSS styles Built-in whitelist allows these Html tags and attributesNode Pre Cite Span Strong Tbody Tfoot Colspan, rowspan Thead Migrating Wiki Content From Other Websites Backing Up the Wiki ServerManaging Wiki Content Wiki File Structure Overview Manually Editing Raw Content File or Folder Name PurposeViewing a Wiki’s Administration Settings To regenerate the index after editing raw wiki contentFor more information about AtomPub, see Metadata.plist file includes the following keys Key Example Value DescriptionTo manually edit wiki administration settings Viewing a Page’s Metainformation PageuidManaging Attachments