Changeset 12102
- Timestamp:
- 09/10/07 13:27:52 (1 year ago)
- Files:
-
- trunk/midcom/midcom.core/midcom/application.php (modified) (2 diffs)
- trunk/midcom/midcom.core/midcom/baseclasses/components/interface.php (modified) (8 diffs)
- trunk/midcom/midcom.core/midcom/core/group_virtual.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/core/handler/configdm.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/core/manifest.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/helper/_componentloader.php (modified) (3 diffs)
- trunk/midcom/midcom.core/midcom/services/auth.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/cron.php (modified) (3 diffs)
- trunk/midcom/midcom.core/midcom/services/dbclassloader.php (modified) (1 diff)
- trunk/midcom/midcom.core/midcom/services/permalinks.php (modified) (1 diff)
- trunk/midcom/net.nehmer.jobmarket/midcom/interfaces.php (modified) (1 diff)
- trunk/midcom/net.nemein.ping/config/config.inc (modified) (1 diff)
- trunk/midcom/net.nemein.ping/config/manifest.inc (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/config/schemadb_default_message.inc (modified) (1 diff)
- trunk/midcom/org.openpsa.directmarketing/style/compose-newsletter-message.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/midcom/application.php
r12094 r12102 623 623 * we still are in the code-init phase. 624 624 * 625 * Example code, executed on a sites Homepage, it will load the news tickerfrom625 * Example code, executed on a sites Homepage, it will load the news listing from 626 626 * the given URL and display it using a substyle of the node style that is assinged 627 627 * to the loaded one: … … 629 629 * <code> 630 630 * <?php 631 * $ newsticker = '/newsticker/latest/3.html';631 * $blog = '/blog/latest/3.html'; 632 632 * $substyle = 'homepage'; 633 * $_MIDCOM->dynamic_load("/midcom-substyle-{$substyle}/{$ newsticker}");633 * $_MIDCOM->dynamic_load("/midcom-substyle-{$substyle}/{$blog}"); 634 634 * ?> 635 635 * </code> trunk/midcom/midcom.core/midcom/baseclasses/components/interface.php
r11947 r12102 28 28 * things after calling the base class constructor: 29 29 * 30 * - Inherit the class as {$component}_interface (e.g. de_linkm_taviewer_interface).30 * - Inherit the class as {$component}_interface (e.g. net_nehmer_static_interface). 31 31 * - Prepare a component manifest for your component, see the class 32 32 * midcom_core_manifest for details. … … 51 51 * See the individual member documentation for now. 52 52 * 53 * - $_ais_class_suffix54 53 * - $_autoload_files 55 54 * - $_autoload_libraries … … 111 110 * 112 111 * <pre> 113 * 'name' => ' de.linkm.taviewer',112 * 'name' => 'net.nehmer.static', 114 113 * 'purecode' => false, 115 114 * 'version' => 1, … … 127 126 * 128 127 * <code> 129 * class de_linkm_taviewer_interface extends midcom_baseclasses_components_interface128 * class net_nehmer_static_interface extends midcom_baseclasses_components_interface 130 129 * { 131 * function de_linkm_taviewer_interface()130 * function net_nehmer_static_interface() 132 131 * { 133 132 * parent::midcom_baseclasses_components_interface(); 134 133 * 135 * $this->_component = ' de.linkm.taviewer';134 * $this->_component = 'net.nehmer.static'; 136 135 * $this->_autoload_files = Array('viewer.php', 'admin.php', 'navigation.php', 'my_special_mgd_schema_class.php'); 137 * $this->_autoload_libraries = Array('midcom.helper.datamanager ');136 * $this->_autoload_libraries = Array('midcom.helper.datamanager2'); 138 137 * } 139 138 * … … 205 204 206 205 /** 207 * The name of the component, e.g. de.linkm.taviewer206 * The name of the component, e.g. net.nehmer.static 208 207 * 209 208 * @var string … … 243 242 244 243 /** 245 * This is the class suffix used when constructing the AIS handler class.246 * It is appended to the component class prefix, f.x. resulting in247 * de_linkm_taviewer_admin (as a default).248 *249 * @var string250 */251 var $_ais_class_suffix = 'admin';252 253 /**254 244 * This is the class suffix used when constructing the NAP handler class. 255 245 * It is appended to the component class prefix, f.x. resulting in 256 * de_linkm_taviewer_navigation (as a default).246 * net_nehmer_static_navigation (as a default). 257 247 * 258 248 * @var string … … 263 253 * This is the class suffix used when constructing the on-site handler class. 264 254 * It is appended to the component class prefix, f.x. resulting in 265 * de_linkm_taviewer_viewer (as a default).255 * net_nehmer_static_viewer (as a default). 266 256 * 267 257 * @var string … … 585 575 $data =& $this->_context_data[$contextid]; 586 576 $loader =& $_MIDCOM->get_component_loader(); 587 $class = $loader->path_to_prefix($this->_component) . '_'; 588 $class .= ($data['adminmode'] ? $this->_ais_class_suffix : $this->_site_class_suffix); 577 $class = $loader->path_to_prefix($this->_component) . '_' . $this->_site_class_suffix; 589 578 $data['handler'] = new $class($current_object, $data['config']); 590 579 if (is_a($data['handler'], 'midcom_baseclasses_components_request')) trunk/midcom/midcom.core/midcom/core/group_virtual.php
r11742 r12102 17 17 * 18 18 * So, for example, the virtual group <i>approvers</i> of the component 19 * <i> de.linkm.taviewer</i> would be named <i>de.linkm.taviewer-approvers</i>.19 * <i>net.nehmer.static</i> would be named <i>net.nehmer.static-approvers</i>. 20 20 * 21 21 * This handle is used in all places to refer to a virtual group. trunk/midcom/midcom.core/midcom/core/handler/configdm.php
r12014 r12102 42 42 * 'handler' => Array ('midcom_core_handler_configdm', 'configdm'), 43 43 * 'fixed_args' => Array('config'), 44 * 'schemadb' => 'file:/ de/linkm/taviewer/config/schemadb_config.inc',44 * 'schemadb' => 'file:/net/nehmer/static/config/schemadb_config.inc', 45 45 * 'schema' => 'config', 46 46 * ); trunk/midcom/midcom.core/midcom/core/manifest.php
r11359 r12102 25 25 * 26 26 * <code> 27 * 'name' => ' de.linkm.taviewer',27 * 'name' => 'net.nehmer.static', 28 28 * 'purecode' => false, 29 29 * 'version' => 15, trunk/midcom/midcom.core/midcom/helper/_componentloader.php
r11931 r12102 538 538 539 539 /** 540 * Helper, converting a component path ( de.linkm.newsticker)541 * to a snippetpath (/ de/linkm/newsticker).540 * Helper, converting a component path (net.nehmer.blog) 541 * to a snippetpath (/net/nehmer/blog). 542 542 * 543 543 * @param string $path Input string. … … 550 550 551 551 /** 552 * Helper, converting a snippetpath (/ de/linkm/newsticker)553 * to a class prefix ( de_linkm_newsticker).552 * Helper, converting a snippetpath (/net/nehmer/blog) 553 * to a class prefix (net_nehmer_blog). 554 554 * 555 555 * @param string $snippetpath Input string. … … 562 562 563 563 /** 564 * Helper, converting a component path ( de.linkm.newsticker)565 * to a class prefix ( de_linkm_newsticker).564 * Helper, converting a component path (net.nehmer.blog) 565 * to a class prefix (net_nehmer_blog). 566 566 * 567 567 * @param string $path Input string. trunk/midcom/midcom.core/midcom/services/auth.php
r12029 r12102 32 32 * syntax to be $component:$name, where $component is either the name of the component 33 33 * or one of 'midgard' or 'midcom' for core privileges. Valid privilege names are for 34 * example ' de.linkm.taviewer:do_something' or 'midgard:update'.34 * example 'net.nehmer.static:do_something' or 'midgard:update'. 35 35 * 36 36 * The assignee is the entity to which the privilege applies, this can be one of several trunk/midcom/midcom.core/midcom/services/cron.php
r11359 r12102 37 37 * Array 38 38 * ( 39 * 'handler' => ' de_linkm_taviewer_crontest',39 * 'handler' => 'net_nehmer_static_cron_test', 40 40 * 'handler_config' => Array ('test', 'configuration', 'entries'), 41 41 * 'recurrence' => MIDCOM_CRON_MINUTE, … … 49 49 * <code> 50 50 * <?php 51 * class de_linkm_taviewer_crontest extends midcom_baseclasses_components_cron_handler51 * class net_nehmer_static_cron_test extends midcom_baseclasses_components_cron_handler 52 52 * { 53 53 * function _on_initialize() … … 68 68 * The component does not need to load the class automatically, instead, it can resort on the 69 69 * auto-loading feature of the service. It will look for the handler in a file named after it, 70 * by replacing the underscores with slashes: The above handler de_linkm_taviewer_crontest71 * would be searched in de/linkm/taviewer/crontest.php, relative to MIDCOM_ROOT.70 * by replacing the underscores with slashes: The above handler net_nehmer_static_cron_test 71 * would be searched in net/nehmer/static/cron/test.php, relative to MIDCOM_ROOT. 72 72 * 73 73 * <b>Cron Job implementation suggestions</b> trunk/midcom/midcom.core/midcom/services/dbclassloader.php
r11925 r12102 241 241 * arguments, the first specifying the place to look for the latter. 242 242 * 243 * For example, if you call load_classes(' de.linkm.taviewer', 'my_classes.inc'), it will244 * look in the directory MIDCOM_ROOT/ de/linkm/taviewer/config/my_classes.inc. The magic243 * For example, if you call load_classes('net.nehmer.static', 'my_classes.inc'), it will 244 * look in the directory MIDCOM_ROOT/net/nehmer/static/config/my_classes.inc. The magic 245 245 * component 'midcom' goes for the MIDCOM_ROOT/midcom/config directory and is reserved 246 246 * for MidCOM core classes and compatibility classes. trunk/midcom/midcom.core/midcom/services/permalinks.php
r4858 r12102 125 125 { 126 126 // Verify that this topic is within the current sites tree, if it is not, 127 // we ignore it. This might happen on symlink topics with taviewer& co127 // we ignore it. This might happen on symlink topics with static & co 128 128 // which point to the outside f.x. 129 129 if ($nav->is_node_in_tree($parent->id, $nav->get_root_node())) trunk/midcom/net.nehmer.jobmarket/midcom/interfaces.php
r12014 r12102 17 17 * 18 18 * This component is not designed to serve as your companies personal job ticker. Usually 19 * you will fare better with a simple newsticker or taviewerthere. Use this component only19 * you will fare better with a simple blog or static there. Use this component only 20 20 * if you want to have a large number of jobs to manage. 21 21 * trunk/midcom/net.nemein.ping/config/config.inc
r4300 r12102 2 2 'components_to_ping' => array 3 3 ( 4 'de.linkm.newsticker',5 4 'net.nemein.wiki', 6 ' net.siriux.photos',5 'org.routamc.photostream', 7 6 'net.nehmer.blog', 8 7 ), trunk/midcom/net.nemein.ping/config/manifest.inc
r5837 r12102 26 26 array ( 27 27 'summary' => 'Weblog pinger service', 28 'description' => 'Tool that pings weblogs.com and other services when de.linkm.newstickerpostings have been updated',28 'description' => 'Tool that pings weblogs.com and other services when net.nehmer.blog postings have been updated', 29 29 'maintainers' => 30 30 array ( trunk/midcom/org.openpsa.directmarketing/config/schemadb_default_message.inc
r5413 r12102 121 121 ), 122 122 ), 123 /* TODO: hide newsletter if midcom_helper_find_node_by_component( de.linkm.newsticker) returns no results */123 /* TODO: hide newsletter if midcom_helper_find_node_by_component(net.nehmer.blog) returns no results */ 124 124 'htmlnewsletter' => array ( 125 125 'description' => 'HTML newsletter email', trunk/midcom/org.openpsa.directmarketing/style/compose-newsletter-message.php
r5048 r12102 3 3 echo $data['message_array']['content']; 4 4 5 $ newsticker_node = midcom_helper_find_node_by_component('de.linkm.newsticker');6 if ($ newsticker_node)5 $blog_node = midcom_helper_find_node_by_component('net.nehmer.blog'); 6 if ($blog_node) 7 7 { 8 /* 9 echo "newsticker_node:<pre>\n"; 10 print_r($newsticker_node); 11 echo "</pre>\n"; 12 */ 13 //echo "{$newsticker_node[MIDCOM_NAV_RELATIVEURL]}latest/{$data['message_array']['newsitems']}"; 14 $_MIDCOM->dynamic_load("{$newsticker_node[MIDCOM_NAV_RELATIVEURL]}latest/{$data['message_array']['newsitems']}"); 8 $_MIDCOM->dynamic_load("{$blog_node[MIDCOM_NAV_RELATIVEURL]}latest/{$data['message_array']['newsitems']}"); 15 9 } 16 10 ?>
