コード例 #1
0
 /**
  * Set the model and view from parameters before we grab the request
  * @author Nathan White
  */
 function pre_request_cleanup_init()
 {
     // check page type for custom model and view
     if (isset($this->params['model'])) {
         $this->model_name = $this->params['model'];
     }
     if (isset($this->params['view'])) {
         $this->view_name = $this->params['view'];
     }
     $model_path = '/minisite_templates/modules/classified/' . $this->model_name . '.php';
     $view_path = '/minisite_templates/modules/classified/' . $this->view_name . '.php';
     if (reason_file_exists($model_path)) {
         reason_include_once($model_path);
     } else {
         trigger_error('The classified module model could not be found at ' . $model_path, FATAL);
     }
     if (reason_file_exists($view_path)) {
         reason_include_once($view_path);
     } else {
         trigger_error('The classified module view could not be found at ' . $view_path, FATAL);
     }
     // initialize the class names
     $model_classname = $GLOBALS['_classified_module_model']['classified/' . $this->model_name];
     $view_classname = $GLOBALS['_classified_module_view']['classified/' . $this->view_name];
     // create the model and pass it some basic info
     $this->model = new $model_classname();
     $this->model->set_site_id($this->site_id);
     $this->model->set_head_items($this->parent->head_items);
     // create the view and pass a reference to the model
     $this->view = new $view_classname();
     $this->view->set_model($this->model);
 }
コード例 #2
0
ファイル: factory.php プロジェクト: hunter2814/reason_package
 /**
  * Gets the correct class for the given library and module. More documentation to come...
  */
 private static function _construct($entity_or_library, $module, $filename = false, $meta_info = false)
 {
     $library = self::_get_library($entity_or_library);
     if (!$filename) {
         $filename = 'classes/media/' . $library . '/' . $module . '.php';
     }
     if (reason_file_exists($filename)) {
         reason_include_once($filename);
         $classname = self::_convert_to_camel_case($module);
         if ($meta_info) {
             $library_classname = ucfirst($library) . $meta_info . $classname;
         } else {
             $library_classname = ucfirst($library) . $classname;
         }
         if (class_exists($library_classname)) {
             $interface_file = 'classes/media/interfaces/' . $module . '_interface.php';
             if (reason_file_exists($interface_file)) {
                 reason_include_once($interface_file);
                 $class = new $library_classname();
                 $implemented = class_implements($class);
                 if (isset($implemented[$classname . 'Interface'])) {
                     return $class;
                 } else {
                     trigger_error($library_classname . ' must implement ' . $classname . 'Interface.');
                 }
             } else {
                 trigger_error($module . ' interface file does not exist: ' . $interface_file);
             }
         } else {
             trigger_error($module . ' class does not exist: ' . $library_classname);
         }
     } else {
         trigger_error($module . ' file does not exist: ' . $filename);
     }
 }
コード例 #3
0
ファイル: feature.php プロジェクト: hunter2814/reason_package
 /**
  * @todo make me work properly and figure out a scheme for including custom views.
  */
 function get_view()
 {
     if (!isset($this->_view)) {
         $view_class = 'DefaultFeatureView';
         if ($view_class != $this->params['view']) {
             $view = $this->params['view'];
             $file = FEATURE_VIEW_PATH . $view . '.php';
             if (reason_file_exists($file)) {
                 reason_require_once($file);
                 if (isset($GLOBALS['_feature_view_class_names'][$view]) && class_exists($GLOBALS['_feature_view_class_names'][$view])) {
                     $view_class = $GLOBALS['_feature_view_class_names'][$view];
                 } else {
                     trigger_error('Feature view class not registered in $GLOBALS[ \'_feature_view_class_names\' ].');
                 }
             } else {
                 trigger_error('Feature view file not found in ' . FEATURE_VIEW_PATH);
             }
         }
         $this->_view = new $view_class();
     }
     return $this->_view;
 }
コード例 #4
0
 * Instead of a page location name, you can use the special keyword "_meta" to add an array of
 * extra information to a page type. Currently "note" is implemented, and any html you provide
 * will show up underneath the page type field in the page content manager.
 *
 * array(
 *	'page_type_1'=>array(
 *		'page_location_1'=>'module_1',
 *		'_meta'=>array('note' => '<p>A note about this page type presented to the user</p>'),
 *	),
 * );
 *
 * *Customizations*
 *
 * Do not customize this array. Instead, define $GLOBALS['_reason_page_types_local']
 * in lib/local/minisite_templates/page_types_local.php .
 *
 * Page types defined in that array will be automatically merged with the contents of
 * this array; where keys exist in both arrays, Reason will use the page type defined
 * in page_types_local.
 */
