Skip to content

Instantly share code, notes, and snippets.

@Fi1osof
Created January 9, 2013 18:45
Show Gist options
  • Save Fi1osof/4495700 to your computer and use it in GitHub Desktop.
Save Fi1osof/4495700 to your computer and use it in GitHub Desktop.
load modBlog
<?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