Swank Wiki | |
Recently Visited
Swank v0.04.04 |
PluginsPlugins differ from apps and pages in that they generally provide new functionality to the Swank core code. This is done by adding a new class to the Swank application's inheritance tree. ExamplesSwank::Plugins::VisitedProvides recent pages tracking for the "Recently Visited" sidebar. It overrides top_action to record the pages visited. It provides a visited_pages method to return the recent pages for the sidebar page. If a page has disable_visited set, then it will not be included in the list of visited pages. This allows helper pages and ajax pages to exclude themselves. It also overrides the handler method to write out the /visited page, when a new version is needed. This is less buggy than overriding init to do the same thing less often, but a post-init method would be a better place for it, since it needs to wait until all the storage, io, and indexing modules are fully initialized before it can write the page. Swank::Plugins::UEBThis is a very simply plugin which implements the Universal Edit Button. It overrides and extends Swank::Security::show_actions to add the UEB link tag to the header when editting is allowed. Swank::Plugins::ChronicSwank::Plugins::Integrity
|