FCKEditor for the Radiant CMS

In my experience customizing and deploying CMSs for clients, 99% of folks want a WYSIWYG editor, for good or ill. Usually good.

I’ve customized the FCKEditor for various projects, and I like:
  • the way it uses “connectors” to allow for the integration of the WYSIWYG with in-site assets / resources and file uploads,
  • that it generates clean HTML for the flexibility the WYSIWYG provides,
  • and it’s good at not molesting any custom HTML you throw in.

So I’ve made a Radiant FCKEditor extension and put it on github.

See the readme for install instructions, requirements and other crap.

click for embiggening

Features

  • In-WYSIWYG file uploads and image placement,
  • Spellchecking – provided aspell is installed,
  • Radius-tag awareness – I did my best to tell FCKEditor to leave radius tags alone, even customizing the tags it should ignore at the PageType level,
  • Works everywhere FCKEditor does,
  • Implemented as a “filter”, allowing you to manage arbitrary numbers of page parts with it,
  • You can dynamically add / remove it from page parts as you see fit.

The Future

  • Create an admin tab to allow for editor toolbar customization,
  • Integrate the link browser to allow for dirt-simple in-site linking,
  • Offer optional integration with the page_attachments plugin for more logical file organization.

Get involved

Really! Drop me a line – dan @ endpoint dot com to discuss your ideas or make a fork, push your changes and send me a pull request. All reasonable offers accepted!

"Flexmenu" style menus in the Radiant CMS

I have no idea if there’s a term to describe this kind of navigation, but I’ll use “flexmenu” as it’s what the excellent WebGUI CMS calls them, implemented via nested ul / li tags.

I like this method of site navigation as it gives a user the ability to see the entirety of the site along with the ability to zoom in / out easily and bounce between sub-sections.

As you drill down into the page hierarchy, the siblings of each page stay open. I’ll try to illustrate:

At the root, where “1” is the root.

1.1
1.2 <-- User clicks this
1.3
1.4

Next:

1.1
1.2
  1.2.1
  1.2.2
  1.2.3 <-- User clicks this
  1.2.4
  1.2.5
1.3
1.4

That opens up.

1.1
1.2
  1.2.1
  1.2.2
  1.2.3
    1.2.3.1 <-- leaf node
    1.2.3.2 <-- leaf node
    1.2.3.3 <-- leaf node
  1.2.4
  1.2.5
1.3
1.4

User clicks a completely separate part of the tree, and the 1.2 branch closes.

1.1
1.2
1.3 <-- User clicks here
  1.3.1
  1.3.2
  1.3.3
1.4

This is implemented via two snippets- a container and a recursive snippet for each node:

Container Snippet

 <r:if_parent>
 <div id="left-column-nav">
 <r:find url="/">
   <ul>
     <r:snippet name="menu-line" />
   </ul>
 </r:find>
 </div>
 </r:if_parent>

Recursive Snippet, named “menu-line”

 <r:children:each>
   <li<r:if_self> class="active"</r:if_self>><r:link />
       <r:if_ancestor_or_self>
         <r:if_children>
           <ul>
             <r:snippet name="menu-line" />
           </ul>
         </r:if_children>
       </r:if_ancestor_or_self>
   </li>  
 </r:children:each>

To use an example from a real site, when at the page ”/about/people/”, this navigation menu will yield HTML similar to:

<div id="left-column-nav">
  <ul>
    <li><a href="/about/">About</a>
      <ul>
        <li><a href="/about/goals/">Goals</a></li>  
        <li><a href="/about/history/">History</a></li>  
        <li><a href="/about/mission/">Mission</a></li>  
        <li class="active"><a href="/about/people/">People</a>
          <ul>
            <li><a href="/about/people/executive-committee-members/">Executive Committee Members</a></li>  
            <li><a href="/about/people/other-committees/">Other Committees</a></li>  
          </ul>
        </li>  
      </ul>
    </li>  
    <li><a href="/news/">News</a></li>  
    <li><a href="/programs/">Programs</a></li>  
    <li><a href="/publications/">Publications</a></li>  
    <li><a href="/resources/">Resources</a></li>  
    <li><a href="/morville-house/">Morville House</a></li>  
  </ul>
</div>

Nicely nested and easily styled via CSS.

Easy Cheese Crackers

No. Not with that processed “cheese food” crap. “Easy” as in “not difficult”.

Ingredients

  • 1 cup flour. I prefer King Arthur White Whole Wheat
  • 2 cups shredded firm cheese – sharp cheddar is a good choice
  • 1 stick softened butter
  • 2 tsp baking powder
  • Dash salt
  • 1/4 tsp cayenne
  • 1/2 tsp mustard powder
  • 1/4 tsp finely ground black pepper
  • 1/2 tsp rosemary

Process

Preheat your oven to 375. Mix everything together in a mixing bowl. Knead together until dough is smooth. It’ll be similar to sugar cookie dough.

Form into bite-sized pieces and place on an ungreased cookie sheet – forming the dough by pressing an amount about the size of a cherry tomato between your palms works well. Optionally – make an X in the flattened balls with a pastry cutter.

Bake 12 to 15 minutes until just starting to brown at the edges. Transfer to a rack to cool. Makes 2 to 3 dozen.

Notes

If you get the timing right, these’ll be slightly chewy and crispy. Incredible.

Do whatever you want with the herbs – this is just a combo I happen to like. I think cayenne and mustard powder are an excellent complement to sharp cheeses. There’s no rule about the cheese, either. Any strong-flavored cheese that can be grated would work fine.

These crackers are an excellent way to use up the odds-and-ends that seem to collect in the cheese drawer.

TrendMicro - Die die die!

