Virginia Web Designers: Joomla, Drupal, Open-Source, CSS, and PHP Northern Virginia / Maryland / Washington DC web designers

11Jan/110

Fixing Itemids for Joomla / K2's tag view

This article is about K2, which works with Joomla.

We created menu items pointing to “generic” tag views. Each tag has its own Itemid, which is fine. However, when you click on “read more” for any of the items on the generic tag page, the ‘read more’ link uses the default K2 Itemid rather than the Itemid of the current page / menu item. This does seem like a bug to me. The read more links should use the Itemids of the current page or at least the menu item that brought the viewer to that ‘read more’ link.

In our case, K2′s default Itemid is 17 (as set in the menu).  We also have a menu item for a tag view, with an Itemid of 37.
The ‘read more’ URLs should have been in this format:

index.php?option=com_k2&view=itemlist&layout=generic&tag=Health%20Care&task=tag&Itemid=37

.. but were showing up as:

index.php?option=com_k2&view=itemlist&layout=generic&tag=Health%20Care&task=tag&Itemid=17

We have written a small override that solved this for us, since I could find no other way to solve this. We dislike core modifications but in this case it seemed to be the only way:

In /components/k2/models/item.php around line 62 (search for “read more link” .. it should be the first one), add this:

//mod to replace K2 Itemid with current page’s Itemid.

if(JRequest::getVar(‘Itemid’) && JRequest::getVar(‘layout’) && (JRequest::getVar(‘layout’) == ‘generic’) && JRequest::getVar(‘task’) && (JRequest::getVar(‘task’) == ‘tag’)){

//MAKE SURE TO CHANGE “Itemid=17″ TO WHATEVER ITEMID YOUR K2 USES:

$link = str_replace(‘Itemid=17′,’Itemid=’.JRequest::getInt(‘Itemid’),$link);

}

//end

Tagged as: , No Comments
5Jan/112

Adding a Joomla Banner Ad (Image or Flash)

