public function init() { $this->ui = new SwatUI(); $this->ui->mapClassPrefixToPath('Pinhole', 'Pinhole'); $this->ui->loadFromXML($this->ui_xml); $this->initSearchForm(); $this->initTagList(); $this->ui->init(); }
return $path . '/' . $tag->shortname; } // }}} // {{{ public static function getAuthorRelativeUri() public static function getAuthorRelativeUri(SiteApplication $app, BlorgAuthor $author) { $path = $app->config->blorg->path . 'author'; return $path . '/' . $author->shortname; } // }}} // {{{ public static function getCommentRelativeUri() public static function getCommentRelativeUri(SiteApplication $app, SiteComment $comment) { return Blorg::getPostRelativeUri($app, $comment->post) . '#comment' . $comment->id; } // }}} // {{{ private function __construct() /** * Prevent instantiation of this static class */ private function __construct() { } } Blorg::setupGettext(); SwatUI::mapClassPrefixToPath('Blorg', 'Blorg'); SiteViewFactory::addPath('Blorg/views'); SiteViewFactory::registerView('post', 'BlorgPostView'); SiteViewFactory::registerView('post-comment', 'BlorgCommentView'); SiteViewFactory::registerView('author', 'BlorgAuthorView'); SiteGadgetFactory::addPath('Blorg/gadgets');
public static function setupGettext() { $path = '@DATA-DIR@/Building/locale'; if (substr($path, 0, 1) === '@') { $path = __DIR__ . '/../locale'; } bindtextdomain(self::GETTEXT_DOMAIN, $path); bind_textdomain_codeset(self::GETTEXT_DOMAIN, 'UTF-8'); } // }}} // {{{ private function __construct() /** * Don't allow instantiation of the Building object * * This class contains only static methods and should not be instantiated. */ private function __construct() { } } Building::setupGettext(); SiteViewFactory::addPath('Building/views'); SiteViewFactory::registerView('building-block-audio', 'BuildingBlockAudioView'); SiteViewFactory::registerView('building-block-video', 'BuildingBlockVideoView'); SiteViewFactory::registerView('building-block-image', 'BuildingBlockImageView'); SiteViewFactory::registerView('building-block-xhtml', 'BuildingBlockXHTMLView'); SiteViewFactory::registerView('building-block-attachment', 'BuildingBlockAttachmentView'); SiteViewFactory::registerView('building-block', 'BuildingBlockCompositeView'); SiteViewFactory::registerView('building-block-admin', 'BuildingBlockAdminCompositeView'); SwatUI::mapClassPrefixToPath('Building', 'Building');
// {{{ public static function setupGettext() public static function setupGettext() { $path = '@DATA-DIR@/Deliverance/locale'; if (substr($path, 0, 1) === '@') { $path = dirname(__FILE__) . '/../locale'; } bindtextdomain(Deliverance::GETTEXT_DOMAIN, $path); bind_textdomain_codeset(Deliverance::GETTEXT_DOMAIN, 'UTF-8'); } // }}} // {{{ public static function getConfigDefinitions() /** * Gets configuration definitions used by the Deliverance package * * Applications should add these definitions to their config module before * loading the application configuration. * * @return array the configuration definitions used by the Deliverance * package. * * @see SiteConfigModule::addDefinitions() */ public static function getConfigDefinitions() { return array('deliverance.list_connection_timeout' => 1, 'deliverance.list_admin_connection_timeout' => 5, 'deliverance.list_script_connection_timeout' => 300, 'deliverance.campaign_from_name' => null, 'deliverance.campaign_from_address' => null, 'deliverance.segment_include_addresses' => null, 'deliverance.campaign_cdn_base' => null, 'deliverance.automatic_analytics_tagging' => false, 'deliverance.analytics_utm_source' => null, 'deliverance.analytics_utm_medium' => 'email', 'deliverance.analytics_utm_campaign' => '%s', 'mail_chimp.double_opt_in' => false, 'mail_chimp.api_key' => null, 'mail_chimp.user_id' => null, 'mail_chimp.default_list' => null, 'mail_chimp.default_folder' => null, 'mail_chimp.preview_url' => 'http://%s.campaign-archive.com/?u=%s&id=%s', 'mail_chimp.list_title' => null, 'mail_chimp.source' => null); } } Deliverance::setupGettext(); SwatUI::mapClassPrefixToPath('Deliverance', 'Deliverance'); SwatDBClassMap::addPath('Deliverance/dataobjects');