Exemplo n.º 1
0
 /**
  * onBootstrapComplete
  */
 public function onBootstrapComplete($event)
 {
     if (CakePlugin::loaded('Comments')) {
         App::uses('Comment', 'Comments.Model');
         Croogo::hookBehavior('Node', 'Comments.Commentable');
         Croogo::hookComponent('Nodes', 'Comments.Comments');
         Croogo::hookModelProperty('Comment', 'belongsTo', array('Node' => array('className' => 'Nodes.Node', 'foreignKey' => 'foreign_key', 'counterCache' => true, 'counterScope' => array('Comment.model' => 'Node', 'Comment.status' => Comment::STATUS_APPROVED))));
     }
     if (CakePlugin::loaded('Taxonomy')) {
         Croogo::hookBehavior('Node', 'Taxonomy.Taxonomizable');
     }
     if (CakePlugin::loaded('Meta')) {
         Croogo::hookBehavior('Node', 'Meta.Meta');
     }
 }
<?php

Configure::load('SimpleCaptcha.simple_captcha');
Croogo::hookBehavior('User', 'SimpleCaptcha.Captcha');
Croogo::hookHelper('Users', 'SimpleCaptcha.Captcha');
Croogo::hookComponent('*', 'SimpleCaptcha.Captcha');
Exemplo n.º 3
0
 *
 * example_routes.php will be loaded in main app/config/routes.php file.
 */
Croogo::hookRoutes('Example');
/**
 * Behavior
 *
 * This plugin's Example behavior will be attached whenever Node model is loaded.
 */
Croogo::hookBehavior('Node', 'Example.Example', array());
/**
 * Component
 *
 * This plugin's Example component will be loaded in ALL controllers.
 */
Croogo::hookComponent('*', 'Example.Example');
/**
 * Helper
 *
 * This plugin's Example helper will be loaded via NodesController.
 */
Croogo::hookHelper('Nodes', 'Example.Example');
/**
 * Admin menu (navigation)
 *
 * This plugin's admin_menu element will be rendered in admin panel under Extensions menu.
 */
Croogo::hookAdminMenu('Example');
/**
 * Admin row action
 *
Exemplo n.º 4
0
<?php

CroogoCache::config('switcher_default', array_merge(Configure::read('Cache.defaultConfig'), array('duration' => '+10 minutes')));
Croogo::hookBehavior('Node', 'Switcher.Switcher');
Croogo::hookComponent('*', 'Switcher.Switcher');
Croogo::hookHelper('*', 'Switcher.Switcher');
Croogo::hookAdminTab('Nodes/admin_edit', 'Switcher', 'switcher.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_add', 'Switcher', 'switcher.admin_tab_node');
CroogoNav::add('extensions.children.switcher', array('title' => 'Switcher', 'url' => '#', 'children' => array('paths' => array('title' => 'Paths', 'url' => array('admin' => true, 'plugin' => 'switcher', 'controller' => 'switcher_paths', 'action' => 'index'), 'weight' => 10), 'nodes' => array('title' => 'Nodes', 'url' => array('admin' => true, 'plugin' => 'nodes', 'controller' => 'nodes', 'action' => 'index'), 'weight' => 20))));
Exemplo n.º 5
0
<?php

$cacheConfig = array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('taxonomy')));
CroogoCache::config('croogo_types', $cacheConfig);
CroogoCache::config('croogo_vocabularies', $cacheConfig);
Croogo::hookComponent('*', 'Taxonomy.Taxonomies');
Croogo::hookHelper('*', 'Taxonomy.Taxonomies');
Croogo::mergeConfig('Translate.models.Term', array('fields' => array('title' => 'titleTranslation', 'description' => 'descriptionTranslation'), 'translateModel' => 'Taxonomy.Term'));
<?php

Croogo::hookComponent('*', 'Blockanywhere.Blockanywhere');
Croogo::hookHelper('Nodes', 'Blockanywhere.Block');
Exemplo n.º 7
0
<?php

Croogo::hookComponent('Nodes', array('Meta.Meta' => array('priority' => 8)));
Croogo::hookHelper('*', 'Meta.Meta');
Exemplo n.º 8
0
<?php

Croogo::hookRoutes('J2c');
Croogo::hookComponent('*', 'J2c.J2c');
Croogo::hookAdminMenu('J2c');
Exemplo n.º 9
0
<?php

Croogo::hookRoutes('Multiattach');
Croogo::hookComponent('Nodes', 'Multiattach.Multiattaches');
Croogo::hookBehavior('Node', 'Multiattach.Multiattach', array());
//Croogo::hookAdminTab('Nodes/admin_add', 'Attachments', 'Multiattach.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_edit', 'Attachments', 'Multiattach.admin_tab_node');
CroogoNav::add('settings.children.multiattach', array('title' => __('Multiattach'), 'url' => array('plugin' => 'Multiattach', 'controller' => 'Multiattach', 'action' => 'settings'), 'access' => array('admin')));
Exemplo n.º 10
0
<?php

Croogo::hookComponent('*', array('Guardian.Guardian' => array('priority' => 1)));
Exemplo n.º 11
0
<?php

Croogo::hookComponent('Nodes', 'Cforms.Cforms');
Croogo::hookHelper('Nodes', 'Cforms.CformCss');
// Configure Wysiwyg
Croogo::mergeConfig('Wysiwyg.actions', array('Cforms/admin_edit' => array(array('elements' => 'CformSuccessMessage'), array('elements' => 'CformAutoConfirmation'))));
<?php

CroogoNav::add('webshop-customer-dashboard', 'users', array('title' => __d('webshop_customer_users', 'Users'), 'url' => array('prefix' => 'panel', 'plugin' => 'webshop_customer_users', 'controller' => 'customer_users', 'action' => 'index')));
Croogo::hookBehavior('Customer', 'WebshopCustomerUsers.CustomerWithUsers');
Croogo::hookComponent('*', 'WebshopCustomerUsers.CustomerUsers');
Croogo::mergeConfig('Webshop.customer_access_providers', array('CustomerUsers' => array('provider' => 'WebshopCustomerUsers.CustomerUser')));
Exemplo n.º 13
0
 *
 * Revisions_routes.php will be loaded in main app/config/routes.php file.
 */
