irislines web design
irislines web design

What’s wrong with this?

The following rule was in the stylesheet for a Joomla component I use: 

    div.thumbs_div a:hover, a:active, a:focus{
    background-color: transparent !important;
    }

Do you spot the syntax error which caused me no end of grief?

I finally did!

 

Continue Reading

Szaki Table (Joomla Extension)

Szaki Table is a Joomla Extension that allows sorting a table by any column header.

I used it on a client’s site to make a list of educational opportunities sortable by date, location, type.   All was well until we added a column for cost and entered cost in US Dollars using the $ sign.

The entire table was replicated in the cell with the $!  

Fortunately one only needs to “escape” the $  by including   before the guilty character.

In researching the extension’s website to see if this had been covered already, I discovered that the extension has many more possibilities — but the English version of the developer’s site is hard to decipher.  I’ll consider this for future projects if a client needs to have interactive data tables.   I think you’re supposed to be able to get the table code from pasting in a csv (with semi-colons rather than commas)!  That’s worth investigating!

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:

     components/com_content/views/category/tmpl/blog.php
     components/com_content/views/category/tmpl/blog_items.php
     components/com_content/views/category/tmpl/blog.xml

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

     templates/your-template/html/com_content/category/blogworm.php
     templates/your-template/html/com_content/category/blogworm_items.php
     templates/your-template/html/com_content/category/blogworm.xml

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.

     templates/beez_20/language/en-GB/en-GB.tpl_beez_20.sys.ini

     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:
$this>escape

but should have said this:
$this->escape

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?

IrisLines LLC
101 Washington Street
Brattleboro, VT 05301

802 257 7391

info@irislines.com