If you have just created your Magento extension but you are now wondering how you can successfully publish it to the community then this article is for you!!
Magento-Connect is an official “repository” for all Magento extensions and a better place where developers can add custom extensions or plugins for community or commercial use.
However, publishing or registering your extension on Magento Connect can sometimes be a pain especially if it is your first ever time to do so. Publishing your extension incorrectly can easily result to unexpected results notably upgrading someone’s entire site
I will definitely recommend packaging your extension on Magento 1.5.x.x as the packaging tool there seems to be well improved compared to the previous versions.
Lets get things started:
Login to admin and go to System - Magento Connect - Package Extensions
Once there, please follow the following steps.
Package Info:
Here is where you will need to provide the details of your extension.

The supported release works like this.
- If you want your extension to only work on Magento version 1.5.x.x and above (Select 1.5.0.0 & later)
- If you want to support previous versions as well you will need to select Pre-1.5.0.0 (Magento will automatically create the URL for version 2.0 of the Magento Connect. This will effectively make your extension available for later versions as well.)
- Name must be the same as the name of your extension.
- License and License URI are the same for most part, unless you want to use a different license.
Release
Specify your extension release details. Straight forward matters.

Release Version is the version of your extension.
Authors
Here you will need to list the author names of the extension.
![]()
Note: The user field, MUST be the same as the name on your Magento Account. This is NOT your screen name, it is the user name as found in My Account on your Magento account.
Dependencies:
Most likely you will only need to specify the PHP versions dependencies. However, if your extension depends on other extensions/packages or other libraries, here is the place for your to specify.
Contents
Here is the place you tell Extension packager where the extension files are. Below I specified the relative paths to the target field.
![]()
The path field, is where you will enter the path to the directory of files relative to the Target. The relative folders to the targets are
Magento Local module file: is app/code/local/
Magento Community module file: is app/code/community/
Magento Global Configuration: is app/etc/
Magento Core team module file: is app/code/core/
Magento User Interface (layouts, templates): is app/design/
Magento PHP Library file: is lib/
Magento Locale language file: is app/locale/
Magento Media library: is media/
Magento Theme Skin (Images, CSS, JS): is skin/
Magento Other web accessible file: is /
Magento PHPUnit test: is tests/
Magento other: is /
You are now ready to package your extension. Press the Save Data and Create Package button at top right of the page.
Depending on the supported release choice you have made in the first step, your extension files will be in the following location
Release 1.5.0.0 & later: var/connect
Release Pre-1.5.0.0 : var/pear
Possible Gotchas / Errors
Release file already exists:
If you get this error: Simply increase the version of the package, re-save the extension and upload it again.
Release refered to unknown or non-existent extension
The package name in package info section MUST be the same as the name of your package.
I hope you find this article helpfully.
If you have any question or feedback please feel free to drop a comment with your own experience.
Bash provides many powerful functions but how can you use these easily?
If you spend any time using the command line, either to manage a server or on the desktop, you have to quickly become proficient with bash. You will also find the you carry out many of the same tasks time after time.
This can quickly become tiresome and error prone, particularly if you are piping several commands together. However, bash provides several ways to make your life easier.
Aliases
If you are always going to be using the same flags with a command, you can ensure that they are called by default by using an alias.
An alias is a shorthand that bash uses in order to fire commands. Several are included as standard with Ubuntu (and other distros) and are stored in your .bashrc file. You can edit these and add your own as the need occurs.
An example of this is that I prefer the human readable file sizes when using ls. You can turn these on using the -h flag, but you have to include this every time you run the command. To make things easier I changed the alias for ll (long list) to read as follows
alias ll="ls -ahlF"
This way I don’t need to remember to put the flag in.
As you build up more of these commands, it makes sense to store them in a separate file so you can easily find and edit them. You can place all of you aliases in a file called .bash_aliases and they will be available for use.
Scripts
Aliases are fine for quickly calling simple commands, but many times you will need to carry out more complex tasks. In order to do this, you can make a script, and then call that.
By placing everything into a script, you benefit from being able to carry out more complicated functions, and the easy of calling it from a single command.
An example of this would be if you wanted to compare two branches in git, and see all of the files that had been created or modified, but not the files that had been deleted. You create a file called git_get_changed_files and put the following in
#!/bin/bash
local ORIGINAL CHANGED FILES
ORIGINAL="$1"
CHANGED="$2"
FILES=$(git diff --name-status $ORIGINAL..$CHANGED public/ | awk '{print $1"@@@@@"$2}')
for FILE in $FILES
do
echo "$FILE" | awk -F "@@@@@" '{ i=""; if ($1 != "D") print $2}'
done
If you place this in your home/bin folder you will then be able to run git_get_changed_files like a normal command.
A Global Function Library
You can expand on this by creating a global library of functions. This works by putting all of the functions into a folder, where each file is a namespace for different functions.
This can be achieved by creating a script that will source of all of the files in a folder, like so:
#!/bin/bash
for f in $(ls /path/to/folder/);
do source /path/to/folder/$f;
done
Call this script func and place it in your home/bin folder. Then you put a script in the folder referenced in the file and use the following structure.
function parse.(){ # auto complete helper, second argument is a grep against the function list
if [[ '' == "$@" ]]
then
echo "Parse Namespaced Functions List"
cat $BASH_SOURCE | grep "^function[^(]" | awk '{j=" USAGE:"; for (i=5; i<=NF; i++) j=j" "$i; print $2" "j}'
else
echo "Parse Functions Matching: $@"
cat $BASH_SOURCE | grep "^function[^(]" | awk '{j=" USAGE:"; for (i=5; i<=NF; i++) j=j" "$i; print $2" "j}' | grep $@
fi
}
function parse.access_log_top_ten_code() { # Show the top ten code from access_log: useage ...code $FILE $CODE
FILE=$1
CODE=$2
echo "Count the top ten $CODE'd pages"
cat $FILE | awk '{ i=($9=="$CODE" ) ? $7 : ""; print i; }' | sort | uniq -c | sort -n | tail -n 11 | head -n 10
}
In this folder a namespace of parse is created. Running
func parse.
Will list all of the function in the file. Running func parse. log will list all of the function that contain log in the function name or description. When the files are listed, the function name will be displayed with the comment along side it.
As the func command sources all of the different files, you are able to makes use of the functions across different namespaces. This means that you can create a file that will format output and then use that in with your git functions.
I hope that you are able to make use of this idea, and build your own library of functions. Anything that you thing would be useful to add to the library, please mention below.
If you have a secondary hard drive that you have to manually mount in Ubuntu/Linux everytime you boot up and you are not too comfortable with the syntax for fstab, this is a possible easy shortcut for you.
You can view the currently mounted partitions by looking at mtap
cat /etc/mtab
If you do this after you have mounted the drive, you can see the full mount command that has been used, eg
/dev/sdc1 /media/BigDrive ext4 rw,nosuid,nodev,uhelper=udisks 0 0
You can copy that line and paste it into your fstab and from then on when you boot up the drive will be mounted automatically.
sudo gedit /etc/fstab
I have no idea what all that stuff means and to be honest I don’t care I just want to use my hard drive.
ALWAYS back up your fstab before making changes!
Hope that helps
Just an update for any PHP developers in and around the Leeds, Bradford and West Yorkshire region:
Edmonds Commerce are still looking for skilled and enthusiastic PHP developers to join the team.
Our focus is entirely on e-commerce which is an exciting and challenging field for the right kind of person.
We expect our developers to be at or around the Zend Certified Developer level but other than that there are no specific criteria.
If you are interested please do get in touch.
We will initially ask you to do a quick PHP quiz, if you want to do that straight away just go here
http://www.edmonds-commerce.co.uk/PHPTest/form.php
Do get in touch directly as well though, the spam bots quite enjoy filling it out as well and I haven’t got around to protecting it.
Just stumbled across a simple and incredibly useful Netbeans plugin.
http://plugins.netbeans.org/plugin/676/path-tools
Path Tools.
It’s not listed in the standard list of available plugins, but if you download the nbm file and just drag and drop it into the plugin install dialog window it works easily enough.
Once installed you can right click any folder or file and explore in the OS file manager (Nautilus for example). You can also set up shell commands. From this point your imagination is your only restriction, this gives you easy integration to various external tools.
Nice