$GLOBALS['_reason_page_types'] = array('default' => array('pre_bluebar' => '', 'main' => 'content', 'main_head' => 'page_title', 'main_post' => '', 'main_post_2' => '', 'main_post_3' => '', 'edit_link' => 'login_link', 'pre_banner' => 'announcements', 'banner_xtra' => 'search', 'post_banner' => 'navigation_top', 'pre_sidebar' => 'assets', 'sidebar' => 'image_sidebar', 'post_sidebar' => '', 'navigation' => 'navigation', 'footer' => 'maintained', 'sub_nav' => 'blurb', 'sub_nav_2' => '', 'sub_nav_3' => '', 'post_foot' => ''), 'a_to_z' => array('banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_head' => '', 'main_post' => 'atoz', 'sidebar' => 'blurb'), 'image_sidebar_100x100' => array('sidebar' => array('module' => 'image_sidebar', 'thumbnail_width' => 100, 'thumbnail_height' => 100)), 'image_sidebar_150x150' => array('sidebar' => array('module' => 'image_sidebar', 'thumbnail_width' => 150, 'thumbnail_height' => 150)), 'image_sidebar_200x200' => array('sidebar' => array('module' => 'image_sidebar', 'thumbnail_width' => 200, 'thumbnail_height' => 200)), 'image_sidebar_200x' => array('sidebar' => array('module' => 'image_sidebar', 'thumbnail_width' => 200)), 'image_sidebar_skip_first' => array('sidebar' => array('module' => 'image_sidebar', 'num_to_skip' => 1)), 'all_related_policies' => array('main_post' => 'policy_related_all'), 'assets' => array('pre_sidebar' => '', 'main_post' => 'assets'), 'assets_with_author_and_date' => array('pre_sidebar' => '', 'main_post' => array('module' => 'assets', 'show_fields' => array('name', 'file_size', 'file_type', 'description', 'datetime', 'author'), 'order' => 'dated.datetime DESC, chunk.author ASC')), 'assets_by_date' => array('pre_sidebar' => '', 'main_post' => array('module' => 'assets', 'order' => 'dated.datetime DESC')), 'assets_by_category' => array('pre_sidebar' => '', 'main_post' => array('module' => 'assets', 'organize_by_page_categories' => true)), 'assets_by_category_sorted_by_date' => array('pre_sidebar' => '', 'main_post' => array('module' => 'assets', 'organize_by_page_categories' => true, 'order' => 'dated.datetime DESC, entity.name ASC')), 'assets_by_author' => array('pre_sidebar' => '', 'main_post' => array('module' => 'assets', 'order' => 'chunk.author ASC')), 'audio_video' => array('main_post' => 'av'), 'audio_video_unpaginated' => array('main_post' => array('module' => 'av', 'num_per_page' => 9999)), 'audio_video_reverse_chronological' => array('main_post' => array('module' => 'av', 'relationship_sort' => false)), 'audio_video_100x100_thumbnails' => array('main_post' => array('module' => 'av', 'thumbnail_width' => 100, 'thumbnail_height' => 100)), 'audio_video_100x100_thumbnails_reverse_chronological' => array('main_post' => array('module' => 'av', 'thumbnail_width' => 100, 'thumbnail_height' => 100, 'relationship_sort' => false)), 'audio_video_150x150_thumbnails' => array('main_post' => array('module' => 'av', 'thumbnail_width' => 150, 'thumbnail_height' => 150)), 'audio_video_150x150_thumbnails_reverse_chronological' => array('main_post' => array('module' => 'av', 'thumbnail_width' => 150, 'thumbnail_height' => 150, 'relationship_sort' => false)), 'audio_video_200x200_thumbnails' => array('main_post' => array('module' => 'av', 'thumbnail_width' => 200, 'thumbnail_height' => 200)), 'audio_video_200x200_thumbnails_reverse_chronological' => array('main_post' => array('module' => 'av', 'thumbnail_width' => 200, 'thumbnail_height' => 200, 'relationship_sort' => false)), 'audio_video_sidebar_blurbs' => array('main_post' => 'av', 'pre_sidebar' => 'image_sidebar', 'sidebar' => 'blurb', 'sub_nav' => 'assets'), 'audio_video_sidebar_blurbs_reverse_chronological' => array('main_post' => array('module' => 'av', 'relationship_sort' => false), 'pre_sidebar' => 'image_sidebar', 'sidebar' => 'blurb', 'sub_nav' => 'assets'), 'audio_video_with_filters' => array('main_post' => array('module' => 'av_with_filters')), 'audio_video_with_filters_reverse_chronological' => array('main_post' => array('module' => 'av_with_filters', 'relationship_sort' => false)), 'audio_video_chronological' => array('main_post' => array('module' => 'av', 'sort_direction' => 'ASC', 'relationship_sort' => false)), 'audio_video_on_current_site' => array('main_post' => array('module' => 'av', 'limit_to_current_page' => false)), 'audio_video_on_current_site_no_nav' => array('main_post' => array('module' => 'av', 'limit_to_current_page' => false), 'navigation' => '', 'sub_nav' => '', 'sub_nav_2' => '', 'sub_nav_3' => ''), 'audio_video_on_current_site_with_filters' => array('main_post' => array('module' => 'av_with_filters', 'limit_to_current_page' => false)), 'audio_video_sidebar' => array('pre_sidebar' => 'image_sidebar', 'sidebar' => 'av'), 'audio_video_sidebar_reverse_chronological' => array('pre_sidebar' => 'image_sidebar', 'sidebar' => array('module' => 'av', 'relationship_sort' => false)), 'audio_video_sidebar_show_children' => array('pre_sidebar' => 'av', 'sidebar' => 'assets', 'main_post' => 'children'), 'audio_video_sidebar_show_children_reverse_chronological' => array('pre_sidebar' => array('module' => 'av', 'relationship_sort' => false), 'sidebar' => 'assets', 'main_post' => 'children'), 'audio_video_offer_original_download' => array('main_post' => array('module' => 'av', 'offer_original_download_link' => true)), 'audio_video_simple' => array('main_post' => 'av_simple'), 'audio_video_simple_360_wide' => array('main_post' => array('module' => 'av_simple', 'width' => 360)), 'audio_video_simple_640_wide' => array('main_post' => array('module' => 'av_simple', 'width' => 640)), 'audio_video_simple_sidebar' => array('sidebar' => array('module' => 'av_simple', 'width' => 240)), 'audio_video_media_above_description' => array('main_post' => array('module' => 'av', 'show_media_first' => true)), 'kaltura_import' => array('main_post' => 'kaltura_import'), 'kaltura_import_default_hidden' => array('main_post' => array('module' => 'kaltura_import', 'default_values' => array('show_hide' => 'hide'))), 'basic_tabs' => array('main_head' => 'basic_tabs'), 'basic_tabs_parent' => array('main_head' => array('module' => 'basic_tabs', 'mode' => 'parent')), 'publication' => array('main_post' => 'publication', 'main_head' => 'publication/title', 'main' => 'publication/description', 'sidebar' => '', 'pre_sidebar' => ''), 'publication_no_dates' => array('main_post' => array('module' => 'publication', 'use_dates_in_list' => false, 'markup_generator_info' => array('item' => array('classname' => 'NoDateItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/item_markup_generators/no_date.php'))), 'main_head' => 'publication/title', 'main' => 'publication/description', 'sidebar' => '', 'pre_sidebar' => ''), 'publication_listnav' => array('main_post' => array('module' => 'publication', 'filter_displayer' => 'listnav.php'), 'main_head' => 'publication/title', 'main' => 'publication/description', 'sidebar' => '', 'pre_sidebar' => ''), 'publication_no_nav' => array('main_post' => 'publication', 'main_head' => 'publication/title', 'main' => 'publication/description', 'navigation' => '', 'sidebar' => '', 'pre_sidebar' => ''), 'publication_related' => array('main_post' => array('module' => 'publication', 'related_mode' => 'true')), 'publication_related_via_category' => array('main_post' => array('module' => 'publication', 'related_mode' => 'true', 'limit_by_page_categories' => 'true')), 'publication_related_7_headlines' => array('main_post' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 7)), 'publication_section_nav' => array('main_post' => 'publication', 'main_head' => 'publication/title', 'main' => 'publication/description', 'sidebar' => '', 'pre_sidebar' => '', 'navigation' => 'publication/sections'), 'publication_with_events_sidebar' => array('main_head' => 'publication/title', 'main' => 'publication/description', 'main_post' => 'publication', 'sidebar' => 'events_mini', 'pre_sidebar' => ''), 'publication_with_events_sidebar_and_content' => array('main_head' => 'publication/title', 'main_post' => 'publication', 'sidebar' => 'events_mini', 'pre_sidebar' => ''), 'publication_sidebar_via_categories' => array('sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'related_order' => 'random', 'limit_by_page_categories' => true, 'max_num_items' => 3)), 'publication_with_full_images_on_listing' => array('main_post' => array('module' => 'publication', 'use_filters' => false, 'show_login_link' => false, 'markup_generator_info' => array('list_item' => array('classname' => 'FullImageListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/full_image.php'))), 'main_head' => 'publication/title', 'main' => 'publication/description', 'sidebar' => '', 'pre_sidebar' => ''), 'publication_with_image_sidebar' => array('main_post' => 'publication', 'main_head' => 'publication/title', 'main' => 'publication/description'), 'publication_and_events_sidebar' => array('pre_sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'sidebar' => array('module' => 'events_mini')), 'events_and_publication_sidebar' => array('pre_sidebar' => array('module' => 'events_mini'), 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4)), 'events_and_publication_sidebar_show_children' => array('pre_sidebar' => array('module' => 'events_mini'), 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'main_post' => 'children'), 'blurb' => array('main_post' => 'blurb', 'sub_nav' => ''), 'blurb_first_under_nav_rest_below_content' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'main_post' => 'blurb'), 'blurb_first_sidebar_others_under_navigation' => array('pre_sidebar' => array('module' => 'blurb', 'num_to_display' => 1), 'sub_nav' => 'blurb'), 'blurb_no_demotion_of_headings' => array('main_post' => array('module' => 'blurb', 'demote_headings' => 0), 'sub_nav' => ''), 'blurb_no_nav' => array('navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_post' => 'blurb'), 'blurb_under_nav_and_below_content' => array('main_post' => 'blurb'), 'blurb_with_children' => array('main' => 'blurb', 'main_post' => 'children', 'sub_nav' => ''), 'blurb_with_siblings' => array('main' => 'blurb', 'main_post' => 'siblings', 'sub_nav' => ''), 'blurb_with_children_sidebar' => array('main_post' => 'blurb', 'sidebar' => 'children', 'sub_nav' => ''), 'blurb_with_siblings_sidebar' => array('main_post' => 'blurb', 'sidebar' => 'siblings', 'sub_nav' => ''), 'blurb_2_columns' => array('main_post' => array('module' => 'blurb', 'demote_headings' => 0), 'sub_nav' => array('module' => 'head_items_include', 'css' => array(array(REASON_HTTP_BASE_PATH . 'css/blurb_grids/blurb_2_columns.css')))), 'blurbs_with_events_and_publication_sidebar_by_page_categories' => array('pre_sidebar' => array('module' => 'events_mini', 'limit_to_page_categories' => true), 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'limit_by_page_categories' => 'true', 'max_num_items' => 3), 'main_post' => 'blurb', 'sub_nav' => ''), 'blurbs_with_events_sidebar_by_page_categories' => array('pre_sidebar' => array('module' => 'events_mini', 'limit_to_page_categories' => true), 'main_post' => 'blurb', 'sub_nav' => ''), 'child_sites' => array('main_post' => 'child_sites'), 'child_sites_with_top_pages' => array('main_post' => 'child_sites_top_pages'), 'child_sites_with_top_pages_nonav' => array('main_post' => 'child_sites_top_pages', 'banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'children_and_grandchildren' => array('main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2)), 'children_and_grandchildren_no_page_title' => array('main_head' => '', 'main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2)), 'children_and_grandchildren_no_nav' => array('navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2)), 'children_and_grandchildren_no_nav_no_page_title' => array('main_head' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2)), 'children_and_grandchildren_full_names' => array('main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2, 'use_link_name' => false)), 'children_and_grandchildren_full_names_h3' => array('main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2, 'use_link_name' => false, 'depth_to_tag_map' => array(1 => 'h3', 2 => 'h4'))), 'children_and_grandchildren_full_names_sidebar_blurbs_no_title' => array('main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2, 'use_link_name' => false, 'depth_to_tag_map' => array(1 => 'h3', 2 => 'h4')), 'pre_sidebar' => 'image_sidebar', 'sidebar' => 'blurb', 'sub_nav' => 'assets', 'main_head' => ''), 'children_and_grandchildren_sidebar_blurbs' => array('main_post' => array('module' => 'children_and_grandchildren', 'max_depth' => 2), 'pre_sidebar' => 'image_sidebar', 'sidebar' => 'blurb', 'sub_nav' => 'assets'), 'children_and_siblings' => array('main_post' => 'children', 'sidebar' => 'siblings'), 'children_and_sidebar_blurbs' => array('main_post' => 'children', 'sidebar' => 'blurb', 'sub_nav' => ''), 'children_and_sidebar_blurbs_no_nav' => array('main_post' => 'children', 'sidebar' => 'blurb', 'navigation' => '', 'sub_nav' => '', 'sub_nav_2' => '', 'sub_nav_3' => ''), 'children_before_content' => array('main_post' => 'content', 'main' => 'children'), 'children_before_content_sidebar_blurbs' => array('main_post' => 'content', 'main' => 'children', 'sidebar' => 'blurb', 'sub_nav' => ''), 'children_no_nav' => array('navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_post' => 'children'), 'children_no_nav_no_title' => array('navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_head' => '', 'main_post' => 'children'), 'department_listing' => array('banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_head' => '', 'main_post' => 'department_list', 'sidebar' => 'blurb'), 'event_registration' => array('main_post' => 'event_registration', 'sidebar' => ''), 'event_signup' => array('main_post' => 'event_signup', 'sidebar' => ''), 'event_slot_registration' => array('main_post' => array('module' => 'events', 'list_item_markup' => 'minisite_templates/modules/events_markup/verbose/verbose_events_list_item.php'), 'sidebar' => ''), 'event_slot_registration_cache_1_hour' => array('main_post' => array('module' => 'events', 'list_item_markup' => 'minisite_templates/modules/events_markup/verbose/verbose_events_list_item.php', 'cache_lifespan' => '3600', 'cache_lifespan_meta' => '7400'), 'sidebar' => ''), 'events' => array('main_post' => 'events', 'sidebar' => ''), 'events_cache_1_hour' => array('main_post' => array('module' => 'events', 'cache_lifespan' => '3600', 'cache_lifespan_meta' => '7400'), 'sidebar' => ''), 'events_gallery_archive' => array('main_post' => array('module' => 'events_gallery', 'template' => 'big_list_no_temporal', 'show' => array('archived'), 'order' => '`datetime` DESC')), 'events_and_images_sidebar_show_children' => array('sidebar' => 'events_mini', 'main_post' => 'children', 'pre_sidebar' => 'image_sidebar'), 'publication_related_and_events_sidebar_show_children' => array('sidebar' => 'events_mini', 'pre_sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'main_post' => 'children'), 'publication_related_and_events_sidebar_show_children_no_title' => array('sidebar' => 'events_mini', 'pre_sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'main_post' => 'children', 'main_head' => ''), 'events_archive' => array('main_post' => 'events_archive', 'sidebar' => ''), 'events_hybrid' => array('main_post' => 'events_hybrid', 'sidebar' => ''), 'events_hybrid_verbose' => array('main_post' => array('module' => 'events_hybrid', 'list_item_markup' => 'minisite_templates/modules/events_markup/verbose/verbose_events_list_item.php'), 'sidebar' => ''), 'events_archive_verbose' => array('main_post' => array('module' => 'events_archive', 'list_item_markup' => 'minisite_templates/modules/events_markup/verbose/verbose_events_list_item.php'), 'sidebar' => ''), 'events_archive_nav_below' => array('main' => 'events_archive', 'main_post' => 'navigation', 'sidebar' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'events_nonav' => array('main_post' => 'events', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'sidebar' => ''), 'events_sidebar' => array('sidebar' => 'events_mini'), 'events_sidebar_by_page_categories' => array('sidebar' => array('module' => 'events_mini', 'limit_to_page_categories' => true)), 'events_and_publication_sidebar_by_page_categories' => array('sidebar' => array('module' => 'events_mini', 'limit_to_page_categories' => true), 'post_sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'limit_by_page_categories' => 'true', 'max_num_items' => 3)), 'events_sidebar_grouped_by_category' => array('sidebar' => 'events_mini_grouped_by_category'), 'events_sidebar_grouped_by_page_categories' => array('sidebar' => array('module' => 'events_mini_grouped_by_category', 'mode' => 'page')), 'events_sidebar_show_children' => array('sidebar' => 'events_mini', 'main_post' => 'children'), 'events_sidebar_show_nav_children' => array('sidebar' => 'events_mini', 'main_post' => array('module' => 'children', 'show_only_pages_in_nav' => true)), 'events_sidebar_show_children_random_images_in_subnav' => array('sidebar' => 'events_mini', 'main_post' => 'children', 'sub_nav' => array('module' => 'image_sidebar', 'num_to_display' => 2, 'rand_flag' => true)), 'events_sidebar_more_show_children' => array('sidebar' => 'events_mini_more', 'main_post' => 'children'), 'events_instancewide' => array('main_post' => 'events_instancewide', 'sidebar' => ''), 'events_verbose' => array('main_post' => array('module' => 'events', 'list_item_markup' => 'minisite_templates/modules/events_markup/verbose/verbose_events_list_item.php'), 'sidebar' => ''), 'events_schedule' => array('main_post' => array('module' => 'events', 'list_markup' => 'minisite_templates/modules/events_markup/schedule/schedule_events_list.php', 'list_item_markup' => 'minisite_templates/modules/events_markup/schedule/schedule_events_list_item.php'), 'sidebar' => ''), 'events_verbose_nonav' => array('main_post' => array('module' => 'events', 'list_item_markup' => 'minisite_templates/modules/events_markup/verbose/verbose_events_list_item.php'), 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'sidebar' => ''), 'faculty' => array('main_post' => 'faculty'), 'faculty_and_children' => array('main_post' => 'faculty', 'sidebar' => 'children'), 'faculty_first' => array('main' => 'faculty', 'main_post' => 'content'), 'faculty_no_nav' => array('navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_post' => 'faculty', 'sidebar' => 'blurb'), 'faculty_with_sidebar_blurbs' => array('main_post' => 'faculty', 'sidebar' => 'blurb', 'sub_nav' => ''), 'faculty_sidebar_children' => array('main_post' => 'faculty', 'sidebar' => 'children'), 'faqs' => array('main_post' => 'faqs'), 'faqs_ordered_by_keywords' => array('main_post' => array('module' => 'faqs', 'order_field' => 'keywords', 'order_direction' => 'ASC')), 'feature' => array('main_post' => 'feature/feature'), 'feature_shuffled' => array('main_post' => array('module' => 'feature/feature', 'shuffle' => true, 'width' => 500, 'height' => 300)), 'feature_av' => array('main_post' => array('module' => 'feature/feature', 'shuffle' => false, 'width' => 300, 'height' => 200, 'view' => 'av_view')), 'feature_autoplay' => array('main_post' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 3, 'width' => 500, 'height' => 300)), 'feature_before_content_sidebar_events_news' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'main' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 3, 'width' => 500, 'height' => 300), 'main_post' => 'content', 'pre_sidebar' => array('module' => 'events_mini', 'ideal_count' => 4), 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'post_sidebar' => 'blurb'), 'feature_before_content_sidebar_events' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'main' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 3, 'width' => 500, 'height' => 300), 'main_post' => 'content', 'pre_sidebar' => 'events_mini', 'post_sidebar' => 'blurb'), 'feature_after_content_sidebar_events' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'main_post' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 3, 'width' => 500, 'height' => 300), 'pre_sidebar' => 'events_mini', 'post_sidebar' => 'blurb'), 'feature_slow_after_content_sidebar_news_events' => array('sub_nav' => 'blurb', 'main_post' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 5, 'width' => 500, 'height' => 300), 'pre_sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'sidebar' => array('module' => 'events_mini', 'ideal_count' => 4)), 'feature_before_content_sidebar_blurbs_first_under_subnav' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'main' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 4, 'width' => 500, 'height' => 300), 'main_post' => 'content', 'pre_sidebar' => 'blurb'), 'feature_after_content_sidebar_blurbs_first_under_subnav' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'main_post' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 4, 'width' => 500, 'height' => 300), 'pre_sidebar' => 'blurb'), 'feedback' => array('main_post' => 'feedback'), 'feedbackNoNavNoSearch' => array('banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main' => 'content', 'main_post' => 'feedback'), 'form' => array('main' => 'form_content', 'main_post' => 'form'), 'form_force_login' => array('main' => 'form_content', 'main_post' => array('module' => 'form', 'force_login' => true)), 'formNoNavNoSearch' => array('banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main' => 'form_content', 'main_post' => 'form'), 'form_sidebar_blurbs' => array('main' => 'form_content', 'main_post' => 'form', 'sidebar' => 'blurb', 'sub_nav' => 'assets', 'pre_sidebar' => 'image_sidebar'), 'form_sidebar_blurbs_if_logged_in' => array('main' => 'form_content', 'main_post' => 'form', 'sidebar' => 'blurbs_if_logged_in', 'sub_nav' => 'assets', 'pre_sidebar' => 'image_sidebar'), 'gallery' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel'), 'sidebar' => ''), 'gallery_above_assets' => array('main' => array('module' => 'gallery2', 'sort_order' => 'rel'), 'main_post' => 'assets', 'pre_sidebar' => '', 'sidebar' => '', 'sub_nav' => 'content'), 'gallery_above_blurbs' => array('main' => array('module' => 'gallery2', 'sort_order' => 'rel'), 'main_post' => 'blurb', 'sidebar' => '', 'sub_nav' => 'content'), 'gallery_above_content' => array('main' => array('module' => 'gallery2', 'sort_order' => 'rel'), 'main_post' => 'content', 'sidebar' => ''), 'gallery_chronological' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'dated.datetime ASC, entity.id ASC'), 'sidebar' => ''), 'gallery_reverse_chronological' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'dated.datetime DESC, entity.id DESC'), 'sidebar' => ''), 'gallery_entire_site' => array('main_post' => array('module' => 'gallery2', 'entire_site' => true)), 'gallery_entire_site_no_nav' => array('main_post' => array('module' => 'gallery2', 'entire_site' => true), 'navigation' => ''), 'gallery_entire_site_no_nav_no_title' => array('main_post' => array('module' => 'gallery2', 'entire_site' => true), 'navigation' => '', 'main_head' => '', 'banner_xtra' => ''), 'gallery_first_nav_below' => array('main' => array('module' => 'gallery2', 'sort_order' => 'rel'), 'main_post' => 'navigation', 'sidebar' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'gallery_no_nav' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel'), 'sidebar' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'gallery_single_page' => array('main_post' => array('module' => 'gallery2', 'use_pagination' => false, 'sort_order' => 'rel'), 'sidebar' => ''), 'gallery_vote' => array('main_post' => 'gallery_vote', 'sidebar' => ''), 'gallery_24_per_page' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'number_per_page' => 24), 'sidebar' => ''), 'gallery_24_per_page_sidebar_blurb' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'number_per_page' => 24), 'sub_nav' => '', 'sidebar' => 'blurb'), 'gallery_100x100_thumbnails' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'thumbnail_width' => 100, 'thumbnail_height' => 100), 'sidebar' => ''), 'gallery_150x150_thumbnails' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'thumbnail_width' => 150, 'thumbnail_height' => 150), 'sidebar' => ''), 'gallery_200x200_thumbnails' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'thumbnail_width' => 200, 'thumbnail_height' => 200), 'sidebar' => ''), 'gallery_640px' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'width' => 640, 'height' => 640, 'crop' => 'fit'), 'sidebar' => ''), 'gallery_720px' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'width' => 720, 'height' => 720, 'crop' => 'fit'), 'sidebar' => ''), 'gallery_800px' => array('main_post' => array('module' => 'gallery2', 'sort_order' => 'rel', 'width' => 800, 'height' => 800, 'crop' => 'fit'), 'sidebar' => ''), 'GoModule' => array('sub_nav_2' => '', 'banner_xtra' => '', 'sidebar' => '', 'pre_sidebar' => '', 'navigation' => '', 'main_post' => 'go'), 'google_map' => array('main_post' => 'google_map'), 'images_under_nav' => array('sidebar' => 'blurb', 'sub_nav' => 'image_sidebar'), 'image_left_no_nav' => array('navigation' => 'image_sidebar', 'sub_nav_2' => '', 'sidebar' => ''), 'image_slideshow' => array('main_post' => 'image_slideshow', 'sidebar' => ''), 'image_slideshow_500x375' => array('main_post' => array('module' => 'image_slideshow', 'width' => 500, 'height' => 375), 'sidebar' => ''), 'image_slideshow_640x480' => array('main_post' => array('module' => 'image_slideshow', 'width' => 640, 'height' => 480), 'sidebar' => ''), 'image_slideshow_720x540' => array('main_post' => array('module' => 'image_slideshow', 'width' => 720, 'height' => 540), 'sidebar' => ''), 'image_slideshow_800x600' => array('main_post' => array('module' => 'image_slideshow', 'width' => 800, 'height' => 600), 'sidebar' => ''), 'image_slideshow_before_content' => array('main' => 'image_slideshow', 'main_post' => 'content', 'sidebar' => ''), 'image_slideshow_before_content_one_blurb_subnav_others_sidebar' => array('main' => 'image_slideshow', 'main_post' => 'content', 'sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'sidebar' => 'blurb'), 'image_slideshow_before_content_no_nav' => array('main' => 'image_slideshow', 'main_post' => 'content', 'navigation' => '', 'sub_nav_2' => '', 'sidebar' => ''), 'image_slideshow_before_content_publication_sidebar' => array('main' => 'image_slideshow', 'main_post' => 'content', 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 5)), 'image_slideshow_before_content_events_sidebar' => array('main' => 'image_slideshow', 'main_post' => 'content', 'sidebar' => 'events_mini'), 'image_slideshow_manual' => array('main_post' => array('module' => 'image_slideshow', 'slideshow_type' => 'manual'), 'sidebar' => ''), 'image_slideshow_manual_500x375' => array('main_post' => array('module' => 'image_slideshow', 'slideshow_type' => 'manual', 'width' => 500, 'height' => 375), 'sidebar' => ''), 'images_full_size' => array('main_post' => 'images', 'sidebar' => ''), 'images_800w' => array('main_post' => array('module' => 'images', 'width' => 800), 'sidebar' => ''), 'images_640w' => array('main_post' => array('module' => 'images', 'width' => 640), 'sidebar' => ''), 'images_640x480' => array('main_post' => array('module' => 'images', 'width' => 640, 'height' => 480), 'sidebar' => ''), 'images_full_size_before_content' => array('main' => 'images', 'main_post' => 'content', 'sidebar' => ''), 'images_full_size_before_content_randomized_single' => array('main' => array('module' => 'images', 'max_num' => 1, 'sort_order' => 'RAND()'), 'main_post' => 'content', 'sidebar' => ''), 'images_full_size_one_at_a_time' => array('main_post' => array('module' => 'images', 'num_per_page' => 1), 'sidebar' => ''), 'images_full_size_single_page' => array('main_post' => array('module' => 'images', 'num_per_page' => 99999), 'sidebar' => ''), 'jobs' => array('main_post' => 'jobs', 'sub_nav' => '', 'sidebar' => 'blurb'), 'live_sites' => array('main_post' => 'live_sites'), 'minutes' => array('main_post' => 'minutes'), 'nav_below_content' => array('banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_post' => 'navigation'), 'publication_sidebar' => array('sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4)), 'publication_sidebar_7_headlines' => array('sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 7)), 'publication_sidebar_images_above' => array('pre_sidebar' => 'image_sidebar', 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4)), 'publication_sidebar_two_month_expiration' => array('sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4, 'minimum_date_strtotime_format' => '-2 months')), 'publication_and_blurbs_sidebar' => array('pre_sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'sidebar' => 'blurb', 'sub_nav' => ''), 'no_sub_nav' => array('sub_nav_2' => '', 'sub_nav' => ''), 'no_title' => array('main_head' => ''), 'no_nav' => array('navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'noNavNoSearch' => array('banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'policy' => array('main_post' => 'policy'), 'poll' => array('main_post' => array('module' => 'form', 'form_view' => 'minisite_templates/modules/poll/poll_form_view.php'), 'main_post_2' => array('module' => 'poll/polling_graph', 'custom_colors' => array('#cb4b4b', '#edc240', '#2f90dc', '#9440ed', '#4da74d'))), 'poll_sidebar' => array('pre_sidebar' => array('module' => 'form', 'form_view' => 'minisite_templates/modules/poll/poll_form_view.php'), 'sidebar' => array('module' => 'poll/polling_graph_sidebar', 'custom_colors' => array('#cb4b4b', '#edc240', '#2f90dc', '#9440ed', '#4da74d'))), 'projects' => array('main_post' => 'projects'), 'random_blurb_and_sidebar_image' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1, 'rand_flag' => true), 'sidebar' => array('module' => 'image_sidebar', 'num_to_display' => 3, 'caption_flag' => false, 'rand_flag' => true)), 'random_sidebar_images' => array('sidebar' => array('module' => 'image_sidebar', 'num_to_display' => 3, 'caption_flag' => false, 'rand_flag' => true)), 'reason_college_home' => array('pre_bluebar' => '', 'main_head' => 'page_title', 'post_banner' => array('module' => 'feature/feature', 'shuffle' => false, 'autoplay_timer' => 3, 'width' => 1680, 'height' => 651), 'main' => array('module' => 'publication', 'show_featured_items' => true, 'related_mode' => 'true', 'markup_generator_info' => array('list' => array('classname' => 'CloakRelatedListMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/publication_list_markup_generators/cloak_related_list.php'), 'list_item' => array('classname' => 'CloakMinimalWithImageListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/cloak_minimal_with_image.php'), 'featured_item' => array('classname' => 'CloakWithImageListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/cloak_with_image.php')), 'max_num_items' => 4), 'main_post' => array('module' => 'events_mini', 'ideal_count' => 5), 'main_post_2' => '', 'pre_sidebar' => array('module' => 'blurb', 'num_to_display' => 4), 'main_post_3' => '', 'edit_link' => 'login_link', 'pre_banner' => 'announcements', 'banner_xtra' => 'search', 'sidebar' => array('module' => 'blurb', 'num_to_display' => 1), 'post_sidebar' => 'content', 'navigation' => '', 'footer' => 'maintained', 'sub_nav' => '', 'sub_nav_2' => '', 'sub_nav_3' => '', 'post_foot' => ''), 'related_policies' => array('main_post' => 'policy_related'), 'related_policies_and_children' => array('main_post' => 'policy_related', 'sidebar' => 'children'), 'related_policies_and_siblings' => array('main_post' => 'policy_related', 'sidebar' => 'siblings'), 'resource' => array('main_post' => 'resource'), 'show_children' => array('main_post' => 'children'), 'show_children_and_publication_sidebar' => array('main_post' => 'children', 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4)), 'show_children_hide_non_nav' => array('main_post' => array('module' => 'children', 'show_only_pages_in_nav' => true)), 'show_children_hide_non_nav_sidebar_blurbs' => array('main_post' => array('module' => 'children', 'show_only_pages_in_nav' => true), 'sidebar' => 'blurb', 'sub_nav' => 'image_sidebar'), 'show_children_images_replace_nav' => array('main_post' => 'children', 'sidebar' => '', 'navigation' => 'image_sidebar'), 'show_children_no_title' => array('main_head' => '', 'main_post' => 'children'), 'show_children_no_nav' => array('main_post' => 'children', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'show_children_no_nav_hide_non_nav' => array('main_post' => array('module' => 'children', 'show_only_pages_in_nav' => true), 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'show_children_no_nav_no_title' => array('main_post' => 'children', 'main_head' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => ''), 'show_children_with_az_list' => array('main_post' => array('module' => 'children', 'provide_az_links' => true)), 'show_children_with_first_images' => array('main_post' => array('module' => 'children', 'provide_images' => true)), 'show_children_with_first_images_100x100' => array('main_post' => array('module' => 'children', 'provide_images' => true, 'thumbnail_height' => 100, 'thumbnail_width' => 100)), 'show_children_with_first_images_150x150' => array('main_post' => array('module' => 'children', 'provide_images' => true, 'thumbnail_height' => 150, 'thumbnail_width' => 150)), 'show_children_with_first_images_200x200' => array('main_post' => array('module' => 'children', 'provide_images' => true, 'thumbnail_height' => 200, 'thumbnail_width' => 200)), 'show_children_with_first_images_no_nav' => array('navigation' => '', 'main_post' => array('module' => 'children', 'provide_images' => true)), 'show_children_with_random_images' => array('main_post' => array('module' => 'children', 'provide_images' => true, 'randomize_images' => true)), 'show_children_with_random_images_100x100' => array('main_post' => array('module' => 'children', 'provide_images' => true, 'randomize_images' => true, 'thumbnail_height' => 100, 'thumbnail_width' => 100)), 'show_children_with_random_images_150x150' => array('main_post' => array('module' => 'children', 'provide_images' => true, 'randomize_images' => true, 'thumbnail_height' => 150, 'thumbnail_width' => 150)), 'show_children_with_random_images_200x200' => array('main_post' => array('module' => 'children', 'provide_images' => true, 'randomize_images' => true, 'thumbnail_height' => 200, 'thumbnail_width' => 200)), 'siblings_and_children' => array('main_post' => 'siblings', 'sidebar' => 'children'), 'sidebar_children' => array('sidebar' => 'children'), 'show_siblings' => array('main_post' => 'siblings'), 'show_siblings_hide_non_nav' => array('main_post' => array('module' => 'siblings', 'show_only_pages_in_nav' => true)), 'show_siblings_hide_external_links' => array('main_post' => array('module' => 'siblings', 'show_external_links' => false)), 'show_siblings_with_parent_title' => array('main_post' => array('module' => 'siblings', 'use_parent_title_as_header' => true)), 'show_siblings_with_first_images' => array('main_post' => array('module' => 'siblings', 'provide_images' => true)), 'show_siblings_with_first_images_100x100' => array('main_post' => array('module' => 'siblings', 'provide_images' => true, 'thumbnail_height' => 100, 'thumbnail_width' => 100)), 'show_siblings_with_first_images_150x150' => array('main_post' => array('module' => 'siblings', 'provide_images' => true, 'thumbnail_height' => 150, 'thumbnail_width' => 150)), 'show_siblings_with_first_images_200x200' => array('main_post' => array('module' => 'siblings', 'provide_images' => true, 'thumbnail_height' => 200, 'thumbnail_width' => 200)), 'show_siblings_with_random_images' => array('main_post' => array('module' => 'siblings', 'provide_images' => true, 'randomize_images' => true)), 'show_siblings_with_random_images_100x100' => array('main_post' => array('module' => 'siblings', 'provide_images' => true, 'randomize_images' => true, 'thumbnail_height' => 100, 'thumbnail_width' => 100)), 'show_siblings_with_random_images_150x150' => array('main_post' => array('module' => 'siblings', 'provide_images' => true, 'randomize_images' => true, 'thumbnail_height' => 150, 'thumbnail_width' => 150)), 'show_siblings_with_random_images_200x200' => array('main_post' => array('module' => 'siblings', 'provide_images' => true, 'randomize_images' => true, 'thumbnail_height' => 200, 'thumbnail_width' => 200)), 'show_siblings_previous_next' => array('main_post' => array('module' => 'siblings', 'previous_next' => true)), 'siblings_no_nav' => array('navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_post' => 'siblings'), 'siblings_and_sidebar_blurbs' => array('sidebar' => 'blurb', 'sub_nav' => '', 'main_post' => 'siblings'), 'sidebar_blurb' => array('sub_nav' => '', 'sidebar' => 'blurb'), 'sidebar_blurb_no_title' => array('sub_nav' => '', 'sidebar' => 'blurb', 'main_head' => ''), 'sidebar_blurb_and_children_no_title' => array('sub_nav' => '', 'sidebar' => 'blurb', 'main_head' => '', 'main_post' => 'children'), 'sidebar_blurb_and_children_with_images' => array('sub_nav' => '', 'pre_sidebar' => 'image_sidebar', 'sidebar' => 'blurb', 'main_post' => 'children'), 'sidebar_blurb_with_related_publication' => array('pre_sidebar' => 'blurb', 'sidebar' => array('module' => 'publication', 'related_mode' => 'true', 'markup_generator_info' => array('list_item' => array('classname' => 'MinimalListItemMarkupGenerator', 'filename' => 'minisite_templates/modules/publication/list_item_markup_generators/minimal.php')), 'max_num_items' => 4), 'sub_nav' => ''), 'sidebar_images_alpha_by_keywords' => array('sidebar' => array('module' => 'image_sidebar', 'order_by' => 'keywords ASC')), 'sidebar_images_alpha_by_name' => array('sidebar' => array('module' => 'image_sidebar', 'order_by' => 'name ASC')), 'sidebar_images_chronological' => array('sidebar' => array('module' => 'image_sidebar', 'order_by' => 'datetime ASC')), 'sidebar_images_reverse_chronological' => array('sidebar' => array('module' => 'image_sidebar', 'order_by' => 'datetime DESC')), 'site_map' => array('banner_xtra' => '', 'navigation' => '', 'sub_nav_2' => '', 'sub_nav' => '', 'main_head' => '', 'main_post' => array('module' => 'sitemap'), 'sidebar' => 'blurb'), 'social_accounts' => array('main_post' => 'social_account/social_account'), 'standalone_login_page' => array('main_post' => 'login'), 'standalone_login_page_stripped' => array('main_head' => '', 'edit_link' => '', 'banner_xtra' => '', 'navigation' => '', 'sub_nav' => '', 'sub_nav_2' => '', 'main_post' => 'login', 'sidebar' => 'blurb'), 'tasks' => array('main_post' => 'tasks'), 'one_blurb_subnav_others_sidebar' => array('sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'sidebar' => 'blurb'), 'children_with_one_blurb_subnav_others_sidebar' => array('main_post' => 'children', 'sub_nav' => array('module' => 'blurb', 'num_to_display' => 1), 'sidebar' => 'blurb', 'pre_sidebar' => 'image_sidebar'), 'editor_demo' => array('main_post' => 'editor_demo'), 'publication' => array('main_post' => 'publication', 'main_head' => 'publication/title', 'main' => 'publication/description', 'sidebar' => '', 'pre_sidebar' => ''), 'show_children_and_random_images' => array('main_post' => 'children', 'sidebar' => array('module' => 'image_sidebar', 'num_to_display' => 4, 'caption_flag' => true, 'rand_flag' => true)), 'feed_display_full' => array('main_post' => array('module' => 'magpie/magpie_feed_display', 'show_entries_lacking_description' => true), 'pre_sidebar' => 'magpie/magpie_feed_search', 'sidebar' => 'magpie/magpie_feed_nav'), 'feed_display_sidebar' => array('sidebar' => array('module' => 'magpie/magpie_feed_display', 'num_per_page' => 999, 'desc_char_limit' => 25, 'show_entries_lacking_description' => true)), 'feed_display_sidebar_with_search' => array('pre_sidebar' => 'magpie/magpie_feed_search', 'sidebar' => 'magpie/magpie_feed_display'), 'classified' => array('main_post' => array('module' => 'classified/classified', 'filter_displayer' => 'listnav.php')), 'quote_sidebar_random_no_page_title' => array('main_head' => '', 'sub_nav' => array('module' => 'quote', 'enable_javascript_refresh' => true, 'prefer_short_quotes' => true, 'num_to_display' => 1, 'rand_flag' => true)), 'quote_sidebar_random' => array('sub_nav' => array('module' => 'quote', 'enable_javascript_refresh' => true, 'prefer_short_quotes' => true, 'num_to_display' => 1, 'rand_flag' => true)), 'quote_by_category' => array('main_post' => array('module' => 'quote', 'page_category_mode' => true)), 'quote' => array('main_post' => 'quote'), 'user_settings' => array('main_post' => 'user_settings/user_settings'));
$GLOBALS['_reason_deprecated_modules'] = array('form_custom/form_custom', 'gallery_single_page', 'gallery_entire_site');
if (reason_file_exists('minisite_templates/page_types_local.php')) {
    reason_include_once('minisite_templates/page_types_local.php');
    if (!empty($GLOBALS['_reason_page_types_local'])) {
        $GLOBALS['_reason_page_types'] = array_merge($GLOBALS['_reason_page_types'], $GLOBALS['_reason_page_types_local']);
    }
    if (!empty($GLOBALS['_reason_deprecated_modules_local'])) {
        $GLOBALS['_reason_deprecated_modules'] = array_merge($GLOBALS['_reason_deprecated_modules'], $GLOBALS['_reason_deprecated_modules_local']);
    }
}
コード例 #5
0
ファイル: form.php プロジェクト: hunter2814/reason_package
 /**
  * Get the form view from page type parameter if it exists - in some cases (like thor) the controller may handle view selection.        
  */
 function &get_form_admin_view()
 {
     if (!isset($this->form_admin_view)) {
         $admin_view_filename = !empty($this->params['form_admin_view']) ? $this->params['form_admin_view'] : false;
         if ($admin_view_filename) {
             if (reason_file_exists('minisite_templates/modules/form/admin_views/' . $admin_view_filename)) {
                 reason_include_once('minisite_templates/modules/form/admin_views/' . $admin_view_filename);
             } elseif (reason_file_exists($admin_view_filename)) {
                 reason_include_once($admin_view_filename);
             } elseif (file_exists($admin_view_filename)) {
                 include_once $admin_view_filename;
             } else {
                 trigger_error('The forms module was unable to load the admin view specified (' . $admin_view_filename . ')', FATAL);
             }
             $admin_view_name = $GLOBALS['_form_admin_view_class_names'][basename($admin_view_filename, '.php')];
             $admin_view = new $admin_view_name();
             $model =& $this->get_form_model();
             $admin_view->set_model($model);
         } else {
             $admin_view = false;
         }
         $this->form_admin_view =& $admin_view;
     }
     return $this->form_admin_view;
 }
コード例 #6
0
ファイル: upload.php プロジェクト: hunter2814/reason_package
/** @access private */
function _parse_async_upload_authenticator($auth)
{
    if (!is_array($auth) || empty($auth)) {
        trigger_fatal_error("upload authenticator must be specified as an " . "array as per the reason_create_async_upload_session API docs; " . "instead got " . var_export($auth, true), 2);
    }
    $callback = array_shift($auth);
    if ($inc_type = _detect_filename($callback)) {
        $filename = $callback;
        $callback = array_shift($auth);
    } else {
        $filename = null;
    }
    if ($filename) {
        if ($inc_type == "absolute" && !file_exists($filename)) {
            trigger_fatal_error("upload authenticator file " . var_export($filename, true) . " does not exist", 2);
        } else {
            if ($inc_type == "relative") {
                if (!reason_file_exists($filename)) {
                    trigger_fatal_error("upload authenticator file " . var_export($filename, true) . " does not exist in either " . "the local or the core Reason lib directory", 2);
                }
                $filename = reason_resolve_path($filename);
            }
        }
    }
    return array("file" => $filename, "callback" => $callback, "arguments" => $auth);
}
コード例 #7
0
        } elseif ($image->get_value('type') != id_of('image')) {
            $xtra = 'id passed to script is not the id of an image';
        } elseif ($image->get_value('state') != 'Live') {
            $xtra = 'image requested is ' . strtolower($image->get_value('state'));
        }
        $xtra .= ' ( Referrer: ' . $_SERVER['HTTP_REFERER'] . ' )';
        trigger_error('Bad image request on image popup script - ' . $xtra);
    }
    $image = null;
}
if (!empty($image)) {
    $GLOBALS['_reason_image_popup_data']['id'] = $id;
    $GLOBALS['_reason_image_popup_data']['title'] = $image->get_value('description') ? $image->get_value('description') : 'Image';
    $GLOBALS['_reason_image_popup_data']['image_exists'] = true;
    $GLOBALS['_reason_image_popup_data']['image_tag'] = '<img src="' . WEB_PHOTOSTOCK . reason_get_image_filename($id) . '" width="' . $image->get_value('width') . '" height="' . $image->get_value('height') . '" border="0" alt="' . htmlentities(strip_tags($image->get_value('description'))) . '" />';
    $GLOBALS['_reason_image_popup_data']['image_caption'] = $image->get_value('content') ? $image->get_value('content') : $image->get_value('description');
    $GLOBALS['_reason_image_popup_data']['image_author'] = $image->get_value('author');
} else {
    $GLOBALS['_reason_image_popup_data']['image_exists'] = false;
    $GLOBALS['_reason_image_popup_data']['title'] = 'Image not found';
}
if (defined('IMAGE_POPUP_TEMPLATE_FILENAME')) {
    $template_path = 'popup_templates/' . IMAGE_POPUP_TEMPLATE_FILENAME;
} else {
    $template_path = 'popup_templates/generic_image_popup_template.php';
}
if (reason_file_exists($template_path)) {
    reason_include($template_path);
} else {
    trigger_error('no template file found for the image popup script (looking for file at ' . $template_path . '; change Reason setting IMAGE_POPUP_TEMPLATE_FILENAME to set the template file)');
}
コード例 #8
0
ファイル: mvc.php プロジェクト: hunter2814/reason_package
 /**
  * Include a file if needed - we allow a relative path from minisite_templates/modules/ or an absolute path.
  */
 private final function _setup_mvc($type, $params = NULL)
 {
     if (!in_array($type, array('controller', 'model', 'view'))) {
         trigger_warning('The type passed (' . $type . ') to _setup_mvc must be "controller", "model", or "view"', 1);
         return NULL;
     }
     if (!empty($params['file']) || !empty($this->{$type})) {
         if (empty($params['file']) || !empty($this->{$type})) {
             $params['file'] = $this->{$type};
         }
         if (reason_file_exists('minisite_templates/modules/' . $params['file'])) {
             reason_include_once('minisite_templates/modules/' . $params['file']);
             $full_path = reason_resolve_path('minisite_templates/modules/' . $params['file']);
         } elseif (reason_file_exists($params['file'])) {
             reason_include_once($params['file']);
             $full_path = reason_resolve_path($params['file']);
         } elseif (file_exists($params['file'])) {
             include_once $params['file'];
             $full_path = realpath($params['file']);
         } else {
             trigger_error('The mvc module was unable to load the ' . $type . ' (' . $params['file'] . ')', FATAL);
         }
         if (isset($GLOBALS['_reason_mvc_' . $type . '_class_names'][reason_basename($full_path)])) {
             $class_name = $GLOBALS['_reason_mvc_' . $type . '_class_names'][reason_basename($full_path)];
         } else {
             trigger_error('The mvc module was unable to determine the class name for the ' . $type . ' (' . $params['file'] . ') - check that the file properly registers itself.', FATAL);
         }
         unset($params['file']);
     } else {
         if ($type == 'controller') {
             $class_name = 'ReasonMVCController';
         }
         // setup the default controller
     }
     // instantiate and return it.
     if (isset($class_name)) {
         $obj = new $class_name();
         $this->configure_mvc($type, $obj, $params);
         return $obj;
     }
 }
