Jun 17

ExpressionEngine: Scrippets for FieldFrame, too

Categories:
ExpressionEngineFilm
Tags:
expressionengine, extension, fieldframe, scrippet, script
Published:
1:44pm on Wednesday 17th June, 2009

Following yesterday’s work to convert the Scrippets plugin for ExpressionEngine, it was simple to turn it into a new field type for Brandon Kelly’s excellent FieldFrame extension.

If you’ve not used FieldFrame before, you are missing out on some serious EE goodness. It extends the default set of field types, including many straightforward fields—checkboxes, radio buttons, etc.—plus many, many more contributed by other developers.

And now there’s one more

The Scrippet field type works in exactly the same way as the standalone plugin, except that you enter your plaintext script content in its own separate field in the Control Panel.

Then you simply refer to your field (by whatever name you have given it in Custom Fields) in your template, and the formatting is automatically applied:

{exp:weblog:entries weblog=“blog”}
  <h2>{title}</h2>
  {script_extract}
{/exp:weblog:entries}

The parameters are the same as for the {exp:scrippet} plugin (see my previous entry for details), and you also need to either link to or include the CSS from scrippets.css as well.

It works as part of the FF Matrix fieldtype as well, so you can post tables of script snippets to your heart’s content. Grab the files from GitHub as per normal.

What is GitHub? GitHub is a web application that uses the version control software Git to allow its members to manage their code online. I am hosting the files for this article there so that any bugfixes or improvements I make can be found in one central location.

I'd love to hear what you think - please use the form below to leave your comments. Anything I consider too offensive, off-topic, or spammy will be deleted at my discretion. Some HTML is permitted, or you can use Textile.

Commenting is not available in this weblog entry.
  1. Stancje's Gravatar

    Stancje at 7:51am on 18th June, 2009 #

    So it shouldn’t cause problems like some plugins? Am I getting it right? Because I often have trouble while using too many plugins.

  2. Matthew Pennell's Gravatar

    Matthew Pennell at 10:59am on 18th June, 2009 #

    No, it shouldn’t cause you any problems at all, either as a plugin or as a FieldFrame field type. Functionally it’s pretty basic, so you should have no problems using it alongside other plugins.

  3. Noclegi Gory Stolowe's Gravatar

    Noclegi Gory Stolowe at 12:33pm on 20th July, 2009 #

    It still will slow the site down though, right? I mean not significantly but usualy the more plugins the slower the site works.