If no ad client exists yet, create one: Components > Banner > Clients. Click New, add the requested details, and Save.

  1. Click Banners, or go to Components > Banner > Banners.
  2. Upload the banner image or Flash swf to /public_html/images/banners.
  3. At this point you can create a new banner from scratch (New), or select an existing one and Copy it. When copying, make sure to edit the banner’s settings to associate it with the correct client, and enable it (set Show Banner to Yes). Set the URL and other settings. Select the image/SWF from the pull-down menu (Banner Image Selector). You don’t need to set width and height.
  4. If using Flash, add Custom Banner Code as follows:{flashad width=”300″ height=”250″}where_is_prg_large_rect4_7-19-10.swf{/flashad}The file name should match a file in /public_html/images/banners, and the dimensions need to match the Flash file’s actual dimensions.

    *** This method requires AllVideos Reloaded, and relies on a custom tag defined in Components > AllVideos Reloaded > Manage Tags / Presets. For iPad users and others requiring HTML5 instead of Flash, we will need to update the associated video player to support both HTML5 and Flash (see my other email about HTML5); stay tuned for details on how to do that.

    The Flash file contains a blank Button with a Hit area (4th frame inside the Button) covering the entire movie,  which links to the banner ad’s unique ID, so that clicking the Flash ad will still track the click. The Button has this ActionScript code attached to it (hit F9 in Flash to view the code):

    on(press){
    getURL(“http://www.yoursite.com/index.php?option=com_banners&task=click&bid=9″, “_blank”);
    }

    .. where bid = this banner’s ID. You should save the banner, and then you can find its ID in the right column of Components > Banner > Banners.

    I have attached a sample Flash file (FLA).

25Jun/100

Impressions of Joomla 1.6 Beta 3

Well, Joomla came out with another 1.6 beta, and it has certainly come a long way. I remember testing a 1.6 beta two years ago. Here are some highlights;

Access Level Control (ACL)

It now features a robust ACL system, though some of the inheritance rules will take some getting used to. This is often cited as a feature Drupal has and Joomla lacks, but soon enough that will be a moot point. From my understanding there will be just one more beta in about two weeks, and then it should be time for 1.6!

Nested categories

Joomla always suffered from a rigid approach to categorization, with Sections and Categories. A section could contain categories, but there could be no sub-categories. This long-running annoyance has finally been been vanquished with Joomla 1.6. It uses only categories (no more sections!), and they can be nested as deeply as you want. I’m sure at some point someone will nest a category 666 levels down, and run into a terrible bug there … but in theory it should be fine, because a category would simply be assigned to a parent category .. the number of sub-levels should have no bearing on it.

Drupal has of course supported nested categories for a long time, where they are called Taxonomy. I think Drupal’s Taxonomy is still more advanced than Joomla 1.6′s category system, but for many, perhaps most users, just having nested categories is en0ugh. Those who want to do more advance PHP magic will naturally be more inclined towards Drupal anyway, and to words like Taxonomy.

The elimination of Joomla’s sections does mean that template code that relies on section IDs will have to be changed to be 1.6-compatible. It will have to check for category IDs instead. It also opens up an interesting possibility of (for example) using a database query to select only those categories that are nested within the current category. That could come in handy in displaying category ‘blogs’ or headlines in a more automated fashion than creating menu links. And speaking of menu links;

Menu Management

Joomla’s menu management has gotten very slick;

  • Changing the menu type is now faster.
  • Much more control over the menu items: meta data, page titles, robot rules, page class styling,  menu link title & CSS attributes.
  • Module assignment from a menu item. You can still assign modules to menu items, but now you can also do this from the menu item itself, rather than having to edit the module separately.
  • Batch processing multiple menu items
  • Language filtering; show your menu item only for certain languages, or for all of them. Would be nice if you could select several languages and hide it on others, but that may be coming.
  • Set template style

Redirect manager

Joomla 1.6 has a new component for managing URL redirects. Presumably this writes to the .htaccess file and created a 301 redirect.

Banner Manager

This is not too different from the 1.5 version, but features “Tracks”, which tracks clicks and impressions in date-filterable and CSV-exportable fashion. Finally we will be able to do some more robust reporting.

I am however baffled that banner clients still have no way to log in and view their banner’s statistics. I think most clients would want that, and offering that ability will help site owners gain more advertisers.

I wrote a Joomla 1.5 hack that got around this by using the “alias” field of the banner client to hold a username. That allows us to associate a banner client with a username, and then we can use that to display banner statistics to a given Joomla user (and only that user). Looks like I will have to port that hack to 1.6. Sigh.

19May/102

Migrating from FrontPage to Joomla

I know what you’re thinking: “are there really still people using FrontPage?” – and the answer is yes. Many hosting companies still offer the FrontPage extensions, and because it is Microsoft software, many people still feel more in their comfort zone with this than with some browser-based content management system like Drupal, Joomla, or WordPress. Actually, Joomla is the only one of those three that is actually a CMS. Drupal’s a framework that can be made into the vision of its creators, but requires more up-front work to get it to that point. For more complex sites it would be worth it though. WordPress is a blogging platform that *can* be used as a CMS, and though it may be a bit of extra work for developers, the fact that many users are now familiar with its interface means an uptick in this trend. More people seem to be using WordPress for content management and not just pure blogging these days. WordPress MU (multi user) together with BuddyPress can be especially powerful for social blogging and interaction.

Migrating a FrontPage site to Joomla

I recently migrated a site from FrontPage to Joomla. I used a very fancy migration tool called Copy & Paste. The site had only a handful of pages so this was no big deal. It just meant saving the graphics to Joomla’s images/stories folder, though even that can often be avoided.

The new Joomla site is not yet live, but I have already turned on SEF (search engine friendly) URLs, which entails an .htaccess file as provided by Joomla. The problem is, FrontPage also uses .htaccess, and whenever you update the FrontPage login credentials, it overwrites the file, rather than updating it and leaving the Joomla parts intact. This means that each time the FrontPage credentials are updated, the Joomla parts have to be added back in. The thing is, with cPanel you can add redirects to htaccess and it will not remove anything from the file. Apparently FrontPage is not capable of this, and takes a more crude approach of simple overwriting the whole thing. It is a minor nuisance, and I suppose I could just wait until the site actually goes live to do the final updates on the file!!

12May/100

Recurring payments with Joomla

Say you want to be able to charge customers with recurring payments, say, every month. I have recently been doing quite a bit of work on that front.

Take a look at nBill, CB Subs (from joomlapolis.com),  and JoomSuite Member.
nBill is the most robust one, and features extensive payment gateway support, robust data import/export, etc.
CB Subs is also good, but I think is a bit harder to use, though handy if you want to give customers a “My Bills” tab in their profile. CB Subs is useful mainly for member subscriptions but can also be used for one-off payments.
JoomSuite Member is aimed mainly at member subscriptions and may not suit all uses. It does integrate nicely with other JoomSuite components, which are more user-friendly than CB Subs or nBill.
nBill and JS Member both require IonCube loaders to be loaded into php.ini.
20Mar/1082

Review of Concrete5 CMS vs. Joomla / Drupal / WordPress

While Joomla and Drupal are the leading open-source CMS systems in terms of adoption by developers, both still have room for improvement (and are indeed improving rapidly). In a nutshell, Joomla comes pre-installed with most everything you would expect to have on a site, and with a few extra addons you’re good to go. The Joomla 1.5 MVC architecture is powerful and the template coding is a clean and straightforward implementation of views in an MVC structure. On the other hand, Drupal is a framework that can be a blog, corporate site, social community, you name it. Out of the box it is not going to do very much for you; it requires customization, adding modules, etc. It offers much more fine-grained control over user permissions, event triggers, customizable views of content presentation (the “Views” module together with CCK), and .. dare I say it … an awful theming system. Consider it the price to pay for getting to use what is certainly a very powgerful system.

In terms of interface usability (for the regular user, not us web developers), Drupal and Joomla both can be quite easy to use, but not out of the box. Drupal takes a bit more work to get user-friendly. Especially input formats need attention. The FCK editor with IMCE for file uploads is great, and the Wysiwyg module is probably the next big thing in Drupal editors – very nicely done.

WordPress beats both Joomla and Drupal in usability, hands-down, but customizing WordPress to make it function like a CMS is not as simple as one would like. It’s not WordPress’s fault: it’s a blogging platform.

OK, and now the reason for this post. Concrete5.

Concrete5 is yet another CMS built on PHP/MySQL, and claims to beat Joomla and Drupal, both in terms of usability and superior code. A big claim, for sure.  We tried it out on the Plethora Design development server and LOVED the ease of use when editing pages and customizing the look and feel of things. Joomla has some extensions that allow in-line editing, but not in-line template modification like this, except in very early alpha stages. Drupal is working on similar things but this is all still in alpha and beta, and months if not years way from being in core. So, one point for Conrete5.

Since it claims to be so easy to use, I tried to put myself in the shoes of one of our clients. I gave myself 10 minutes to figure it out, with using any tutorials or documentation, because if it is easy to use, tutorials and documentation should not be needed. So here’s what I did. I said to myself:

“I want to add a page. Oh, look, there’s an Add Page button”. Great.

“I need to edit this page. Aaah, an Edit Page button.” Cool.

What is especially wonderful is the ability to drag and drop page elements on the fly, and there is a nice context menu available when you click on an editable item.

Note that frontend editing is possible with both Joomla and Drupal but Concrete5 presents it in a (much) slicker way.

A very nice feature is the ability to edit the built-in image gallery.

Well, that covered most of the needs a small “brochure” site might need.

Last item;

“I need to add a contact form and also an application form with file uploads.”

I was not able to find a way to add a form. I know in Concrete5 forms are called “widgets” and you can also use external forms. Why is there no simple “Add Form” button like there is an “Add Page” button? I could find no way of doing this, even though the default installation (with sample data) does have an About page with a form embedded in it, and there is a Forms core block installed by default. I also know that file uploads are supported on forms. That’s all well and good, but now I want to add one, and I can’t. I spent about 10 minutes looking into this, checking their forum and documentation, and was none the wiser. I’m sure the answer is simple, but it should be obvious, especially for a CMS claiming such superiority. I may give it a whirl again at some other time, because it does look very well-suited to small sites … not for anything beyond that in my opinion (although I do realize it has a solid API and a dedicated developer community, so I could be taking this back in the future!).

Update:

See Tony’s comment below and this screencast on how to add a form in Concrete5. More videos for end users here.

Adding forms *is* very easy. The “Add to Main” link is not visible enough, but once you know where to look it’s not a problem. I think there ought to be an “add to main” icon floating to the left or right of the main content area, so one doesn’t need to scroll all the way down the page to find it. But the form editing here certainly blows Joomla and Drupal out of the water with its ease of use.

Conclusions

In terms of ease of use it is in the same league as hosted site builders such as Google Sites and Yahoo SiteBuilder (and that is not an insult!!), but with more control, and the ability for developers to extend the functionality. It’s as easy to use as WordPress, with the added bonus of being able to adjust the look and feel on the fly too. Overall it looks like a great CMS and is worth trying out. Why haven’t Joomla and Drupal added this kind of easy editing, after their many years and thousands of dedicated developers? It’s a bit baffling.

17Jun/090

Upcoming art show(s) in Boston

new_leafFor those of you who will be in Boston in July, check out JP Licks in Jamaica Plain for my sister’s artwork. She lists her upcoming shows and past shows on her site. Hers is also a site I recently converted to Joomla.

17Jun/090

Armitage Gone Dance Think Punk Videos & photos

Lou Reed, Laurie Anderson, and Karole Armitage

Lou Reed, Laurie Anderson, and Karole Armitage

In 2006 I designed a brand-new (and, incidentally, award-winning) site for a New York dance company called called Armitage Gone! Dance. At that time it was designed using Dreamweaver templates, and it was maintained using Adobe Contribute. I recently converted it to Joomla.

Check out the new video and photos of Armitage Gone Dance’s 2009 Think Punk event. Among those in attendance were Lou Reed, Calvin Klein, David Salle, Karole Armitage, Jeff Koons, and Rufus Wainwright. I like to follow my customers’ growth, and hold out hopes of being invited so I can get to meet some of these people … if you’re reading, Lou, contact me.