Overriding Sandvox Application Files

This article is aimed at advanced users of Sandvox only. As such, any modifications made to Sandvox files using the techniques described below cannot be supported by Karelia.

The Sandvox application is made up of a large number of files and folders, all contained inside the main "Sandvox.app" package. Sandvox allows you to effectively replace or override some of these files by placing your own modified copy in the "Library → Application Support → Sandvox" folder in your Home Directory.

To see the full list of files that you can override:

  1. Quit Sandvox and enter this command in the Terminal:
    defaults write com.karelia.Sandvox ShowSearchPaths -bool YES
    
    This tells Sandvox to output all file searches to the console.
  2. Relaunch Sandvox.
  3. Open the console log using the Console application (found in Applications > Utilities).
  4. To make things easier to read, you may wish to filter the log to "Sandvox."

Towards the end of the log, there should be a number of lines of output like this:

2006-11-21 11:18:00.637 Sandvox[18762] Searched for KTCachedImageTypes.plist (from KTComponents) in ~/Library/Application Support/Sandvox/

To customize and override a Sandvox application file:

  1. Locate the Sandvox application in the Finder
  2. Control-click the application icon and choose "Show Package Contents."
  3. Using the Console output as a guide, browse to the correct folder in the Sandvox package:
    • application - look in the "/Contents/Resources" directory
    • KTComponents - look in the "/Contents/Frameworks/KTComponents.framework/Resources" directory
    • plug-in - look in the "/Contents/Plugins/" directory, inside the appropriate plug-in
  4. Copy the file somewhere temporary like the desktop.
  5. Make your modifications.
  6. Place the file in the appropriate directory and relaunch Sandvox. (In the example above it was "~/Library/Application Support/Sandvox/")

Some of the Sandvox files that can be overridden:

KTCachedImageTypes.plist
A property list of the built-in image sizes. For instance, change the maxPixels value to something larger than 640 to allow for larger images on photo pages.
KTPageTemplate.html
The global HTML template that all pages are generated from. Example: change [[=&toplink.titleText]] instances to [[=toplink.titleHTML]] to force the site menu to show styles (font, color, boldface, etc.) in the page titles.
KTPageMainContentTemplate
The main contents of a page.
KTCommentsTemplate
The template for comment system generation.
ddsmoothmenu.css, ddsmoothmenu.js
The files that are uploaded to support drop-down site menus.
jquery-##.js
If you have set the hidden preference of "jQueryVersion" to a particular version and you include that file here (replacing the ## with the actual version), then this file will be loaded locally for editing.
KTScaledImageTypes
a property list to map image sizes for various contexts on a page. (This will not likely be useful for overriding.)
RSSTemplate.xml
The XML template for RSS feeds.
HTML Templates
Files with titles like "TextPageTemplate.html." The HTML template that defines how a plug-in will look. Makes use of our special HTML modifers.
globalCSS.txt
This and other CSS files are used in the generation of the CSS code for a site. This is merged with the CSS in the chosen site design.

Keywords: hack, hide, hidden, hacking, hook, hooks, hooking, replace, replacing, override, overriding, overridden, overide, overiding, file, files, template, templates, html, htm, framework, frameworks, resource, resources, plugin, plugins, plug-in, plug-ins, modify, modifying, package, packages, sandvox.app, ktpagetemplate

How can we improve this page? Let us know.