irislines web design
irislines web design

Posts Tagged ‘Joomla!’

New Facebook code on a Joomla 1.5 site….

This topic came up on the Joomla New England list and Terry posted the solution:

In case anyone needs to know, what worked was to split the FBML version of the code in two. That is, paste the script tag at the bottom of the head tag in the template HTML, then paste the rest of the code into the module (or article). In other words:

Continue Reading

Error installing J! 1.5.22 onto MAMP 9.5

Helping a colleague today and got a nasty message about MySql  not being happy.    Googled a bit of the error message itself and found helpful solutions online.    We had to modify the joomla.sql file from the Installation folder,  changing TYPE=MyISAM   to   ENGINE=MyISAM throughout the file.  

I had a Query Tool for Postgres that let me open the .sql file.   It did not want to open in a simple text editor.

The “repaired”  joomla.sql file allowed the installation to proceed.   Apparently this was a conflict between joomla 1.5.22  and the newest versions of MAMP and MySQL.

Puzzled by alternative layouts not working?

My puzzle was that my alternative layout for a category blog would not show up as a choice in the category manager.

I turned to the Joomla Forum  and found that others had posted about their alternative layouts not being implemented, even when they chose them for a particular category.

Here’s what I posted in reply:

Alternative layouts will NOT be implemented if a menu item pointing to that category exists.   (Even if you arrive at the category via list, or other non-menu link.)

I have created templates/my-template/hmtl/com_content/category/blogworm.php    as well as blogworm_item.php   and blogworm_item.xml.

I have added lines in the .sys.ini language file for the new menu item type.

When I choose the alternative menu item, then my layout overrides are applied to the blog display of the category.

But it is not possible for me to select this category override in the category manager options or category manager for a particular category —   it does not appear in the menu of alternative layouts.

Having the .xml file precludes the use of the alternative as a an option to be selected at the category or item level.

I cloned my   .php files with yet another name and the alternative layout was  then available at the category level — and it worked on a category that had no menu item pointing to it.

The presence of the .xml file turns your layout override into a custom menu item type.  If you want or need both, you’ll have to clone the .php file with a new name.

Alternative layout overrides in Joomla! 1.6

Two years ago I blogged about a solution to have different “read-more” links for different sections of a website.

With Joomla! 1.6 it would be possible to have two variations of the php file that generates the blog,  one that would include the words “read-more” and one that wouldn’t.   Since this affects the display in the blog “page”, not the individual articles, this layout alternative would actually need to be an alternative menu item type.

Here’s how you would do it:

1.  Locate the php files that create the blog layout and blog layout menu item type:


2.  Make a copy of those three files and place them in your template’s html folder and rename them!  I’ve used blogworm.php…etc.  for blog without read more


3.  The change we’re talking about only requires a change in the blogworm_items.php file.

     at  line 155  (or nearby)  find:
     echo JText::_(‘COM_CONTENT_READ_MORE’);      and delete that.

4.  Open blogworm.xml and make changes to line 3:  you add a reference to your template at the beginning and change BLOG to BLOGWORM at the end of each of these strings:


      So what’s all that shouting about?   Those are strings that will be added to a language file, where you will provide a translation.

5.  Use TextEdit or NotePad to open your templates lanugage file — the .sys.ini one — or grab a copy from beez_20 as a starting point.  This file provides extra info about your template positions that shows up in the template manager.  It also provides info to display in the menu item manager.


     ADD to this file: 

TPL_BEEZ_20_COM_CONTENT_CATEGORY_VIEW_BLOGWORM_TITLE=”Beez 20  Blog without the words Read More”

TPL_BEEZ_20_COM_CONTENT_CATEGORY_VIEW_BLOGWORM_OPTION=”Beez 20 Blog without the words Read More”

TPL_BEEZ_20_COM_CONTENT_CATEGORY_VIEW_BLOGWORM_DESC=”Provides read more links without the words Read More – for use in photo gallery”

6.  Create a menu item to display this category as a blog with out the words “read more” in the read more links — choose your new menu item type from the menu item types list.




What’s New in Templates for Joomla! 1.6?

I’m getting ready for two conferences this spring and have worked up a new Templates card with all the php snippets plus sections on Template Overrides, Layout Overrides, Custom Menu Item Types, and Parameters.

I’m in proofreading mode on the  NEW Template Cheat Sheet for Joomla! 1.6.   This one will be yellow with a yellow iris in the corners.

If you’d like a sneak peak, or to be a proofreader of the new one — before I go to print — email me and I’ll send you a pdf.    I’ll have a limited edition of the new sheet for Joomla Day New England, which is April 2, 2011.     I’ll also have both 1.5 and 1.6 Cheat Sheets for my presentations at CMS Expo May 2-4 in Evanston, IL.

Making Beez Better – typo!

My purple Template Cheat Sheet 2 handed out at Joomla! events in New England and the CMS Expo 2010 has a typo in the section called “Making Beez Better”

