RadiantCasts have moved

Posted by cristi on August 26, 2010

I see that a lot of you still end up here searching for RadiantCasts. Don’t worry, we didn’t stop making them, we just moved them to Radiant CMS blog. Or you can watch them over at our channel on blip.tv.

Radiant CMS I18n for site content with the Globalize2 extension

Posted by cristi on October 16, 2009

The Globalize2 extension for Radiant CMS allows you to easily translate the content of your site into any number of languages.

It uses the Globalize2 Rails plugin based on the I18N API available in Rails since version 2.2

Features:

  • Provides the ability to translate your pages (title, slug, breadcrumb, description, keywords) using the Radiant admin interface.
  • Provides the ability to translate your snippets and layouts using the Radiant admin interface.
  • Radius tags for accessing the locales and translations.
  • Possibility to completely delete the translation for a page.

Check out the source code on github.

For installation and configuration details visit the Radiant Globalize2 Extension documentation page.

To translate your Paperclipped assets, you can use Radiant Globalize2 Paperclipped Extension:

Features:

  • Provides the ability to translate Paperclipped assets (title and caption) using the Radiant admin interface.
  • Altered Paperclipped Radius Tags which take into account the locale

Check out the source code on github.

For installation and configuration details visit the Radiant Globalize2 Paperclipped Extension documentation page.

Our extensions are ready for Radiant CMS 0.9

Posted by cristi on October 15, 2009

The new Blade interface from Radiant is awesome, but you need to modify a little your extensions. We did that and here’s what we got:

Radiant Custom Fields extension (github repository):

An extension that allows you to add custom fields to pages.

radiant-custom-fields-extension

Radiant Database Mailer extension (github repository):

An extension that adds database persistence to emailed forms. It works on top of the Radiant Mailer extension and the fields recorded to the database are user defined.

radiant-database-mailer-extension-index

radiant-database-mailer-extension-show

Radiant Member Extension (github repository):

An extension that adds members support to Radiant CMS. Using this extension you can restrict access to pages on your public site to be accessible only to members that have an account. It is based on Restful Authentication System, so the member model has almost the same attributes. The members can be added or edited only from Radiant Admin.

radiant-member-extension-index

radiant-member-extension-edit

Radiant Paginate extension (github repository):

An extension that provides pagination support using Will Paginate.

Radiant Sitemap XML extension (github repository):

This extension automatically creates a XML sitemap for your site.

Radiant Stereotype extension (github repository):

An extension that adds templating support.

Radiant Super Export extension (github repository):

An extension that provides portability to your project by allowing you to export and import the records in the database and making it easy to manage them with a source control tool like Git or Subversion.

Radiant Tiny Paper extension (github repository):

An extension that adds Paperclipped based Tiny MCE support to Radiant CMS. Provides a Rich Text Editor filter and allows you to edit the content using the TinyMCE editor. It also provides an Image and File browser to help you manage the Paperclipped assets.

radiant-tiny-paper-extension-image-browser

radiant-tiny-paper-extension-file-browser

Radiant Sitemap XML Extension

Posted by cristi on August 30, 2009

Announcing the Radiant Sitemap XML Extension.

Features

  • Allows you to specify in Radiant admin which pages appear in the sitemap;
  • Gives you the possibility to set the change_frequency and priority per page.

Check out the source code on github.

For installation and configuration details visit the Radiant Sitemap XML Extension documentation page.

Radiant Mailer Extension client-side validation 1

Posted by cristi on August 30, 2009

Forms validation on the client-side is very important as it saves time and bandwidth, and gives you the option to point out to the user what they’ve done wrong in filling out the form. Having said that let me present you the way we do client-side validation of the email forms created using Radiant Mailer Extension.

First, of course you will need to set up a new Radiant project and install the Radiant Mailer Extension. You can checkout the repository I made for this post on github.

We’re using Andrew Tetlaw’s validation.js. You can download it here.

Now, that you have the project ready, let’s create a Contact page in Radiant. This is a Mailer page so you need to create a mailer page part with the following content:

  
    subject: From the website of Whatever
    from: noreply@example.com
    redirect_to: /contact/thank-you
    recipients:
      - one@one.com
      - two@two.com
  

Create the email form:

  
    <div id="flash" style="display:none;"></div>
    <r:mailer:form id="mailer-form">
      <label for="name">Name:</label><br/>
      <r:mailer:text name="name" /><br/>

      <label for="email">Email:</label><br/>
      <r:mailer:text name="email" /><br/>

      <label for="message">Message:</label><br/>
      <r:mailer:textarea name="message" /> <br/>

      <input type="submit" value="Send" />
    </r:mailer:form>
  

Great, we have the email form ready and the Radiant Mailer configured to use. Let’s start adding the Javascript. In your layout, link to the prototype.js and validation.js.

  
    <script type="text/javascript" src="/javascripts/prototype.js"></script>
    <script type="text/javascript" src="/javascripts/validation.js"></script>
  

