mtense productions

some stuff you might find useful

I helped a buddy develop an ecommerce site in joomla using hikashop.  Hikashop's cart module functionality is a bit limited.  You either get a very verbose full cart or a very minimal mini cart. We customized the mini cart to include the ability to expand to the full cart in either a slider or popup. This makes the functionality similar to what you find at amazon, especially when you move the cart to the very top of the page.

The cart hidden initially because it is empty. Add an item (from those below) to the cart to have it appear.  Then click the expansion image beside each to see how they expand.

Here are some demos of the expanding mini cart in action.

If you would like to add similar functionality to your hikashop, I have packaged up the files.


Tagged in: Hikashop Joomla PHP
Hits: 93437

Posted by on in Techie Stuff

When web hosts lock down their firewalls, they often close commonly used outgoing SMTP ports.  Most everyone is used to port 25 being blocked, but my web host was also blocking 465 and 587 which are the common ports for sending SMTP traffic over SSL and TLS connections.

Of course, when you get the first level support guys trying to mess with the firewall, they are rarely successful.  It is handy to have a command you and they can run to check their work.

Here are the openssl commands for checking the connections.  These connect to google's gmail servers.

openssl s_client -connect -crlf -ign_eof
openssl s_client -connect -starttls smtp -crlf

The first command connects on port 465 is typically used for SMTP traffic over SSL.  You can test different versions of SSL with the -ssl2 and -ssl3 options.  There is nothing email specific about the command. A small variation can be used to check https connections (HTTP over SSL)

openssl s_client -connect -crlf -ign_eof

Tagged in: Email SSL Web
Hits: 6481

Posted by on in Techie Stuff

It is really annoying when you are trying to make a file available for download and the user's browser keeps opening the file rather than allowing the user to save it.  This php script forces the Save As dialog to show up reliably when downloading a file.

To use the script, download it, set the $path variable to the relative path to your downloads folder, and upload the script to your website.  The default name for the downloads folder is "downloads".  Place your files in the downloads folder (specified in $path above) and link to the files like this:


For example, if your downloads folder is called "downloads" and it is at the root of your website, then there no changes necessary.  Simply upload the script to your website.

Download the script: download.php

Cleaning up the URL

On apache servers mod_rewrite can hide what's happening under the covers and clean up the download URLs.  So, for example instead of this


The user sees this


Although it appears that the file is being downloaded directly from the downloads directory, mod_rewrite can recognize and rewrite the URL to use the php script for downloading the file.

Options +FollowSymLinks
RewriteEngine On
RewriteRule   ^downloads/(.+)$   download.php?file=$1

Assuming mod_rewrite is available on your server, simply place the code above into the .htaccess file to support downlod URLs with no reference to the php script.  If the downloads directory is not in the root of your website, specify the path in the RewriteRule.  For example, if the downloads directory is located at /foo/bar/downloads, the RewriteRule should look like:

Options +FollowSymLinks
RewriteEngine On
RewriteRule   ^foo/bar/downloads/(.+)$   foo/bar/download.php?file=$1

Download the script with pretty URL: download.php

Tagged in: PHP Web
Hits: 6298

Richmond Sunlight provides tools for keeping track of what's going on in the Virginia General Assembly.

One feature of the website is tracking bills of interest by associating them with a free user account.  In addition to reviewing the status of the bills through their website, their Photosynthesis service and API makes it possible to gather information about specific bills in an automated fashion.  Details of Photosynthesis service and the API are documented on their website

I recently helped out on a small project using the API to pull and display information on specific bills.  The API is json and the website runs php, so the result was a nice little example of how to retrieve data in json format and display it in php.  I created this write up in hopes that it might help someone looking to do something similar.

Tagged in: JSON PHP Tutorial
Hits: 9122

Posted by on in Techie Stuff

I use a headless xbox running xbmc4xbox to play music on my outdoor speakers. I developed a stripped-down web interface that works well on mobile phone browsers. The idea is to be able to browse your music, add it to the current playlist, and control playback and volume. That is about it.


This interface does not work with newer versions of xbmc. It supports older versions that will run on the original xbox hardware. The simplified interfaces discussed on the wiki (like ppcdefault.asp) seem to have gone missing.  This interface fills the gap for me.

To install and use this interface simply extract the contents of the zip file into the main xbmc directory, then access via web browser at: http://xbox_ip/tunes.asp

Clicking the green arrow adds folders or songs to the current playlist where they can be played with the play button. Although the current playlist can be viewed and cleared, its management is a bit quirky.  For example, stopping playback and clearing the playlist does not seem to remove all the items.  When new songs are added and played, playback starts with a song from the old playlist before proceeding to the new songs.  This is a feature of the original web interface, so it is beyond me to debug.


Tunes Web Interface for XBMC Classic 1.0 HOT
(0 votes)

A simple music-only web interface for xbmc4xbox.  Unzip to xbmc directory and access via http://xbox_ip/tunes.asp.

Date 2013-04-04 16:10:24 File Size 35.88 KB Download 1677 Download

Tagged in: xbmc
Hits: 4747
You are here: Home Categories Techie Stuff