TrendMicro is suing BarracudaNetworks over the incredibly novel idea of scanning email for viruses (via the excellent open-source ClamAV ) on an SMTP server. To me, this is akin to suing someone for locking their doors at night. I mean, who could’ve ever thunk to scan email before it hits mailboxes? Unpossible.

Sigh. Add me to the list of sysadmins that think TrendMicro sucks and doesn’t deserve your money.

My MythTV setup

The hardware that went into my MythTV setup.
  • Case: Antec NSK2480, 380W PS
  • Motherboard: ASUS M2NPV-VM AM2 NVIDIA GeForce 6150 MicroATX
  • Wireless Card: SMC SMCWPCIT-G PCI V2.2 (5V/3.3V) Wireless Adapter – Retail
  • HDD: Seagate Barracuda 7200.10 ST3400620A 400GB 7200 RPM IDE Ultra ATA100 Hard Drive – OEM
  • Processor: AMD Athlon 64 LE-1620 2.4GHz Socket AM2 45W Single-Core Processor Model
  • Capture Card: Hauppauge WinTV PVR 350
  • DVD: ASUS 18X DVD±R DVD Burner with LightScribe Black PATA Model DRW-1814BL
  • Memory: Crucial 1GB 240-Pin DDR2 SDRAM DDR2 667

Synopsis

This hardware works excellently right out of the box with Knoppmyth – part of the reason is that I did my homework beforehand. Everything was purchased at NewEgg and arrived promptly and worked perfectly. I found this mix of hardware to be an excellent place to start if you’re looking to build a MythTV PVR. Total cost was a hair under $600, with shipping.

To go through each piece:

The Case – Antec NSK2480

It’s bigger than I thought – about the size of a component stereo tuner. NewEgg has the size wrong.

It’s quality stuff. Good fit and finish, easy to work with, quality fans and a quiet power supply.

The Motherboard – ASUS M2NPV-VM

More features than you can shake a stick at, including:
  • Built-in nVidia graphics,
  • Many video-out options,
  • Paravirtualization support,
  • Onboard LAN,
  • SATA RAID.

Everything worked fine, and I’m using the proprietary nVidia drivers. The heavy emphasis on multimedia options (and the microATX form factor) makes this an excellent PVR chassis.

Wireless Card – SMC

The SMC has an Atheros chipset and is supported directly in recent linux kernels. I had to use wpa_supplicant to get WPA encrypted wireless connections working.

HDD – Seagate Barracuda 400GB Ultra ATA100

I screwed up and bought an IDE drive – woops. No big deal – it’s still plenty fast enough for recording live TV.

Processor – Athlon 64 LE-1620

This is a low power single core AMD 64-bit chip. I find myself doing more post-processing of video than I thought I would, so if I had it to do again I’d probably get a faster dual-core chip. BUT – this machine idles at 64 watts, so I should save some scratch on electricity in the long haul.

Capture Card – PVR-350

Excellent capture quality – but I had much trouble with the TV-out. It’d work fine for a few hours – then I’d lose red output and everyone would look like a smurf until I rebooted.

So I just started using the TV-out provided by the motherboard – and my problems disappeared. Were I to do it again, I’d either buy two of the cheaper PVR-150s or the PVR-500 to get dual tuners.

A plus – the remote is high quality and works perfectly via lirc. Load is very low during video capture because of the PVR-350’s hardware MPEG decoder.

DVDASUS 18x DVD±R Burner

Not much to say – works fine and is darned quiet.

Memory – Crucial 1GB DDR2 667

This is plenty of RAM – after a month it essentially never hits the swap file.

Things I’d do differently

I alluded to some of this above, but:
  • I’d get two cheaper PVR-150s or the more expensive PVR-500. TV-out on the PVR-350 was buggy for me, has a low maximum resolution and is handled admirably by the motherboard. More than once I’ve wanted to watch live TV while recording – but I’ve found as my library has increased this happens less often.
  • I MIGHT get a faster dual-core AMD processor. It’s not a problem and I’m patient, but for an hour-long show the post-processing for commercial detection and transcoding takes about an hour. Slow, but tolerable.
  • You can’t have enough HDD space. I’d get a larger hard drive.
  • I would use a standard Debian Etch install instead of Knoppmyth. Now that the system is working the way I want, I’ve realized that Knoppmyth really didn’t do anything I couldn’t have, and I may have saved some time starting with Debian Etch proper. But – if you’re not a Debian zealot like myself, you really can’t go wrong with Knoppmyth.

Notes

I transcode video after recording, shrinking it to about 60% of its original size. I can store 14+ days of TV. ARMAGEDDON, HERE I COME!

I switched the default desktop from XFCE (or whatever it was) to my currently preferred KDE – I’ve got plenty of RAM, and I wanted to use Amarok to stream my music collection from my OpenBSD firewall/router/home server. Sound is piped out through my (somewhat old) component stereo and is excellent.

I do not know what I did before commercial auto-skip. I cannot stand watching TV now without it. Were MythTV made of the blood of innocents, I’d still use it because of commercial auto-skip.

This system would serve as an excellent chassis for pretty much any MythTV system – it’s got tons of room, it’s very quiet and the motherboard gives you a ton of connection options – with excellent linux support (proprietary drivers aside).

When I record, transcode and watch TV at the same time, load averages around 1. Very impressive.

Currently I have standard cable. My next upgrades will be a HD Tuner and HD cable – along with a much bigger HDD and a filesystem managed via LVM.

I am ridiculously happy with this system – it’s changed how I watch TV, listen to music and is worth every penny. I cannot say enough good things about it – and because of prudent hardware choices it was quite easy to set up.

If you’re looking to create a MythTV system, this’d be a great place to start.

Recommend me on Working With Rails

Add to Technorati Favorites

Add to Google