More Joomla extensions

On our Yireo site, you can find numerous free extensions for both Joomla! as Magento - helping you solve common problems when building your site

One Pixel Out Player

The One Pixel Out Player is a Joomla! 1.5 implementation of the 1 Pixel Out MP3-player developed for WordPress. It reuses the Flash player but wraps it around a clean Joomla! 1.5 architecture. This plugin not only wraps up the Flash player, but also allows for easy customization of the colors through a color-selection box - check the screenshot below.

Software information

License GNU/GPL Price Free Current version 1.1 Download zip plg_onepixelout.zip Requirements Joomla! 1.5.15 or later
PHP 5.2.8 or later

help us to build free software

or

About this plugin

This plugin is loosely based on the Joomla! 1.0 plugin written by Yuriy Smetana. Of course the code has been written entirely to be Joomla! 1.5 native, so the old code is gone entirely.

Coincidently there is another 1.5 plugin written by Davien doing exactly the same as this plugin - the 1pixelout plugin. The plugin looks the same and does the same. There are some differences though (mostly technical). Here are the improvements of this One Pixel Out Player compared to Daviens work:

  • Colors can be easily selected through a popup color-box
  • Output can be overridden using a template override
  • This code does NOT generate PHP Notices, so is fully compliant to PHP coding standards
  • This code has no old structures like $_GLOBAL or functions, but uses the new class-infrastructure of JPlugin
  • This code has been commented and uses clear logic to keep the source as open as possible
  • The plugin has an extra option to disable remote MP3s, which should be considered a risk

None of Daviens code has been reused, so actually this is not a fork.

Installation

The minimum requirements for this plugin are Joomla! 1.5.7 and PHP 5.

  1. To install this plugin, download it from the download-section on this site to your computer.
  2. Then install the ZIP file from within the Joomla! Administrator as a regular extension.
  3. Next go to the Plugin Manager to enable the plugin "Content - One Pixel Out Player".

Usage

Open up an article and insert the following code:

{play}/path/to/my.mp3{/play}
Save the article and check the result on the frontend. The Flash-player should appear with the MP3-file ready to play.

Parameter: MP3 file

You can configure a default path for the MP3 through the plugin settings.

The following paths are possible:

  • Just the filename "my.mp3" if the default path has been configured
  • A relative path like "http://static.yireo.com/images/stories/my.mp3"
  • An absolute path like "http://static.yireo.com/images/stories/my.mp3"
  • A URL like "http://mywebsite/my.mp3"

Parameter syntax

The following examples are valid:
{play autostart=1}my.mp3{/play}
{play autostart="1"}my.mp3{/play}
{play autostart='1'}my.mp3{/play}
{play autostart='yes'}my.mp3{/play}
{play autostart='no'}my.mp3{/play}
{play autostart="yes" file="my.mp3"}
The following examples are wrong and do NOT work:
{play autostart='1}
{play autostart="yes" file="my.mp3"/}

Template override

The plugin uses a very simple template file to add the Flash-object in HTML-code. The template-file "plugins/content/onepixelout/plg_onepixelout.php" could be copied to the "html"-folder of your Joomla! template to allow for a template override.

You can include PHP-code but this is not recommended.

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo