Joomla banner module

I’ve written a companion module for my Joomla advertising component.

This module loads a random banner from a user-supplied list, based on dates supplied by the user. It accepts both flash files (.swf) and images.

You’ll also need to download the component to use this module.

Go to the downloads page here!

Posted by admin on July 20th, 2008 2 Comments

New PC - 2/3 purchased!

As I mentioned before, my elderly computer is on the way out.

Although making the switch to Ubuntu certainly extended the lifespan of my home PC (I would probably have chucked it out of the nearest window otherwise), I’ve been gradually picking up components for the last few months now, ready to build myself a new monster to be proud of! Besides, I’d lose my geek card if I told anyone the stats of my current box…

What I’ve picked up already:

  • 500Gb Seagate hard disc
  • 4GB RAM (Geil)
  • Asus P5K Motherboard
  • 1 * cheap DVD writer

Still to get:

  • Intel E8500 (It was going to be the E8400, but the E8500 has come down to E8400 prices recently)
  • Radeon 4850
  • An as-yet-undecided case / power supply
  • Shiny new keyboard and mouse. No point splashing out on all that hardware if your input devices are old, crusty, germ-filled, chocolate covered health-hazards!

I’m still not sold on the advantages of quad-core computing just yet. The main advantage of building my own PC will be ease of upgrading later, so maybe in a year or two, I might be changing my mind!

As for operating system, I’m still undecided. I’ve had a great experience with Ubuntu, but I’m itching to try out other flavours of Linux - with Fedora and OpenSuse being top of the list.

Look out for some unboxing photos soon!

Posted by admin on July 16th, 2008 2 Comments

Simple Jquery and CSS menu

I’ve had some fun this weekend tinkering with Jquery. It’s taken me a long time to get round to playing with this library, having thrown my eggs in the Prototype / Scriptaculous basket, but after some experimentation, I wish I’d done it sooner!

I have to admit; the syntax is nicer, much simpler (no more $$(’selector’)) and the documentation seems better. Jquery is also lightweight and fast.

To celebrate my switchover, here’s a very simple Jquery menu demonstration!

Let’s start off with the HTML:

<div id="”content”">
<ul id="”menu”">
  <li class="”starter”&gt;menu"></li>
  <li><a href="”#”">home</a></li>
  <li><a href="”#”">about us</a></li>
  <li>a href=”#”&gt;portfolio</li>
  <li><a href="”#”">contact us</a></li>
</ul>
</div>

It doesn’t get much simpler than this! An ordered list, ready for styling. Not much to see here. Here comes the javascript:
$(document).ready(function(){
  $("li:not(:first)").hide();

  $("li.starter").click(function(){
    if($("li:not(:first)").is(":visible")){
        $("li:not(:first)").fadeOut("fast");
    }else{
        $("li:not(:first)").fadeIn("fast");
    }
  })
})

Eek! Slightly more complicated. Let’s walk through it.
$(document).ready(function(){

Before we do anything, we make sure that the DOM is ready for manipulation. This has a handy side effect, when we see the next line:
$("li:not(:first)").hide();

This piece of code looks for all the ‘li’ elements in the page (disregarding the first one) and hides them, using display:none. The great thing is, since we’re doing this within $(document).ready, users with javascript switched off will still see the menu!
$("li.starter").click(function(){

This tells the browser to look out for any clicks on the li.starter element, and use the next bit of code to handle it.
if($("li:not(:first)").is(":visible")){
    $("li:not(:first)").fadeOut("fast");
}else{
    $("li:not(:first)").fadeIn("fast");
}

This part checks to see if the list items are visible, and shows them or hides them as appropriate.

You can see the full demonstration here, with comments!

Posted by admin on July 13th, 2008 3 Comments

New Joomla! banner component

I was recently working on a Joomla! site which required a fairly unusual banner management system. The spec was that the user would be able to enter a list of banners, links, start dates and expiry dates, and that these banners would be displayed in a random order in the main content area. The component will accept all major image formats, and flash movie files. (.swf)

I wasted quite a bit of time trying to mold other components to my needs, but I could have saved myself some time if I had just written my own!

Here we are, then; the result of my labour.

This component requires Joomla 1.5 or later.

LICENSE + DISCLAIMER:Copyright 2008 John McCollum. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

By downloading this component, you are indicating your acceptance of the terms above. Please make sure you back up your files and database before installing this component.

Click here to download the component!

EDIT - by popular demand, I’ve written a simple module to interact with this component. It simply loads a random image or .swf into a module position, based on dates supplied by the user. Note - you must download the component to use the module, although you can use the component on its own!

Click here to download the module!

Posted by admin on July 9th, 2008 27 Comments

Stumbleupon, Youtube, Firefox and link prefetching

While it will take a long time for the full implications of the Viacom vs. Youtube battle to be known, one thing has already become clear - user privacy is an extremely low priority.

The great fear, of course, is that users are held responsible for having viewed copyrighted content, wittingly or unwittingly.

Yes, I said unwittingly!

You may or may not know this, but many modern applications prefetch links. They’re smart enough to know what link you’re likely to follow next, and they queue it up for you, in advance. This speeds up your browsing experience quite dramatically!

It affects your privacy too though, since the act of prefetching registers that you’ve loaded a particular page, even with no action on your behalf. From Mozilla:

“Privacy implications

Along with the referral and URL-following implications already mentioned above, prefetching will generally cause the cookies of the prefetched site to be accessed. (For example, if you google amazon, the google results page will prefetch www.amazon.com, causing amazon cookies to be sent back and forth.”

(http://developer.mozilla.org/en/docs/Link_prefetching_FAQ)

I know of at least two applications that prefetch links - Firefox and Stumbleupon. You can check your settings quite easily.

  • Open a new browser window
  • Type about:config in the address bar
  • In the ‘Filter’ box, type ‘prefetch’. You might see several settings.

Network.prefetch-next is Firefox’s setting for prefetching links; double-click this to toggle it from on to off, if you like.

If you want to adjust Stumbleupon’s settings for prefetching links, it is easiest to do this through the SU toolbar thusly:

Tools->Toolbar Options->Configuration->Prefetch Stumbles (makes stumbling faster)

So will I be changing my settings? Probably not. I don’t honestly believe that my youtube viewing habits will get me into trouble. However, knowledge is good; and you should know that the prefetching options that speed up your browsing comes with a cost to your privacy.

Posted by admin on July 7th, 2008 1 Comment