Small Business Resources

I spend the better part of my time advising Small Business on the ins and outs of Online Marketing. Pop over to eBiz4Results.com for the full story.

Current Project

At the end of 2008, I launched BestMacTools.com where you will find reviews, and commentary mostly related to Productivity Tools for Mac OS X.

For Bloggers

It is now just about axiomatic... the most effective online marketing tool for any business is a Blog. That's why I publish Blog4Results.com.

Archive for Coding

May
01

Joomla Markdown Extension

Posted by: Nigel Ball | Comments (2)

As a result of a request from a reader of this blog, I have prepared a new Joomla extension which I have christened “jMarkdown” to partner with jTextile. Why would I do this? Well I remain absolutely convinced that even the best of the WYSIWYG editors for blogs and CMS are basically useless when it comes to editing text or restyling content. Wherever possible I use Textile markup for content intended for publication via the HTML. This is a matter of personal preference, many others use Markdown. Elsewhere in this blog you’ll find jTextile, a Joomla 1.5 extension which supports the textile syntax

Anyway, jMarkdown allows you to prepare articles for Joomla 1.0 using the Markdown syntax. jMarkdown, when activated, will convert the text into html for display purposes.

You can download jMarkdown here. This is a prerelease version and does not include any documentation. Just install the extension and activate the plugin in your Joomla 1.5 site.

As usual feel free to comment or ask questions here.

Categories : Coding, Software
Comments (2)

Just a quick post here to say that I have released a VirtueMart shipping module for Joomla 1.5.

Suffice to say that it provides a flexible mechanism for calculating shipping with separate scales for “Domestic” and “International” orders.

The idea for this module, plus core source code, was derived from an existing module “flex” by Micah Shawn which is contained in the current VirtueMart distribution.

You can download the module from HERE. Installation instructions are in the included README file.

Comments (9)
Mar
06

Joomla Textile Plugin

Posted by: Nigel Ball | Comments (15)

During the process of migrating a large Joomla site from 1.0 to 1.5 I ran into a problem. As usual with any sites with user editable content, I had steered away from using a WYSIWYG editor (I’ve yet to find one that actually works!) and have used Textile to format the content.

However, some serious Googling did not reveal a plugin for Joomla 1.5 to render the content. The original “mos Textile” mambot has disappeared and “rok Textile” does not work on 1.5

So I have lashed together a Joomla 1.5 plugin which will render textile markup correctly (including SmartyPants extensions).

Extension details:

  • I’ve called the plugin jTextile
  • It’s a BETA release
  • There is no documentation
  • There are no configuration options
  • It works on the content only
  • It is based on the work of others, thanks to their efforts
  • It can be downloaded from here


If there is any interest from out there, I’ll extend and support the plugin. Feel free to post comments or questions in this blog.

Categories : Coding
Comments (15)

Following Jim Wilson’s comment I have revisted this subject and now offer my own extension which adds Textile2 to the AlternateSyntaxParser without the need for hacking Jim’s original extension.

You can download the extension here.

Instructions are included in the source, but for convenience, they are repeated here…

Installation:

  1. Install the AlternateSyntaxParser extension.
  2. Drop this script (AlternateSyntaxParserTextile2.php) into $IP/extensions/AlternateSyntaxParser
  1. Enable the extension by adding this line to your LocalSettings.php:
require_once('extensions/AlternateSyntaxParser/MarkdownSyntax.php'); after the line enabling the AlternateSyntaxParser
  1. Download the Textile2 library
  2. Extract the file classTextile.php from the downloaded archive.
  1. Drop classTextile.php into $IP/extensions/AlternateSyntaxParser/

Usage:

To use Textile2 in a page, put #MARKUP textile2 at the top of the page:

Alternatively, you may specify a site-wide default alternate language by setting the $wgAlternateSyntaxParserLanguage variable in your LocalSettings.php.

$wgAlternateSyntaxParserLanguage = ‘textile2’;

Categories : Coding, Publishing
Comments (2)
Aug
30

Using Textile Markup with MediaWiki

Posted by: Nigel Ball | Comments (3)

MediaWiki is used extensively for documentation sites simply because it has so many features that make it ideal for this type of wiki application. The primary example is, of course Wikipedia

Naturally, I want to use MediaWiki for my own documentation sites. However, I use Textile – a lightweight, humane web text generator almost exclusively wherever HTML markup would otherwise be used. Also, I have to admit that I find the built-in MediaWiki markup verbose, ugly and counter-intuitive.

So, I was pleased to find a well written and documented MediaWiki extension which provides for alternative parsers, including textile. For some reason, the standard extension does not work on my sites. What I describe here is a simple mechanism to replace the TextilePHP parser with the Textile2 parser.

Step One

Install the MediaWiki AlternativeSyntaxParser extension. Test it and if it works for you you’re done!

Step 2

If the basic installation does not work, or if you want to try Textile2, add the following lines to AlternativeSyntaxParser.php at about line #153

 case 'textile2':
    require_once('classTextile.php');
    $textile = new Textile();
    $text = $textile->TextileThis($parser->mSwappedOutText);
    break;

Step Three

Download the Textile2 source from here& and copy the file classTextile.php to the same directory where the alternative parsers are.

Step Four

Actually, you’re done! You now have another alternative parser ‘textile2’ available.

Once you have installed this, the editor buttons are no longer useful… maybe I’ll integrate TheEditorHelper unless someone else gets it done first.

Categories : Coding, Publishing
Comments (3)
Feb
23

PHP 4.4.5 segfault fix

Posted by: Nigel Ball | Comments (0)

Quick tip for those of us unfortunate enough to have to deal with “legacy” php code (Ruby is Sooo much easier!).

One of my ISPs recently upgraded the PHP installation to 4.4.5 and suddenly my php application stopped. Nothing in the error log, no output to the browser.

I discovered that an attempt to session_register an unitialised variable causes that build of PHP to segfault.

For example…

Will cause a segfault

<?php
session_start();
session_register("logon");
?>

No segfault

<?php
session_start();
$logon = "fred";
session_register("logon");
?>

I do not know if this is a generic issue or a consequence of the particular ISP’s build. But, I hope that this will help anyone else whose PHP application mysteriously stops!

Categories : Coding
Comments (0)