<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=B.nisevic</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=B.nisevic"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/B.nisevic"/>
	<updated>2026-08-11T01:07:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_CodeSniffer&amp;diff=100621</id>
		<title>Joomla CodeSniffer</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_CodeSniffer&amp;diff=100621"/>
		<updated>2013-06-20T15:44:26Z</updated>

		<summary type="html">&lt;p&gt;B.nisevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{page|needs technical review|This page needs expanded installation instructions, especially for Windows-based systems}}&lt;br /&gt;
&lt;br /&gt;
== A Nose For Joomla ==&lt;br /&gt;
&lt;br /&gt;
This is a custom coding standard for the PHP CodeSniffer that attempts to codify and enforce the Joomla coding standards.&lt;br /&gt;
&lt;br /&gt;
==Why?==&lt;br /&gt;
&lt;br /&gt;
- Coherent and consisting coding practice makes the files look more professional. Conflicting styles in the same project (or worse, the same file) not only look sloppy, they encourage further sloppiness.&lt;br /&gt;
&lt;br /&gt;
- When all code complies with the same standard, bad code is easier for everyone to spot.&lt;br /&gt;
&lt;br /&gt;
- It makes it easier for someone new to a particular file in the project to find and fix errors, or extend functionality.&lt;br /&gt;
&lt;br /&gt;
- If there is no consistent standard maintained, the sometimes developers will reformat the code to suit themselves. This causes a wide range of changes in the code repository, and if there is a later problem, a significant change could be lost in the chaff produced by a diff.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
First of all you have to install the [http://pear.php.net/package/PHP_CodeSniffer/ PHP CodeSniffer]. This set of files is intended to work with phpcs version 1.4, so behavior with any other version is undefined. One way to do this is to start the console (cmd.exe in windows environments) and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pear install PHP_CodeSniffer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To specify a specific version of the PHP CodeSniffer, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pear install PHP_CodeSniffer-1.4.x&amp;lt;/code&amp;gt; (specify a number for x, versions 1.4.0 through 1.4.5 are available)&lt;br /&gt;
&lt;br /&gt;
Pear will handle the whole installation by itself.&lt;br /&gt;
&lt;br /&gt;
Then download and unzip the [https://github.com/joomla/coding-standards Joomla! CodeSniffer] and copy the contents of it into /path/to/PHP_CodeSniffer/Standards/Joomla.&lt;br /&gt;
&lt;br /&gt;
In Unix systems this path is usually /usr/lib/php/PHP/PHP_CodeSniffer/Standards/Joomla but this varies from system to system. In Xubuntu 12.04, the path is /usr/share/php/PHP/CodeSniffer/Standards/Joomla.&lt;br /&gt;
Windows based system with XAMPP have the following path: PATH_TO_XAMMP\php\PEAR\PHP\CodeSniffer\Standards (for example: C:\xampp\php\PEAR\PHP\CodeSniffer\Standards)&lt;br /&gt;
&lt;br /&gt;
Use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pear config-get php_dir&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to find out where the PEAR directory is on your system, then add &amp;quot;/PHP/PHP_CodeSniffer/Standards&amp;quot; to it.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
You invoke the custom standard by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpcs --standard=Joomla file/to/sniff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test a platform file using the provided platform coding standards use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpcs --standard=build/phpcs/Joomla path/to/file/or/folder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further documentation on the use of phpcs can be found at: [http://pear.php.net/package/PHP_CodeSniffer/docs]&lt;br /&gt;
&lt;br /&gt;
==IDE integration==&lt;br /&gt;
&lt;br /&gt;
While everybody loves the console as it is with no doubt the most effective way to do whatever you need to do.. sometimes even linux gurus need a little bit of comfort.&lt;br /&gt;
&lt;br /&gt;
Fortunately there is a plugin available for eclipse and netbeans that integrates the CodeSniffer in our favorite IDE, so any coding standard violations are shown like &amp;quot;normal&amp;quot; errors.&lt;br /&gt;
&lt;br /&gt;
=== Netbeans ===&lt;br /&gt;
&lt;br /&gt;
For netbeans you have to install the sniffer plugin first. You can download the plugin [http://sourceforge.net/projects/phpmdnb/files/nbm/ here].&lt;br /&gt;
&lt;br /&gt;
# Start your netbeans IDE&lt;br /&gt;
# Open Tools =&amp;gt; Plugins =&amp;gt; Downloaded and press &#039;&#039;Add Plugin&#039;&#039;&lt;br /&gt;
# Choose the loaded nbm file and confirm the installation&lt;br /&gt;
# Now there is a new tab in Tools =&amp;gt; Options =&amp;gt; PHP called &amp;quot;PHPCodeSniffer&amp;quot;&lt;br /&gt;
# You have to set the path to the &#039;&#039;phpcs.bat&#039;&#039; from the installed PHP_CodeSniffer PEAR package&lt;br /&gt;
#* for Unix based systems the path is something like /usr/bin/phpcs&lt;br /&gt;
#* in XAMPP (windows) you can find the file in the php root folder (e.g. C:\xampp\php\phpcs.bat)&lt;br /&gt;
# As &amp;quot;standard&amp;quot; type &amp;quot;Joomla&amp;quot; to use the Joomla! standard&lt;br /&gt;
# now you can click &#039;&#039;test Settings&#039;&#039; to check the settings and finish the installation by pressing &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
# Open he task window (Window =&amp;gt; Tasks) to sniff your code.&lt;br /&gt;
# Most time it is a good idea to filter the task (show only in edited file or create an own filter which displays only sniff errors)&lt;br /&gt;
&lt;br /&gt;
=== Eclipse ===&lt;br /&gt;
[[Image:eclipse_pti.png|left|thumb|200px|1) Eclipse PTI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Installation is a breeze and follows the usual pattern:&lt;br /&gt;
# &amp;lt;tt&amp;gt;Help =&amp;gt; Install new Software...&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &amp;lt;tt&amp;gt;Work with:&amp;lt;/tt&amp;gt; Fill in one of the update site URLs found here: http://www.phpsrc.org/eclipse/pti/&lt;br /&gt;
# Select the desired tools&lt;br /&gt;
# Restart Eclipse.&lt;br /&gt;
&lt;br /&gt;
[[Image:eclipse_pti_settings.png|right|thumb|150px|2) Eclipse PTI settings]]&lt;br /&gt;
You are now able to sniff for code violations against common standards like PEAR or Zend etc.&lt;br /&gt;
&lt;br /&gt;
To sniff against your own standards, all you have to do is specify their location and activate them (see screen shot 2)&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;Window =&amp;gt; Preferences&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &amp;lt;tt&amp;gt;PHP Tools =&amp;gt; PHP CodeSniffer&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Happy sniffing&lt;br /&gt;
&lt;br /&gt;
=== PHPStorm ===&lt;br /&gt;
&lt;br /&gt;
==== PHPStorm ====&lt;br /&gt;
[[Image:PhpStorm4CodeSniffer.png|left|thumb|200px|1) PHPStorm  4.x CodeSniffer]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CodeSniffer is supported out of the box in PHPStorm, just go to settings, and under &amp;quot;Inspections&amp;quot; you will see the list of Sniff you have installed.&lt;br /&gt;
&lt;br /&gt;
See: the [http://www.jetbrains.com/phpstorm/webhelp/using-php-code-sniffer-tool.html JetBrains documentation page for setting the Code Sniffer]  and also  [http://blog.jetbrains.com/webide/2012/03/checking-your-code-with-php-code-sniffer-in-phpstorm-4-0/ phpStorm Blog])&lt;br /&gt;
&lt;br /&gt;
For users on ubuntu using phpStorm. Don&#039;t listen instructions at http://www.jetbrains.com/phpstorm/webhelp/using-php-code-sniffer-tool.html#d59626e1126 because there is no working bat (windows file) on linux system. To validate your CodeSniffer choose /usr/bin/phpcs launcher.&lt;br /&gt;
&lt;br /&gt;
Under Settings-&amp;gt;Inspections when you choose joomla profile, in the tree below, search for PHP and open it and than make sure that PHP Code Sniffer validation checkbox is checked. Otherwise PHP Code Sniffer won&#039;t sniff your code.&lt;br /&gt;
&lt;br /&gt;
On ubuntu you install code standards with:&lt;br /&gt;
cd /usr/share/php/PHP/CodeSniffer/Standards&lt;br /&gt;
sudo git clone http://github.com/joomla/coding-standards.git Joomla&lt;br /&gt;
===== Installing Joomla Sniff =====&lt;br /&gt;
&lt;br /&gt;
# get the sniffers from the [https://github.com/joomla/coding-standards coding standards repo]&lt;br /&gt;
# unpack Joomla CodeSniffer rules under:&lt;br /&gt;
## If you are using XAMPP &#039;&#039;\xampp\php\PEAR\PHP\CodeSniffer\Standards\Joomla&#039;&#039;&lt;br /&gt;
## If not maybe you should check here: &#039;&#039;/usr/share/php/PHP/CodeSniffer/Standards&#039;&#039;&lt;br /&gt;
# Go to Settings (CTRL-ALT-S) and search for &amp;quot;PHP Code Sniffer Validation&amp;quot;, click the button Validate to force reload of rules from disk&lt;br /&gt;
# Joomla should be now available in the list. See following image:&lt;br /&gt;
&lt;br /&gt;
[[Image:PhpStorm6CodeSniffer.png|left|thumb|200px|1) PHPStorm  6.x CodeSniffer]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== PHP PSR-0, PSR-1 and PSR-2 ====&lt;br /&gt;
* https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md&lt;br /&gt;
* https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-1-basic.md&lt;br /&gt;
* https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-2-advanced.md&lt;br /&gt;
&lt;br /&gt;
===== Installing PHP PSR-0, PSR-1 and PSR-2 Sniff =====&lt;br /&gt;
&lt;br /&gt;
A CodeSniffer sniff to check against the PSR-x Coding Standard&lt;br /&gt;
&lt;br /&gt;
Download files at&lt;br /&gt;
* https://github.com/squizlabs/PHP_CodeSniffer/tree/master/CodeSniffer/Standards&lt;br /&gt;
&lt;br /&gt;
if you are using Xampp, &lt;br /&gt;
# unpack PSR-1 CodeSniffer rules under \xampp\php\PEAR\PHP\CodeSniffer\Standards\PSR (SPR or any directory will work)&lt;br /&gt;
# Go to Settings (CTRL-ALT-S) and search for &amp;quot;PHP Code Sniffer Validation&amp;quot;, click the button Validate to force reload of rules from disk&lt;br /&gt;
# PSR is available in the list&lt;br /&gt;
&lt;br /&gt;
==== PHPStorm  3.x / Alternative method ====&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: This method is outdated, but it might be useful if you are looking for a different integration. It also demonstrates the use of external tools in PHPStorm - so it shouldn&#039;t be deleted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;del&amp;gt;There is currently no plugin available&amp;lt;/del&amp;gt; The CodeSniffer can also be integrated easily as an external tool. PHPStorm will display the output in the console, including clickable links containing line and column numbers to the files that contain errors.&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;Settings&amp;quot; and search for &amp;quot;External tools&amp;quot;&lt;br /&gt;
* Click &amp;quot;Add...&amp;quot;&lt;br /&gt;
* Choose a &amp;quot;name&amp;quot;, &amp;quot;Group&amp;quot; and &amp;quot;Description&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Output Filters&amp;quot;&lt;br /&gt;
** Click &amp;quot;Add...&amp;quot;, Choose a name and enter under &amp;quot;Regular expression to match output&amp;quot; the value: &amp;lt;tt&amp;gt;$FILE_PATH$:$LINE$:$COLUMN$&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;quot;Program&amp;quot;: Search for the phpcs executable on your system. You have to set the path to the &#039;&#039;phpcs.bat&#039;&#039; from the installed PHP_CodeSniffer PEAR package&lt;br /&gt;
** for Unix based systems the path is something like /usr/bin/phpcs&lt;br /&gt;
** in XAMPP (windows) you can find the file in the php root folder (e.g. C:\xampp\php\phpcs.bat)&lt;br /&gt;
* &amp;quot;Paramaters&amp;quot;:&lt;br /&gt;
** &amp;lt;tt&amp;gt;--standard=&amp;lt;path/to/joomla-platform&amp;gt;/build/phpcs/Joomla&amp;lt;/tt&amp;gt; The path to the Joomla! coding standards.&lt;br /&gt;
** &amp;lt;tt&amp;gt;--report=emacs&amp;lt;/tt&amp;gt; The will generate a simple list containing links to the error files&lt;br /&gt;
** Optional you may want to specify &amp;lt;tt&amp;gt;-p&amp;lt;/tt&amp;gt; for &amp;quot;progress&amp;quot; or &amp;lt;tt&amp;gt;-n&amp;lt;/tt&amp;gt; for &amp;quot;errors only&amp;quot;.&lt;br /&gt;
** The last parameter has to be &amp;lt;tt&amp;gt;$FilePath$&amp;lt;/tt&amp;gt; specifying the file or folder you want to sniff.&lt;br /&gt;
&lt;br /&gt;
A typical &amp;quot;Parameters&amp;quot; line on a Linux system might look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;-np --standard=/home/elkuku/libs/joomla/build/phpcs/Joomla --report=emacs $FilePath$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may now right click any file or folder and choose the sniffer from the context menu or add a new toolbar button with a nice Joomla! logo [[File:icon-16-joomla.png]].&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* http://www.phpsrc.org/ PTI - PHP tools integration for Eclipse&lt;br /&gt;
* http://sourceforge.net/projects/phpmdnb/ Netbeans plugin&lt;br /&gt;
* http://hakre.wordpress.com/2010/03/06/php-code-sniffer-eclipse-and-wordpress/ - Excellent article. Just change &amp;quot;Wordpress&amp;quot; for &amp;quot;Joomla!&amp;quot; ;)&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]][[Category:Bug Squad]]&lt;/div&gt;</summary>
		<author><name>B.nisevic</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_CodeSniffer&amp;diff=100610</id>
		<title>Joomla CodeSniffer</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_CodeSniffer&amp;diff=100610"/>
		<updated>2013-06-20T14:17:55Z</updated>

		<summary type="html">&lt;p&gt;B.nisevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{page|needs technical review|This page needs expanded installation instructions, especially for Windows-based systems}}&lt;br /&gt;
&lt;br /&gt;
== A Nose For Joomla ==&lt;br /&gt;
&lt;br /&gt;
This is a custom coding standard for the PHP CodeSniffer that attempts to codify and enforce the Joomla coding standards.&lt;br /&gt;
&lt;br /&gt;
==Why?==&lt;br /&gt;
&lt;br /&gt;
- Coherent and consisting coding practice makes the files look more professional. Conflicting styles in the same project (or worse, the same file) not only look sloppy, they encourage further sloppiness.&lt;br /&gt;
&lt;br /&gt;
- When all code complies with the same standard, bad code is easier for everyone to spot.&lt;br /&gt;
&lt;br /&gt;
- It makes it easier for someone new to a particular file in the project to find and fix errors, or extend functionality.&lt;br /&gt;
&lt;br /&gt;
- If there is no consistent standard maintained, the sometimes developers will reformat the code to suit themselves. This causes a wide range of changes in the code repository, and if there is a later problem, a significant change could be lost in the chaff produced by a diff.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
First of all you have to install the [http://pear.php.net/package/PHP_CodeSniffer/ PHP CodeSniffer]. This set of files is intended to work with phpcs version 1.4, so behavior with any other version is undefined. One way to do this is to start the console (cmd.exe in windows environments) and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pear install PHP_CodeSniffer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To specify a specific version of the PHP CodeSniffer, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pear install PHP_CodeSniffer-1.4.x&amp;lt;/code&amp;gt; (specify a number for x, versions 1.4.0 through 1.4.5 are available)&lt;br /&gt;
&lt;br /&gt;
Pear will handle the whole installation by itself.&lt;br /&gt;
&lt;br /&gt;
Then download and unzip the [https://github.com/joomla/coding-standards Joomla! CodeSniffer] and copy the contents of it into /path/to/PHP_CodeSniffer/Standards/Joomla.&lt;br /&gt;
&lt;br /&gt;
In Unix systems this path is usually /usr/lib/php/PHP/PHP_CodeSniffer/Standards/Joomla but this varies from system to system. In Xubuntu 12.04, the path is /usr/share/php/PHP/CodeSniffer/Standards/Joomla.&lt;br /&gt;
Windows based system with XAMPP have the following path: PATH_TO_XAMMP\php\PEAR\PHP\CodeSniffer\Standards (for example: C:\xampp\php\PEAR\PHP\CodeSniffer\Standards)&lt;br /&gt;
&lt;br /&gt;
Use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pear config-get php_dir&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to find out where the PEAR directory is on your system, then add &amp;quot;/PHP/PHP_CodeSniffer/Standards&amp;quot; to it.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
You invoke the custom standard by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpcs --standard=Joomla file/to/sniff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test a platform file using the provided platform coding standards use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpcs --standard=build/phpcs/Joomla path/to/file/or/folder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further documentation on the use of phpcs can be found at: [http://pear.php.net/package/PHP_CodeSniffer/docs]&lt;br /&gt;
&lt;br /&gt;
==IDE integration==&lt;br /&gt;
&lt;br /&gt;
While everybody loves the console as it is with no doubt the most effective way to do whatever you need to do.. sometimes even linux gurus need a little bit of comfort.&lt;br /&gt;
&lt;br /&gt;
Fortunately there is a plugin available for eclipse and netbeans that integrates the CodeSniffer in our favorite IDE, so any coding standard violations are shown like &amp;quot;normal&amp;quot; errors.&lt;br /&gt;
&lt;br /&gt;
=== Netbeans ===&lt;br /&gt;
&lt;br /&gt;
For netbeans you have to install the sniffer plugin first. You can download the plugin [http://sourceforge.net/projects/phpmdnb/files/nbm/ here].&lt;br /&gt;
&lt;br /&gt;
# Start your netbeans IDE&lt;br /&gt;
# Open Tools =&amp;gt; Plugins =&amp;gt; Downloaded and press &#039;&#039;Add Plugin&#039;&#039;&lt;br /&gt;
# Choose the loaded nbm file and confirm the installation&lt;br /&gt;
# Now there is a new tab in Tools =&amp;gt; Options =&amp;gt; PHP called &amp;quot;PHPCodeSniffer&amp;quot;&lt;br /&gt;
# You have to set the path to the &#039;&#039;phpcs.bat&#039;&#039; from the installed PHP_CodeSniffer PEAR package&lt;br /&gt;
#* for Unix based systems the path is something like /usr/bin/phpcs&lt;br /&gt;
#* in XAMPP (windows) you can find the file in the php root folder (e.g. C:\xampp\php\phpcs.bat)&lt;br /&gt;
# As &amp;quot;standard&amp;quot; type &amp;quot;Joomla&amp;quot; to use the Joomla! standard&lt;br /&gt;
# now you can click &#039;&#039;test Settings&#039;&#039; to check the settings and finish the installation by pressing &#039;&#039;Ok&#039;&#039;&lt;br /&gt;
# Open he task window (Window =&amp;gt; Tasks) to sniff your code.&lt;br /&gt;
# Most time it is a good idea to filter the task (show only in edited file or create an own filter which displays only sniff errors)&lt;br /&gt;
&lt;br /&gt;
=== Eclipse ===&lt;br /&gt;
[[Image:eclipse_pti.png|left|thumb|200px|1) Eclipse PTI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Installation is a breeze and follows the usual pattern:&lt;br /&gt;
# &amp;lt;tt&amp;gt;Help =&amp;gt; Install new Software...&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &amp;lt;tt&amp;gt;Work with:&amp;lt;/tt&amp;gt; Fill in one of the update site URLs found here: http://www.phpsrc.org/eclipse/pti/&lt;br /&gt;
# Select the desired tools&lt;br /&gt;
# Restart Eclipse.&lt;br /&gt;
&lt;br /&gt;
[[Image:eclipse_pti_settings.png|right|thumb|150px|2) Eclipse PTI settings]]&lt;br /&gt;
You are now able to sniff for code violations against common standards like PEAR or Zend etc.&lt;br /&gt;
&lt;br /&gt;
To sniff against your own standards, all you have to do is specify their location and activate them (see screen shot 2)&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;tt&amp;gt;Window =&amp;gt; Preferences&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &amp;lt;tt&amp;gt;PHP Tools =&amp;gt; PHP CodeSniffer&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Happy sniffing&lt;br /&gt;
&lt;br /&gt;
=== PHPStorm ===&lt;br /&gt;
&lt;br /&gt;
==== PHPStorm ====&lt;br /&gt;
[[Image:PhpStorm4CodeSniffer.png|left|thumb|200px|1) PHPStorm  4.x CodeSniffer]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CodeSniffer is supported out of the box in PHPStorm, just go to settings, and under &amp;quot;Inspections&amp;quot; you will see the list of Sniff you have installed.&lt;br /&gt;
&lt;br /&gt;
See: the [http://www.jetbrains.com/phpstorm/webhelp/using-php-code-sniffer-tool.html JetBrains documentation page for setting the Code Sniffer]  and also  [http://blog.jetbrains.com/webide/2012/03/checking-your-code-with-php-code-sniffer-in-phpstorm-4-0/ phpStorm Blog])&lt;br /&gt;
&lt;br /&gt;
For users on ubuntu using phpStorm. Don&#039;t listen instructions at http://www.jetbrains.com/phpstorm/webhelp/using-php-code-sniffer-tool.html#d59626e1126 because there is no working bat (windows file) on linux system. To validate your CodeSniffer choose /usr/bin/phpcs launcher.&lt;br /&gt;
&lt;br /&gt;
===== Installing Joomla Sniff =====&lt;br /&gt;
&lt;br /&gt;
# get the sniffers from the [https://github.com/joomla/coding-standards coding standards repo]&lt;br /&gt;
# unpack Joomla CodeSniffer rules under:&lt;br /&gt;
## If you are using XAMPP &#039;&#039;\xampp\php\PEAR\PHP\CodeSniffer\Standards\Joomla&#039;&#039;&lt;br /&gt;
## If not maybe you should check here: &#039;&#039;/usr/share/php/PHP/CodeSniffer/Standards&#039;&#039;&lt;br /&gt;
# Go to Settings (CTRL-ALT-S) and search for &amp;quot;PHP Code Sniffer Validation&amp;quot;, click the button Validate to force reload of rules from disk&lt;br /&gt;
# Joomla should be now available in the list. See following image:&lt;br /&gt;
&lt;br /&gt;
[[Image:PhpStorm6CodeSniffer.png|left|thumb|200px|1) PHPStorm  6.x CodeSniffer]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== PHP PSR-0, PSR-1 and PSR-2 ====&lt;br /&gt;
* https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md&lt;br /&gt;
* https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-1-basic.md&lt;br /&gt;
* https://github.com/pmjones/fig-standards/blob/psr-1-style-guide/proposed/PSR-2-advanced.md&lt;br /&gt;
&lt;br /&gt;
===== Installing PHP PSR-0, PSR-1 and PSR-2 Sniff =====&lt;br /&gt;
&lt;br /&gt;
A CodeSniffer sniff to check against the PSR-x Coding Standard&lt;br /&gt;
&lt;br /&gt;
Download files at&lt;br /&gt;
* https://github.com/squizlabs/PHP_CodeSniffer/tree/master/CodeSniffer/Standards&lt;br /&gt;
&lt;br /&gt;
if you are using Xampp, &lt;br /&gt;
# unpack PSR-1 CodeSniffer rules under \xampp\php\PEAR\PHP\CodeSniffer\Standards\PSR (SPR or any directory will work)&lt;br /&gt;
# Go to Settings (CTRL-ALT-S) and search for &amp;quot;PHP Code Sniffer Validation&amp;quot;, click the button Validate to force reload of rules from disk&lt;br /&gt;
# PSR is available in the list&lt;br /&gt;
&lt;br /&gt;
==== PHPStorm  3.x / Alternative method ====&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: This method is outdated, but it might be useful if you are looking for a different integration. It also demonstrates the use of external tools in PHPStorm - so it shouldn&#039;t be deleted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;del&amp;gt;There is currently no plugin available&amp;lt;/del&amp;gt; The CodeSniffer can also be integrated easily as an external tool. PHPStorm will display the output in the console, including clickable links containing line and column numbers to the files that contain errors.&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;Settings&amp;quot; and search for &amp;quot;External tools&amp;quot;&lt;br /&gt;
* Click &amp;quot;Add...&amp;quot;&lt;br /&gt;
* Choose a &amp;quot;name&amp;quot;, &amp;quot;Group&amp;quot; and &amp;quot;Description&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Output Filters&amp;quot;&lt;br /&gt;
** Click &amp;quot;Add...&amp;quot;, Choose a name and enter under &amp;quot;Regular expression to match output&amp;quot; the value: &amp;lt;tt&amp;gt;$FILE_PATH$:$LINE$:$COLUMN$&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;quot;Program&amp;quot;: Search for the phpcs executable on your system. You have to set the path to the &#039;&#039;phpcs.bat&#039;&#039; from the installed PHP_CodeSniffer PEAR package&lt;br /&gt;
** for Unix based systems the path is something like /usr/bin/phpcs&lt;br /&gt;
** in XAMPP (windows) you can find the file in the php root folder (e.g. C:\xampp\php\phpcs.bat)&lt;br /&gt;
* &amp;quot;Paramaters&amp;quot;:&lt;br /&gt;
** &amp;lt;tt&amp;gt;--standard=&amp;lt;path/to/joomla-platform&amp;gt;/build/phpcs/Joomla&amp;lt;/tt&amp;gt; The path to the Joomla! coding standards.&lt;br /&gt;
** &amp;lt;tt&amp;gt;--report=emacs&amp;lt;/tt&amp;gt; The will generate a simple list containing links to the error files&lt;br /&gt;
** Optional you may want to specify &amp;lt;tt&amp;gt;-p&amp;lt;/tt&amp;gt; for &amp;quot;progress&amp;quot; or &amp;lt;tt&amp;gt;-n&amp;lt;/tt&amp;gt; for &amp;quot;errors only&amp;quot;.&lt;br /&gt;
** The last parameter has to be &amp;lt;tt&amp;gt;$FilePath$&amp;lt;/tt&amp;gt; specifying the file or folder you want to sniff.&lt;br /&gt;
&lt;br /&gt;
A typical &amp;quot;Parameters&amp;quot; line on a Linux system might look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;-np --standard=/home/elkuku/libs/joomla/build/phpcs/Joomla --report=emacs $FilePath$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may now right click any file or folder and choose the sniffer from the context menu or add a new toolbar button with a nice Joomla! logo [[File:icon-16-joomla.png]].&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* http://www.phpsrc.org/ PTI - PHP tools integration for Eclipse&lt;br /&gt;
* http://sourceforge.net/projects/phpmdnb/ Netbeans plugin&lt;br /&gt;
* http://hakre.wordpress.com/2010/03/06/php-code-sniffer-eclipse-and-wordpress/ - Excellent article. Just change &amp;quot;Wordpress&amp;quot; for &amp;quot;Joomla!&amp;quot; ;)&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]][[Category:Bug Squad]]&lt;/div&gt;</summary>
		<author><name>B.nisevic</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Using_the_JPane_classes_in_a_component&amp;diff=83663</id>
		<title>J1.5:Using the JPane classes in a component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Using_the_JPane_classes_in_a_component&amp;diff=83663"/>
		<updated>2013-04-01T17:18:45Z</updated>

		<summary type="html">&lt;p&gt;B.nisevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{deprecated|when=1.5|from=1.6|link=Using_the_JHtmlTabs_class_in_a_component|old=JPane|new=JHtmlTabs}}&lt;br /&gt;
JPane class types include &#039;Tabs&#039; and &#039;Sliders&#039;. &lt;br /&gt;
&lt;br /&gt;
Sliders implement the mootools accordian effect. Examples are the Joomla Admin parameters settings.&lt;br /&gt;
Tabs also implement mootools (but in which degree?)&lt;br /&gt;
&lt;br /&gt;
startPane and endPane() require a string identifier.&lt;br /&gt;
&lt;br /&gt;
JPanes contain Panels&lt;br /&gt;
&lt;br /&gt;
startPanel() and endPanel() require name and ID parameters.&lt;br /&gt;
&lt;br /&gt;
You can set some options in the getInstance method.&lt;br /&gt;
== JPane options ==&lt;br /&gt;
&#039;&#039;&#039;startOffset&#039;&#039;&#039;:  The default tab/slider to start with (zero based index).&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;allowAllClose&#039;&#039;&#039;:  Can we close all sliders (=true) or may always have one open (=false).&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;opacityTransition&#039;&#039;&#039;: show a fading Transition (=true or =false) when opening or closing the slider/tab.&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;duration&#039;&#039;&#039;: Time duration to display or close the slider/tab in milliseconds (default : 300).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;onActive&#039;&#039;&#039;: Another function to use when making a tab active (??)&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;onBackground&#039;&#039;&#039;:  Another function to use when making a tab dissapear (??)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
jimport(&#039;joomla.html.pane&#039;);&lt;br /&gt;
//1st Parameter: Specify &#039;tabs&#039; or &#039;sliders&#039; as appearance &lt;br /&gt;
//2nd Parameter: Array with 4 parameters (optionnal)&lt;br /&gt;
//	- &#039;startOffset&#039; : Starting with third tab(=2) as the default (zero based index)&lt;br /&gt;
//	- &#039;allowAllClose&#039; : Determine if all tabs or sliders can be closed (=true) or if there must always be almost one tab/slider opened (=false)&lt;br /&gt;
//	- &#039;opacityTransition&#039; : Specify if a fade Transition must be use when opening or closing the slider/tab (true or false)&lt;br /&gt;
//	- &#039;duration&#039; : Time duration to display or close the slider/tab in milliseconds  (default : 300)&lt;br /&gt;
$pane =&amp;amp; JPane::getInstance(&#039;tabs&#039;, array(&#039;startOffset&#039;=&amp;gt;2, &#039;allowAllClose&#039;=&amp;gt;true, &#039;opacityTransition&#039;=&amp;gt;true, &#039;duration&#039;=&amp;gt;600)); &lt;br /&gt;
echo $pane-&amp;gt;startPane( &#039;pane&#039; );&lt;br /&gt;
echo $pane-&amp;gt;startPanel( &#039;Example Panel 1&#039;, &#039;panel1&#039; );&lt;br /&gt;
echo &amp;quot;This is panel1&amp;quot;;&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
echo $pane-&amp;gt;startPanel( &#039;&amp;lt;h3&amp;gt;Example Panel 2&amp;lt;/h3&amp;gt;&#039;, &#039;panel2&#039; );&lt;br /&gt;
echo &amp;quot;This is panel2 with an header3 tag&amp;quot;;&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
echo $pane-&amp;gt;startPanel( &#039;Example Panel 3&#039;, &#039;panel3&#039; );&lt;br /&gt;
echo &amp;quot;This is panel3&amp;quot;;&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
echo $pane-&amp;gt;endPane();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Don&#039;t forget the echo&#039;s!! Thanks to tcp for this post: [http://forum.joomla.org/viewtopic.php?f=231&amp;amp;t=135641#p664869 FYI - Change in usage of JPane]&lt;br /&gt;
Also notice that the useCookies in the comments in the code or on the api, do NOT seem to be implemented&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Adding onClick to Tab ==&lt;br /&gt;
Looking in JTabs source, you will found that there are two more options can be set; onActive and onBackground event. This is easy to add if you familiar with PHP and JavaScript. But I will show you how to do in an easy way (but may not a best practic). Look back to JPane-&amp;gt;startPanel(..,...), for the first parameter you can add tag to it instead of normal text. So, I just add span tag to the tab title and set onClick to do something.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$pane = &amp;amp; JPane::getInstance(&#039;Tabs&#039;); &lt;br /&gt;
echo $pane-&amp;gt;startPane(&#039;doc&#039;) ;&lt;br /&gt;
echo $pane-&amp;gt;startPanel(&#039;&amp;lt;span onclick=&amp;quot;document.adminForm.job_id.value=0;&amp;quot;&amp;gt;Summary&amp;lt;/span&amp;gt;&#039;,&#039;doc-summary&#039;) ;&lt;br /&gt;
echo $this-&amp;gt;loadTemplate(&#039;summary&#039;);&lt;br /&gt;
echo $pane-&amp;gt;endPanel();&lt;br /&gt;
foreach($this-&amp;gt;jobs as $job)&lt;br /&gt;
{&lt;br /&gt;
      $this-&amp;gt;job = $job;&lt;br /&gt;
      if ($this-&amp;gt;doc-&amp;gt;type_id == CP_CLEARING_REQ)&lt;br /&gt;
      {&lt;br /&gt;
          $this-&amp;gt;refJob = null;&lt;br /&gt;
          foreach ($this-&amp;gt;refJobs as $refJob) {&lt;br /&gt;
              if ( ($refJob-&amp;gt;project_no==$job-&amp;gt;project_no) &amp;amp;&amp;amp; ($refJob-&amp;gt;subproject_code==$job-&amp;gt;subproject_code) )&lt;br /&gt;
              {&lt;br /&gt;
                 $this-&amp;gt;refJob = $refJob;&lt;br /&gt;
                 break;&lt;br /&gt;
              }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      echo $pane-&amp;gt;startPanel(&#039;&amp;lt;span onclick=&amp;quot;document.adminForm.job_id.value=&#039;.$job-&amp;gt;id.&#039;;&amp;quot;&amp;gt;&#039;.$job-&amp;gt;project_no.&#039;/&#039;&lt;br /&gt;
           .$job-&amp;gt;subproject_code.&amp;quot;&amp;lt;/span&amp;gt;&amp;quot;, &#039;job-&#039;.$job-&amp;gt;id);&lt;br /&gt;
      echo $this-&amp;gt;loadTemplate(&#039;job&#039;);&lt;br /&gt;
      echo $pane-&amp;gt;endPanel();	&lt;br /&gt;
}&lt;br /&gt;
echo $pane-&amp;gt;endPane() ;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>B.nisevic</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Learn_more_about_patch_files&amp;diff=83550</id>
		<title>Archived:Learn more about patch files</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Learn_more_about_patch_files&amp;diff=83550"/>
		<updated>2013-03-22T14:10:10Z</updated>

		<summary type="html">&lt;p&gt;B.nisevic: /* Other Important Articles About Patch Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Bug Squad]]&lt;br /&gt;
&lt;br /&gt;
Test this patch, make a patch, are things you hear when you report an issue or when you&#039;re working on bugs. What exactly is a patch?&lt;br /&gt;
&lt;br /&gt;
A patch is a file that indicates which exact lines in which exact files should be changed.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a recent patch from issue 11354 which corrected a simple typo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 Index: plugins/authentication/gmail.php&lt;br /&gt;
 ===================================================================&lt;br /&gt;
 --- plugins/authentication/gmail.php (revision 10386)&lt;br /&gt;
 +++ plugins/authentication/gmail.php (working copy)&lt;br /&gt;
 @@ -87,7 +87,7 @@&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
  else {&lt;br /&gt;
 - $message = &#039;curl isn\&#039;t insalled&#039;;&lt;br /&gt;
 + $message = &#039;curl isn\&#039;t installed&#039;;&lt;br /&gt;
  } &lt;br /&gt;
  if ($success)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Looking more closely, we see that the patch always starts with the name of the changed file relative to the Joomla! root. In this case it is the file gmail.php in the plugins/authenticaion folder.&lt;br /&gt;
&lt;br /&gt;
Next we see the file named again in two lines. The number in the first line represents the version of the code base or build on which the patch was created, The working copy is the copy that is changed. What do I mean by build? Every time a change is made to the codebase, that creates a new revision or build. You can find your build number in the changelog.php file in your joomla! root.&lt;br /&gt;
&lt;br /&gt;
Next comes @@ -87,7 +87,7 @@ which tells us that the change will start on line 87 of the file.&lt;br /&gt;
&lt;br /&gt;
Finally we see the code. The old line 87 has a – in front of it and the new line 87 has a +.&lt;br /&gt;
&lt;br /&gt;
The new version of the line will replace the old line in the file.&lt;br /&gt;
&lt;br /&gt;
Of course most patches are much more complex than this, but they really just are repeated instances of this structure.&lt;br /&gt;
&lt;br /&gt;
So if you saw this patch file and wanted to fix your version of Joomla! all you would need to do is find line 87 of gmail.php and make that change. So if someone tells you “There&#039;s a patch on the tracker” what they are saying is that you can go download the patch and apply it to your version of Joomla!. However one thing to keep in mind is that if your version does not match the version in the code repository it is possible that that patch will not work because it depends on or impacts other parts of the code.&lt;br /&gt;
&lt;br /&gt;
Now, if you&#039;re contributing a bug fix  as opposed to just reporting an issue, the ideal is to submit a patch file that you have tested. However, if you can&#039;t do that, at least give this information:&lt;br /&gt;
&lt;br /&gt;
    * The complete names and paths of any files changed&lt;br /&gt;
    * The line numbers of the changes&lt;br /&gt;
    * The old and new versions of the changed lines&lt;br /&gt;
&lt;br /&gt;
However, making a patch file is even better and  is not complicated if you install a subversion client such as Tortoise or the Subclipse plugin for Eclipse. For information on how to install the Eclipse IDE, see [[Setting_up_your_workstation_for_Joomla!_development | Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
==Patch Files and UTF-8 Characters==&lt;br /&gt;
Most patch files are for PHP files that contain simple text. However, patch files can also be used to patch language INI files, and these can often contain UTF-8 characters. There is a known problem when you try to apply a patch with UTF-8 characters using Eclipse. The patch file may show errors when you try to apply it. One possible work-around to this problem is to copy the file to your clipboard and then in the Patch Input Specification in Eclipse, select Clipboard instead of File. Note that the preview for the patched files may show question marks for the UTF-8 characters, but the patch will apply correctly.&lt;br /&gt;
&lt;br /&gt;
You can check that the patch did apply correctly by using the Compare With&amp;amp;rarr;Base Revision feature in Eclipse.&lt;br /&gt;
&lt;br /&gt;
==Other Important Articles About Patch Files==&lt;br /&gt;
[http://docs.joomla.org/Git_for_Testers_and_Trackers#Important_Notes_About_Patch_File_Format Important Notes About Patch File Format]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://docs.joomla.org/Git_for_Testers_and_Trackers#Apply_Patches_and_Pull_Requests_Without_Branches Apply Patches and Pull Requests Without Branches]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://docs.joomla.org/Git_for_Testers_and_Trackers#Apply_Patches_and_Pull_Requests_Using_Branches Apply Patches and Pull Requests Using Branches]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>B.nisevic</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Learn_more_about_patch_files&amp;diff=83549</id>
		<title>Archived:Learn more about patch files</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Learn_more_about_patch_files&amp;diff=83549"/>
		<updated>2013-03-22T14:07:12Z</updated>

		<summary type="html">&lt;p&gt;B.nisevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Bug Squad]]&lt;br /&gt;
&lt;br /&gt;
Test this patch, make a patch, are things you hear when you report an issue or when you&#039;re working on bugs. What exactly is a patch?&lt;br /&gt;
&lt;br /&gt;
A patch is a file that indicates which exact lines in which exact files should be changed.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a recent patch from issue 11354 which corrected a simple typo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 Index: plugins/authentication/gmail.php&lt;br /&gt;
 ===================================================================&lt;br /&gt;
 --- plugins/authentication/gmail.php (revision 10386)&lt;br /&gt;
 +++ plugins/authentication/gmail.php (working copy)&lt;br /&gt;
 @@ -87,7 +87,7 @@&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
  else {&lt;br /&gt;
 - $message = &#039;curl isn\&#039;t insalled&#039;;&lt;br /&gt;
 + $message = &#039;curl isn\&#039;t installed&#039;;&lt;br /&gt;
  } &lt;br /&gt;
  if ($success)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Looking more closely, we see that the patch always starts with the name of the changed file relative to the Joomla! root. In this case it is the file gmail.php in the plugins/authenticaion folder.&lt;br /&gt;
&lt;br /&gt;
Next we see the file named again in two lines. The number in the first line represents the version of the code base or build on which the patch was created, The working copy is the copy that is changed. What do I mean by build? Every time a change is made to the codebase, that creates a new revision or build. You can find your build number in the changelog.php file in your joomla! root.&lt;br /&gt;
&lt;br /&gt;
Next comes @@ -87,7 +87,7 @@ which tells us that the change will start on line 87 of the file.&lt;br /&gt;
&lt;br /&gt;
Finally we see the code. The old line 87 has a – in front of it and the new line 87 has a +.&lt;br /&gt;
&lt;br /&gt;
The new version of the line will replace the old line in the file.&lt;br /&gt;
&lt;br /&gt;
Of course most patches are much more complex than this, but they really just are repeated instances of this structure.&lt;br /&gt;
&lt;br /&gt;
So if you saw this patch file and wanted to fix your version of Joomla! all you would need to do is find line 87 of gmail.php and make that change. So if someone tells you “There&#039;s a patch on the tracker” what they are saying is that you can go download the patch and apply it to your version of Joomla!. However one thing to keep in mind is that if your version does not match the version in the code repository it is possible that that patch will not work because it depends on or impacts other parts of the code.&lt;br /&gt;
&lt;br /&gt;
Now, if you&#039;re contributing a bug fix  as opposed to just reporting an issue, the ideal is to submit a patch file that you have tested. However, if you can&#039;t do that, at least give this information:&lt;br /&gt;
&lt;br /&gt;
    * The complete names and paths of any files changed&lt;br /&gt;
    * The line numbers of the changes&lt;br /&gt;
    * The old and new versions of the changed lines&lt;br /&gt;
&lt;br /&gt;
However, making a patch file is even better and  is not complicated if you install a subversion client such as Tortoise or the Subclipse plugin for Eclipse. For information on how to install the Eclipse IDE, see [[Setting_up_your_workstation_for_Joomla!_development | Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
==Patch Files and UTF-8 Characters==&lt;br /&gt;
Most patch files are for PHP files that contain simple text. However, patch files can also be used to patch language INI files, and these can often contain UTF-8 characters. There is a known problem when you try to apply a patch with UTF-8 characters using Eclipse. The patch file may show errors when you try to apply it. One possible work-around to this problem is to copy the file to your clipboard and then in the Patch Input Specification in Eclipse, select Clipboard instead of File. Note that the preview for the patched files may show question marks for the UTF-8 characters, but the patch will apply correctly.&lt;br /&gt;
&lt;br /&gt;
You can check that the patch did apply correctly by using the Compare With&amp;amp;rarr;Base Revision feature in Eclipse.&lt;br /&gt;
&lt;br /&gt;
==Other Important Articles About Patch Files==&lt;br /&gt;
[http://docs.joomla.org/Git_for_Testers_and_Trackers#Important_Notes_About_Patch_File_Format | Important Notes About Patch File Format]&lt;br /&gt;
[http://docs.joomla.org/Git_for_Testers_and_Trackers#Apply_Patches_and_Pull_Requests_Without_Branches | Apply Patches and Pull Requests Without Branches]&lt;br /&gt;
[http://docs.joomla.org/Git_for_Testers_and_Trackers#Apply_Patches_and_Pull_Requests_Using_Branches | Apply Patches and Pull Requests Using Branches]&lt;/div&gt;</summary>
		<author><name>B.nisevic</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Testing_Checklists&amp;diff=83546</id>
		<title>Testing Checklists</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Testing_Checklists&amp;diff=83546"/>
		<updated>2013-03-22T13:13:04Z</updated>

		<summary type="html">&lt;p&gt;B.nisevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is designed to help Joomla! Bug Squad members as they test Open issues and Pending issues.&lt;br /&gt;
&lt;br /&gt;
=== Testing Open Issues ===&lt;br /&gt;
The &amp;quot;Open&amp;quot; status indicates that no JBS member has evaluated this issue. So the goal is to learn enough about the issue to be able to change the status to one of the following: Unable to Confirm, Known Issue, Duplicate Report, Not Joomla! Core, Confirmed,  or Information Required. See [[Bug Tracking Process#Resolving Issues | Bug Tracking Process]] for details about these status codes.&lt;br /&gt;
&lt;br /&gt;
Here is a checklist for testing Open issues:&lt;br /&gt;
* Did you carefully read the whole description and any other comments? &lt;br /&gt;
* Is there enough information provided? If not, add a comment and change to Information Required.&lt;br /&gt;
* Did you search the tracker to see if this issue has already been reported? If so, add a comment and change to Duplicate Report.&lt;br /&gt;
* Does the issue relate to a Joomla! core program? If not, change status to Not Joomla! Core.&lt;br /&gt;
* Is the issue a known issue or limitation? If so, change status to Known Issue.&lt;br /&gt;
* Is the issue an enhancement request? If so, change status to Not a Bug.&lt;br /&gt;
* Before testing, did you update your local GIT repository to get the latest GIT Joomla! version? (see [[Git for Testers and Trackers]])&lt;br /&gt;
* If you couldn&#039;t duplicate the problem with the latest GIT version, did you test using the latest production version?&lt;br /&gt;
* If the issue is still unconfirmed, try to to reproduce the issue with different cache settings.&lt;br /&gt;
* Try to localize the problem by changing your cache settings.&lt;br /&gt;
* If you changed the issue to Confirmed, did you make sure there is a detailed test plan in the comments to allow someone who is not familiar with the issue to understand and test the issue?&lt;br /&gt;
&lt;br /&gt;
=== Testing Pending Issues ===&lt;br /&gt;
A Pending issue is one that (a) has been confirmed, (b) has a detailed test plan, and (c) has a proposed patch to be tested ([[Learn more about patch files]]). Here is a checklist for testing Pending issues:&lt;br /&gt;
* Is there a test plan for the issue shown in the Test Instructions field? If not, post a comment and change status to Information Required.&lt;br /&gt;
* Before testing, did you update your local GIT repository to get the latest GIT Joomla! version?&lt;br /&gt;
* Did you test the issue &#039;&#039;before&#039;&#039; applying the patch to make sure you can duplicate the problem?&lt;br /&gt;
* Did you test the issue after applying the patch to make sure the problem is fixed?&lt;br /&gt;
* Are there any other test cases that should be considered? Examples might include:&lt;br /&gt;
** template override files (especially beez template)&lt;br /&gt;
** testing with SEF or mod_rewrite enabled and disabled&lt;br /&gt;
** language file issues (test with Debug Language set to Yes).&lt;br /&gt;
** PHP warnings (test with Error Reporting set to Maximum).&lt;br /&gt;
* In your comment before you report the test results (positive or negative) add @test to the comment on a separate line (this is used for stats).&lt;br /&gt;
* If your test is successful and you are the first tester, indicate in your comment that a second test is needed. If you are the second tester, change the status to Ready to Commit.&lt;br /&gt;
* Check the &amp;quot;Monitor Item&amp;quot; link on the left side if you want to receive an email when someone changes this tracker issue.&lt;br /&gt;
* Remember to revert the changes made by the patch after you are done testing.&lt;br /&gt;
&lt;br /&gt;
=== Testing Code Snippets ===&lt;br /&gt;
Sometimes to test a patch you will need to test PHP code snippets. One very simple way to do this is as follows:&lt;br /&gt;
# Create a new folder called &amp;quot;com_test&amp;quot; under the components folder.&lt;br /&gt;
# Create a new file called &amp;quot;test.php&amp;quot; under this folder.&lt;br /&gt;
# Put your PHP code snippet in this file.&lt;br /&gt;
# To run the file, just enter the URL &amp;lt;your domain&amp;gt;/index.php?option=com_test. For example, &amp;lt;nowiki&amp;gt;http://localhost/joomla_development/index.php?option=com_test&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This will run the code snippet inside the Joomla! framework. This way, when you are done, you can just remove the com_test folder and no other files have been changed. (Sam, thanks for this tip!)&lt;br /&gt;
&lt;br /&gt;
=== General Tips &amp;amp; Tricks ===&lt;br /&gt;
* If you have the cache enabled (Global Configuration &amp;amp;rarr; System &amp;amp;rarr; Cache Settings), you will need to clean the cache each time you make a change to the code or parameters. Otherwise, you might be seeing the older cached version of the page. For this reason, unless you are specifically testing the cache feature, test with the Cache set to &amp;quot;No&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* When working it is best to set error reporting to maximum and turn on all debugging options (these are set in Global Configuration).&lt;br /&gt;
&lt;br /&gt;
[[Category:Bug Squad]]&lt;/div&gt;</summary>
		<author><name>B.nisevic</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Testing_Checklists&amp;diff=83524</id>
		<title>Testing Checklists</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Testing_Checklists&amp;diff=83524"/>
		<updated>2013-03-22T10:05:41Z</updated>

		<summary type="html">&lt;p&gt;B.nisevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is designed to help Joomla! Bug Squad members as they test Open issues and Pending issues.&lt;br /&gt;
&lt;br /&gt;
=== Testing Open Issues ===&lt;br /&gt;
The &amp;quot;Open&amp;quot; status indicates that no JBS member has evaluated this issue. So the goal is to learn enough about the issue to be able to change the status to one of the following: Unable to Confirm, Known Issue, Duplicate Report, Not Joomla! Core, Confirmed,  or Information Required. See [[Bug Tracking Process#Resolving Issues | Bug Tracking Process]] for details about these status codes.&lt;br /&gt;
&lt;br /&gt;
Here is a checklist for testing Open issues:&lt;br /&gt;
* Did you carefully read the whole description and any other comments? &lt;br /&gt;
* Is there enough information provided? If not, add a comment and change to Information Required.&lt;br /&gt;
* Did you search the tracker to see if this issue has already been reported? If so, add a comment and change to Duplicate Report.&lt;br /&gt;
* Does the issue relate to a Joomla! core program? If not, change status to Not Joomla! Core.&lt;br /&gt;
* Is the issue a known issue or limitation? If so, change status to Known Issue.&lt;br /&gt;
* Is the issue an enhancement request? If so, change status to Not a Bug.&lt;br /&gt;
* Before testing, did you update your local GIT repository to get the latest GIT Joomla! version? (see [[Git for Testers and Trackers]])&lt;br /&gt;
* If you couldn&#039;t duplicate the problem with the latest GIT version, did you test using the latest production version?&lt;br /&gt;
* If the issue is still unconfirmed, try to to reproduce the issue with different cache settings.&lt;br /&gt;
* Try to localize the problem by changing your cache settings.&lt;br /&gt;
* If you changed the issue to Confirmed, did you make sure there is a detailed test plan in the comments to allow someone who is not familiar with the issue to understand and test the issue?&lt;br /&gt;
&lt;br /&gt;
=== Testing Pending Issues ===&lt;br /&gt;
A Pending issue is one that (a) has been confirmed, (b) has a detailed test plan, and (c) has a proposed patch to be tested ([[Learn more about patch files]]). Here is a checklist for testing Pending issues:&lt;br /&gt;
* Is there a test plan for the issue shown in the Test Instructions field? If not, post a comment and change status to Information Required.&lt;br /&gt;
* Before testing, did you update your local SVN repository to get the latest SVN Joomla! version?&lt;br /&gt;
* Did you test the issue &#039;&#039;before&#039;&#039; applying the patch to make sure you can duplicate the problem?&lt;br /&gt;
* Did you test the issue after applying the patch to make sure the problem is fixed?&lt;br /&gt;
* Are there any other test cases that should be considered? Examples might include:&lt;br /&gt;
** template override files (especially beez template)&lt;br /&gt;
** testing with SEF or mod_rewrite enabled and disabled&lt;br /&gt;
** language file issues (test with Debug Language set to Yes).&lt;br /&gt;
** PHP warnings (test with Error Reporting set to Maximum).&lt;br /&gt;
* In your comment before you report the test results (positive or negative) add @test to the comment on a separate line (this is used for stats).&lt;br /&gt;
* If your test is successful and you are the first tester, indicate in your comment that a second test is needed. If you are the second tester, change the status to Ready to Commit.&lt;br /&gt;
* Check the &amp;quot;Monitor Item&amp;quot; link on the left side if you want to receive an email when someone changes this tracker issue.&lt;br /&gt;
* Remember to revert the changes made by the patch after you are done testing.&lt;br /&gt;
&lt;br /&gt;
=== Testing Code Snippets ===&lt;br /&gt;
Sometimes to test a patch you will need to test PHP code snippets. One very simple way to do this is as follows:&lt;br /&gt;
# Create a new folder called &amp;quot;com_test&amp;quot; under the components folder.&lt;br /&gt;
# Create a new file called &amp;quot;test.php&amp;quot; under this folder.&lt;br /&gt;
# Put your PHP code snippet in this file.&lt;br /&gt;
# To run the file, just enter the URL &amp;lt;your domain&amp;gt;/index.php?option=com_test. For example, &amp;lt;nowiki&amp;gt;http://localhost/joomla_development/index.php?option=com_test&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This will run the code snippet inside the Joomla! framework. This way, when you are done, you can just remove the com_test folder and no other files have been changed. (Sam, thanks for this tip!)&lt;br /&gt;
&lt;br /&gt;
=== General Tips &amp;amp; Tricks ===&lt;br /&gt;
* If you have the cache enabled (Global Configuration &amp;amp;rarr; System &amp;amp;rarr; Cache Settings), you will need to clean the cache each time you make a change to the code or parameters. Otherwise, you might be seeing the older cached version of the page. For this reason, unless you are specifically testing the cache feature, test with the Cache set to &amp;quot;No&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* When working it is best to set error reporting to maximum and turn on all debugging options (these are set in Global Configuration).&lt;br /&gt;
&lt;br /&gt;
[[Category:Bug Squad]]&lt;/div&gt;</summary>
		<author><name>B.nisevic</name></author>
	</entry>
</feed>