In order the activate validation on the form you need a little Javascript snippet the will pass the form’s id attribute and will show the flash. You can put it in the layout also:

  <script type="text/javascript">
    function FormValidationCallback(passed_validation, form) {
       if (!passed_validation) {
         $('flash').update('<div class="error">The form contains errors!</div>');
         $('flash').show();
       } else {
         $('flash').hide();
       }
      }
      document.observe("dom:loaded", function () {
        new Validation($('mailer-form'), {onFormValidate: FormValidationCallback});
      });
  </script>

To activate validation on certain fields you just need to ad the proper class. Here’s the list of classes available to add to your field elements:

  • required (not blank)
  • validate-number (a valid number)
  • validate-digits (digits only)
  • validate-alpha (letters only)
  • validate-alphanum (only letters and numbers)
  • validate-date (a valid date value)
  • validate-email (a valid email address)
  • validate-url (a valid URL)
  • validate-date-au (a date formatted as; dd/mm/yyyy)
  • validate-currency-dollar (a valid dollar value)
  • validate-selection (first option e.g. ‘Select one…’ is not selected option)
  • validate-one-required (At least one textbox/radio element must be selected in a group)
  
    <r:mailer:text name="name" class="required" />
  

The validation library uses CSS classes to indicate validation status. Let’s style them a little:

  
    div.error {
      background:#CC0000 url(/images/site/exclamation.png) no-repeat 10px 5px;
      padding:5px 10px 5px 30px;
      color:#FFF;
      font-weight:bold;
      border:2px solid #CCCC99;
      margin:10px 0 5px 10px;
    }
    .validation-advice {
      background:#FFF url(/images/site/exclamation_advice.png) no-repeat left 5px;
      color:#9E2522;
      font-size:85%;
      padding:8px 0 5px 22px;
    }
  

You have here a screenshot of the validated form:

radiant-mailer-client-side-validation

This about covers it. You can find out more about the options validate.js library gives you on Andrew Tetlaw’s blog. And you can see a working example of this technique on our company’s contact form.

Radiant Database Mailer Extension saves attachments using paperclip

Posted by cristi on August 12, 2009

Radiant Database Mailer Extension is used to add database persistency to emailed forms, and it just got fresh features.

Besides the possibility to save posted form fields and entire email messages to the database and export data to CSV and XLS, now it saves e-mail attachments using paperclip. Any attachments that the email might have will be saved on the file system. They can be downloaded from the details page of every record.

Also, the extension got thoroughly tested using Cucumber and webrat/email_spec.

Check out the source code on github.

For installation and configuration details visit the Radiant Database Mailer Extension documentation page.

Internet Explorer problem using minified CSS with Radiant SNS Minifier Extension 2

Posted by cristi on July 03, 2009

The Radiant SNS Extension is of great help at separating stylesheets and javascripts from other site content stored in pages. And if you use it with Radiant SNS Minifier Extension it adds the ability to minify CSS and JS files. This way you can keep the code the way you like it in the editor, but serve up minified files.

But there is a little problem with the minified versions of the CSS files on IE browsers (of course):

This CSS statement:

1
2
3
  #test { 
    border: 1px solid #000000;
    }

Is minified like this:

1
  #test{border:1px solid#000;}

Which for some reason is misinterpreted by IE browsers, which don’t apply the correct styles.

The simple solution is to break down the border statement like this:

1
2
3
4
5
  #test {
    border-width: 1px;
    border-style: solid;
    border-color: #000000;
  }

This problem might appear also on some other CSS statements, I didn’t checked, but if something doesn’t look right on IE this might be the problem (among a lot others).

Radiant Paginate Extension

Posted by cristi on June 12, 2009

Radiant Paginate Extension update:

Features

  • Specify number children per page
  • Ordering by a specific page attribute and order direction
  • Conditionally render content for first page
  • Render pagination links customizable from the Radius tag (specify next/prev label, DOM class, inner and outer window etc.)

Check out the source code on github.

For installation and configuration details visit the Radiant Paginate Extension documentation page.

Radiant Super Export Extension

Posted by cristi on May 22, 2009

Radiant Super Export Extension update:

Features

  • All records are exported to individual YAML files;
  • A directory is created for each model in the default import/export path which is db/export;
  • The individual YAML files are saved with the record ID as their filename.

Check out the source code on github.

For installation and configuration details visit the Radiant Super Export Extension documentation page.

Radiant Member Extension gets some new features

Posted by cristi on April 13, 2009

Radiant Member Extension, used for restricting site content to registered members, got some new features. Also, the configuring got a little easier.

So, what’s new? One small but important feature is the possbility of deleting members.

The next feature is the improved control you have over members with activate/deactivate actions. When you deactivate a member, his password will be copied in a new field making him unable to access his acount. Activating him will copy back his old password.

If before you needed to modify the environment.rb or initializers/member.rb files in order to get the extension up and running, now all this settings are kept in Radiant::Config. You only need to and key/value pairs to this table to get the extension running.

Radiant’s caching prevents us from using Rails’ flash to notify the user of failed login attempts. To work around this, Member Extension uses cookies to store flash messages and Javascript to display them in the view. Now the flash messages can be easily customized from Radiant::Config.

Check out the source code on github.

For installation and configuration details visit the Radiant Member Extension documentation page.