Created
January 9, 2013 18:45
-
-
Save Fi1osof/4495700 to your computer and use it in GitHub Desktop.
load modBlog
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 | |
$path = $this->getOption('modsociety.core_path', null); | |
if(!$path){ | |
$path = MODX_CORE_PATH .'components/modsociety/'; | |
} | |
$path .= 'model/modSociety/'; | |
if(!$this->loadClass('modSociety', $path, false, true)){ | |
$this->log(self::LOG_LEVEL_ERROR, "Could not load class modSociety"); | |
return false; | |
} | |
class modBlog extends modSociety{ | |
protected function getCorePath(){ | |
return dirname(dirname(dirname(__FILE__))).'/'; | |
} | |
/* | |
* Show topic | |
*/ | |
public function showTopic($id){ | |
if(!$idInt = intval($id)){ | |
return false; | |
} | |
$this->modx->resource = $this->getTopic(array( | |
'id' => $idInt, | |
'published' => true, | |
'deleted' => false, | |
)); | |
return $this->sendForward(246); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment