the JoomlaWorks blog

  1. Establish naming conventions
  2. Never use generic names for classes, IDs and form names in your code like “comment” or “article”. Someone else may do so too, so you can kiss your app’s functionality bye-bye!
  3. Avoid inline CSS
  4. Try to squeeze as much CSS code as possible into one file
  5. Avoid placing inline UI images in your HTML. UI images are meant to exist as background in your app’s CSS file.
  6. Avoid inline Javascript
  7. Try to squeeze as much Javascript code as possible into one file
  8. Don’t execute Javascript code when not needed! E.g. do simple checks by element container ID or similar.
  9. Avoid inline CSS inside your Javascript code. Stick to classes and IDs. Don’t inject too much HTML markup if possible. Try to alter the behaviour of your app by adding/removing CSS classes/IDs
  10. For God’s sake use an open source CMS, don’t re-invent the wheel, make it possible to contribute back. Joomla!, Drupal, Wordpress are enterprise class CMSs to get started with and some of the most popular websites in the world are powered by these open source CMSs.

Disclaimer: we develop extensions for Joomla! If you do too, please keep in mind these rules, there is no reason for both of us to pull our hairs at 3am in the morning ;)


Comments

I was recently looking for a clean solution to prevent the display of module positions on gazzetta.gr - the 2nd most high traffic Joomla! website, after joomla.org.

The first thing that came to mind was the htaccess trick I had spotted on the Joomla! forums here: http://forum.joomla.org/viewtopic.php?p=1887090#p1887090

Thing is, this rule does not work if you have SEF on and you’re in some inside page.

So I just wrote a simple solution which is PHP based and you can include right at the top of your Joomla! template for ease of maintenance (template designers can use this too as an XML option ;) )…

(this is PHP code, make sure it’s inside <?php and ?> tags)

// Prevent ?tp=1
$currentURL = explode(‘?’,substr(JURI::base(),0,-1).$_SERVER[‘REQUEST_URI’]);
if($_GET[‘tp’]) header(‘Location: ‘.$currentURL[0]);

Check it out here

UPDATE: There seems to be a Joomla! API solution for that. Thanks to Cory Webb for letting me know.
JRequest::setVar(‘tp’,0);


Comments

When it comes to Joomla! development these days, I prefer to use Panic’s Coda editor on the Mac. It’s what I ever wanted from an editor: clutter-free interface and powerful features!

One extra cool thing about Coda is that you can add custom references (or “books”) within the Coda workspace and furthermore it provides you with a search functionality on these books.

Thanks to Luca Scarpa I recently discovered these links at SitePoint and drastudio.com mentioning how to create your own custom books for various technologies. But there was one particular technology missing: Joomla!

So, without further adieu, I present you these simple settings and a handy book icon to add the official Joomla! Documentation website as a Coda book:

1. Click the “Books” button in the Coda toolbar (top) and then hit the + button at the bottom left to add a new book.

2. In the dialog window that appears, enter the following information:
Book Title: Joomla! Documentation
Book URL: http://docs.joomla.org/
Use For Mode: PHP-HTML
Search URL: http://docs.joomla.org/Special:Search?search=*&go=Go

3. Next, download this image and once it’s on your computer, drag the image inside the Cover Image area. This will create the book’s cover. So far your settings will look like this:



4. Click OK to add your book in Coda!

Now you can even use the search box in Coda to directly search the Joomla! documentation website.

Happy coding!


Comments

The Arts Desk

If you’re reading this blog, you probably know what K2 is (if you don’t, jump quickly to getk2.org to learn more).

When we were releasing K2 a few months back, we really did not expect people to grasp it so soon. Compared to other similar components, it seems to have gained most attention, especially from professional Joomla! designers and developers.

You see, professionals realize the flexibility of developing websites with K2 (both in terms of cost and time), which is the main reason we decided to build K2 in the first place.

And gradually we see amazing K2 powered Joomla! websites being launched, further strengthening my point. I occasionally have a look at K2 community “showcase section”, do some google search or get notified via Twitter about such great examples.

So in this blog post I’ve gathered links to some of the most appealing websites powered with K2 I’ve encountered so far. Check them out:

http://www.theartsdesk.com (arts magazine) (screenshot appears above)
http://www.ccemagonline.com (music magazine)
http://www.imperativetraining.com (training courses)
http://www.evxteam.org (technology)
http://www.intolerantoffspring.com (food recipes)
http://www.softone.gr (software company)
http://www.botopoulos.gr (politician blog)
http://www.statetheatrecompany.com.au (theatre)
http://www.samsonprojects.com (arts)
http://www.thestateroomslc.com (concert hall)
http://www.reelasian.com (film festival)
http://www.watsonmoore.com (classifieds)
http://www.trieditmyself.com (blog)
http://www.joomlabamboo.com/template-guides/ (knowledge base)

(the following were added after October 22nd)
http://www.graphicdisplaycommunity.com (creative community)
http://www.low-magazine.com (online arts magazine)
http://www.journaldesquetes.fr (french RPG game mag)
http://www.joominspiration.com (inspiration for Joomla! sites)
http://www.901sports.com (sports magazine)
http://www.dreamcatchers-crete.com (real estate)
http://www.laydev.de (Joomla! designers)

I will publish more rounds as I discover new unique designs and implementations.

If you know any K2 powered Joomla! websites that stand out, just leave a comment. ;)


Comments

An introduction to K2 (and more) at Joomla!Day Germany 2009!

“Why use K2 and why you don’t have to wait for Joomla! 1.6 to get feature-rich content publishing.”

Kudos to the organizers of the event Robert, Alex and Thomas.

The slides can be found here: http://www.slideshare.net/joomlaworks/jd-fotis-evangelou-k2-presentation

The demo website shown is the official K2 demo site located here: http://k2.joomlaworks.gr/demo-v2/ The K2 plugin showcased (along with some technical insight) can be found here to download: http://k2community.joomlaworks.gr/forum/topics/example-k2-plugin-installs-in

The duration of the video is about 1 hour but it’s a great resource especially for newbies to K2 (and more experienced users).

Thanks!


Comments