<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>hi, it&#39;s mike</title>
    <link>https://mike.puddingtime.org/tags/joomla/</link>
    <description>Recent content on hi, it&#39;s mike</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>mike@puddingtime.org (mike)</managingEditor>
    <webMaster>mike@puddingtime.org (mike)</webMaster>
    <copyright>© 2026, mike</copyright>
    <lastBuildDate>Wed, 08 Sep 2010 00:25:53 +0000</lastBuildDate>
    <atom:link href="https://mike.puddingtime.org/tags/joomla/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Ballpark Digest Relaunched</title>
      <link>https://mike.puddingtime.org/posts/2010-09-08-ballpark-digest-relaunched/</link>
      <pubDate>Wed, 08 Sep 2010 00:25:53 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-09-08-ballpark-digest-relaunched/</guid>
      
      <description>![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2010/09/bpd.jpg) The new Ballpark Digest went live today.
This job was pretty similar to the Arena Digest relaunch, and involved a lot of the same tasks.
There were over 2,500 legacy articles that needed to be …</description>
      <content:encoded><![CDATA[<div style="text-align:center;margin:1em;">![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2010/09/bpd.jpg)</div>
<p><a href="http://www.ballparkdigest.com/201009073035/at-the-ballpark/the-front-office/welcome-to-the-new-ballpark-digest">The new Ballpark Digest</a> went live today.</p>
<p>This job was pretty similar to the <a href="http://mph.puddingbowl.org/2010/05/relaunch-day/">Arena Digest relaunch</a>, and involved <a href="http://mph.puddingbowl.org/2010/04/from-legacy-cms-to-joomla-with-ruby/">a lot of the same tasks</a>.</p>
<p>There were over 2,500 legacy articles that needed to be imported this time around, and preserving their search engine placement was a little more important because the site was pretty well indexed. I had to pick up one new trick, too:</p>
<p>Not having any legacy i.d. numbers to work with during the import, I ended up having to figure out the legacy URLs on my own.  I knew the article were, at least, in the proper order, so at the beginning of the import data, the second article in the list had an i.d. of &ldquo;2&rdquo;, the tenth in the list had an i.d. of &ldquo;10&rdquo;, etc. Unfortunately, that 1-1 mapping broke down the first time an article was published then taken down, because my import data didn&rsquo;t note missing articles. By the time I got to the 2,000th article, the relationship between import row and legacy i.d. was off by a pretty substantial amount.</p>
<p>I grabbed the <a href="http://9astronauts.com/code/ruby/rbing/">RBing</a> gem and automated the process of searching by article title and using the URL I got back to figure out the article&rsquo;s old i.d. and URL. That didn&rsquo;t work perfectly, because there were some gaps in Bing&rsquo;s indexation of the site. So I had to write a second script that ran down the list of articles and looked at each i.d., applying the following algorithm:</p>
<ul>
<li>
<p>If the article i.d. was one greater than the i.d. of the article before it, and one less than the i.d. of the article after it, I assumed it was o.k.</p>
</li>
<li>
<p>If the article i.d. didn&rsquo;t match the above criteria, but the i.d. of the article after it was two greater than the i.d. of the article before it, I assumed the real page for that article had failed to be indexed, and I assigned it an i.d between those of the articles on either side of the sequence.</p>
</li>
<li>
<p>If the article i.d. didn&rsquo;t meet either of those criteria, I flagged it for review.</p>
</li>
</ul>
<p>Most of the time, the ones that were flagged for review were part of a streak of articles that hadn&rsquo;t been indexed properly to begin with, so the best result Bing could produce was an easily recognizable archive page URL. It was easy to consult the list and see sequences like this:</p>
<ul>
<li>
<p>453</p>
</li>
<li>
<p>454</p>
</li>
<li>
<p>archive URL</p>
</li>
<li>
<p>archive URL</p>
</li>
<li>
<p>archive URL</p>
</li>
<li>
<p>archive URL</p>
</li>
<li>
<p>459</p>
</li>
</ul>
<p>Clearly the third through sixth articles in the list had to be 455, 456, 457 and 458. I felt a little guilty for not taking the time to work out a way to do that programatically, but there were only three or four sequences like that so I sucked it up. There were also a few sequences where there was no discerning the proper sequence, but that list totaled fewer than 15.</p>
<p>Once all the i.d.&rsquo;s were straightened out, I wrote a script to generate the redirects, and plopped it into the site .htaccess.</p>
<p>#joomla #web development</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Ballpark%20Digest%20Relaunched">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Relaunch Day</title>
      <link>https://mike.puddingtime.org/posts/2010-05-27-relaunch-day/</link>
      <pubDate>Thu, 27 May 2010 07:04:17 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-05-27-relaunch-day/</guid>
      
      <description>![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2010/05/adigest.jpg) Kevin flipped the switch on DNS for Arena Digest today, completing the transition from the previous CMS to Joomla. I wrote some notes about managing the transition from the legacy CMS to …</description>
      <content:encoded><![CDATA[<div style="text-align:center;margin:1em;">![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2010/05/adigest.jpg)</div>
<p>Kevin flipped the switch on DNS for <a href="http://arenadigest.com">Arena Digest</a> today, completing the transition from the previous CMS to Joomla. I wrote some notes about managing the transition from the <a href="http://mph.puddingbowl.org/2010/04/from-legacy-cms-to-joomla-with-ruby/">legacy CMS to Joomla with Ruby</a> last month, but a few more things are worth calling out that made the job easier:</p>
<p>First, <a href="http://extensions.joomla.org/extensions/core-enhancements/scripts/7230">SC JQuery</a> came in handy because I had some legacy JQuery that needed to come over, but it was colliding with the MooTools menus. SC JQuery provides Joomla with a working version of the latest JQuery and makes sure it&rsquo;s running in &ldquo;no conflict&rdquo; mode.</p>
<p>Second, <a href="http://extensions.joomla.org/extensions/administration/admin-structure/10307">Advanced Module Manager</a> fixed a headache that had to do with making sure that some ad zones appear where they&rsquo;re supposed to. Joomla&rsquo;s controls for where a module appears (currently) lack the ability to say &ldquo;put this module on every menu but &hellip;&rdquo; which means some special pages (like the search page) won&rsquo;t display modules designated for anything besides &ldquo;show on all menus.&rdquo; Advanced Module Manager provides a way to designate &ldquo;every menu but,&rdquo; and that provided me with a way to create front page and inside page advertising zones that appeared everywhere they were supposed to.</p>
<p>Third, I&rsquo;m going to be interested to see how the new <a href="http://www.wibiya.com/">Wibiya toolbar</a> performs in terms of users taking advantage of it.  Previous designs along the line of Arena Digest involve several widgets to handle all the social networking and bookmarking stuff that&rsquo;s become <em>de rigeur</em>. Wibiya wraps all that up into one lump, and it lives down at the bottom of the page where you can a. see it, b. make it go away and c. use it to do what all the other widgets did. In testing, it didn&rsquo;t cause any problems with load times (it waits for the rest of the page) and it defers some bottlenecks until the visitor wants to use specific functionality, so it&rsquo;s not chasing people off if they land and everything doesn&rsquo;t load quickly.</p>
<p>Finally, I&rsquo;ve decided that when I put up a new Joomla site, TinyMCE is coming out and <a href="http://www.joomlacontenteditor.net/">JCE</a> is going in. JCE is much nicer, both to use and to configure, with some really helpful roles-based privileges you can assign to limit what certain users can do.</p>
<p>Warmed Up to Joomla</p>
<p>It has been almost three years since I first blogged about <a href="http://mph.puddingbowl.org/2007/07/live-learn-complain/">my issues with Joomla</a>. Since then, Joomla 1.5 has come out and matured (1.6 is approaching), and most of what I hated has been dealt with.  Remaining complaints (like the way it handles section/category organization) are being addressed in the next version. The templates override system, which allows you to have decent templates without hacking the core files at all, is in full effect, so CSS-based designs are a practical reality.</p>
<p>It&rsquo;s also a lot more search engine friendly. Though I tend to use the <a href="http://extensions.joomla.org/extensions/site-management/sef/10134">sh404SEF</a> plugin to get better control of the site structure, vanilla Joomla SEF URLs aren&rsquo;t a bad joke anymore.</p>
<p>If you&rsquo;re not bringing over legacy content, getting a decent Joomla site stood up takes very little time and you can get really good results quickly. Raiding the <a href="http://extensions.joomla.org/">extensions directory</a> usually yields any functionality you find missing. For better or worse, Joomla&rsquo;s leadership <a href="http://community.joomla.org/blogs/leadership/636-jed-to-be-gpl-only-by-july-2009.html">booted out non-GPL&rsquo;d extensions</a> last year, which means it&rsquo;s easier to get at the free stuff, and there&rsquo;s less likelihood you&rsquo;ll be stuck trying to get something protected by ionCube working on your hosting provider (which means you can tweak plugins that are almost but not quite right).</p>
<p>All that said, it&rsquo;s still not for everybody.  Joomla&rsquo;s a real CMS and it looks and acts like one. In other words, it&rsquo;s not the sort of software where you stand up the site then casually toss the keys to the new owner. It has a writer/editor/administrator privileges model you need to be ready to take advantage of. If your client isn&rsquo;t already familiar with CMS software from previous use (Kevin is, which makes things easier for me), you should think about preparing a couple of accounts in the new installation: one for the client as content manager and one for the client as site administrator. It&rsquo;s not like anybody&rsquo;s face is going to melt if they look at the settings available to the admin, but not having administrative privileges narrows the number of options present at login, and that makes it easier on someone just learning day-to-day content management. <br /></p>
<p>#arenadigest #joomla #web design #web development</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Relaunch%20Day">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>From Legacy CMS to Joomla with Ruby</title>
      <link>https://mike.puddingtime.org/posts/2010-04-19-from-legacy-cms-to-joomla-with-ruby/</link>
      <pubDate>Mon, 19 Apr 2010 07:44:45 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-04-19-from-legacy-cms-to-joomla-with-ruby/</guid>
      
      <description>This weekend’s project was sort of interesting:
Given a spreadsheet that represents a 642-article data dump from a legacy, proprietary CMS, import all the content to Joomla and come up with a way that the legacy URL structure can be redirected from the old URL scheme to the new Joomla scheme without …</description>
      <content:encoded><![CDATA[<p>This weekend&rsquo;s project was sort of interesting:</p>
<p>Given a spreadsheet that represents a 642-article data dump from a legacy, proprietary CMS, import all the content to Joomla and come up with a way that the legacy URL structure can be redirected from the old URL scheme to the new Joomla scheme without breaking links and killing the site&rsquo;s Google juice.</p>
<p>Fortunately, I wrote a bunch of importing code last year to handle an even more primitive setup (no CMS at all &hellip; just a collection of hundreds of static files), so I solved a lot of the problems that come from importing to Joomla then, so for the import phase of the project I just needed to come up with the code to read the spreadsheet.</p>
<p>Here&rsquo;s the process I used in a nutshell:</p>
<ol>
<li>Reading the Content</li>
</ol>
<p>The spreadsheet was pretty minimal.  Each line included the publication date, title, teaser and content, but the article ids weren&rsquo;t included as data: they corresponded to the line of the spreadsheet the article was on.  I had to have the article i.d. because I&rsquo;d need it later to map the URLs correctly.</p>
<p>The <a href="http://roo.rubyforge.org/">roo</a> gem makes reading an Excel spreadsheet super easy.</p>
<ol start="2">
<li>Massaging the Content</li>
</ol>
<p>Part of the spec for the migration includes converting to human-readable (a.k.a. search engine friendly (SEF)) URLs. The old URL structure looks something like this:</p>
<pre><code> http://foo.com/category/index.html?article_id=123
</code></pre>
<p>We want to end up with something like this:</p>
<pre><code> http://foo.com/category/section/lorem_ipsum_dolor_amet
</code></pre>
<p>And we want to make sure we control the URL such that we can map all those legacy &ldquo;article_id&rdquo; URLs to their SEF equivalents in a few steps. Since Joomla allows you to set your own article aliases and use them as part of the URL, I just took each article title and did some basic substitutions and changes:</p>
<pre><code>article_alias = article_title.gsub(/\'|\&quot;|\?|\./,&quot;&quot;)

article_alias.gsub!(/\W/,&quot;-&quot;)

article_alias.downcase!

article_alias.gsub!(/\-{2,}/,&quot;-&quot;)
</code></pre>
<p>That had the effect of giving an article with a title like &ldquo;Can This &lsquo;Article&rsquo; Possibly End Well?&rdquo; an alias of  <code>can-this-article-possibly-end-well</code>.</p>
<ol start="3">
<li>Storing the Content</li>
</ol>
<p>I hooked up to the Joomla backend with <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html">ActiveRecord</a>. As roo read each line of the spreadsheet it created a new article in the <code>jos_content</code> table in the Joomla database.</p>
<p>A number of lines in the spreadsheet were completely blank.  I&rsquo;m guessing it&rsquo;s because articles were deleted, or created but never completed. When I came across cases like that, I added some filler text and made sure to set the <code>state</code> field in the database to &ldquo;0&rdquo; to keep them from appearing in Joomla once the new site goes live until the site owner can decide what to do with them.</p>
<p>To keep an eye on how all this was going over on the target database, I used <a href="http://www.sequelpro.com/">Sequel Pro</a>, which provides a very clean and easy-to-use GUI for MySQL. It was easy to do a quick run, catch any problems, quickly remove the records then re-run my scripts.</p>
<p>It&rsquo;s a comment on how nice Ruby, roo and ActiveRecord were to work with that this part of the process took less than two hours from opening the spreadsheet and scratching out some ideas on a legal pad to having all the content into the Joomla database, ready for the next phase.</p>
<ol start="4">
<li>Mapping the Legacy URLs</li>
</ol>
<p>The next step in the process was figuring out how to redirect 640 legacy URLs from this:</p>
<pre><code> http://foo.com/category/index.html?article_id=123
</code></pre>
<p>to this:</p>
<pre><code> http://foo.com/category/section/lorem-ipsum-dolor-amet
</code></pre>
<p>There are a few pieces to the puzzle:</p>
<p>First off, you need to have some sort of SEF URL scheme configured in Joomla.  The default method is to toggle them in the system-wide control panel, which will take you from something like this:</p>
<pre><code>http://foo.com/index.php?option=com_content&amp;Itemid=506&amp;catid=117&amp;id=1654&amp;lang=en&amp;view=article
</code></pre>
<p>to something like this:</p>
<pre><code> http://foo.com/index.php/category/section/12345-lorem-ipsum-dolor-amet
</code></pre>
<p>There are two things I don&rsquo;t like about that:</p>
<p>First, the &ldquo;index.php&rdquo; part is pointless and ugly.</p>
<p>Second, the &ldquo;12345-&rdquo; (the article i.d.) at the tail end is also pointless and ugly, <em>and</em> it threatened to make life hard when it came time to do the redirects, because Joomla&rsquo;s article i.d. would have to be mapped in relationship to the legacy CMS&rsquo;s article i.d. In other words, the article with the Joomla id &ldquo;12345&rdquo; was the article with the legacy i.d. of &ldquo;321,&rdquo; &ldquo;12346&rdquo; was the legacy i.d. &ldquo;322&rdquo;, etc.</p>
<p>I didn&rsquo;t want to have to figure out the offset, and it just didn&rsquo;t seem very elegant to have to do so, plus I have my doubts that&rsquo;s a very future-proof solution.</p>
<p>So Joomla&rsquo;s SEF functionality needed a little help, which I got in the form of the <a href="http://extensions.joomla.org/extensions/site-management/sef/10134">sh404SEF</a> module for Joomla. I&rsquo;ve been using sh404sef since before Joomla even had SEF URLs of its own. It provides a lot of really useful functionality both in terms of controlling how URLs work and in manipulating how the site&rsquo;s section/category structure presents to visitors. It has moved to a subscription model in the past year, but it&rsquo;s worth it.</p>
<p>With sh404sef, I was able to go from this:</p>
<pre><code> http://foo.com/index.php/category/section/12345-lorem-ipsum-dolor-amet
</code></pre>
<p>to this:</p>
<pre><code> http://foo.com/category/section/lorem-ipsum-dolor-amet
</code></pre>
<ol start="5">
<li>Managing the Redirects</li>
</ol>
<p>Everything up to this point was pretty easy. The spec called for converting the data and adding SEF URLs to enhance the site&rsquo;s SEO. The spec also called for preserving the site&rsquo;s PageRank by making sure we cut down on the number of 404s.</p>
<p>This is the point where I briefly hit a wall. The old legacy URLs looked like this:</p>
<pre><code>     http://foo.com/category/index.html?article_id=123
</code></pre>
<p>Since sh404SEF allows you to create your own custom redirects in a file and import them, my thought was &ldquo;just generate a quick list of needed redirects, mapping the &ldquo;article_id&rdquo; parameter to the correct SEF URL, call it day.</p>
<p>Sadly, sh404SEF (and mod_redirect) don&rsquo;t really understand query parameters if you try to use them as a generic URL, so none of the redirects would work. I ended up having to generate the redirects as a series of rules that started with a condition (grab the article id parameter) and then went to the proper mapping, e.g.:</p>
<pre><code>RewriteCond %{QUERY_STRING} ^article_id=7$

RewriteRule ^(.*)$ /archives/news/lorem-ipsum-dolor-amet? [R=301,L]
</code></pre>
<p>I went back to Ruby and roo to read the spreadsheet, map the article ids to the proper alias (and place in the directory structure), and spit out my .htaccess with all the rules in place.</p>
<p>I could have gone another direction with this, by simply converting the query strings into a path.  From this:</p>
<pre><code>     http://foo.com/category/index.html?article_id=123
</code></pre>
<p>to this:</p>
<pre><code>     http://foo.com/category/section/123
</code></pre>
<p>Then handled all the mapping with sh404SEF, which would be able to understand that sort of URL.</p>
<p>That would have had the benefit of requiring just a few lines in .htaccess, but intuitively I don&rsquo;t think it makes more sense to have a bunch of custom redirect rules down in a plugin within the CMS. I haven&rsquo;t done any testing, but hitting a PHP process every time a redirect is needed seemed worse than letting Apache handle it.</p>
<p>#apache #cms #joomla #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20From%20Legacy%20CMS%20to%20Joomla%20with%20Ruby">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
  </channel>
</rss>
