Exemple #1
0
<?php

define("DEALERS", true);
CMSApplication::register_module("dealer", array("display_name" => "Dealers", "link" => "/admin/dealer/"));
CMSApplication::register_module("domain", array("display_name" => "Dealer Domains", "link" => "/admin/domain/", 'split' => true));
CMSApplication::register_module("testdrive", array("display_name" => "Test Drive Requests", "link" => "/admin/testdrive/", 'split' => true));
CMSApplication::register_module("brochure", array("display_name" => "Brochure Requests", "link" => "/admin/brochure/", 'split' => true));
CMSApplication::register_module("tracking", array("display_name" => "Tracking", "link" => "/admin/tracking/", 'split' => true));
if (!defined("CONTENT_MODEL")) {
    $con = new ApplicationController(false, false);
    define("CONTENT_MODEL", $con->cms_content_class);
}
if (!defined("DEALER_MODEL")) {
    if (!$con) {
        $con = new ApplicationController(false, false);
    }
    define("DEALER_MODEL", $con->dealer_class);
}
WaxEvent::add(CONTENT_MODEL . ".setup", function () {
    $model = WaxEvent::data();
    if (!$model->columns['dealers']) {
        $model->define("dealers", "ManyToManyField", array('target_model' => DEALER_MODEL, 'group' => 'relationships'));
    }
});
//add a link from the users to a dealership
WaxEvent::add("WildfireUser.setup", function () {
    $obj = WaxEvent::data();
    $obj->define("dealer", "ForeignKey", array('target_model' => DEALER_MODEL, 'group' => 'relationships', 'col_name' => "dealer_id"));
});
//add in this so it will block all views of the branch & join the created user to the dealership
WaxEvent::add(DEALER_MODEL . ".user_creation", function () {
<?php

CMSApplication::register_module("media.flickr", array("hidden" => true, "plugin_name" => "wildfire.media.flickr", 'assets_for_cms' => true));
WildfireMedia::$classes[] = 'WildfireFlickrFile';
<?php

CMSApplication::register_module("advertising", array('plugin_name' => 'wildfire.advertising.advanced', 'assets_for_cms' => true, "display_name" => "Advertising", "link" => "/admin/advertising/", 'split' => true));
if (!defined("CONTENT_MODEL")) {
    $con = new ApplicationController(false, false);
    define("CONTENT_MODEL", $con->cms_content_class);
}
WaxEvent::add(CONTENT_MODEL . ".setup", function () {
    $model = WaxEvent::data();
    if (!$model->columns['ads']) {
        $model->define("ads", "ManyToManyField", array('target_model' => 'WildfireAdvertAdvanced', "eager_loading" => true, "join_model_class" => "WaxModelWeightedJoin", "join_order" => "weight DESC", 'group' => 'advertising', 'module' => 'advertising', 'extra_fields_view' => '_advertising_extra_fields', 'existing_media_list' => '_existing_ad_list'));
    }
});
Exemple #4
0
<?php

/* Each plugin can make use of a a file called setup.php which can be used to initialise
	 any required setup.
*/
define("CMS_VERSION", "0.5-devel");
define("CMS_DIR", dirname(__FILE__));
CMSApplication::register_module("home", array("display_name" => "Dashboard", "link" => "/admin/home/", 'auth_level' => 0));
CMSApplication::register_module("settings", array("display_name" => "Settings", "link" => "/admin/settings/", 'auth_level' => 30));
CMSApplication::register_module("sections", array("display_name" => "Site Sections", "link" => "/admin/sections/", 'auth_level' => 30));
CMSApplication::register_module("categories", array("display_name" => "Categories", "link" => "/admin/categories/", 'auth_level' => 20));
CMSApplication::register_module("content", array("display_name" => "Content", "link" => "/admin/content/", 'auth_level' => 10));
CMSApplication::register_module("comments", array("display_name" => "Comments", "link" => "/admin/comments/", 'auth_level' => 5));
CMSApplication::register_module("files", array("display_name" => "Files", "link" => "/admin/files/", 'auth_level' => 0));
CMSApplication::register_module("users", array("display_name" => "CMS Users", "link" => "/admin/users/", 'auth_level' => 30));
//CMSApplication::register_module("email", array("display_name"=>"Email", "link"=>"/admin/email/", 'auth_level'=>30));
Autoloader::include_from_registry('CMSHelper');
Autoloader::register_helpers();