Croogo::hookRoutes('Revisions');
/**
 * Behavior
 *
 * This plugin's Revisions behavior will be attached whenever Node model is loaded.
 */
Croogo::hookBehavior('Node', 'Revisions.Revisions', array());
/**
 * Component
 *
 * This plugin's Revisions component will be loaded in ALL controllers.
 */
Croogo::hookComponent('*', 'Revisions.Revisions');
/**
 * Helper
 *
 * This plugin's Revisions helper will be loaded via NodesController.
 */
Croogo::hookHelper('Nodes', 'Revisions.Revisions');
/**
 * Admin menu (navigation)
 *
 * This plugin's admin_menu element will be rendered in admin panel under Extensions menu.
 */
//Croogo::hookAdminMenu('Revisions');
/**
 * Admin row action
 *
Exemplo n.º 14
0
<?php

Croogo::hookComponent('*', 'Nodes.Nodes');
Croogo::hookHelper('*', 'Nodes.Nodes');
CroogoNav::add('content', array('icon' => array('edit', 'large'), 'title' => __('Content'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'index'), 'weight' => 10, 'children' => array('list' => array('title' => __('List'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'index'), 'weight' => 10), 'create' => array('title' => __('Create'), 'url' => array('plugin' => 'nodes', 'admin' => true, 'controller' => 'nodes', 'action' => 'create'), 'weight' => 20))));
Exemplo n.º 15
0
<?php

Croogo::hookBehavior('Node', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesNode', 'foreignKey' => 'node_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting')))));
Croogo::hookBehavior('Block', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesBlock', 'foreignKey' => 'block_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting', 'joinTable' => 'sites_blocks')))));
Croogo::hookBehavior('Link', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesLink', 'foreignKey' => 'link_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting', 'joinTable' => 'sites_links')))));
if (Configure::read('Cakeforum.name') !== false) {
    Croogo::hookBehavior('ForumCategory', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesForumCategory', 'foreignKey' => 'forum_category_id', 'associationForeignKey' => 'site_id')))));
    Croogo::hookComponent('ForumCategories', 'Sites.SiteFilter');
}
Croogo::hookComponent('*', array('Sites.Multisite' => array('priority' => 5)));
Croogo::hookHelper('*', 'Sites.Sites');
// uncomment this line to use absolute url for menu links
// alternatively, you can hook this helper later via other plugins
// Croogo::hookHelper('*', 'Sites.SitesMenus');
Croogo::hookAdminTab('Nodes/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Nodes/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Attachments/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Attachments/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Blocks/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Blocks/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Links/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Links/admin_edit', 'Sites', 'sites.sites_selection');
$cacheConfig = Cache::config('_cake_model_');
$cacheConfig = Hash::merge($cacheConfig['settings'], array('prefix' => 'sites_', 'path' => CACHE . 'queries', 'duration' => '+1 hour'));
Cache::config('sites', $cacheConfig);
require 'admin_menu.php';
Exemplo n.º 16
0
<?php

CroogoCache::config('cached_settings', array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('settings'))));
Croogo::hookComponent('*', 'Settings.Settings');
CroogoNav::add('settings', array('icon' => array('cog', 'large'), 'title' => __d('croogo', 'Settings'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Site'), 'weight' => 60, 'children' => array('site' => array('title' => __d('croogo', 'Site'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Site'), 'weight' => 10), 'meta' => array('title' => __d('croogo', 'Meta'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Meta'), 'weight' => 20), 'reading' => array('title' => __d('croogo', 'Reading'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Reading'), 'weight' => 30), 'writing' => array('title' => __d('croogo', 'Writing'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Writing'), 'weight' => 40), 'comment' => array('title' => __d('croogo', 'Comment'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Comment'), 'weight' => 50), 'service' => array('title' => __d('croogo', 'Service'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'settings', 'action' => 'prefix', 'Service'), 'weight' => 60), 'languages' => array('title' => __d('croogo', 'Languages'), 'url' => array('admin' => true, 'plugin' => 'settings', 'controller' => 'languages', 'action' => 'index'), 'weight' => 70))));
Exemplo n.º 17
0
<?php

Croogo::hookRoutes('Kieken');
#Croogo::hookBehavior('Node', 'Example.Example', array());
#Croogo::hookComponent('*', 'Kieken.Kieken');
Croogo::hookComponent('Nodes', 'Kieken.KiekenFeatured');
Croogo::hookComponent('Dolfify.Frontpage', 'Kieken.KiekenFeatured');
#Croogo::hookHelper('Nodes', 'Example.Example');
Croogo::hookAdminMenu('Kieken');
#Croogo::hookAdminRowAction('Nodes/admin_index', 'Example', 'plugin:example/controller:example/action:index/:id');
#Croogo::hookAdminTab('Nodes/admin_add', 'Example', 'example.admin_tab_node');
#Croogo::hookAdminTab('Nodes/admin_edit', 'Example', 'example.admin_tab_node');
# Load the Kieken settings
if (file_exists(APP . 'plugins' . DS . 'kieken' . DS . 'config' . DS . 'settings.yml')) {
    $settings = Spyc::YAMLLoad(file_get_contents(APP . 'plugins' . DS . 'kieken' . DS . 'config' . DS . 'settings.yml'));
}
foreach ($settings as $settingKey => $settingValue) {
    Configure::write($settingKey, $settingValue);
}
 *
 * twitterlogin_routes.php will be loaded in main app/config/routes.php file.
 */
Croogo::hookRoutes('Twitterlogin');
/**
 * Behavior
 *
 * This plugin's Example behavior will be attached whenever Node model is loaded.
 */
//Croogo::hookBehavior('Node', 'Example.Example', array());
/**
 * Component
 *
 * This plugin's Example component will be loaded in ALL controllers.
 */
Croogo::hookComponent('*', 'Twitterlogin.Twitterlogin');
/**
 * Helper
 *
 * This plugin's Twitterlogin helper will be loaded via UsersController.
 */
Croogo::hookHelper('*', 'Twitterlogin.Twitterlogin');
/**
 * Admin menu (navigation)
 *
 * This plugin's admin_menu element will be rendered in admin panel under Extensions menu.
 */
Croogo::hookAdminMenu('Twitterlogin');
/**
 * Admin row action
 *
Exemplo n.º 19
0
<?php

CroogoCache::config('croogo_menus', array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('menus'))));
Croogo::hookComponent('*', 'Menus.Menus');
Croogo::hookHelper('*', 'Menus.Menus');
CroogoNav::add('menus', array('icon' => array('sitemap', 'large'), 'title' => __d('croogo', 'Menus'), 'url' => array('plugin' => 'menus', 'admin' => true, 'controller' => 'menus', 'action' => 'index'), 'weight' => 20, 'children' => array('menus' => array('title' => __d('croogo', 'Menus'), 'url' => array('plugin' => 'menus', 'admin' => true, 'controller' => 'menus', 'action' => 'index'), 'weight' => 10), 'add_new' => array('title' => __d('croogo', 'Add new'), 'url' => array('plugin' => 'menus', 'admin' => true, 'controller' => 'menus', 'action' => 'add'), 'weight' => 20, 'htmlAttributes' => array('class' => 'separator')))));
Exemplo n.º 20
0
<?php

CroogoCache::config('croogo_blocks', array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('blocks'))));
Croogo::hookComponent('*', array('Blocks.Blocks' => array('priority' => 5)));
Croogo::hookHelper('*', 'Blocks.Regions');
Croogo::mergeConfig('Translate.models.Block', array('fields' => array('title' => 'titleTranslation', 'body' => 'bodyTranslation'), 'translateModel' => 'Blocks.Block'));
Exemplo n.º 21
0
<?php

if (Configure::read('Site.acl_plugin') == 'Acl') {
    // activate AclFilter component only until after a succesful install
    if (file_exists(APP . 'Config' . DS . 'settings.json')) {
        Croogo::hookComponent('*', 'Acl.AclFilter');
        Croogo::hookComponent('*', array('CroogoAccess' => array('className' => 'Acl.AclAccess')));
    }
    Croogo::hookBehavior('User', 'Acl.UserAro');
    Croogo::hookBehavior('Role', 'Acl.RoleAro');
    Cache::config('permissions', array('duration' => '+1 hour', 'path' => CACHE . 'queries' . DS, 'engine' => Configure::read('Cache.defaultEngine'), 'prefix' => Configure::read('Cache.defaultPrefix'), 'groups' => array('acl')));
}
//region Menu's
CroogoNav::add('sidebar', 'webshop', array('title' => __d('webshop', 'Webshop'), 'url' => '#', 'weight' => 30, 'children' => array('customers' => array('title' => __d('webshop', 'Customers'), 'url' => array('plugin' => 'webshop', 'controller' => 'customers', 'action' => 'index')), 'products' => array('title' => __d('webshop', 'Products'), 'url' => array('plugin' => 'webshop', 'controller' => 'products', 'action' => 'index')), 'Configuration groups' => array('title' => __d('webshop', 'Configuration groups'), 'url' => array('plugin' => 'webshop', 'controller' => 'configuration_groups', 'action0' => 'index')), 'Configuration options' => array('title' => __d('webshop', 'Configuration options'), 'url' => array('plugin' => 'webshop', 'controller' => 'configuration_options', 'action' => 'index')), 'configuration' => array('title' => __d('webshop', 'Configuration'), 'url' => '#'))));
CroogoNav::add('sidebar', 'settings.children.webshop', array('title' => __d('webshop', 'Webshop'), 'url' => '#'));
CroogoNav::add('webshop-dashboard-address_details-actions', 'edit', array('title' => __d('webshop', 'Edit'), 'url' => array('controller' => 'address_details', 'action' => 'edit', '_id'), 'htmlAttributes' => array('class' => 'btn-primary')));
CroogoNav::add('webshop-dashboard-customer_contacts-actions', 'edit', array('title' => __d('webshop', 'Edit'), 'url' => array('controller' => 'customer_contacts', 'action' => 'edit', '_id'), 'htmlAttributes' => array('class' => 'btn-primary')));
//endregion
//region Helpers
Croogo::hookHelper('*', 'Webshop.Product');
Croogo::hookHelper('*', 'Webshop.ConfigurationOption');
Croogo::hookHelper('*', 'Webshop.Webshop');
//endregion
//region Behaviors
Croogo::hookBehavior('Node', 'Webshop.Product');
//endregion
//region Components
Croogo::hookComponent('*', 'Webshop.CustomerAccess');
//endregion
Configure::write('Webshop.customer_access_providers', array());
Croogo::mergeConfig('Translate.models.ConfigurationOption', array('fields' => array('name' => 'nameTranslation'), 'translateModel' => 'Webshop.ConfigurationOption'));
//region Panel prefix setup
Croogo::mergeConfig('Routing.prefixes', array('panel'));
Router::reload();
//endregion
//region Admin panels
//region Admin tabs
Croogo::hookAdminTab('Products/admin_edit', 'Configuration implementation', 'Pltfrm.admin/node_webhosting_product_tab');
//endregion
//region Admin hooks
Croogo::hookAdminBox('Products/admin_edit', 'Configuration group', 'Webshop.admin/product/box_configuration_group_selector');
//endregion
//endregion