Blog Entry
Following up on his EECI EU talk on finding new ways to publish, Christopher Imrie started a thread in the EE forums to discuss standardizing on a JavaScript loader in EE.
Due to the increase in number of JavaScript rich fieldtypes and addons that are being made available for EE, I believe EllisLab needs to begin to address the need for a standard JavaScript loader to operate site wide in the CP.
At the moment, most addons work by directly adding script elements to the CP head, which leads to slow loading times, particularly on highly customisable pages such as the Publish Page. We are also seeing that many addons are still of the “single javascript file” mindset, and depend heavily on PHP to directly manipulate the JavaScript output. The single javascript file mindset leads to large monolithic JavaScript files which are difficult to debug and the high PHP environment dependency makes portability of the module very difficult (eg: making a fieldtype with a JavaScript powered UI work with SafeCracker).
A standard JavaScript loader, according to Christopher, could “promote the future growth of ‘Rich’ UI add ons.” He mentions RequireJS as a possibility.
Do you have an opinion on this and want to chime in? The thread is open and waiting for your feedback.
How-to Article
The standard approach to EE templates has been to have a rough equivalence between a template and a page, or a template and a content type. Templates include a header and footer, which are usually done as snippets or embeds, and some content (possibly inline, possibly using more snippets and/or embeds).
The language of “template partials” is from the Ruby on Rails world, but the concept is solid for any framework in any language. In a nutshell, the idea is this: you have one wrapper template that has containers in it, and then you fill in those containers later. The wrapper template doesn’t care what’s in the containers, and the containers don’t care about the wrapper.
“But,” you may say, “my templates are all wrappers with containers for stuff! The stuff is all different, that’s why we have to have different templates!” It’s true that the “stuff” is all different–but are the containers all different? Take a look at a typical site you’ve built–I bet that you have at most two or three markup patterns for the whole thing.
If you’re used to the typical way of working with ExpressionEngine templates, you’ll see as we go on that the template partials pattern requires thinking “inside-out” for a while. However, there are some huge benefits to switching to this way of thinking.
Read the Article
Blog Entry
In a tweet earlier this week, EllisLab announced that they moved the ExpressionEngine language packs to GitHub and encourages the community to help collaborate and improve them.
The language packs (which you can find listed here) allow ExpressionEngine to be localized and run in different languages.
If you want to contribute to a language pack, find the language pack you want to modify, fork the repository, make sure you’re working from the correct branch, work on your changes inside of a feature branch, push your changes to your fork of the repository, and send us a pull request. Then, we’ll take a look at your pull request, make sure everything looks alright and merge it in.
Get to translating!
How-to Article
Editor Note: In this how-to article, ProForm developer Isaac Raway shows how to create reusable form templates with his ProForm module.
One of the features of ProForm is the ability to create a single template capable of rendering any form that is designed in the module. Creating a reusable form template is simple and it can provide the same consistent UI to all of your forms, reducing the amount of work it takes to create a new form.
Goals
The basic goals for this setup is to be as flexible as possible. To this end, the essential design for this system is intended to allow multiple ways of using the same base template:
- As a full form URL - this allows us to simply link to forms that have been created in ProForm, without having to hook up anything else
- As an embedded template - allows placing the form inside of another custom template that might also do other things
Let’s get started.
Read the Article
Blog Entry
This week has been full of ExpressionEngine conferences! With EngineSummit and EECI on the roster, this week’s podcast discusses Lea and Emily’s experiences in the speaking circuit.
If you have something interesting to contribute to the community and want to get the benefits of exposure at the same time, the show shares tips on how to prepare to speak for different audiences, goals, and venues! Tune in now!
Also, if you still haven’t filled out the 2012 EE Podcast survey, the show’s still taking responses until midnight Mountain Time today! Be one of the five people to win a fabulous EE Podcast t-shirt!
Blog Entry
Last week I received a mention on Twitter that thanked this site for the motivation to upgrade their site to the latest version of ExpressionEngine. I hadn’t heard of the site before and was intrigued. It’s called Jackass Letters. Written and run by Christopher L. Jorgensen, Jackass Letters (JL) archives letters Christopher writes to companies and notable people and also posts the replies he gets.
Here’s the idea in a nut:
Jackass Letters is dedicated to examining correspondence with real people and companies. It is equal parts spoof, satire, parody and criticism. New letters are generally published once a week.
Is my motivation greed? Am I just clamoring after free stuff? No. Free stuff is cool, but I enjoy the process, enjoy the responses more than any of the swag. Daily I made the trip to my mail box only to see it stuffed with junk mail and bills. Now I look forward to getting mail again!
I started clicking around the site, reading letters, laughing and generally amusing myself with the responses from some of the companies Christopher contacted. JL is a utilitarian site that is solely focused on publishing letters and the replies.
You could see this as a meaningless endeavor. I could understand why. I see it as a fun experiment that captures a snapshot of the corporate culture and humor of some of the biggest names in the world. From Best Buy to Budweiser, Apple to the AARP, and Nike to Nissan, Christopher has written dozens and dozens of letters and eagerly awaited a response. He’s reviving the dying art of writing a letter.
I asked Christopher if he would do an interview with EE Insider so we can learn more about the site.
EE Insider: When did you start the site?
Christopher Jorgensen: I started the site in 2008. Originally the idea was to see if I could just get free stuff from companies just by asking. The first company I wrote was Apple. The reply that came back irritated me. It was boring boilerplate marketing and made no mention of anything I’d written in my letter. It was basic facts any Apple fan would already know. So I wrote them back and complained about the reply and they sent me a pen.
At this point I realized I enjoyed the letter writing more than the free pen and Jackass Letters was born.
In college my roommate and I wrote a few letters to companies complaining about things like insect infestation in our boxed potatoes, but it never occurred to me to make those letters public. (This was before most companies had websites. ‘92 or so.)
EEI: Why did you choose ExpressionEngine for this site?
CJ: My first dynamic site was a blog run on a used Apple G3 iMac in my basement using a version of pMachine. When EE came out I migrated to it with a new project.
I’ve used other CMSes, but I am a dabbler, so attacking another learning curve is not something I get excited about. Even going from EE 1.x to EE 2 was a major task for me. I doubt I would have done it if I wasn’t also interested in doing a redesign. I’ve used Wordpress, Joomla, and a couple of others, but have seldom been tempted to switch to something other than EE.
EEI: Wow, so you’re a senior member of the community. Are you using any add-ons or special configurations with the site?
CJ: I’m running a pretty much out of the box installation. I used the first third of your book ExpressionEngine 2: A Quick-Start Guide to get going, but once I felt like I knew enough to do what I wanted I just dove in!
I have an amazing amount of “Advanced Conditionals” set up to deliver different content depending on the URL structure. I have about a dozen templates running the entire site and this counts my site map and RSS feed.
There are a lot of plugins I would love to have, but the site costs me about $600 a year to run. I spend about $150 a year in postage alone! Maybe if the site ever makes money I’ll consider adding some more bells, but I often take the hard way to save a little money (like manually creating my site map template and hand rolling my .htaccess).
EEI: Do you accept donations for postage?
CJ: I do accept postage donations. I also accept donations to my legal defense fund, to the illustrator charity fund, and to the girlfriend/editor/typist dinner fund. (I don’t really have a legal defense fund.)
I couldn’t do my site without the help of others.
Jackass Letters hasn’t gotten me sued yet, but one of my letters got me set up with a lawyer. He gives me advice from time to time when I have questions about whether I can legally put something online. I don’t always listen to him, but he makes it so the girlfriend can sleep at night.
I also have a great illustrator who works with me because he likes to be part of what I do. He’s named Anthony Imperioli. I make donations to his favorite charity rather than actually paying him.
EEI: What’s your favorite thing about ExpressionEngine?
CJ: The flexibility. One of the things I’ve recently started to do is to try to use my own content more efficiently. I’ve started writing my letters directly within EE. I created a print template only a logged in Admin can see. I print the letter, set a future post date in EE for 3 months out, then if it’s answered I move it to the main channel. If not it posts to
the Unanswered channel.
I plan a video/podcast shortly and intend to do that within EE. If I can imagine the page there seems to be a way to do it. I’m still learning, and I am intimidated by all the things the design pros do with EE. I do all my own templates and CSS and such, but I am not a programmer. Yet I still manage!
EEI: Is there anything that you’d change about ExpressionEngine?
CJ: I would love the ability to autoupdate. For someone like me that is more focused on the content side the actual maintenance of the site can get in the way. If the database backed up and the site stayed up to date, I could let it get out of my way and just produce!
I’ve often thought there should be either first party or third party templates, but for some reason these haven’t caught on for EE. It would be nice to do a “Newspaper” install or select “Web comic” or one of dozens of design options; blog, store, magazine, etc.
EEI: Are you working on anything cool for the site?
CJ: One of the things I am currently working on is a script that will pull all the content of an EE category and cURL the contents into a directory, then zip it up as an ePub and rename it. I have it working fairly well for text only posts at this point.
My first test will be to create an ePub of all the content at jackassletters.com/unanswered.
I still have another 100+ letters to input there before I can pull them all back out, but this still beats doing all that formatting by hand. I want this to eventually be a cron job that fires off daily and creates an ePub of “The Worst of Jackass Letters” or “The Best of” or whatever.
I have a lot of plans for books this year. I am currently writing all the Governors & Premiers in the US and Canada. I also have a woman in Malaysia writing letters on my behalf to companies she likes interacting with. I am outsourcing my labor for a book I am going to call “Jackass Letters: Outsourced.”
We’ll see how long it takes me to do this. I feel like I am close to getting “Unanswered” finished.
If someone made an add on that easily allowed for ePub creation I’d buy that in a heartbeat. It’s not as easy as you might think though.
Blog Entry
In a two part series at Metaq, Terris Kremer wrote up how to sort and order data with ExpressionEngine and Ajax. Terris takes a regular ol’ table of EE entries and makes them sortable.
The first step to making something work with Ajax is to make sure it works without Ajax. If a user doesn’t have JavaScript enabled I want to be sure they can still sort entries. Those users will just have to load the entire page.
Let’s start with a basic template that has a header, footer and content section.
He includes plenty of code snippets and explanations so you can adapt the code to your situation. The first article just gets the basics working…no Ajax implementation yet. In the second article Terris tackles making the entries sortable without requiring a page load.
If this type of functionality is new to you or you need it on an upcoming project, both articles are a good reference.