-
-
Save nouphet/3255837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ) { | |
// このテーマを適用する! | |
$themeName = 'special_theme'; | |
} | |
$this->mRoot->mContext->setThemeName($themeName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment