Skip to content

Instantly share code, notes, and snippets.

@hissy
Created August 27, 2013 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hissy/5354ad067308059358f8 to your computer and use it in GitHub Desktop.
Save hissy/5354ad067308059358f8 to your computer and use it in GitHub Desktop.
hardcode date archive block start date
<?php defined('C5_EXECUTE') or die("Access Denied.");
class DateArchiveBlockController extends Concrete5_Controller_Block_DateArchive {
public function view() {
if($this->targetCID > 0) {
$target = Page::getByID($this->targetCID);
$this->set('target',$target);
}
$firstPost = new DateTime('2012-01-01T00:00:00+09:00');
$this->set('firstPost',$firstPost);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment