Skip to content

Instantly share code, notes, and snippets.

@suin
Created August 4, 2012 07:44
Show Gist options
  • Save suin/3255616 to your computer and use it in GitHub Desktop.
Save suin/3255616 to your computer and use it in GitHub Desktop.
<?php
class ChangeThemeByModule extends XCube_ActionFilter
{
public function postFilter()
{
$dirname = null;
if ( isset($this->mRoot->mContext->mModule->mXoopsModule) and is_object($this->mRoot->mContext->mModule->mXoopsModule) ) {
$dirname = $this->mRoot->mContext->mModule->mXoopsModule->get('dirname');
}
if ( $dirname == 'message' ) {
$this->mRoot->mContext->setThemeName('special_theme');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment