Features integration

dixon_ - October 28, 2009 - 01:30
Project:Better Formats
Version:6.x-1.1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

There is some movements to make module's settings exportable to support things like the Features module and migration and deployments better.

It would be really great if the Better Formats module could take care of exporting input formats and its settings and do the Features integration. This way one could package input formats into Features in a very powerful way.

I'll look into providing a patch for this.

#1

catch - November 5, 2009 - 07:19

I'm also interested in this, most standard way would be to use ctools exportables. I'm unlikely to have time to write a patch, but would definitely review / test one to get it rtbc.

#2

nedjo - November 11, 2009 - 00:56

Input formats are already included in features via the features.filter.inc file, though it doesn't yet include a hook_features_export_options() implementation so filters don't appear as a component that can be added to features.

Add this to get filter formats at least showing up:

<?php
/**
* Implementation of hook_features_export_options().
*/
function filter_features_export_options() {
 
$options = array();
 
$formats = _filter_get_formats();
  foreach (
$formats as $format) {
   
$name = check_plain($format['name']);
   
$options[$name] = $name;
  }
 
ksort($options);
  return
$options;
}
?>

Of course, the additional data from better formats isn't included.

#3

catch - November 20, 2009 - 14:17
Title:Make setups exportable and support the Features module» Features integration
Status:active» needs review

Here's a very rough patch. Doesn't yet attempt to integrate with features' own input format integration. Also relies on hard coded user roles etc. and reverting isn't working yet with latest features beta. Hopefully gets things off to a start though.

AttachmentSize
616496-better_formats-features.patch 3.36 KB

#4

dragonwize - November 21, 2009 - 00:45

Good work catch. I will review this and hopefully be able to help out soon.

#5

catch - November 25, 2009 - 07:59

Reverting now works. So within itself, this is somewhat there, the real problems are how to deal with numeric / arbitrary user roles and format ids. I'm using this for upgrading a site from Drupal 5 to Drupal 6 (which it's perfect for) rather than trying to build features to deploy on multiple different sites so this is likely as far as I'll take it at this point. However I'll continue to try to keep an eye out on this issue, and I also need wysiwyg module support for exactly the same reason.

AttachmentSize
616496-better_formats-features.patch 3.36 KB
 
 

Drupal is a registered trademark of Dries Buytaert.