21September

Open Joomla modal with Javascript

To open a modal box in Joomla using Javascript, first make sure the modal behavior is loaded:

JHTML::_('behavior.modal');

Then, open an external resource with an iframe handler:

SqueezeBox.setContent( 'iframe', 'http://google.com' );

Posted in Joomla, Tutorials, Development

01September

Reconfigure Plesk after vhost.conf changes

I always forget the command to reconfigure Plesk after adding a vhost.conf file.

The command to reconfigure Plesk for one site is:

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

or the command I use reconfigures all sites:

/usr/local/psa/admin/bin/websrvmng -a

Posted in Tutorials

31August

Pop-up calendar in Joomla

The Joomla frameworks offers an easy solution to insert a date field with a pop-up calender select box, to easily select a date. The pop-up is Mootools operated.

Posted in Joomla, Tutorials

25August

Virtuemart Paypal Currency Problem

Virtuemart has a multiple currency feature where users can select from a pre-defined set of currencies for checkout.

This is very useful, but has a major bug when checking out with Paypal. The final order logged in Virtuemart is correct, and has the correct currency. However, when the user is redirected to Paypal, the transaction will be done in the default currency of the Virtuemart shop.

This problem has existed since 2009, and in 2011 I would have expected it to be resolved already.

I would class this as a major problem as it results in incorrect transactions.

Posted in Tutorials, Development

31July

Changing NetBeans Source Directory

You can rename projects in Netbeans however, if you keep the NetBeans metadata files separate from your source files, you can not change the source directory from the Netbeans interface.

Luckily the NetBeans project files are simple text files, so we can easily change it there. Close NetBeans (so that you don’t accidentally overwrite the new project file). Find the project directory and open the directory called nbproject. Then open the file project.properties.

Change this:

src.dir=<old path>


To:

src.dir=<new path>

Posted in Tutorials

27July

Execute Joomla content plugins on string

In Joomla 1.7 (and I assume Joomla 1.6) you can very easily execute content plugins on a string.

$text = JHTML::_('content.prepare', $text );

This is much simpler than the previous method in Joomla 1.5:

$Item = JTable::getInstance('content');
$dispatcher = JDispatcher::getInstance();
$params = new JParameter('');
JPluginHelper::importPlugin('content');
$Item->parameters = new JParameter('');
$Item->id = "";
$Item->state = "";
$Item->catid = "";
$Item->sectionid "";
$Item->title "";
$Item->text = "Your text with {content plugin code}";

// Apply content plugins to custom text
$results = $dispatcher->trigger('onPrepareContent', array (&$Item, &$params, 0));

Posted in Joomla, Tutorials

12July

Display All Starred Messages in Thunderbird

I have many email accounts setup in Thunderbird, and I star message which I want to give more attention to later. Unfortunately, thunderbird does have an option to view all "starred" messages.

Posted in Tutorials

11July

Google Chrome to drop H.264

Google have taken the decision to drop h.264 and adopt the WebM (VP8) & Theora video codecs for Chrome’s HTML5 <video> support. The Chronium Blog post on January 11, 2011 sets out their current position on the subject and further complicates the long running HTML5 video codec debate.

Posted in Video

25June

Passing Joomla session variables to Flash

Flash does not load browser cookies when sending HTTP requests (except in Internet Explorer where persistent cookies are loaded). Any requests from Flash will be processed as a new user agent.

This raised a problem for me when trying to perform an AJAX request from a Flash object which required session data from Joomla. The session data of the user performing the request was not passed.

Obviously, I'm not the first to experience this issue and it is widely discussed elsewhere, but not so much when it comes to Joomla.

Posted in Joomla, Tutorials

05June

E-mail could not be sent in Joomla ‘Send to a friend’ feature

The "send to friend" feature in Joomla allows you to recommend pages to your friends by emailing them directly from Joomla. One common cause of the E-mail could not be sent error message is the anti-spam measure enforced by Joomla. If you try to send an email within 20 seconds of opening the page, Joomla will produce this error message.

Posted in Joomla

About Dave Horsfall

Dave Horsfall is a British software developer and founder of the hwdMediaShare project. More...

Recent Comments

  • Ppl like you get all the brains. I just get to say thanks for he awnesr.

    Rosa, 06. September, 2011 |

  • Ppl like you get all the brains. I just get to say thanks for he awnesr.

    Rosa, 06. September, 2011 |

  • No, the file should be called "project.properties", and it should be located in the same directory as the file called "project.xml". I'm...

    Dave Horsfall, 29. August, 2011 |

  • There is no file called "project.properties". There is a file "project.xml" is this the one? It is not "simple text" though...

    OppfinnarJocke, 29. August, 2011 |