Home
  • English
  • עברית
  • Home
  • Portfolio
  • Blog
  • Services
  • About us
  • Contact

CTools, Context and Message

Submitted by Amitaibu on Mon, 04/05/2010 - 21:38
— Tagged as
  • CTools
  • Drupal-planet

When I decided I'll use CTools for the Message module, I knew it will save me some time. I mean, everybody knows the "let's re-use the same API" concept. I started copying from Context module the parts that I needed, and added my own logic.

Today, I've decided it is time to add a message UI module. It took me about twenty minutes which ended with the commit message: "Added message UI - A shameless copy/ paste from Context module."

It was much faster than what I thought it would be. So, it's not just about using the same API, it is about using the API the same way as others. And if "others" are yhahn and jmiccolis then I can sleep better at night (or at least when the baby doesn't cry).

I'm also thinking -- which is easier to do than to actually sit down and write a patch -- that it would be neat if CTools exportables plugin would have had also a uniform UI that modules such as Context, Message and others to come, could use. So even on the UI level, there will be no code duplication, and a UX gain as-well.

Now with the spare time at hand, all that is left to do is use the super-secret CTools plugin:

ctools_include('close-computer-and-go-spend-more-time-with-family');

Comments

missing screenshots :)

Base templates for a UI sound good to start with. Keep in mind that specific tasks and context may require to deviate from the template in order to provide the optimal ui.

Would be nice to actually see what you did here :)

  • reply
Submitted by roy (not verified) on Mon, 04/05/2010 - 23:51.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><blockquote>
  • Lines and paragraphs break automatically.
  • Pairs of<blockquote> tags will be styled as a block that indicates a quotation.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Gizra | Brener 5, Tel-Aviv 63826 Israel | +972-527-587-697 | info@gizra.com