The sheet reads:

but should have said this:

Alas, that missing hyphen would lead to a fatal error!

My apologies to all, and kudos to my student Dawn Russell who discovered and pointed out the error.

The really good news is that none of that code will be needed in Template Overrides for Joomla! 1.6.   An opportunity to append a page class suffix to a top level

is now included in the Joomla! 1.6 core.



I’m in proofreading mode on a NEW Template Cheat Sheet for Joomla! 1.6.   This one will be yellow with a yellow iris in the corners.

If you’d like a sneak peak, or to be a proofreader of the new one — before I go to print — email me and I’ll send you a pdf.    I’ll have a limited edition of the new sheet for Joomla Day New England, which is April 2, 2011.     I’ll also have both 1.5 and 1.6 Cheat Sheets for my presentations at CMS Expo May 2-4 in Evanston, IL.

When things go wrong ….

Chances are the same things have gone wrong for someone else!

Yesterday my husband got a new computer and moved his files over from an older Mac.  He was horrified to find blank  pages where his data should have been — only a few labels displayed.   Other layouts seemed to be OK.  The data — 9000+ records — seemed to be intact.  He set out to rebuild the layout for his data entry screen:  ~60 labels and fields.

I set out to find the problem.  A google search for “File Maker Pro 11 Snow Leopard blank” produced the solution:  a problem FMP has with a slightly corrupt font folder.  Turns out other people did have the same problem and that solutions were ready for the finding.   In about 15 seconds he was able to open the faulty layout, select all elements on the page and change the font to anything other than Arial.  Bingo!

So the moral is….   take time to do a search!

Today Meg and I puzzled over a Joomla! section blog that we could not get to sort properly.  We decided to edit the titles of about 40 articles in order to force them to sort chronologically.  The articles needed some other attention and we were going to have to open each one anyway.

But then,  they still wouldn’t sort properly!  So off to Google I went.

Turns out,  there’s a bug in the most recent version of Joomla  1.5.22  doesn’t sort Section blogs properly.  Who would’ve thought?  It also turned out that someone had provided a very specific solution:  Change one line of code in a particular file. 

Joomla 1.5.22 Section Blog doesn’t sort properly.

We’re web developers.  Why do we sometimes forget to use the web?

IE8, JCE, and email links….

Yesterday at a training session a user showed me a very strange display of what should have been a linked email address.  There was all kinds of code where the link text — the email address — should have been.

She was working in Firefox on a Mac, and deleted the link and rebuilt it and all was fine. (She was editing a page that someone else had worked on….  probably in IE!)

Today I get a call from a different client who wanted to be reminded of how to link to an email address.   I walked her through it and there was the gibberish again!

Hmm….  what browser are you using?    Internet Explorer.    Aha!

So…  off I go to do more testing* and sure enough, the JCE editor creates messed up links.   In the editor you’ll see:
where you should be seeing the link text.

If you publish that article,  the public will see:
?subject=test'; document.write( '

If you MUST use IE,   then in adding an email link where the link text is the email address,  the JCE editor will fill the url bar of the Advanced Link Editor  with   Just click insert and the link will be fine.   DO NOT click the envelope to add email address,  bcc, cc, or Subject fields.

If the link text is NOT an email address, then the JCE editor Advanced Link Editor functions can be used.

Best Practice?   Don’t use IE!


* I tested in IE8  on sites that use JCE 1.5.7 and JCE

Imagesized revised…

NEW version of Imagesized plugin includes more options, but forces a bg and border for all generated thumbnails.   Set to white this could often just disappear on the page, but on the fbg site I needed thumbs to sometimes be on a background image for front page.

I was using very standard image sizes so I could predict that all thumbnails would be the actual size, and not need a “fudge-factor”  so I modified the plugin code as follows:

In plg_imagesized.php  line 373


imagerectangle($result, 0, 0, $widthm-1, $heightm-1, $this->set_img_color($result,$fp_bocolor));

I changed it to

imagerectangle($result, 0, 0, $widthm, $heightm, $this->set_img_color($result,$fp_bocolor));

and line 375


$sample = imagecopyresampled($result, $image, -($width/2) + ($widthm/2)+2, -($height/2) + ($heightm/2)+2, 0, 0, $width-4, $height-4, $width_orig, $height_orig);

I changed it to:

$sample = imagecopyresampled($result, $image, -($width/2) + ($widthm/2), -($height/2) + ($heightm/2), 0, 0, $width, $height, $width_orig, $height_orig);


By the way, the new Imagesized plugin now offers different settings for leading or intro blog entries and the settings can be applied to front page, and/or section and category blogs.  You can exclude sections or categories from using the plugin.

It also includes a character count cut off for leading and intro articles which appends […] after the specified character.  This lets you have very even blocks for a multiple column display.   You can specify a different  ….   symbol.

IrisLines LLC
101 Washington Street
Brattleboro, VT 05301

802 257 7391