コード例 #9
0
	/**
	 * Add a reason template entity
	 *
	 * Makes sure the template file exists and there is no existing template entity with the same name before creating entity
	 *
	 * @param string $template_name The name of the template file (not including .php)
	 * @return mixed Id of created template or false if failure
	 * @author Matt Ryan
	 * @since Reason 4.0 beta 4
	 */
	function reason_add_template($template_name)
	{
		if(!get_template_by_name($template_name))
		{
			if(reason_file_exists('minisite_templates/'.$template_name.'.php'))
			{
				return reason_create_entity( id_of('master_admin'), id_of('minisite_template'), $user_id, $template_name, array('new'=>0));
			}
			else
			{
				trigger_error('Template '.$template_name.' does not exist in filesystem; unable to be added');
				return false;
			}
		}
		else
		{
			trigger_error('Template '.$template_name.' already exists in db; unable to be added');
			return false;
		}
	}
コード例 #10
0
echo ' file system split. The script allows you to easily change these references, or resolve references to missing files. By default, missing ';
echo ' files and references to "local" files are displayed, and "core" files are shown as available options for new values.</p>';
// we loop through POST and make sure it contains requested changes to type entities and that those are limited to changeable fields.
// once we do this, we actually make the changes.
if (!empty($_POST)) {
    unset($_POST['process']);
    $count = 0;
    foreach ($_POST as $k => $v) {
        $change_values = array();
        // each $k should be an integer that corresponds to a type entity. If not, ignore it.
        if (is_int($k)) {
            $e = new entity($k);
            if (reason_is_entity($e, 'type')) {
                foreach ($v as $field => $value) {
                    if (isset($fields[$field])) {
                        if (reason_file_exists($fields[$field] . '/' . $value)) {
                            $change_values[$field] = $value;
                        }
                    }
                }
                if (!empty($change_values)) {
                    if ($update_attempt = reason_update_entity($k, $user_id, $change_values)) {
                        $count++;
                    }
                }
            }
        }
    }
    echo '<h3>' . $count . ' entity updates were saved.</h3>';
}
if ($_GET['fields_referencing'] === 'all') {
コード例 #11
0
ファイル: thor.php プロジェクト: natepixel/reason_package
	function &setup_view()
	{
		if (!isset($this->_view))
		{
			if (!defined('REASON_FORMS_THOR_DEFAULT_VIEW'))
			{
				trigger_error('REASON_FORMS_THOR_DEFAULT_VIEW constant is not defined - using the default for now, but please set the constant in the reason_settings.php file.');
				define('REASON_FORMS_THOR_DEFAULT_VIEW', 'default.php'); // trigger error as well
			}
			$form =& $this->get_form_entity();
			$custom_view_filename = $form->get_value('thor_view');
			if (!empty($custom_view_filename) && reason_file_exists('minisite_templates/modules/form/views/thor/'.$custom_view_filename))
			{
				reason_include_once('minisite_templates/modules/form/views/thor/'.$custom_view_filename);
			}
			elseif (!empty($custom_view_filename) && reason_file_exists($custom_view_filename))
			{
				reason_include_once($custom_view_filename);
			}
			elseif (reason_file_exists('minisite_templates/modules/form/views/thor/'.REASON_FORMS_THOR_DEFAULT_VIEW))
			{
				reason_include_once('minisite_templates/modules/form/views/thor/'.REASON_FORMS_THOR_DEFAULT_VIEW);
			}
			elseif (reason_file_exists('minisite_templates/modules/form/views/'.REASON_FORMS_THOR_DEFAULT_VIEW))
			{
				reason_include_once('minisite_templates/modules/form/views/'.REASON_FORMS_THOR_DEFAULT_VIEW);
			}
			elseif (file_exists(REASON_FORMS_THOR_DEFAULT_VIEW))
			{
				include_once(REASON_FORMS_THOR_DEFAULT_VIEW);
			}
			else trigger_error('The thor view (' . (!empty($custom_view_filename)) ? $custom_view_filename : REASON_FORMS_THOR_DEFAULT_VIEW . ') could not be loaded for a form (' . $form->get_value('name') . ') with id ' . $form->id() .  
							   ' Check the thor_view value in the content manager or the REASON_FORMS_THOR_DEFAULT_VIEW constant.', FATAL);
			
			$view_name = $GLOBALS['_form_view_class_names'][basename( (!empty($custom_view_filename)) ? $custom_view_filename : REASON_FORMS_THOR_DEFAULT_VIEW, '.php')];
			$this->_view = new $view_name();
			$this->_view->set_model($this);
		}
		return $this->get_view();
	}
コード例 #12
0
ファイル: factory.php プロジェクト: hunter2814/reason_package
 /**
  * Gets the class name from a page type and region name
  *
  * Will include the module in case it has not already been included
  *
  * @param object page_type - ReasonPageType Object
  * @param string region - name of the page type region where we want to find the module class name.
  * @return string module class name or the empty string
  * @todo this should arguably just get a method on the page type - get the class name of a region
  */
 private static function get_module_class($page_type, $region)
 {
     $region_info = $page_type->get_region($region);
     if ($region_info['module_filename'] && reason_file_exists($region_info['module_filename'])) {
         reason_include_once($region_info['module_filename']);
     }
     return !empty($GLOBALS['_module_class_names'][$region_info['module_name']]) ? $GLOBALS['_module_class_names'][$region_info['module_name']] : '';
 }
コード例 #13
0
 function set_modules_to_process()
 {
     $modules = false;
     $rpts =& get_reason_page_types();
     $page =& $this->get_page();
     $page_type_name = $page->get_value('custom_page');
     $page_type = $rpts->get_page_type($page_type_name);
     $regions = $page_type->get_region_names();
     foreach ($regions as $region) {
         $region_info = $page_type->get_region($region);
         if (!empty($region_info['module_name']) && !empty($region_info['module_filename']) && reason_file_exists($region_info['module_filename'])) {
             reason_include_once($region_info['module_filename']);
             $module_class = $GLOBALS['_module_class_names'][$region_info['module_name']];
             $module_obj = new $module_class();
             if (method_exists($module_obj, 'clear_cache')) {
                 $modules[$region_info['module_name']] = $module_obj;
             }
         }
     }
     $this->modules = $modules ? $modules : false;
 }
コード例 #14
0
ファイル: setup.php プロジェクト: hunter2814/reason_package
 * Declare HTMLPurifier configurations based on a string key.
 *
 * HTMLPurifier configs should be located in the ./config folder, and named according to the keys
 * in $GLOBALS['_reason_htmlpurifier_config'].
 *
 * To setup a default configuration for your instance of Reason CMS, perform the following steps:
 *
 * 1. create a class at ../../../local/config/htmlpurifier/configs/your_default.php that extends ../../../core/config/htmlpurifier/configs/default.php
 * 2. overload class defaults, register the class name, and/or add your own rules using the custom_config method to your specificiations ... 	
 * 3. copy ../../../core/config/htmlpurifier/setup_local.php to ../../../local/config/htmlpurifier/setup_local.php
 * 4. add default => your_default to $GLOBALS['_reason_htmlpurifier_config_local']
 * 
 * While you could skip the above and just customize ./configs/default.php, or copy the file to your local area and configure it, the above
 * process makes sure that you stay current with possible updates to ./configs/default.php.
 *  
 * @package reason 
 * @subpackage config
 */
/**
 * Include dependencies
 */
include_once 'reason_header.php';
include_once HTML_PURIFIER_INC . 'htmlpurifier.php';
reason_include_once('config/htmlpurifier/configs/abstract.php');
$GLOBALS['_reason_htmlpurifier_config'] = array('default' => 'default');
if (reason_file_exists('config/htmlpurifier/setup_local.php')) {
    reason_include_once('config/htmlpurifier/setup_local.php');
    if (!empty($GLOBALS['_reason_htmlpurifier_config_local'])) {
        $GLOBALS['_reason_htmlpurifier_config'] = array_merge($GLOBALS['_reason_htmlpurifier_config'], $GLOBALS['_reason_htmlpurifier_config_local']);
    }
}
コード例 #15
0
ファイル: setup.php プロジェクト: hunter2814/reason_package
<?php

/**
 * Set up the module sets singleton object
 *
 * This procedural file adds the core module sets to the module sets object.
 *
 * @package reason
 * @subpackage minisite_templates
 */
$ms =& reason_get_module_sets();
$ms->add(array('events', 'event_registration', 'event_signup', 'event_slot_registration', 'events_archive', 'events_hybrid', 'events_instancewide', 'events_schedule', 'events_verbose'), 'event_display');
/**
 * Create a set publication_item_display which holds module names that display publication items
 */
$ms->add('publication', 'publication_item_display');
$ms->add(array('gallery', 'gallery2', 'images', 'image_slideshow', 'gallery_vote', 'gallery_single_page'), 'image_display');
$ms->add(array('av', 'av_filejump', 'av_with_filters'), 'media_display');
$ms->add(array('av', 'av_with_filters'), 'av_module_derivatives');
if (reason_file_exists('config/module_sets/setup_local.php')) {
    reason_include_once('config/module_sets/setup_local.php');
}
コード例 #16
0
ファイル: social.php プロジェクト: hunter2814/reason_package
 /**
  * @return mixed integrator object or false if it couldn't be loaded.
  */
 function get_integrator($account_type, $required_interface_support = NULL)
 {
     if (empty($account_type)) {
         trigger_error('The get_integrator account_type parameter cannot be empty');
         return false;
     }
     if (!isset($this->_integrators[$account_type])) {
         if (reason_file_exists('classes/social/' . $account_type . '.php')) {
             reason_include_once('classes/social/' . $account_type . '.php');
             if (isset($GLOBALS['_social_integrator_class_names'][$account_type])) {
                 $this->_integrators[$account_type] = new $GLOBALS['_social_integrator_class_names'][$account_type]();
             } else {
                 trigger_error('The integrator could not be instantiated - it may not be registering itself properly.');
                 $this->_integrators[$account_type] = false;
             }
         } else {
             trigger_error('The integrator for account type ' . $account_type . ' could not be found.');
             $this->_integrators[$account_type] = false;
         }
     }
     return $this->_integrators[$account_type];
 }
コード例 #17
0
ファイル: events.php プロジェクト: natepixel/reason_package
	/**
	 * Get a markup object
	 *
	 * @param string $type 'item', 'list', 'list_chrome', 'list_item'
	 * @return object
	 */
	function get_markup_object($type)
	{
		if(isset($this->_markups[$type]))
			return $this->_markups[$type];
		
		if(isset($this->params[$type.'_markup']))
		{
			if(!empty($this->params[$type.'_markup']))
			{
				$path = $this->params[$type.'_markup'];
			}
			else
			{
				$var = 'default_'.$type.'_markup';
				$path = $this->$var;
			}
			if(reason_file_exists($path))
			{
				reason_include_once($path);
				if(!empty($GLOBALS['events_markup'][$path]))
				{
					if(class_exists($GLOBALS['events_markup'][$path]))
					{
						$markup = new $GLOBALS['events_markup'][$path];
						if('item' == $type)
						{
							if($markup instanceof eventsItemMarkup)
								$this->_markups[$type] = $markup;
							else
								trigger_error('Markup does not implement eventsItemMarkup interface');
						}
						elseif('list' == $type)
						{
							if($markup instanceof eventsListMarkup)
								$this->_markups[$type] = $markup;
							else
								trigger_error('Markup does not implement eventsListMarkup interface');
						}
						elseif('list_item' == $type)
						{
							if($markup instanceof eventsListItemMarkup)
								$this->_markups[$type] = $markup;
							else
								trigger_error('Markup does not implement eventsListItemMarkup interface');
						}
						elseif('list_chrome' == $type)
						{
							if($markup instanceof eventsListChromeMarkup)
								$this->_markups[$type] = $markup;
							else
								trigger_error('Markup does not implement eventsListChromeMarkup interface');
						}
						else
						{
							trigger_error('Unknown markup type');
						}
					}
					else
					{
						trigger_error('No class with name '.$GLOBALS['events_markup'][$path].' found');
					}
				}
				else
				{
					trigger_error('Events markup not properly registered at '.$path);
				}
			}
			else
			{
				trigger_error('No markup file exists at '.$path);
			}
		}
		else
		{
			trigger_error('Unrecognized markup type ('.$type.')');
		}
		if(!isset($this->_markups[$type]))
			$this->_markups[$type] = false;
		return $this->_markups[$type];
	}
コード例 #18
0
ファイル: default.php プロジェクト: natepixel/reason_package
	function load_modules() // {{{
	{
		$page_type = $this->get_page_type();

		if (extension_loaded('newrelic')) { 
			newrelic_name_transaction($page_type->get_name()); 
		}
		
		// if an api was requested lets identify the region to run
		if ($requested_api = $this->get_requested_api())
		{
			$module_api = ReasonAPIFactory::get_requested_api($page_type, $requested_api, $this->get_requested_identifier());
			if ($module_api) $this->section_to_module[$module_api['module_region']] = $module_api['module_name'];
			else $this->section_to_module = null;
		}
		else
		{
			foreach ($page_type->get_region_names() as $region)
			{
				$region_info = $page_type->get_region($region);
				$module_name = $region_info['module_name'];
				$module_filename = $region_info['module_filename'];
				if ($module_filename && reason_file_exists($module_filename)) reason_include_once( $module_filename );
				$this->section_to_module[$region] = $module_name;
			}
		}
		
		if (!empty($this->section_to_module))
		{
			$canonicalizer = new reasonCanonicalizer();
			foreach( $this->section_to_module AS $region => $module_name )
			{
				if( !empty( $module_name ) )
				{
					$region_info = $page_type->get_region($region);				
					$params = ($region_info['module_params'] != null) ? $region_info['module_params'] : array();
					$module_class = (!empty($GLOBALS[ '_module_class_names' ][ $module_name ])) ? $GLOBALS[ '_module_class_names' ][ $module_name ] : '';
					if( !empty( $module_class ) )
					{
						$this->_modules[ $region ] = new $module_class;
						$args = array();
						// set up a reference instead of a copy
						// dh - I really want to get rid of this.  For now, it stays.  However, I'm adding a number
						// of other parameters that a module will take by default so that we can rely on some important
						// data coming in.  9/15/04
						$args[ 'parent' ] =& $this; // pass this object to the module
						$args[ 'page_id' ] = $this->page_id;
						$args[ 'site_id' ] = $this->site_id;
						$args[ 'cur_page' ] = $this->cur_page;
						// we set the module identifier as a hash of the section - should be unique
						$args[ 'identifier' ] = ReasonAPIFactory::get_identifier_for_module($page_type, $region);
						//$args[ 'nav_pages' ] =& $this->pages;
						$args[ 'textonly' ] = '';
						$args[ 'api' ] = (!empty($module_api)) ? $module_api['api'] : false;
						$args[ 'page_is_public' ] = $this->page_is_public;
						
						// this is used by a few templates to add some arguments.  leaving it in for backwards
						// compatibility.  i believe that any usage of this can be done with page type parameteres now.
						$this->additional_args( $args );
						
						// localizes the args array inside the module class.  this is basically another layer of backwards
						// compatibility with old modules.
						$this->_modules[ $region ]->prep_args( $args );
						
						// Pass a reference to the pages object into the module (so the module doesn't have to use the
						// deprecated reference to the template)
						$this->_modules[ $region ]->set_page_nav( $this->pages );
						
						// Pass a reference to the head items object into the module (so the module doesn't have to use the
						// deprecated reference to the template)
						$this->_modules[ $region ]->set_head_items( $this->head_items );
						
						// Pass a reference to the head items object into the module (so the module doesn't have to use the
						// deprecated reference to the template)
	
						$breadcrumbs_obj =& $this->_get_crumbs_object();
						$this->_modules[ $region ]->set_crumbs( $breadcrumbs_obj );
						
						// send and check parameters gathered above from the page_types
						$this->_modules[ $region ]->handle_params( $params );
						
						// hook to run code before grabbing and sanitizing the _REQUEST.  this is important for something
						// that might not know what variables will be coming through until a Disco class or some such thing
						// has been loaded.
						$this->_modules[ $region ]->pre_request_cleanup_init();
						
						// Set the module request array based on the cleanup rules. 
						$this->_modules[ $region ]->request = $this->clean_external_vars($this->_modules[$region]->get_cleanup_rules());
						
						// init takes $args as a backwards compatibility feature.  otherwise, everything should be handled
						// in prep_args
						if ($this->should_benchmark()) $this->benchmark_start('init module ' . $module_name);
						$this->_modules[ $region ]->init( $args );
						if ($this->should_benchmark()) $this->benchmark_stop('init module ' . $module_name);

						$canonicalizer->register($this->_modules[ $region ]);
					}
					else
					{
						trigger_error( 'Badly formatted module ('.$module_name.') - $module_class not set ' );
					}
				}
			}
			if($canonical_url = $canonicalizer->get_canonical_url())
			{
				$this->head_items->add_head_item('link',array('rel'=>'canonical','href'=>$canonical_url ), '');
			}
		}
	} // }}}
コード例 #19
0
 /**
  * Resolves the module filename relative to minisite_templates/modules given the name. 
  * Used in {@link ReasonPageTypes::get_page_type() get_page_type()}.
  * 
  * @param string $module_name The name of the module whose filename will be determined.
  * @return mixed the filename of $module_name or false if it cannot be found.
  */
 static function resolve_filename($module_name)
 {
     static $cachedModules;
     if (!empty($module_name)) {
         if (!isset($cachedModules[$module_name])) {
             if (reason_file_exists('minisite_templates/modules/' . $module_name . '.php')) {
                 $cachedModules[$module_name] = 'minisite_templates/modules/' . $module_name . '.php';
             } elseif (reason_file_exists('minisite_templates/modules/' . $module_name . '/module.php')) {
                 $cachedModules[$module_name] = 'minisite_templates/modules/' . $module_name . '/module.php';
             } else {
                 trigger_error('The minisite module class file for "' . $module_name . '" cannot be found', WARNING);
                 $cachedModules[$module_name] = false;
             }
         }
         return $cachedModules[$module_name];
     } else {
         return false;
     }
 }
コード例 #20
0
ファイル: util.php プロジェクト: hunter2814/reason_package
function get_html_editor_integration_object($site_id)
{
    static $editor_objects = array();
    if (empty($editor_objects[$site_id])) {
        $es = new entity_selector();
        $es->add_type(id_of('html_editor_type'));
        $es->add_right_relationship($site_id, relationship_id_of('site_to_html_editor'));
        $es->set_num(1);
        $editors = $es->run_one();
        $html_editor_filename = defined('REASON_DEFAULT_HTML_EDITOR') ? REASON_DEFAULT_HTML_EDITOR : 'base.php';
        if (!empty($editors)) {
            $editor = current($editors);
            if ($editor->get_value('html_editor_filename')) {
                $html_editor_filename = $editor->get_value('html_editor_filename');
            }
        }
        if (!strpos($html_editor_filename, '.php')) {
            $html_editor_filename .= '.php';
        }
        if (reason_file_exists('html_editors/' . $html_editor_filename)) {
            reason_include_once('html_editors/' . $html_editor_filename);
            if (!empty($GLOBALS['_reason_editor_integration_classes'][$html_editor_filename])) {
                if (class_exists($GLOBALS['_reason_editor_integration_classes'][$html_editor_filename])) {
                    $editor_objects[$site_id] = new $GLOBALS['_reason_editor_integration_classes'][$html_editor_filename]();
                } else {
                    trigger_error('The class ' . $GLOBALS['_reason_editor_integration_classes'][$html_editor_filename] . ' does not exist; using default editor (plain text)');
                }
            } else {
                trigger_error('The file html_editors/' . $html_editor_filename . ' is not recording its class name in $GLOBALS[ \'_reason_editor_integration_classes\' ]. Using default editor (plain text)');
            }
        } else {
            trigger_error('The file html_editors/' . $html_editor_filename . ' does not exist. Using default editor (plain text)');
        }
        if (!isset($editor_objects[$site_id])) {
            reason_include_once('html_editors/base.php');
            $editor_objects[$site_id] = new $GLOBALS['_reason_editor_integration_classes']['base.php']();
        }
    }
    return $editor_objects[$site_id];
}
コード例 #21
0
 *
 * @package reason
 * @subpackage admin
 */
/**
 * Include dependencies
 */
include_once 'reason_header.php';
reason_include_once('classes/viewer.php');
reason_include_once('classes/entity_selector.php');
include_once SETTINGS_INC . 'google_api_settings.php';
/**
 * We check for the old style admin_module.php file and trigger an error if it is still being used
 * @todo remove this backwards compatibility check by Reason 4 RC 1
 */
if (reason_file_exists('classes/admin/admin_module.php')) {
    trigger_error('You are using an admin_module.php file to define administrative modules. 
				   The classes/admin/admin_module.php file should be removed from the core and local classes/admin/ directories, 
				   and config/admin_modules/setup.php and config/admin_module/setup_local.php used instead. 
				   You may need to create a config/admin_modules/setup_local.php file in the local side of the core/local 
				   split if you have made any changes or additions to the now deprecated admin_module.php file. 
				   See this changelog post for further information: 
				   https://apps.carleton.edu/opensource/reason/developers/changes/?story_id=652065');
    reason_include_once('classes/admin/admin_module.php');
} else {
    reason_include_once('config/admin_modules/setup.php');
}
reason_include_once('classes/head_items.php');
reason_include_once('function_libraries/user_functions.php');
/**
 * Admin Page
コード例 #22
0
ファイル: setup.php プロジェクト: hunter2814/reason_package
 *
 * Reason compares the requested module to this keys in this array. If it finds a matching key
 * (case-sensitive) it includes the file identified by the key "file" in the value array of the cur_module 
 * key in the classes/admin/modules directory.
 *
 * Reason then instantiates the class identified by the key "class" in the value array.
 *
 * A brief schematic of the $GLOBALS['_reason_admin_modules'] array:
 *
 * <pre>
 *	$GLOBALS['_reason_admin_modules'] = array(
 *		'Default'=>array('file'=>'default.php','class'=>'DefaultModule'),
 *		'Another'=>array('file'=>'another.php','class'=>'AnotherModule'),
 * );
 * </pre>
 *
 * To create a new admin module, add a file to reason_package/reason_4.0/lib/local/classes/admin/modules/.
 *
 * In this file, define a class that extends the DefaultModule. Overload the various methods as needed.
 *
 * Add a line to the $GLOBALS['_reason_admin_modules_local'] which identifies the filename and class name 
 * of your new module. Now the new module should be available simply by altering the cur_module request element to 
 * match the key you used in this array.
 */
$GLOBALS['_reason_admin_modules'] = array('Default' => array('file' => 'default.php', 'class' => 'DefaultModule'), 'DoBorrow' => array('file' => 'doBorrow.php', 'class' => 'DoBorrowModule'), 'DoAssociate' => array('file' => 'doAssociate.php', 'class' => 'DoAssociateModule'), 'DoDisassociate' => array('file' => 'doDisassociate.php', 'class' => 'DoDisassociateModule'), 'Archive' => array('file' => 'archive.php', 'class' => 'ArchiveModule'), 'Sorting' => array('file' => 'sorter.php', 'class' => 'SortingModule'), 'Site' => array('file' => 'site.php', 'class' => 'SiteModule'), 'Lister' => array('file' => 'lister.php', 'class' => 'ListerModule'), 'Delete' => array('file' => 'delete.php', 'class' => 'DeleteModule'), 'Undelete' => array('file' => 'undelete.php', 'class' => 'UndeleteModule'), 'Expunge' => array('file' => 'expunge.php', 'class' => 'ExpungeModule'), 'Editor' => array('file' => 'editor.php', 'class' => 'EditorModule'), 'Associator' => array('file' => 'associator.php', 'class' => 'AssociatorModule'), 'ReverseAssociator' => array('file' => 'reverse_associator.php', 'class' => 'ReverseAssociatorModule'), 'user_info' => array('file' => 'user_info.php', 'class' => 'UserInfoModule'), 'kill_session' => array('file' => 'kill_session.php', 'class' => 'KillSessionModule'), 'show_session' => array('file' => 'show_session.php', 'class' => 'ShowSessionModule'), 'about_reason' => array('file' => 'reason_info.php', 'class' => 'ReasonInfoModule'), 'Test' => array('file' => 'test.php', 'class' => 'TestModule'), 'Sharing' => array('file' => 'sharing.php', 'class' => 'SharingModule'), 'Preview' => array('file' => 'preview.php', 'class' => 'PreviewModule'), 'Finish' => array('file' => 'finish.php', 'class' => 'FinishModule'), 'Cancel' => array('file' => 'cancel.php', 'class' => 'CancelModule'), 'NoDelete' => array('file' => 'no_delete.php', 'class' => 'NoDeleteModule'), 'ChooseTheme' => array('file' => 'choose_theme.php', 'class' => 'ChooseThemeModule'), 'ViewUsers' => array('file' => 'view_users.php', 'class' => 'ViewUsersModule'), 'Duplicate' => array('file' => 'duplicate.php', 'class' => 'DuplicateModule'), 'clone' => array('file' => 'cloner.php', 'class' => 'ClonerModule'), 'ThorData' => array('file' => 'thor_data.php', 'class' => 'ThorDataModule'), 'GroupTester' => array('file' => 'group_tester.php', 'class' => 'GroupTesterModule'), 'ListSites' => array('file' => 'list_sites.php', 'class' => 'ListSitesModule'), 'ListUnusedThemes' => array('file' => 'list_unused_themes.php', 'class' => 'ListUnusedThemesModule'), 'ImageImport' => array('file' => 'image_import.php', 'class' => 'ImageImportModule'), 'AllowableRelationshipManager' => array('file' => 'allowable_relationship_manager.php', 'class' => 'AllowableRelationshipManagerModule'), 'SortPosts' => array('file' => 'sort_posts.php', 'class' => 'SortPostsModule'), 'EntityInfo' => array('file' => 'entity_info.php', 'class' => 'EntityInfoModule'), 'BatchDelete' => array('file' => 'batch_delete.php', 'class' => 'BatchDeleteModule'), 'Export' => array('file' => 'export.php', 'class' => 'ReasonExportModule'), 'VersionCheck' => array('file' => 'version_check.php', 'class' => 'ReasonVersionCheckModule'), 'EventSplit' => array('file' => 'event_split.php', 'class' => 'ReasonEventSplitModule'), 'ActiveUsers' => array('file' => 'active_users.php', 'class' => 'ReasonActiveUsersModule'), 'ReviewChanges' => array('file' => 'review_changes.php', 'class' => 'ReasonReviewChangesModule'), 'SitePages' => array('file' => 'site_pages.php', 'class' => 'ReasonSitePagesModule'), 'ImageSizer' => array('file' => 'image_sizer.php', 'class' => 'ImageSizerModule'), 'OrphanManager' => array('file' => 'orphan_manager.php', 'class' => 'OrphanManagerModule'), 'ManageLocks' => array('file' => 'manage_locks.php', 'class' => 'ManageLocksModule'), 'AdminTools' => array('file' => 'admin_tools.php', 'class' => 'ReasonAdminToolsModule'), 'ErrorVisibility' => array('file' => 'error_visibility.php', 'class' => 'ErrorVisibilityModule'), 'KalturaMediaImagePicker' => array('file' => 'media_work_image_picker_kaltura.php', 'class' => 'kalturaMediaWorkImagePickerModule'), 'ZencoderMediaImagePicker' => array('file' => 'media_work_image_picker_zencoder.php', 'class' => 'zencoderMediaWorkImagePickerModule'), 'ZencoderMediaWorkUpdate' => array('file' => 'pull_files_from_zencoder.php', 'class' => 'zencoderMediaWorkUpdateModule'), 'MediaDownloadLinks' => array('file' => 'media_work_download_links.php', 'class' => 'mediaWorkDownloadLinksModule'), 'KalturaImport' => array('file' => 'kaltura_import.php', 'class' => 'KalturaImportModule'), 'MediaImport' => array('file' => 'media_import.php', 'class' => 'MediaImportModule'), 'CustomizeTheme' => array('file' => 'customize_theme.php', 'class' => 'CustomizeThemeModule'), 'SiteAccessDenied' => array('file' => 'site_access_denied.php', 'class' => 'SiteAccessDeniedModule'), 'Newsletter' => array('file' => 'newsletter/newsletter.php', 'class' => 'NewsletterModule'), 'DeleteRegistrationSlotData' => array('file' => 'delete_slot_data.php', 'class' => 'DeleteRegistrationSlotDataModule'), 'ClearCache' => array('file' => 'clear_cache.php', 'class' => 'ReasonClearCacheModule'), 'Analytics' => array('file' => 'analytics.php', 'class' => 'AnalyticsModule'), 'AnalyticsAbout' => array('file' => 'analytics.php', 'class' => 'AnalyticsAboutModule'), 'ShareSiteOwnership' => array('file' => 'share_site_ownership.php', 'class' => 'ShareSiteOwnershipModule'));
if (reason_file_exists('config/admin_modules/setup_local.php')) {
    reason_include_once('config/admin_modules/setup_local.php');
    if (!empty($GLOBALS['_reason_admin_modules_local'])) {
        $GLOBALS['_reason_admin_modules'] = array_merge($GLOBALS['_reason_admin_modules'], $GLOBALS['_reason_admin_modules_local']);
    }
}
コード例 #23
0
/**
 * Get the singleton module sets object
 *
 * The first time it is run, this function will get the object 
 * and set it up using minisite_templates/module_sets.php
 *
 * Subsequent times it is run it will just return references to 
 * that single instance.
 *
 * @return object
 */
function &reason_get_module_sets()
{
    static $ms;
    if (empty($ms)) {
        $ms = new module_sets('This setup string should only be in the factory function');
        if (reason_file_exists('config/module_sets/setup.php')) {
            reason_include_once('config/module_sets/setup.php');
        }
    }
    return $ms;
}
コード例 #24
0
ファイル: setup.php プロジェクト: hunter2814/reason_package
<?php

/**
 * If REASON_ENABLE_ENTITY_SANITIZATION is defined, this file defines sanitization settings.
 *
 * The strings used can reference
 *
 * - a native or already included function name (ie. strip_tags or reason_sanitize_html)
 * - the empty string to disable sanitization for a field
 *
 * The keys in $GLOBALS['_reason_entity_sanitization'] are primarily the unique names of types, with two exceptions:
 *
 * - "default" is the sanitization function that will be run in nothing more explicit is defined for a field.
 * - "entity" provides defaults for the fields in the entity table - you could override then on a type by type basis.
 *
 * @todo after reason 4.5 remove "no_tidy" from admin interface and use these rules instead.
 * @todo create sanitization function which parses thor XML and sanitizes the individual fields with HTML purifier.
 * @todo create sanitization function which parses LDAP queries and sanitizes them as appropriate.
 *
 * @package reason
 * @subpackage config
 * @author Nathan White
 */
$GLOBALS['_reason_entity_sanitization'] = array('default' => 'reason_sanitize_html', 'entity' => array('id' => '', 'name' => 'reason_sanitize_html', 'type' => '', 'last_edited_by' => '', 'last_modified' => '', 'unique_name' => '', 'state' => '', 'creation_date' => '', 'no_share' => '', 'new' => '', 'created_by' => ''), 'minisite_page' => array('extra_head_content' => ''), 'form' => array('thor_content' => ''), 'audience_type' => array('audience_filter' => ''), 'group_type' => array('arbitrary_ldap_query' => '', 'ldap_group_filter' => '', 'ldap_group_member_fields' => ''));
if (reason_file_exists('config/entity_sanitization/setup_local.php')) {
    reason_include_once('config/entity_sanitization/setup_local.php');
    if (!empty($GLOBALS['_reason_entity_sanitization_local'])) {
        $GLOBALS['_reason_entity_sanitization'] = array_merge($GLOBALS['_reason_entity_sanitization'], $GLOBALS['_reason_entity_sanitization_local']);
    }
}
コード例 #25
0
/**
 * Get the singleton reason default access object
 *
 * @return object
 */
function reason_get_default_access()
{
    static $da;
    if (empty($da)) {
        $da = new reason_default_access('This setup string should only be in the factory function');
        if (reason_file_exists('config/default_access/setup.php')) {
            reason_include_once('config/default_access/setup.php');
        }
        if (reason_file_exists('config/default_access/setup_local.php')) {
            reason_include_once('config/default_access/setup_local.php');
        }
    }
    return $da;
}