Index: INSTALL.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/INSTALL.txt,v retrieving revision 1.1 diff -u -r1.1 INSTALL.txt --- INSTALL.txt 9 Jan 2008 01:19:04 -0000 1.1 +++ INSTALL.txt 24 Feb 2008 18:19:29 -0000 @@ -5,8 +5,10 @@ 1) Place this directory in your modules directory. -2) Enable the module at admin/build/modules. +2) Create the tables manually based on the schema definition found in the flexifilter.install file (which now does nothing). -3) Configure, edit, add, enable, disable, or delete flexifilters at admin/build/flexifilters. +3) Enable the module at admin/build/modules. -4) Add your custom filters to input formats at admin/settings/filters. \ No newline at end of file +4) Configure, edit, add, enable, disable, or delete flexifilters at admin/build/flexifilters. + +5) Add your custom filters to input formats at admin/settings/filters. \ No newline at end of file Index: flexifilter.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.info,v retrieving revision 1.2 diff -u -r1.2 flexifilter.info --- flexifilter.info 22 Jan 2008 00:48:28 -0000 1.2 +++ flexifilter.info 24 Feb 2008 18:06:13 -0000 @@ -1,5 +1,4 @@ ; $Id: flexifilter.info,v 1.2 2008/01/22 00:48:28 cwgordon7 Exp $ name = Flexifilter description = Allows creatation of flexible input filters without writing any code. -package = Flexifilter -core = 6.x \ No newline at end of file +package = Flexifilter \ No newline at end of file Index: flexifilter.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.install,v retrieving revision 1.5 diff -u -r1.5 flexifilter.install --- flexifilter.install 22 Jan 2008 00:48:28 -0000 1.5 +++ flexifilter.install 24 Feb 2008 18:07:21 -0000 @@ -5,19 +5,20 @@ * Implementation of hook_install(). */ function flexifilter_install() { - drupal_install_schema('flexifilter'); - include_once (drupal_get_path('module', 'flexifilter') .'/flexifilter.module'); + // drupal_install_schema('flexifilter'); + // include_once (drupal_get_path('module', 'flexifilter') .'/flexifilter.module'); } /** * Implementation of hook_uninstall(). */ function flexifilter_uninstall() { - drupal_uninstall_schema('flexifilter'); + // drupal_uninstall_schema('flexifilter'); } /** * Implementation of hook_schema(). + * The schema definition is left here to assist you in creating the table manually, because I'm so not writing the SQL for this useless port. */ function flexifilter_schema() { $schema['flexifilters'] = array( Index: flexifilter.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/flexifilter/flexifilter.module,v retrieving revision 1.14 diff -u -r1.14 flexifilter.module --- flexifilter.module 23 Jan 2008 22:43:16 -0000 1.14 +++ flexifilter.module 24 Feb 2008 18:18:45 -0000 @@ -14,92 +14,94 @@ /** * Implementation of hook_menu() */ -function flexifilter_menu() { +function flexifilter_menu($may_cache) { $items = array(); - $items['admin/build/flexifilters'] = array( - 'title' => t('Flexifilters'), - 'description' => t('Create new flexible input filters without writing any code.'), - 'page callback' => 'drupal_get_form', - 'access arguments' => array('administer flexifilter'), - 'page arguments' => array('flexifilter_filter_list_form'), - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/list'] = array( - 'title' => t('List'), - 'type' => MENU_DEFAULT_LOCAL_TASK, - ); - $items['admin/build/flexifilters/add'] = array( - 'title' => t('Add new flexifilter'), - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_edit_form'), - 'type' => MENU_LOCAL_TASK, - 'weight' => 1, - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/import'] = array( - 'title' => t('Import a flexifilter'), - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_input_form'), - 'type' => MENU_LOCAL_TASK, - 'weight' => 2, - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/defaults'] = array( - 'title' => t('Load a default flexifilter'), - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_default_form'), - 'type' => MENU_LOCAL_TASK, - 'weight' => 3, - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/%flexifilter'] = array( - 'title callback' => 'flexifilter_get_field', - 'title arguments' => array(3, 'label'), - 'type' => MENU_CALLBACK, - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_edit_form', 3), - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/%flexifilter/edit'] = array( - 'type' => MENU_DEFAULT_LOCAL_TASK, - 'title' => t('Edit'), - ); - $items['admin/build/flexifilters/%flexifilter/export'] = array( - 'title' => t('Export'), - 'type' => MENU_LOCAL_TASK, - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_export_form', 3), - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/%flexifilter/delete'] = array( - 'title' => t('Delete'), - 'type' => MENU_CALLBACK, - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_delete_form', 3), - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/%flexifilter/enable'] = array( - 'title' => t('Enable'), - 'type' => MENU_CALLBACK, - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_enable_form', 3), - 'file' => 'flexifilter.admin.inc', - ); - $items['admin/build/flexifilters/%flexifilter/disable'] = array( - 'title' => t('Disable'), - 'type' => MENU_CALLBACK, - 'page callback' => 'drupal_get_form', - 'page arguments' => array('flexifilter_filter_disable_form', 3), - 'file' => 'flexifilter.admin.inc', - ); + if (!$may_cache) { + $items[] = array( + 'title' => t('Flexifilters'), + 'path' => 'admin/build/flexifilters', + 'description' => t('Create new flexible input filters without writing any code.'), + 'callback' => 'drupal_get_form', + 'access' => user_access('administer flexifilter'), + 'callback arguments' => array('flexifilter_filter_list_form'), + ); + $items[] = array( + 'title' => t('List'), + 'path' => 'admin/build/flexifilters/list', + 'type' => MENU_DEFAULT_LOCAL_TASK, + ); + $items['admin/build/flexifilters/add'] = array( + 'title' => t('Add new flexifilter'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_edit_form'), + 'type' => MENU_LOCAL_TASK, + 'weight' => 1, + ); + $items['admin/build/flexifilters/import'] = array( + 'title' => t('Import a flexifilter'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_input_form'), + 'type' => MENU_LOCAL_TASK, + 'weight' => 2, + ); + $items['admin/build/flexifilters/defaults'] = array( + 'title' => t('Load a default flexifilter'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_default_form'), + 'type' => MENU_LOCAL_TASK, + 'weight' => 3, + ); + } + else { + if (arg(0) == 'admin' && arg(1) == 'build' && arg(2) == 'flexifilters') { + require_once(drupal_get_path('module', 'flexifilter') .'/flexifilter.admin.inc'); + } + if (arg(0) == 'admin' && arg(1) == 'build' && arg(2) == 'flexifilters' && is_numeric(arg(3))) { + $items['admin/build/flexifilters/'. arg(3)] = array( + 'title' => flexifilter_get_field(flexifilter_load(arg(3)), 'label'), + 'type' => MENU_CALLBACK, + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_edit_form', 3), + ); + $items['admin/build/flexifilters/'. arg(3) .'/edit'] = array( + 'type' => MENU_DEFAULT_LOCAL_TASK, + 'title' => t('Edit'), + ); + $items['admin/build/flexifilters/'. arg(3) .'/export'] = array( + 'title' => t('Export'), + 'type' => MENU_LOCAL_TASK, + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_export_form', flexifilter_load(arg(3))), + ); + $items['admin/build/flexifilters/'. arg(3) .'/delete'] = array( + 'title' => t('Delete'), + 'type' => MENU_CALLBACK, + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_delete_form', flexifilter_load(arg(3))), + 'file' => 'flexifilter.admin.inc', + ); + $items['admin/build/flexifilters/%flexifilter/enable'] = array( + 'title' => t('Enable'), + 'type' => MENU_CALLBACK, + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_enable_form', flexifilter_load(arg(3))), + ); + $items['admin/build/flexifilters/%flexifilter/disable'] = array( + 'title' => t('Disable'), + 'type' => MENU_CALLBACK, + 'callback' => 'drupal_get_form', + 'callback arguments' => array('flexifilter_filter_disable_form', flexifilter_load(arg(3))), + ); + } + } return $items; } /** * Implementation of hook_help() */ -function flexifilter_help($path, $arg) { - switch ($path) { +function flexifilter_help($section) { + switch ($section) { case 'admin/help#flexifilter': $output = '

'. t('Flexifilters are flexible filters that can be used by Input Formats to filter created content.', array('@input_formats' => url('admin/settings/filters'))) .'

'; //$output .= '

'. t('For more information, see the online handbook entry for Flexifilter module.', array('@flexifilter' => 'http://drupal.org/handbook/modules/flexifilter/')) .'

';