Changeset 887
- Timestamp:
- 09/03/08 16:01:01 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
plugins/plugin_directory/trunk/plugin_directory.plugin.php
r886 r887 75 75 // put together our rule 76 76 $rule['name'] = 'display_plugin'; 77 $rule['parse_regex'] = '%^ packages/browse(?:page/(?P<page>[2-9]|[1-9][0-9]+))?/?$%';78 $rule['build_str'] = ' packages/browse';77 $rule['parse_regex'] = '%^explore/plugins/(?P<slug>.+)/?$%'; 78 $rule['build_str'] = 'explore/plugins/{$slug}'; 79 79 $rule['handler'] = 'UserThemeHandler'; 80 $rule['action'] = 'display_p ackages';80 $rule['action'] = 'display_plugin'; 81 81 $rule['priority'] = 3; 82 82 $rule['description'] = 'Plugin Repo Server Browser'; … … 84 84 // add our rule to the stack 85 85 $rules[] = $rule; 86 87 // put together our rule 88 $rule['name'] = 'display_plugins'; 89 $rule['parse_regex'] = '%^explore/plugins/?$%'; 90 $rule['build_str'] = 'explore/plugins/'; 91 $rule['handler'] = 'UserThemeHandler'; 92 $rule['action'] = 'display_plugins'; 93 $rule['priority'] = 3; 94 $rule['description'] = 'Plugin Repo Server Browser'; 95 96 // add our rule to the stack 97 $rules[] = $rule; 86 98 87 99 // and pass it along … … 90 102 } 91 103 92 public function filter_theme_act_display_packages( $handled, $theme ) 104 /** 105 * @ todo make uoe own template for these 106 */ 107 public function filter_theme_act_display_plugins( $handled, $theme ) 93 108 { 94 109 $theme->posts = Posts::get( array( 'content_type' => 'plugin', 'limit' => 20 ) ); 95 $theme->display( 'packages' ); 110 $theme->display( 'home' ); 111 return true; 112 } 113 114 public function filter_theme_act_display_plugin( $handled, $theme ) 115 { 116 $theme->post = Post::get( array( 'content_type' => 'plugin' ) ); 117 $theme->display( 'entry.single' ); 96 118 return true; 97 119 }
