Flexifilter, as of 1.1, provides for importing and exporting. When exporting a flexifilter, you can choose either a PHP version for use in modules, or serialized data for manual imports. To manually import flexifilters, such as those provided below, go to Administer -> Site Building -> Flexifilters, and click 'Import a flexifilter'. To use an export in your module, manually import the export as shown previously, and then export them in PHP format (or you can build them from scratch). Then see the Flexifilter API handbook page.
Please contribute your own flexifilters! If you have documentation status, please edit this page and add them in the format provided. If you don't have documentation status, create a book page with this node as the parent, and someone with documentation status will move them here for you.
Mediawiki Format
The Mediawiki format is a widely used format that is based on the Mediawiki software. It comes pre-installed with Flexifilter, however it is a good example of a flexifilter, and what Flexifilter's exports look like.
Flexifilter Cite
Flexifilter Cite is a sample module, serving as an example of how modules can utilize Flexifilter to distribute a filter. It allows for citations of other nodes to be added as components in flexifilters.
Link Formatting
Sometimes it's difficult to teach users how to use HTML, and instead, you can teach them a format like this: [link|title]. This export provides the flexifilter for this format.
Please note that the previous link is not importing correctly in flexifilter-6.x-1.2. Please import this instead:
a:9:{s:5:"label";s:15:"Link Formatting";s:11:"description";s:47:"You may format links in the format [link|title]";s:2:"id";s:1:"2";s:7:"enabled";b:1;s:8:"advanced";b:0;s:5:"delta";s:1:"0";s:5:"cache";s:1:"1";s:10:"components";a:3:{i:0;a:3:{s:5:"class";s:22:"flexifilter_chunk_grab";s:8:"settings";a:7:{s:6:"starts";s:1:"[";s:4:"ends";s:1:"]";s:11:"pass_limits";i:0;s:14:"case_sensitive";i:0;s:12:"include_rest";i:1;s:4:"step";s:7:"process";s:10:"components";a:3:{i:0;a:3:{s:5:"class";s:24:"flexifilter_text_prepend";s:8:"settings";a:2:{s:4:"text";s:9:"<a href="";s:4:"step";s:7:"process";}s:2:"id";s:2:"32";}i:1;a:3:{s:5:"class";s:24:"flexifilter_text_replace";s:8:"settings";a:3:{s:4:"find";s:1:"|";s:7:"replace";s:2:"">";s:4:"step";s:7:"process";}s:2:"id";s:2:"33";}i:2;a:3:{s:5:"class";s:23:"flexifilter_text_append";s:8:"settings";a:2:{s:4:"text";s:4:"</a>";s:4:"step";s:7:"process";}s:2:"id";s:2:"34";}}}s:2:"id";s:2:"31";}s:7:"id_next";i:35;s:9:"id_prefix";s:22:"flexifilter_component_";}s:3:"fid";s:3:"new";}
Back to Top
When text is really long and unwieldy, you need a back to top link. Because Flexifilter has if statements, and text appending, we can create such a filter with Flexifilter. See this tutorial and this export.
Swear Filter
If you have a community that allows anyone to post to the front page, you may consider using a swear filter. Here is the export for a starting point- you can add your own swears, using the example (not a real swear!) to guide your filter.
Comments
Link Formatting filter cannot be imported
error: It appears that the serialized flexifilter you entered was improperly formed. Please check the source.
Alternate Link Formatter
According to MediaWiki formatting rules for external links (http://www.mediawiki.org/wiki/Help:Links#External_links) the format [http://example.com An Example] should be supported (note the use of a space instead of a pipe |)
The export below supports that format and should be applied AFTER the built-in MediaWiki formatter.
Same problem here. I'm
Same problem here. I'm trying to do something more advanced, wanted to use the Link Formatting example as a starting point, but it says it's not valid to import.
No OL LI support
Hi,
I am not a coder. I installed Flexifilters with Drupal 6. I copied some MediaWiki text of mine over Drupal, with ordered list (
#
). This is not supported. It is possible to make it work without delving into the code?H5-H6
are not supported either. Same question: a way to fix it without coding?Thanks
OL LI support.
Please check this out, I think its something you needed.
http://drupal.org/node/212417#comment-3852986
MediaWiki Filter: unordered-ordered-list and indentation.
MediaWiki Format: Wikipedia like editing http://www.mediawiki.org/wiki/Help:Formatting
Original Work By: Valentin Guignon (valentin.guignon@cirad.fr)
Flexifilter Extension Conversion By: Vallabh Joshi (http://vallabhjoshi.com | vallabhjoshi@gmail.com)
This filter supports:
horizontal line ----
Please IMPORT code below in Flexifilter
Import failure
I've tried this a few times (just in case I hadn't grabbed the whole thing) but every time I try to paste this into an import window I get
It appears that the serialized flexifilter you entered was improperly formed. Please check the source.
Is there any chance you can re-post this or make it available as a download?
Running: Drupal 6.20, flexifilter-6.x-1.2 (on openSUSE Linux 11.3)
Alan
New filter (bugfix)
Hello,
starting from the previous filter I've improved a lot the list markup, other minor things, and even add the paragraph tag (<p>).
Now I still have to work on tables (that will be much longer...).
In any case remember that the corret mediawiki syntax is over here: http://www.mediawiki.org/wiki/Help:Formatting http://www.mediawiki.org/wiki/Help:Tables
For next improvement see here: Mediawiki Flexifilter filter
So, that's what you need to import:
Last table cell missing
Hi Risca
It's an old thread (and old sandbox code) but did you ever managed to fix the display of the last table cell (bottom/right one). It is missing in the table and output as a P tag inside the table or as an attribute name sometimes depending on the table data.
regards
wvdv