<?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=Lemings</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=Lemings"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Lemings"/>
	<updated>2026-08-19T17:32:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Portal:Template_Development/Reading_list&amp;diff=84325</id>
		<title>Portal:Template Development/Reading list</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Portal:Template_Development/Reading_list&amp;diff=84325"/>
		<updated>2013-04-12T16:07:53Z</updated>

		<summary type="html">&lt;p&gt;Lemings: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Accessibility]]&lt;br /&gt;
* [[Beez]] - an accessible default template&lt;br /&gt;
* [[Creating clickable background images using CSS]]&lt;br /&gt;
* The [[Joomla! 1.5 Template Tutorial]] is a work in progress. If you would like to help out with it, please take a look at the [[JDOC:Joomla! 1.5 Template Tutorials Project|main project page]] and the [[JDOC:Joomla! 1.5 Template Tutorials Project/Outline|Outline for Template Tutorials]].&lt;br /&gt;
* Jim Yuzwalk has contributed a useful [http://help.joomla.org/files/JJYs_Joomla_Template_Design_Tutorial-2010_08_26.pdf introduction to Joomla templates] (download the example template from [http://help.joomla.org/files/JJYs_Example_Joomla_Template_2010_05_07.zip here]).&lt;br /&gt;
* [[Changing the site favicon]]&lt;br /&gt;
* [[Using Class Suffixes]]&lt;br /&gt;
* [[Using Firebug With Your Joomla Website]] {{JVer/multi|1.0,1.5,1.6,1.7,2.5}}&lt;br /&gt;
* [[Understanding Output Overrides]] {{JVer/multi|1.5,2.5,3.0}}&lt;br /&gt;
* [[Layout Overrides in Joomla 2.5]] {{JVer/multi|1.6,2.5,3.0}}&lt;br /&gt;
* [[Creating custom template parameter types]] {{JVer/multi|1.5}}&lt;br /&gt;
* [[How are templates executed?]]&lt;br /&gt;
* [[How to determine if the user is viewing the front page]]&lt;br /&gt;
* [[Template parameters]] {{JVer/multi|1.5}}&lt;br /&gt;
* [[jdoc statements]]&lt;br /&gt;
* [[Objects methods and properties available from your template]] - what you can do with &amp;lt;code&amp;gt;$this&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[How to cloak email addresses]] {{JVer/multi|1.6,1.7,2.5,3.0}}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Landing subpages|{{PAGENAME}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Talk:Creating_a_profile_plugin&amp;diff=38051</id>
		<title>Talk:Creating a profile plugin</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Talk:Creating_a_profile_plugin&amp;diff=38051"/>
		<updated>2011-03-21T20:52:42Z</updated>

		<summary type="html">&lt;p&gt;Lemings: /* profile to profile5 */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[User:Jcasal|Jcasal]] 13:17, 28 December 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The examples uses the language model for I18N of the plugin, but does not show how this elements are added to the plugin the language directories.&lt;br /&gt;
&lt;br /&gt;
Looking at &#039;&#039;profile5.xml&#039;&#039; it indicates that the language files are to be found in:&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages&amp;gt;&lt;br /&gt;
                &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.plg_user_profile.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.plg_user_profile.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But these are the language files for the &#039;&#039;User:Profile&#039;&#039; plugin. So basically, the language translations would need to be done on another plugin&#039;s language files?&lt;br /&gt;
&lt;br /&gt;
Should this tutorial show the plugin containing its own language files? For example:&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages&amp;gt;&lt;br /&gt;
                &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.plg_user_profile5.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.plg_user_profile5.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and examples of how these files would look like...&lt;br /&gt;
&lt;br /&gt;
[[User:Jcasal|Jcasal]] 21:00, 28 December 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Actually, after lots of trial and error, I have found a few other things that needed to be updated, so the changes are now published. Hope they work for others and save you some time doing your first user profile extension plugin.&lt;br /&gt;
&lt;br /&gt;
== profile to profile5 ==&lt;br /&gt;
&lt;br /&gt;
I made the changes for plug-in to work as expected. &lt;br /&gt;
&lt;br /&gt;
As before it was not running onUserAfterSave functon, because profile5 property in $data array was not set. &lt;br /&gt;
&lt;br /&gt;
If profile keys stay the same in database, profile plugin wipes out profile5 keys and vice versa.&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Creating_a_profile_plugin&amp;diff=38050</id>
		<title>Creating a profile plugin</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Creating_a_profile_plugin&amp;diff=38050"/>
		<updated>2011-03-21T20:49:17Z</updated>

		<summary type="html">&lt;p&gt;Lemings: Changed &amp;#039;profile&amp;#039; with &amp;#039;profile5&amp;#039; to make plugin work.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Profile plugin is a new extension in Joomla! 1.6. It allows the addition of supplemental fields in the registration and profile forms of the com_user front end and in the user create/edit form in the back end.&lt;br /&gt;
&lt;br /&gt;
A simple example plugin is included in the basic Joomla! installation as a proof of concept. Much more complex plugins are possible.&lt;br /&gt;
&lt;br /&gt;
The example plugin takes advantage of on the onContentPrepareForm and onUserAfterSave events. &lt;br /&gt;
&lt;br /&gt;
Multiple profile plugins may be included and will be rendered in sequence.&lt;br /&gt;
&lt;br /&gt;
There are four separate places where profiles forms are used in core extensions, and each of these four can be manipulated separately if that is desired. The two locations in the front end are the user registration form and the user profile edit form. In the back end the locations are the edit screen for users in the user manager and the My Profile view found in the Admin menu.&lt;br /&gt;
&lt;br /&gt;
This page shows an example of a second plugin, named profile5. It adds a single field called something.&lt;br /&gt;
&lt;br /&gt;
This is the file structure&lt;br /&gt;
&lt;br /&gt;
 profile5.php&lt;br /&gt;
 profile5.xml&lt;br /&gt;
 en-GB.plg_user_profile5.ini&lt;br /&gt;
 en-GB.plg_user_profile5.sys.ini&lt;br /&gt;
 /profiles/profile.xml&lt;br /&gt;
&lt;br /&gt;
The supplemental fields are created with xml file in the profiles folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
	&amp;lt;!-- $Id: profile.xml 16723 2010-05-04 01:37:00Z eddieajau $ --&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;profile5&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset name=&amp;quot;profile5&amp;quot;&lt;br /&gt;
			label=&amp;quot;PLG_USER_PROFILE5_SLIDER_LABEL&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
				name=&amp;quot;something&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				id=&amp;quot;something&amp;quot;&lt;br /&gt;
				description=&amp;quot;PLG_USER_PROFILE5_FIELD_SOMETHING_DESC&amp;quot;&lt;br /&gt;
				filter=&amp;quot;string&amp;quot;&lt;br /&gt;
				label=&amp;quot;PLG_USER_PROFILE5_FIELD_SOMETHING_LABEL&amp;quot;&lt;br /&gt;
				message=&amp;quot;PLG_USER_PROFILE5_FIELD_SOMETHING_MESSAGE&amp;quot;&lt;br /&gt;
				size=&amp;quot;30&amp;quot;&lt;br /&gt;
			/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
profile5.php &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 /**&lt;br /&gt;
  * @version		$Id: profile.php 17685 2010-06-14 21:46:46Z dextercowley $&lt;br /&gt;
  * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
  * @license		GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
  */&lt;br /&gt;
&lt;br /&gt;
 defined(&#039;JPATH_BASE&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
  /**&lt;br /&gt;
   * An example custom profile plugin.&lt;br /&gt;
   *&lt;br /&gt;
   * @package		Joomla.Plugins&lt;br /&gt;
   * @subpackage	user.profile&lt;br /&gt;
   * @version		1.6&lt;br /&gt;
   */&lt;br /&gt;
  class plgUserProfile5 extends JPlugin&lt;br /&gt;
  {&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param	string	The context for the data&lt;br /&gt;
	 * @param	int		The user id&lt;br /&gt;
	 * @param	object&lt;br /&gt;
	 * @return	boolean&lt;br /&gt;
	 * @since	1.6&lt;br /&gt;
	 */&lt;br /&gt;
	function onContentPrepareData($context, $data)&lt;br /&gt;
	{&lt;br /&gt;
		// Check we are manipulating a valid form.&lt;br /&gt;
		if (!in_array($context, array(&#039;com_users.profile&#039;, &#039;com_users.registration&#039;))) {&lt;br /&gt;
			return true;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$userId = isset($data-&amp;gt;id) ? $data-&amp;gt;id : 0;&lt;br /&gt;
&lt;br /&gt;
		// Load the profile data from the database.&lt;br /&gt;
		$db = &amp;amp;JFactory::getDbo();&lt;br /&gt;
		$db-&amp;gt;setQuery(&lt;br /&gt;
			&#039;SELECT profile_key, profile_value FROM #__user_profiles&#039; .&lt;br /&gt;
			&#039; WHERE user_id = &#039;.(int) $userId .&lt;br /&gt;
			&#039; AND profile_key LIKE \&#039;profile5.%\&#039;&#039; .&lt;br /&gt;
			&#039; ORDER BY ordering&#039;&lt;br /&gt;
		);&lt;br /&gt;
		$results = $db-&amp;gt;loadRowList();&lt;br /&gt;
&lt;br /&gt;
		// Check for a database error.&lt;br /&gt;
		if ($db-&amp;gt;getErrorNum()) {&lt;br /&gt;
			$this-&amp;gt;_subject-&amp;gt;setError($db-&amp;gt;getErrorMsg());&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Merge the profile data.&lt;br /&gt;
		$data-&amp;gt;profile5 = array();&lt;br /&gt;
		foreach ($results as $v) {&lt;br /&gt;
			$k = str_replace(&#039;profile5.&#039;, &#039;&#039;, $v[0]);&lt;br /&gt;
			$data-&amp;gt;profile[$k] = $v[1];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param	JForm	The form to be altered.&lt;br /&gt;
	 * @param	array	The associated data for the form.&lt;br /&gt;
	 * @return	boolean&lt;br /&gt;
	 * @since	1.6&lt;br /&gt;
	 */&lt;br /&gt;
	function onContentPrepareForm($form, $data)&lt;br /&gt;
	{&lt;br /&gt;
		// Load user_profile plugin language&lt;br /&gt;
		$lang = JFactory::getLanguage();&lt;br /&gt;
		$lang-&amp;gt;load(&#039;plg_user_profile5&#039;, JPATH_ADMINISTRATOR);&lt;br /&gt;
&lt;br /&gt;
		if (!($form instanceof JForm)) {&lt;br /&gt;
			$this-&amp;gt;_subject-&amp;gt;setError(&#039;JERROR_NOT_A_FORM&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		// Check we are manipulating a valid form.&lt;br /&gt;
		if (!in_array($form-&amp;gt;getName(), array(&#039;com_users.profile&#039;, &#039;com_users.registration&#039;,&#039;com_users.user&#039;,&#039;com_admin.profile&#039;))) {&lt;br /&gt;
			return true;&lt;br /&gt;
		}&lt;br /&gt;
		if ($form-&amp;gt;getName()==&#039;com_users.profile&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			// Add the profile fields to the form.&lt;br /&gt;
			JForm::addFormPath(dirname(__FILE__).&#039;/profiles&#039;);&lt;br /&gt;
			$form-&amp;gt;loadFile(&#039;profile&#039;, false);&lt;br /&gt;
	&lt;br /&gt;
			// Toggle whether the something field is required.&lt;br /&gt;
			if ($this-&amp;gt;params-&amp;gt;get(&#039;profile-require_something&#039;, 1) &amp;gt; 0) {&lt;br /&gt;
				$form-&amp;gt;setFieldAttribute(&#039;something&#039;, &#039;required&#039;, $this-&amp;gt;params-&amp;gt;get(&#039;profile-require_something&#039;) == 2, &#039;profile&#039;);&lt;br /&gt;
			} else {&lt;br /&gt;
				$form-&amp;gt;removeField(&#039;something&#039;, &#039;profile&#039;);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		//In this example, we treat the frontend registration and the back end user create or edit as the same. &lt;br /&gt;
		elseif ($form-&amp;gt;getName()==&#039;com_users.registration&#039; || $form-&amp;gt;getName()==&#039;com_users.user&#039; )&lt;br /&gt;
		{		&lt;br /&gt;
			// Add the registration fields to the form.&lt;br /&gt;
			JForm::addFormPath(dirname(__FILE__).&#039;/profiles&#039;);&lt;br /&gt;
			$form-&amp;gt;loadFile(&#039;profile&#039;, false);&lt;br /&gt;
			&lt;br /&gt;
			// Toggle whether the something field is required.&lt;br /&gt;
			if ($this-&amp;gt;params-&amp;gt;get(&#039;register-require_something&#039;, 1) &amp;gt; 0) {&lt;br /&gt;
				$form-&amp;gt;setFieldAttribute(&#039;something&#039;, &#039;required&#039;, $this-&amp;gt;params-&amp;gt;get(&#039;register-require_something&#039;) == 2, &#039;profile&#039;);&lt;br /&gt;
			} else {&lt;br /&gt;
				$form-&amp;gt;removeField(&#039;something&#039;, &#039;profile&#039;);&lt;br /&gt;
			}&lt;br /&gt;
		}			&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	function onUserAfterSave($data, $isNew, $result, $error)&lt;br /&gt;
	{&lt;br /&gt;
		$userId	= JArrayHelper::getValue($data, &#039;id&#039;, 0, &#039;int&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($userId &amp;amp;&amp;amp; $result &amp;amp;&amp;amp; isset($data[&#039;profile5&#039;]) &amp;amp;&amp;amp; (count($data[&#039;profile5&#039;])))&lt;br /&gt;
		{&lt;br /&gt;
			try&lt;br /&gt;
			{&lt;br /&gt;
				$db = &amp;amp;JFactory::getDbo();&lt;br /&gt;
				$db-&amp;gt;setQuery(&#039;DELETE FROM #__user_profiles WHERE user_id = &#039;.$userId.&#039; AND profile_key LIKE \&#039;profile5.%\&#039;&#039;);&lt;br /&gt;
				if (!$db-&amp;gt;query()) {&lt;br /&gt;
					throw new Exception($db-&amp;gt;getErrorMsg());&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				$tuples = array();&lt;br /&gt;
				$order	= 1;&lt;br /&gt;
				foreach ($data[&#039;profile5&#039;] as $k =&amp;gt; $v) {&lt;br /&gt;
					$tuples[] = &#039;(&#039;.$userId.&#039;, &#039;.$db-&amp;gt;quote(&#039;profile5.&#039;.$k).&#039;, &#039;.$db-&amp;gt;quote($v).&#039;, &#039;.$order++.&#039;)&#039;;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				$db-&amp;gt;setQuery(&#039;INSERT INTO #__user_profiles VALUES &#039;.implode(&#039;, &#039;, $tuples));&lt;br /&gt;
				if (!$db-&amp;gt;query()) {&lt;br /&gt;
					throw new Exception($db-&amp;gt;getErrorMsg());&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			catch (JException $e) {&lt;br /&gt;
				$this-&amp;gt;_subject-&amp;gt;setError($e-&amp;gt;getMessage());&lt;br /&gt;
				return false;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Profile5.xml controls whether the field is required, disabled or optional in the forms. Since profile5.php says to treat backend create/edit the same as registration only two sets of options are required, register and profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
	&amp;lt;!-- $Id:  --&amp;gt;&lt;br /&gt;
 &amp;lt;extension version=&amp;quot;1.6&amp;quot; type=&amp;quot;plugin&amp;quot; group=&amp;quot;user&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;name&amp;gt;plg_user_profile5&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;Joomla! Project&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2008&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;(C) 2005 - 2010 Open Source Matters. All rights reserved.&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;GNU General Public License version 2 or later; see LICENSE.txt&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;admin@joomla.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;www.joomla.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;1.6.0&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;PLG_USER_PROFILE5_XML_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;files&amp;gt;&lt;br /&gt;
		&amp;lt;filename plugin=&amp;quot;profile5&amp;quot;&amp;gt;profile5.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;profiles&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;languages&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.plg_user_profile5.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.plg_user_profile5.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
	&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;config&amp;gt;&lt;br /&gt;
		&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
			&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;field name=&amp;quot;register-require-user&amp;quot; type=&amp;quot;spacer&amp;quot;&lt;br /&gt;
					label=&amp;quot;PLG_USER_PROFILE5_FIELD_NAME_REGISTER_REQUIRE_USER&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
				&amp;lt;field name=&amp;quot;register-something&amp;quot; type=&amp;quot;list&amp;quot;&lt;br /&gt;
					description=&amp;quot;PLG_USER_PROFILE5_FIELD_SOMETHING_DESC&amp;quot;&lt;br /&gt;
					label=&amp;quot;PLG_USER_PROFILE5_FIELD_SOMETHING_LABEL&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
					&amp;lt;option value=&amp;quot;2&amp;quot;&amp;gt;JOPTION_REQUIRED&amp;lt;/option&amp;gt;&lt;br /&gt;
					&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JOPTION_OPTIONAL&amp;lt;/option&amp;gt;&lt;br /&gt;
					&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JDISABLED&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;/field&amp;gt;&lt;br /&gt;
&lt;br /&gt;
				&amp;lt;field name=&amp;quot;profile-require-user&amp;quot; type=&amp;quot;spacer&amp;quot;&lt;br /&gt;
					label=&amp;quot;PLG_USER_PROFILE5_FIELD_NAME_PROFILE_REQUIRE_USER&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
				&amp;lt;field name=&amp;quot;profile-require_something&amp;quot; type=&amp;quot;list&amp;quot;&lt;br /&gt;
					description=&amp;quot;PLG_USER_PROFILE5_FIELD_SOMETHING_DESC&amp;quot;&lt;br /&gt;
					label=&amp;quot;PLG_USER_PROFILE5_FIELD_SOMETHING_LABEL&amp;quot;&lt;br /&gt;
				&amp;gt;&lt;br /&gt;
					&amp;lt;option value=&amp;quot;2&amp;quot;&amp;gt;JOPTION_REQUIRED&amp;lt;/option&amp;gt;&lt;br /&gt;
					&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JOPTION_OPTIONAL&amp;lt;/option&amp;gt;&lt;br /&gt;
					&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JDISABLED&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;/field&amp;gt;&lt;br /&gt;
&lt;br /&gt;
			&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;/config&amp;gt;&lt;br /&gt;
 &amp;lt;/extension&amp;gt;&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
en-GB.plg_user_profile5.ini&lt;br /&gt;
&lt;br /&gt;
 ; $Id: en-GB.plg_user_profile.ini 19353 2010-11-05 07:57:29Z infograf768 $&lt;br /&gt;
 ; Joomla! Project&lt;br /&gt;
 ; Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.&lt;br /&gt;
 ; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php&lt;br /&gt;
 ; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
 &lt;br /&gt;
 PLG_USER_PROFILE5_XML_DESCRIPTION=&amp;quot;User Profile 5 Plug-in&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5=&amp;quot;User - Profile 5&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_SLIDER_LABEL=&amp;quot;User Profile 5&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_FIELD_NAME_REGISTER_REQUIRE_USER=&amp;quot;User profile fields for registration and administrator user profile 5 forms&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_FIELD_NAME_PROFILE_REQUIRE_USER=&amp;quot;User profile fields for profile 5 edit form&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_FIELD_SOMETHING_DESC=&amp;quot;Choose an option for the something filed&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_FIELD_SOMETHING_LABEL=&amp;quot;Something!&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_FIELD_SOMETHING_MESSAGE=&amp;quot;A Message for something!&amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_XML_DESCRIPTION=&amp;quot;User Profile 5 Plug-in&amp;quot;&lt;br /&gt;
&lt;br /&gt;
en-GB.plg_user_profile5.sys.ini&lt;br /&gt;
&lt;br /&gt;
 ; $Id: en-GB.plg_user_profile.sys.ini 17052 2010-05-14 14:05:58Z infograf768 $&lt;br /&gt;
 ; Joomla! Project&lt;br /&gt;
 ; Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.&lt;br /&gt;
 ; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php&lt;br /&gt;
 ; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
 &lt;br /&gt;
 PLG_USER_PROFILE5=&amp;quot;User - Profile 5 &amp;quot;&lt;br /&gt;
 PLG_USER_PROFILE5_XML_DESCRIPTION=&amp;quot;User Profile 5 Plug-in&amp;quot;&lt;br /&gt;
&lt;br /&gt;
By installing profile5 you can add new fields in addition to the ones in profile. You can also control which view levels see those fields.&lt;br /&gt;
Alternatively, you can write a more complex common plugin with varying controls for different groups.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]][[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_info_page/lv-LV&amp;diff=30395</id>
		<title>Joomla info page/lv-LV</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_info_page/lv-LV&amp;diff=30395"/>
		<updated>2010-09-01T08:31:35Z</updated>

		<summary type="html">&lt;p&gt;Lemings: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
= Latviešu=&lt;br /&gt;
&lt;br /&gt;
== Kas ir Joomla? ==&lt;br /&gt;
Joomla ir informācijas pārvaldības sistēma (CMS), ar kā palīdzību iespējams izveidot interneta vietnes un dažāda tiešsaites aplikācijas. Joomla ir saņēmusi vairākas balvas dažādās nominācijās, kas apliecina tās kvalitāti. Lietošanas ērtuma un vieglas paplašināšanas iespēju, kas arī citu iemeslu dēl Joomla ir kļuvusi par populārāko vietņu sistēmu pasaulē. Vēl jo vairāk, Joomla ir atvērtā koda produkts, un ikvienam ir tiesības to lietot bez maksas. Galvenās Joomla! pozitīvās iezīmes ir:&lt;br /&gt;
&lt;br /&gt;
* Viegla instalācija&lt;br /&gt;
* Vienkārša vietnes uzturēšana&lt;br /&gt;
* Augstākā līmeņa drošības un stabilitātes filozofija&lt;br /&gt;
* Jaudīgi bezmaksas un maksas paplašinājumi&lt;br /&gt;
* Milzīgs skaits viedņu, ar kā palīdzību vienkārši var mainīt vietnes izskatu&lt;br /&gt;
&lt;br /&gt;
== Kur var atrast Joomla? ==&lt;br /&gt;
* Ielādēt Joomla pakotni: http://www.joomla.org/download.html&lt;br /&gt;
* Ielādēt Joomla tulkojuma pakotnes Latviešu valodā (lv-LV): http://extensions.joomla.org/extensions/languages/translations-for-joomla/5341&lt;br /&gt;
&lt;br /&gt;
== Kur var atrast paplašinājumus? ==&lt;br /&gt;
* Ielādēt paplašinājumus: http://extensions.joomla.org/&lt;br /&gt;
* Ielādēt paplašinājumu tulkojumus latviešu valodā: http://www.joomlalv.org/forums/viewforum.php?f=52/&lt;br /&gt;
&lt;br /&gt;
== Kur var atrast pamācības Joomla lietošanā? ==&lt;br /&gt;
* Dokumentācijas angļu valodā: http://docs.joomla.org/&lt;br /&gt;
* Dokumentācija latviešu valodā: http://www.joomlalv.org/&lt;br /&gt;
&lt;br /&gt;
== Kur meklēt palīdzību saistībā ar Joomla lietošanu? ==&lt;br /&gt;
* Bezmaksas palīdzības forums angļu valodā: http://forum.joomla.org/&lt;br /&gt;
* Bezmaksas palīdzības forums latviešu valodā: http://forum.joomla.org/viewforum.php?f=358 &lt;br /&gt;
* Bezmaksas palīdzības forums latviešu valodā: http://www.joomlalv.org/forums&lt;br /&gt;
&lt;br /&gt;
== Vietējie pasākumi / Joomla dienas ==&lt;br /&gt;
Joomla lietotāji visā pasaulē organizē Joomla dienas. Joomla diena ir pasākums, kas paredzēts vietējiem Joomla lietotājiem, lai demonstrētu sistēmas iespējas, dažādus projektus un risinātu kopīgas problēmas. Vairāk informācijas atrodams šeit: http://community.joomla.org/events/joomla-days.html&lt;br /&gt;
&lt;br /&gt;
== Joomla lietotāju grupas (JUG) ==&lt;br /&gt;
Joomla lietotāju grupas (JUG) ir lielisks veids, kā satikt jaunus cilvēkus un savstarpēji sadarboties, iegūt jaunas iemaņas un dalīties ar tām ar citiem lietotājiem. Joomla lietotāji ir atrodami gandrīz visur. Iespējams arī Jūsu pilsētā. Ja nav, tad Jums ir iespēja izveidot jaunu grupu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Latvijā nav reģistrētu lietotāju grupu &lt;br /&gt;
* Visas lietotāju grupas :http://community.joomla.org/user-groups/&lt;br /&gt;
&lt;br /&gt;
* Bieži uzdotie jautāji par Joomla lietotāju grupām: http://community.joomla.org/user-groups/jug-faq.html&lt;br /&gt;
&lt;br /&gt;
== Kā piedalīties Joomla attīstībā? ==&lt;br /&gt;
* Atbildēt jebkurā atbalsta forumā (link to: Where to get support for Joomla?)&lt;br /&gt;
* Tulkot vai rakstīt dokumentāciju vai pamācības (link to: Where to get documentation for Joomla?)&lt;br /&gt;
* Izstrādāta paplašinājumus vai veidnes &lt;br /&gt;
* Testēt un komentēt un pievienot jaunus ierakstus kļūdu reģistrā: http://docs.joomla.org/How_do_you_report_a_bug%3F&lt;br /&gt;
* Pievienoties Joomla! darba grupām&lt;br /&gt;
* Piedalīties ar Joomla! saistītos notikumos&lt;br /&gt;
* Palīdzēt arī citādi, skatiet http://contribute.joomla.org/&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_info_page/lv-LV&amp;diff=30394</id>
		<title>Joomla info page/lv-LV</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_info_page/lv-LV&amp;diff=30394"/>
		<updated>2010-09-01T08:21:53Z</updated>

		<summary type="html">&lt;p&gt;Lemings: New page: {{RightTOC}} = Latviešu=  == Kas ir Joomla? == Joomla ir informācijas pārvaldības sistēma (CMS), ar kā palīdzību iespējams izveidot interneta vietnes un dažāda tiešsaites aplik...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightTOC}}&lt;br /&gt;
= Latviešu=&lt;br /&gt;
&lt;br /&gt;
== Kas ir Joomla? ==&lt;br /&gt;
Joomla ir informācijas pārvaldības sistēma (CMS), ar kā palīdzību iespējams izveidot interneta vietnes un dažāda tiešsaites aplikācijas. Joomla ir saņēmusi vairākas balvas dažādās nominācijās, kas apliecina tās kvalitāti. Lietošanas ērtuma un vieglas paplašināšanas iespēju, kas arī citu iemeslu dēl Joomla ir kļuvusi par populārāko vietņu sistēmu pasaulē. Vēl jo vairāk, Joomla ir atvērtā koda produkts, un ikvienam ir tiesības to lietot bez maksas. Galvenās Joomla! pozitīvās iezīmes ir:&lt;br /&gt;
&lt;br /&gt;
* Viegla instalācija&lt;br /&gt;
* Vienkārša vietnes uzturēšana&lt;br /&gt;
* Augstākā līmeņa drošības un stabilitātes filozofija&lt;br /&gt;
* Jaudīgi bezmaksas un maksas paplašinājumi&lt;br /&gt;
* Milzīgs skaits viedņu, ar kā palīdzību vienkārši var mainīt vietnes izskatu&lt;br /&gt;
&lt;br /&gt;
== Kur var atrast Joomla? ==&lt;br /&gt;
* Ielādēt Joomla pakotni: http://www.joomla.org/download.html&lt;br /&gt;
* Ielādēt Joomla tulkojuma pakotnes Latviešu valodā (lv-LV): http://extensions.joomla.org/extensions/languages/translations-for-joomla/5341&lt;br /&gt;
&lt;br /&gt;
== Kur var atrast paplašinājumus? ==&lt;br /&gt;
* Ielādēt paplašinājumus: http://extensions.joomla.org/&lt;br /&gt;
* Ielādēt paplašinājumu tulkojumus latviešu valodā: {http://www.joomlalv.org/forums/viewforum.php?f=52/}&lt;br /&gt;
&lt;br /&gt;
== Kur var atrast pamācības Joomla lietošanā? ==&lt;br /&gt;
* Dokumentācijas angļu valodā: http://docs.joomla.org/&lt;br /&gt;
* Dokumentācija latviešu valodā: {http://www.joomlalv.org/}&lt;br /&gt;
&lt;br /&gt;
== Kur meklēt palīdzību saistībā ar Joomla lietošanu? ==&lt;br /&gt;
* Bezmaksas palīdzības forums angļu valodā: http://forum.joomla.org/&lt;br /&gt;
* Bezmaksas palīdzības forums latviešu valodā: http://forum.joomla.org/viewforum.php?f=358 &lt;br /&gt;
* Bezmaksas palīdzības forums latviešu valodā: http://www.joomlalv.org/forums&lt;br /&gt;
&lt;br /&gt;
== Vietējie pasākumi / Joomla dienas ==&lt;br /&gt;
Joomla lietotāji visā pasaulē organizē Joomla dienas. Joomla diena ir pasākums, kas paredzēts vietējiem Joomla lietotājiem, lai demonstrētu sistēmas iespējas, dažādus projektus un risinātu kopīgas problēmas. Vairāk informācijas atrodams šeit: http://community.joomla.org/events/joomla-days.html&lt;br /&gt;
&lt;br /&gt;
== Joomla User Groups (JUG) ==&lt;br /&gt;
Local Joomla User Groups (JUG) are a great way to meet new people, get help with a project, or share your own knowledge with other Joomla users. Joomla is everywhere so check to see if there&#039;s already a JUG in your area. If not, you might want to consider forming one.&lt;br /&gt;
&lt;br /&gt;
{ Please put here the JUGs organized in the countries where this language is spoken, e.g. for English that would be:&lt;br /&gt;
* JUGs in the United Kingdom: http://community.joomla.org/user-groups/europe/united-kingdom.html&lt;br /&gt;
* JUGs in The United States: http://community.joomla.org/user-groups/north-america/united-states.html&lt;br /&gt;
* JUGs in Canada: http://community.joomla.org/user-groups/north-america/canada.html&lt;br /&gt;
* JUGs in Australia: http://community.joomla.org/user-groups/asia-pacific/australia.html&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
* JUG FAQ: http://community.joomla.org/user-groups/jug-faq.html&lt;br /&gt;
&lt;br /&gt;
== How to contribute to Joomla? ==&lt;br /&gt;
* Answer Questions in any Joomla! Forum (link to: Where to get support for Joomla?)&lt;br /&gt;
* Write or Translate a Tutorial or Documentation (link to: Where to get documentation for Joomla?)&lt;br /&gt;
* Develop an Extension or Template &lt;br /&gt;
* Test or Add a Comment to an Issue Report: http://docs.joomla.org/How_do_you_report_a_bug%3F&lt;br /&gt;
* Join a Joomla! Working Group&lt;br /&gt;
* Help Out at a Joomla! Event&lt;br /&gt;
* Contribute in Other Ways, see http://contribute.joomla.org/&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Running_Automated_Tests_for_the_Joomla_CMS&amp;diff=21892</id>
		<title>Running Automated Tests for the Joomla CMS</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Running_Automated_Tests_for_the_Joomla_CMS&amp;diff=21892"/>
		<updated>2010-02-25T18:04:31Z</updated>

		<summary type="html">&lt;p&gt;Lemings: /* Install Selenium RC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As of February 2010, a tests folder has been added to the Joomla! SVN download. This folder contains a growing library of unit and functional tests. The unit tests use PHPUnit and the functional tests use PHPUnit and Selenium. The unit tests perform tests primarily on the Joomla! framework. The Selenium functional tests actually run Joomla! from a browser and test it as a user would.&lt;br /&gt;
&lt;br /&gt;
Before you can run the tests, you need to install some programs on your local workstation, as documented below. This document explains how to run the functional tests from your local workstation.&lt;br /&gt;
&lt;br /&gt;
== Install PHPUnit ==&lt;br /&gt;
Both the unit and functional tests rely on PHPUnit. PHPUnit is a testing framework that requires PHP to be installed on the local workstation. XAMP / WAMP users can use the PHP installation that comes with them. Otherwise, you may need to install PHP, and the PEAR package, on your local workstation. More detailed instructions can be found at [http://www.php.net/manual/en/install.php http://www.php.net/manual/en/install.php].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On most PHP installations, PNPUnit can be installed using the standard PEAR installation process.&lt;br /&gt;
&lt;br /&gt;
For example, on XAMPP version 1.7.3 on Windows, you would do the following commands:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;cd c:\xampp\php&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear channel-discover pear.phpunit.de&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear channel-discover pear.symfony-project.com&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear install phpunit/PHPUnit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Windows users not using WAMP / XAMP can use the same procedure, with substituting the location of your PHP installation for &amp;lt;code&amp;gt;cd c:\xampp\php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ubuntu users would use the following commands to install PHPUnit:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear channel-discover pear.phpunit.de&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear channel-discover pear.symfony-project.com&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear install phpunit/PHPUnit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More detailed instructions can be found here: [http://www.phpunit.de/manual/3.0/en/installation.html http://www.phpunit.de/manual/3.0/en/installation.html].&lt;br /&gt;
&lt;br /&gt;
== Install Selenium RC ==&lt;br /&gt;
Selenium RC is the package that allows you to run Selenium tests from PHP or other programming languages. To install it, just go to the Selenium site [http://seleniumhq.org/projects/remote-control http://seleniumhq.org/projects/remote-control] and download the package. Then unzip the file into a folder. &lt;br /&gt;
&lt;br /&gt;
For example, in Windows if you create a folder called &amp;lt;code&amp;gt;C:\selenium&amp;lt;/code&amp;gt; and unzip this file there, it will create a folder called selenium-server-1.0.1. In that folder, create a Windows bat file (such as selenium.bat though the name does not matter) or Linux shell script that runs the following command: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;java -jar selenium-server.jar -browserSessionReuse&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the Java executable is not on your path, then you will need to indicate the full path to it, like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;c:\program files (x86)\Java\jre6\bin\java.exe&amp;quot; -jar selenium-server.jar -browserSessionReuse&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note the argument &amp;lt;code&amp;gt;browserSessionReuse&amp;lt;/code&amp;gt; is used to allow you to run multiple tests without closing and re-opening the browser each time. Save this file so you can easily find and execute it when needed.&lt;br /&gt;
&lt;br /&gt;
This program needs to be running in the background before you can run any Selenium functional tests.&lt;br /&gt;
&lt;br /&gt;
If You are using Firefox 3.6.x you will run in problems with this configuration. Check out this link: http://www.qaautomation.net/?p=15 how to get it working on Firefox 3.6.x.&lt;br /&gt;
&lt;br /&gt;
== Create a Selenium Configuration File ==&lt;br /&gt;
To run the Selenium tests, we have to tell Selenium how to navigate and login to your local Joomla! installation. This is done by creating a PHP file called &amp;lt;code&amp;gt;configdef.php&amp;lt;/code&amp;gt;. The Joomla! download includes a file called &amp;lt;code&amp;gt;tests/system/servers/config-def.php-dist&amp;lt;/code&amp;gt;. This is a sample file that you can use to create the real file. Copy this file to a file called &amp;lt;code&amp;gt;tests/system/servers/configdef.php&amp;lt;/code&amp;gt; and edit it to reflect your test systems configuration. There are comments in the file that tell you how to do this.&lt;br /&gt;
&lt;br /&gt;
== Run the Test Suite ==&lt;br /&gt;
At this point, we are ready to actually run the tests. There are two steps to running a test. First, you need to make sure the Selenium RC process is running in the background. To do this, just execute the command (bat file or shell script) you created when you installed Selenium RC. This will continue to run until you cancel it.&lt;br /&gt;
&lt;br /&gt;
Once Selenium RC is running, you need to execute the functional tests. There are several ways you can do this. &lt;br /&gt;
&lt;br /&gt;
To run all tests from the command line in Windows, change to the &amp;lt;code&amp;gt;tests/system&amp;lt;/code&amp;gt; folder and run the following command (the phpunit.bat file comes from the PHPUnit installation):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpunit.bat --bootstrap servers\configdef.php suite\TestSuite.php &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Linux, the command is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpunit --bootstrap servers/configdef.php suite/TestSuite.php &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run all of the tests in the TestSuite.php file. You should see a series of messages display in the console telling you what tests are being run and what the tests are doing. You should also see two browser windows open. One will display Selenium commands that are being executed. The other will show the Joomla! website and the various screens that are being opened and closed as the tests are run. &lt;br /&gt;
&lt;br /&gt;
The tests will run for a few minutes, depending on the speed of your system. When they are done, you will get a summary display showing how many tests were run and whether there were errors or failures. If there are errors or failures, the line of code from the test program that generated the error or failure will also show.&lt;br /&gt;
&lt;br /&gt;
An error occurs when the test encounters an actual PHP error. A failure occurs when the test gets a result that is different than expected.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
* Make sure you run the tests on a clean database that has been installed with sample data. If you have made database changes, you should re-install Joomla! or otherwise put the database back to it&#039;s original post-installed state.&lt;br /&gt;
* If you find errors or failures when you run the tests, you can run the tests against the Joomla! trunk to see if the problems are in trunk or just in your branch.&lt;br /&gt;
* If you maintain more than one local Joomla! project (for example, one for trunk, another for a branch), you will need to make sure to have a configdef.php file for each that has the right path and login information. You can watch the browser window while the tests are running to make sure you are testing the URL that you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Eclipse Users ==&lt;br /&gt;
You can use the External Tools Configurations option, found under the Run -&amp;gt; External Tools menu, to create launch configurations to run the tests. &lt;br /&gt;
&lt;br /&gt;
* For example, to create a launch configuration to run the Test Suite of the currently-selected Eclipse project, you would enter the location that points to your phpunit.bat file, set the Working Directory to &amp;quot;${project_loc}\tests\system&amp;quot;, and set the arguments to &amp;lt;code&amp;gt;--bootstrap servers\configdef.php suite\TestSuite.php&amp;lt;/code&amp;gt;. This is shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Selenium_tutorial_screenshot_20100205.png]]&lt;br /&gt;
&lt;br /&gt;
: The argument &amp;lt;code&amp;gt;suite\TestSuite.php&amp;lt;/code&amp;gt; identifies the test that you wish to run. To run a different test, change this argument to the test that you wish to run. For example, to run com_users user0001Test.php, you would use &amp;lt;code&amp;gt;suite\com_users\user0001Test.php&amp;lt;/code&amp;gt;. Remember that we have already set the Working Directory as \tests\system. &lt;br /&gt;
&lt;br /&gt;
: Then you can run this from inside Eclipse and the console output will show in the Eclipse console. Note that you still need to have the Selenium RC program running in the background first, before running the suite. Note that you need to select a file in the current project before running this command so the &amp;lt;code&amp;gt;{project_loc}&amp;lt;/code&amp;gt; variable is set correctly.&lt;br /&gt;
&lt;br /&gt;
* You can create a configuration to make it easy to run any single test in your project. To do this, create a new External Tools Configuration as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Selenium_tutorial_screenshot_20100211.png]]&lt;br /&gt;
&lt;br /&gt;
: This is the same as the configuration above except that the second argument is ${selected_resource_loc}. To use this configuration, select the desired test file by clicking on it in the PHP Explorer view or in the edit area. Then start this launch configuration. The selected test file will be run.&lt;br /&gt;
&lt;br /&gt;
[[Category:Bug Squad]] [[Category:Development]] [[Category:Testing]]&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Running_Automated_Tests_for_the_Joomla_CMS&amp;diff=21891</id>
		<title>Running Automated Tests for the Joomla CMS</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Running_Automated_Tests_for_the_Joomla_CMS&amp;diff=21891"/>
		<updated>2010-02-25T18:03:59Z</updated>

		<summary type="html">&lt;p&gt;Lemings: /* Create a Selenium Configuration File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As of February 2010, a tests folder has been added to the Joomla! SVN download. This folder contains a growing library of unit and functional tests. The unit tests use PHPUnit and the functional tests use PHPUnit and Selenium. The unit tests perform tests primarily on the Joomla! framework. The Selenium functional tests actually run Joomla! from a browser and test it as a user would.&lt;br /&gt;
&lt;br /&gt;
Before you can run the tests, you need to install some programs on your local workstation, as documented below. This document explains how to run the functional tests from your local workstation.&lt;br /&gt;
&lt;br /&gt;
== Install PHPUnit ==&lt;br /&gt;
Both the unit and functional tests rely on PHPUnit. PHPUnit is a testing framework that requires PHP to be installed on the local workstation. XAMP / WAMP users can use the PHP installation that comes with them. Otherwise, you may need to install PHP, and the PEAR package, on your local workstation. More detailed instructions can be found at [http://www.php.net/manual/en/install.php http://www.php.net/manual/en/install.php].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On most PHP installations, PNPUnit can be installed using the standard PEAR installation process.&lt;br /&gt;
&lt;br /&gt;
For example, on XAMPP version 1.7.3 on Windows, you would do the following commands:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;cd c:\xampp\php&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear channel-discover pear.phpunit.de&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear channel-discover pear.symfony-project.com&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear install phpunit/PHPUnit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Windows users not using WAMP / XAMP can use the same procedure, with substituting the location of your PHP installation for &amp;lt;code&amp;gt;cd c:\xampp\php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ubuntu users would use the following commands to install PHPUnit:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear channel-discover pear.phpunit.de&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear channel-discover pear.symfony-project.com&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear install phpunit/PHPUnit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More detailed instructions can be found here: [http://www.phpunit.de/manual/3.0/en/installation.html http://www.phpunit.de/manual/3.0/en/installation.html].&lt;br /&gt;
&lt;br /&gt;
== Install Selenium RC ==&lt;br /&gt;
Selenium RC is the package that allows you to run Selenium tests from PHP or other programming languages. To install it, just go to the Selenium site [http://seleniumhq.org/projects/remote-control http://seleniumhq.org/projects/remote-control] and download the package. Then unzip the file into a folder. &lt;br /&gt;
&lt;br /&gt;
For example, in Windows if you create a folder called &amp;lt;code&amp;gt;C:\selenium&amp;lt;/code&amp;gt; and unzip this file there, it will create a folder called selenium-server-1.0.1. In that folder, create a Windows bat file (such as selenium.bat though the name does not matter) or Linux shell script that runs the following command: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;java -jar selenium-server.jar -browserSessionReuse&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the Java executable is not on your path, then you will need to indicate the full path to it, like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;c:\program files (x86)\Java\jre6\bin\java.exe&amp;quot; -jar selenium-server.jar -browserSessionReuse&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note the argument &amp;lt;code&amp;gt;browserSessionReuse&amp;lt;/code&amp;gt; is used to allow you to run multiple tests without closing and re-opening the browser each time. Save this file so you can easily find and execute it when needed.&lt;br /&gt;
&lt;br /&gt;
This program needs to be running in the background before you can run any Selenium functional tests.&lt;br /&gt;
&lt;br /&gt;
== Create a Selenium Configuration File ==&lt;br /&gt;
To run the Selenium tests, we have to tell Selenium how to navigate and login to your local Joomla! installation. This is done by creating a PHP file called &amp;lt;code&amp;gt;configdef.php&amp;lt;/code&amp;gt;. The Joomla! download includes a file called &amp;lt;code&amp;gt;tests/system/servers/config-def.php-dist&amp;lt;/code&amp;gt;. This is a sample file that you can use to create the real file. Copy this file to a file called &amp;lt;code&amp;gt;tests/system/servers/configdef.php&amp;lt;/code&amp;gt; and edit it to reflect your test systems configuration. There are comments in the file that tell you how to do this.&lt;br /&gt;
&lt;br /&gt;
== Run the Test Suite ==&lt;br /&gt;
At this point, we are ready to actually run the tests. There are two steps to running a test. First, you need to make sure the Selenium RC process is running in the background. To do this, just execute the command (bat file or shell script) you created when you installed Selenium RC. This will continue to run until you cancel it.&lt;br /&gt;
&lt;br /&gt;
Once Selenium RC is running, you need to execute the functional tests. There are several ways you can do this. &lt;br /&gt;
&lt;br /&gt;
To run all tests from the command line in Windows, change to the &amp;lt;code&amp;gt;tests/system&amp;lt;/code&amp;gt; folder and run the following command (the phpunit.bat file comes from the PHPUnit installation):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpunit.bat --bootstrap servers\configdef.php suite\TestSuite.php &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Linux, the command is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpunit --bootstrap servers/configdef.php suite/TestSuite.php &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run all of the tests in the TestSuite.php file. You should see a series of messages display in the console telling you what tests are being run and what the tests are doing. You should also see two browser windows open. One will display Selenium commands that are being executed. The other will show the Joomla! website and the various screens that are being opened and closed as the tests are run. &lt;br /&gt;
&lt;br /&gt;
The tests will run for a few minutes, depending on the speed of your system. When they are done, you will get a summary display showing how many tests were run and whether there were errors or failures. If there are errors or failures, the line of code from the test program that generated the error or failure will also show.&lt;br /&gt;
&lt;br /&gt;
An error occurs when the test encounters an actual PHP error. A failure occurs when the test gets a result that is different than expected.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
* Make sure you run the tests on a clean database that has been installed with sample data. If you have made database changes, you should re-install Joomla! or otherwise put the database back to it&#039;s original post-installed state.&lt;br /&gt;
* If you find errors or failures when you run the tests, you can run the tests against the Joomla! trunk to see if the problems are in trunk or just in your branch.&lt;br /&gt;
* If you maintain more than one local Joomla! project (for example, one for trunk, another for a branch), you will need to make sure to have a configdef.php file for each that has the right path and login information. You can watch the browser window while the tests are running to make sure you are testing the URL that you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Eclipse Users ==&lt;br /&gt;
You can use the External Tools Configurations option, found under the Run -&amp;gt; External Tools menu, to create launch configurations to run the tests. &lt;br /&gt;
&lt;br /&gt;
* For example, to create a launch configuration to run the Test Suite of the currently-selected Eclipse project, you would enter the location that points to your phpunit.bat file, set the Working Directory to &amp;quot;${project_loc}\tests\system&amp;quot;, and set the arguments to &amp;lt;code&amp;gt;--bootstrap servers\configdef.php suite\TestSuite.php&amp;lt;/code&amp;gt;. This is shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Selenium_tutorial_screenshot_20100205.png]]&lt;br /&gt;
&lt;br /&gt;
: The argument &amp;lt;code&amp;gt;suite\TestSuite.php&amp;lt;/code&amp;gt; identifies the test that you wish to run. To run a different test, change this argument to the test that you wish to run. For example, to run com_users user0001Test.php, you would use &amp;lt;code&amp;gt;suite\com_users\user0001Test.php&amp;lt;/code&amp;gt;. Remember that we have already set the Working Directory as \tests\system. &lt;br /&gt;
&lt;br /&gt;
: Then you can run this from inside Eclipse and the console output will show in the Eclipse console. Note that you still need to have the Selenium RC program running in the background first, before running the suite. Note that you need to select a file in the current project before running this command so the &amp;lt;code&amp;gt;{project_loc}&amp;lt;/code&amp;gt; variable is set correctly.&lt;br /&gt;
&lt;br /&gt;
* You can create a configuration to make it easy to run any single test in your project. To do this, create a new External Tools Configuration as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Selenium_tutorial_screenshot_20100211.png]]&lt;br /&gt;
&lt;br /&gt;
: This is the same as the configuration above except that the second argument is ${selected_resource_loc}. To use this configuration, select the desired test file by clicking on it in the PHP Explorer view or in the edit area. Then start this launch configuration. The selected test file will be run.&lt;br /&gt;
&lt;br /&gt;
[[Category:Bug Squad]] [[Category:Development]] [[Category:Testing]]&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Running_Automated_Tests_for_the_Joomla_CMS&amp;diff=21890</id>
		<title>Running Automated Tests for the Joomla CMS</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Running_Automated_Tests_for_the_Joomla_CMS&amp;diff=21890"/>
		<updated>2010-02-25T18:01:45Z</updated>

		<summary type="html">&lt;p&gt;Lemings: /* Create a Selenium Configuration File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As of February 2010, a tests folder has been added to the Joomla! SVN download. This folder contains a growing library of unit and functional tests. The unit tests use PHPUnit and the functional tests use PHPUnit and Selenium. The unit tests perform tests primarily on the Joomla! framework. The Selenium functional tests actually run Joomla! from a browser and test it as a user would.&lt;br /&gt;
&lt;br /&gt;
Before you can run the tests, you need to install some programs on your local workstation, as documented below. This document explains how to run the functional tests from your local workstation.&lt;br /&gt;
&lt;br /&gt;
== Install PHPUnit ==&lt;br /&gt;
Both the unit and functional tests rely on PHPUnit. PHPUnit is a testing framework that requires PHP to be installed on the local workstation. XAMP / WAMP users can use the PHP installation that comes with them. Otherwise, you may need to install PHP, and the PEAR package, on your local workstation. More detailed instructions can be found at [http://www.php.net/manual/en/install.php http://www.php.net/manual/en/install.php].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On most PHP installations, PNPUnit can be installed using the standard PEAR installation process.&lt;br /&gt;
&lt;br /&gt;
For example, on XAMPP version 1.7.3 on Windows, you would do the following commands:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;cd c:\xampp\php&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear channel-discover pear.phpunit.de&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear channel-discover pear.symfony-project.com&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;pear install phpunit/PHPUnit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Windows users not using WAMP / XAMP can use the same procedure, with substituting the location of your PHP installation for &amp;lt;code&amp;gt;cd c:\xampp\php&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ubuntu users would use the following commands to install PHPUnit:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear channel-discover pear.phpunit.de&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear channel-discover pear.symfony-project.com&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;$sudo pear install phpunit/PHPUnit&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More detailed instructions can be found here: [http://www.phpunit.de/manual/3.0/en/installation.html http://www.phpunit.de/manual/3.0/en/installation.html].&lt;br /&gt;
&lt;br /&gt;
== Install Selenium RC ==&lt;br /&gt;
Selenium RC is the package that allows you to run Selenium tests from PHP or other programming languages. To install it, just go to the Selenium site [http://seleniumhq.org/projects/remote-control http://seleniumhq.org/projects/remote-control] and download the package. Then unzip the file into a folder. &lt;br /&gt;
&lt;br /&gt;
For example, in Windows if you create a folder called &amp;lt;code&amp;gt;C:\selenium&amp;lt;/code&amp;gt; and unzip this file there, it will create a folder called selenium-server-1.0.1. In that folder, create a Windows bat file (such as selenium.bat though the name does not matter) or Linux shell script that runs the following command: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;java -jar selenium-server.jar -browserSessionReuse&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the Java executable is not on your path, then you will need to indicate the full path to it, like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;c:\program files (x86)\Java\jre6\bin\java.exe&amp;quot; -jar selenium-server.jar -browserSessionReuse&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note the argument &amp;lt;code&amp;gt;browserSessionReuse&amp;lt;/code&amp;gt; is used to allow you to run multiple tests without closing and re-opening the browser each time. Save this file so you can easily find and execute it when needed.&lt;br /&gt;
&lt;br /&gt;
This program needs to be running in the background before you can run any Selenium functional tests.&lt;br /&gt;
&lt;br /&gt;
== Create a Selenium Configuration File ==&lt;br /&gt;
To run the Selenium tests, we have to tell Selenium how to navigate and login to your local Joomla! installation. This is done by creating a PHP file called &amp;lt;code&amp;gt;configdef.php&amp;lt;/code&amp;gt;. The Joomla! download includes a file called &amp;lt;code&amp;gt;tests/system/servers/config-def.php-dist&amp;lt;/code&amp;gt;. This is a sample file that you can use to create the real file. Copy this file to a file called &amp;lt;code&amp;gt;tests/system/servers/configdef.php&amp;lt;/code&amp;gt; and edit it to reflect your test systems configuration. There are comments in the file that tell you how to do this.&lt;br /&gt;
&lt;br /&gt;
If You are using Firefox 3.6.x you will run in problems with this configuration. Check out this link: http://www.qaautomation.net/?p=15 how to get it working on Firefox 3.6.x.&lt;br /&gt;
&lt;br /&gt;
== Run the Test Suite ==&lt;br /&gt;
At this point, we are ready to actually run the tests. There are two steps to running a test. First, you need to make sure the Selenium RC process is running in the background. To do this, just execute the command (bat file or shell script) you created when you installed Selenium RC. This will continue to run until you cancel it.&lt;br /&gt;
&lt;br /&gt;
Once Selenium RC is running, you need to execute the functional tests. There are several ways you can do this. &lt;br /&gt;
&lt;br /&gt;
To run all tests from the command line in Windows, change to the &amp;lt;code&amp;gt;tests/system&amp;lt;/code&amp;gt; folder and run the following command (the phpunit.bat file comes from the PHPUnit installation):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpunit.bat --bootstrap servers\configdef.php suite\TestSuite.php &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Linux, the command is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;phpunit --bootstrap servers/configdef.php suite/TestSuite.php &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run all of the tests in the TestSuite.php file. You should see a series of messages display in the console telling you what tests are being run and what the tests are doing. You should also see two browser windows open. One will display Selenium commands that are being executed. The other will show the Joomla! website and the various screens that are being opened and closed as the tests are run. &lt;br /&gt;
&lt;br /&gt;
The tests will run for a few minutes, depending on the speed of your system. When they are done, you will get a summary display showing how many tests were run and whether there were errors or failures. If there are errors or failures, the line of code from the test program that generated the error or failure will also show.&lt;br /&gt;
&lt;br /&gt;
An error occurs when the test encounters an actual PHP error. A failure occurs when the test gets a result that is different than expected.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
* Make sure you run the tests on a clean database that has been installed with sample data. If you have made database changes, you should re-install Joomla! or otherwise put the database back to it&#039;s original post-installed state.&lt;br /&gt;
* If you find errors or failures when you run the tests, you can run the tests against the Joomla! trunk to see if the problems are in trunk or just in your branch.&lt;br /&gt;
* If you maintain more than one local Joomla! project (for example, one for trunk, another for a branch), you will need to make sure to have a configdef.php file for each that has the right path and login information. You can watch the browser window while the tests are running to make sure you are testing the URL that you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Eclipse Users ==&lt;br /&gt;
You can use the External Tools Configurations option, found under the Run -&amp;gt; External Tools menu, to create launch configurations to run the tests. &lt;br /&gt;
&lt;br /&gt;
* For example, to create a launch configuration to run the Test Suite of the currently-selected Eclipse project, you would enter the location that points to your phpunit.bat file, set the Working Directory to &amp;quot;${project_loc}\tests\system&amp;quot;, and set the arguments to &amp;lt;code&amp;gt;--bootstrap servers\configdef.php suite\TestSuite.php&amp;lt;/code&amp;gt;. This is shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Selenium_tutorial_screenshot_20100205.png]]&lt;br /&gt;
&lt;br /&gt;
: The argument &amp;lt;code&amp;gt;suite\TestSuite.php&amp;lt;/code&amp;gt; identifies the test that you wish to run. To run a different test, change this argument to the test that you wish to run. For example, to run com_users user0001Test.php, you would use &amp;lt;code&amp;gt;suite\com_users\user0001Test.php&amp;lt;/code&amp;gt;. Remember that we have already set the Working Directory as \tests\system. &lt;br /&gt;
&lt;br /&gt;
: Then you can run this from inside Eclipse and the console output will show in the Eclipse console. Note that you still need to have the Selenium RC program running in the background first, before running the suite. Note that you need to select a file in the current project before running this command so the &amp;lt;code&amp;gt;{project_loc}&amp;lt;/code&amp;gt; variable is set correctly.&lt;br /&gt;
&lt;br /&gt;
* You can create a configuration to make it easy to run any single test in your project. To do this, create a new External Tools Configuration as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Selenium_tutorial_screenshot_20100211.png]]&lt;br /&gt;
&lt;br /&gt;
: This is the same as the configuration above except that the second argument is ${selected_resource_loc}. To use this configuration, select the desired test file by clicking on it in the PHP Explorer view or in the edit area. Then start this launch configuration. The selected test file will be run.&lt;br /&gt;
&lt;br /&gt;
[[Category:Bug Squad]] [[Category:Development]] [[Category:Testing]]&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Creating_a_file_uploader_in_your_component&amp;diff=20591</id>
		<title>Archived:Creating a file uploader in your component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Creating_a_file_uploader_in_your_component&amp;diff=20591"/>
		<updated>2009-12-05T21:00:45Z</updated>

		<summary type="html">&lt;p&gt;Lemings: There was mistake $accept instead of $okMIMETypes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Creating a file uploader in your component: Method 1, SWFUpload ==&lt;br /&gt;
&lt;br /&gt;
=== Part 1: Introduction ===&lt;br /&gt;
&lt;br /&gt;
SWFUpload is a free open source multiple file uploader available for download from http://swfupload.org/&lt;br /&gt;
&lt;br /&gt;
A demo of swfupload is available here: http://demo.swfupload.org/v220/simpledemo/index.php&lt;br /&gt;
&lt;br /&gt;
The standard way to upload a file is with a HTML form. This works great if you are uploading one file, but browsers do not let you select and upload more than one file at a time.&lt;br /&gt;
&lt;br /&gt;
The most common way of selecting multiple files for upload is to use flash and javascript. The flash part of the script opens up a selct file dialog where multiple files can be selected, and the flash/javascript sends each file, and recieves the response from the server.&lt;br /&gt;
&lt;br /&gt;
The most popular scripts used to do this are SWFUpload and Fancy upload (http://digitarald.de/project/fancyupload/). The flash uploader in Joomla&#039;s media manager is based on Fancy Upload version 1.0. As Fancy upload 2.0 and 3.0 use mootools 1.2, and Joomla 1.5 uses mootools 1.11, we can not use Fancy Upload 2.0/3.0 in the admin pages of Joomla. Fancy Upload 1.0 could be used, but it is not updated or supported anymore.&lt;br /&gt;
&lt;br /&gt;
SWFUpload does not use Mootools or Jquery. Because of this it will likely work on any page with Mootools 1.11 (Joomla 1.5), or Mootools 1.2 (Joomla 1.6). Therefore we will be using SWFUpload in this article.&lt;br /&gt;
&lt;br /&gt;
Download ths latest version of SWFUpload from the download page (http://code.google.com/p/swfupload/). Download the SWFUpload v2.2.0.1 Samples.zip file.&lt;br /&gt;
&lt;br /&gt;
Inside the file there will be a demos folder, and inside that a simpledemo folder. This is the example we are going to integrate into a Joomla component.&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes you have followed the http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1 tutorial and are familiar with Joomla&#039;s MVC structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Adding The External Javascript ===&lt;br /&gt;
&lt;br /&gt;
We need to add in the external links in the head of the document, put some javascript into the head of the doc, and put some HTML in our body.&lt;br /&gt;
&lt;br /&gt;
If you look at the simpledemo/index.php page you will see links to 5 files in the head of the page.&lt;br /&gt;
&lt;br /&gt;
Make a folder within the root of your components folder called swfupload, copy the ../css/default.css, ../swfupload/swfupload.js, js/swfupload.queue.js, js/fileprogress.js and js/handlers.js files into this folder.&lt;br /&gt;
&lt;br /&gt;
We also need to copy the ../swfupload/swfupload.swf and images/TestImageNoText_65x29.png files into this folder.&lt;br /&gt;
&lt;br /&gt;
Within your view.html.php file add in the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
//get the hosts name&lt;br /&gt;
jimport(&#039;joomla.environment.uri&#039; );&lt;br /&gt;
$host = JURI::root();&lt;br /&gt;
&lt;br /&gt;
//add the links to the external files into the head of the webpage (note the &#039;administrator&#039; in the path, which is not nescessary if you are in the frontend)&lt;br /&gt;
$document =&amp;amp; JFactory::getDocument();&lt;br /&gt;
$document-&amp;gt;addScript($host.&#039;administrator/components/com_mycomponent/swfupload/swfupload.js&#039;);&lt;br /&gt;
$document-&amp;gt;addScript($host.&#039;administrator/components/com_mycomponent/swfupload/swfupload.queue.js&#039;);&lt;br /&gt;
$document-&amp;gt;addScript($host.&#039;administrator/components/com_mycomponent/swfupload/fileprogress.js&#039;);&lt;br /&gt;
$document-&amp;gt;addScript($host.&#039;administrator/components/com_mycomponent/swfupload/handlers.js&#039;);&lt;br /&gt;
$document-&amp;gt;addStyleSheet($host.&#039;administrator/components/com_mycomponent/swfupload/default.css&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
That is the external files part done. We still have to add in the head javascript, and the body html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=== Part 3: Adding The Head Javascript ===&lt;br /&gt;
&lt;br /&gt;
Head javascript part:&lt;br /&gt;
The javascript below is almost the same as the javascript from the simple demo, the few modifications are commented. It is nescessary to read through it and change the parts (such as task) that are relevant to your component.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
//when we send the files for upload, we have to tell Joomla our session, or we will get logged out &lt;br /&gt;
$session = &amp;amp; JFactory::getSession();&lt;br /&gt;
		&lt;br /&gt;
$swfUploadHeadJs =&#039;&lt;br /&gt;
var swfu;&lt;br /&gt;
&lt;br /&gt;
window.onload = function()&lt;br /&gt;
{&lt;br /&gt;
			&lt;br /&gt;
var settings = &lt;br /&gt;
{&lt;br /&gt;
        //this is the path to the flash file, you need to put your components name into it&lt;br /&gt;
	flash_url : &amp;quot;&#039;.$host.&#039;administrator/components/com_mycomponent/swfupload/swfupload.swf&amp;quot;,&lt;br /&gt;
	&lt;br /&gt;
        //we can not put any vars into the url for complicated reasons, but we can put them into the post...&lt;br /&gt;
        upload_url: &amp;quot;index.php&amp;quot;,&lt;br /&gt;
	post_params: &lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;option&amp;quot; : &amp;quot;com_mycomponent&amp;quot;,&lt;br /&gt;
		&amp;quot;controller&amp;quot; : &amp;quot;mycontroller&amp;quot;,&lt;br /&gt;
		&amp;quot;task&amp;quot; : &amp;quot;mytask&amp;quot;,&lt;br /&gt;
		&amp;quot;id&amp;quot; : &amp;quot;&#039;.$myItemObject-&amp;gt;id.&#039;&amp;quot;,&lt;br /&gt;
		&amp;quot;&#039;.$session-&amp;gt;getName().&#039;&amp;quot; : &amp;quot;&#039;.$session-&amp;gt;getId().&#039;&amp;quot;,&lt;br /&gt;
		&amp;quot;format&amp;quot; : &amp;quot;raw&amp;quot;&lt;br /&gt;
	}, &lt;br /&gt;
        //you need to put the session and the &amp;quot;format raw&amp;quot; in there, the other ones are what you would normally put in the url&lt;br /&gt;
	file_size_limit : &amp;quot;5 MB&amp;quot;,&lt;br /&gt;
        //client side file chacking is for usability only, you need to check server side for security&lt;br /&gt;
	file_types : &amp;quot;*.jpg;*.jpeg;*.gif;*.png&amp;quot;,&lt;br /&gt;
	file_types_description : &amp;quot;All Files&amp;quot;,&lt;br /&gt;
	file_upload_limit : 100,&lt;br /&gt;
	file_queue_limit : 100,&lt;br /&gt;
	custom_settings : &lt;br /&gt;
	{&lt;br /&gt;
		progressTarget : &amp;quot;fsUploadProgress&amp;quot;,&lt;br /&gt;
		cancelButtonId : &amp;quot;btnCancel&amp;quot;&lt;br /&gt;
	},&lt;br /&gt;
	debug: false,&lt;br /&gt;
&lt;br /&gt;
	// Button settings&lt;br /&gt;
	button_image_url: &amp;quot;&#039;.$host.&#039;administrator/components/com_mycomponent/swfupload/images/TestImageNoText_65x29.png&amp;quot;,&lt;br /&gt;
	button_width: &amp;quot;85&amp;quot;,&lt;br /&gt;
	button_height: &amp;quot;29&amp;quot;,&lt;br /&gt;
	button_placeholder_id: &amp;quot;spanButtonPlaceHolder&amp;quot;,&lt;br /&gt;
	button_text: \&#039;&amp;lt;span class=&amp;quot;theFont&amp;quot;&amp;gt;Choose Files&amp;lt;/span&amp;gt;\&#039;,&lt;br /&gt;
	button_text_style: &amp;quot;.theFont { font-size: 13; }&amp;quot;,&lt;br /&gt;
	button_text_left_padding: 5,&lt;br /&gt;
	button_text_top_padding: 5,&lt;br /&gt;
				&lt;br /&gt;
	// The event handler functions are defined in handlers.js&lt;br /&gt;
	file_queued_handler : fileQueued,&lt;br /&gt;
	file_queue_error_handler : fileQueueError,&lt;br /&gt;
	file_dialog_complete_handler : fileDialogComplete,&lt;br /&gt;
	upload_start_handler : uploadStart,&lt;br /&gt;
	upload_progress_handler : uploadProgress,&lt;br /&gt;
	upload_error_handler : uploadError,&lt;br /&gt;
	upload_success_handler : uploadSuccess,&lt;br /&gt;
	upload_complete_handler : uploadComplete,&lt;br /&gt;
	queue_complete_handler : queueComplete	// Queue plugin event&lt;br /&gt;
};&lt;br /&gt;
swfu = new SWFUpload(settings);&lt;br /&gt;
};&lt;br /&gt;
	     &lt;br /&gt;
&#039;;&lt;br /&gt;
&lt;br /&gt;
//add the javascript to the head of the html document&lt;br /&gt;
$document-&amp;gt;addScriptDeclaration($swfUploadHeadJs);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you want more info on what each paramater is, have a look at the swfupload docs:&lt;br /&gt;
http://demo.swfupload.org/Documentation/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Part 4: Adding The Body HTML ===&lt;br /&gt;
&lt;br /&gt;
We still have to add in our body HTML, in you tmpl/default.php file add in:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;swfuploader&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;form id=&amp;quot;form1&amp;quot; action=&amp;quot;index.php&amp;quot; method=&amp;quot;post&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
			&amp;lt;div class=&amp;quot;fieldset flash&amp;quot; id=&amp;quot;fsUploadProgress&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;span class=&amp;quot;legend&amp;quot;&amp;gt;Upload Queue&amp;lt;/span&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div id=&amp;quot;divStatus&amp;quot;&amp;gt;0 Files Uploaded&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div&amp;gt;&lt;br /&gt;
				&amp;lt;span id=&amp;quot;spanButtonPlaceHolder&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
				&amp;lt;input id=&amp;quot;btnCancel&amp;quot; type=&amp;quot;button&amp;quot; value=&amp;quot;Cancel All Uploads&amp;quot; onclick=&amp;quot;swfu.cancelQueue();&amp;quot; disabled=&amp;quot;disabled&amp;quot; style=&amp;quot;margin-left: 2px; font-size: 8pt; height: 29px;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If all has gone well, you will be able to upload files to your components script, although nothing will happen on the server as there is no PHP to recieve the image.&lt;br /&gt;
&lt;br /&gt;
===  Part 5: Recieveing The File With PHP ===&lt;br /&gt;
&lt;br /&gt;
It is worth noting that allowing users to upload files to the server is possibly the most dangerous thing to do in terms of security, and if someone with malicious intentions manages to upload a php file to your server, then they can easily take control of the site.&lt;br /&gt;
&lt;br /&gt;
It is recommeneded you do some reading on file upload security. This is a good start:&lt;br /&gt;
&lt;br /&gt;
http://www.scanit.be/uploads/php-file-upload.pdf&lt;br /&gt;
&lt;br /&gt;
And there are many other good resources on the internet. It is important you understand how file upload security works, rather than copying and pasting some code that checks the MIME type, and assuming the script is safe.&lt;br /&gt;
&lt;br /&gt;
Here is some example PHP that will check if the file is an image, and upload it. It is not an exhaustive example of security checking, but it is a good start:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
//import joomlas filesystem functions, we will do all the filewriting with joomlas functions,&lt;br /&gt;
//so if the ftp layer is on, joomla will write with that, not the apache user, which might&lt;br /&gt;
//not have the correct permissions&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
jimport(&#039;joomla.filesystem.folder&#039;);&lt;br /&gt;
		&lt;br /&gt;
//this is the name of the field in the html form, filedata is the default name for swfupload&lt;br /&gt;
//so we will leave it as that&lt;br /&gt;
$fieldName = &#039;Filedata&#039;;&lt;br /&gt;
&lt;br /&gt;
//any errors the server registered on uploading&lt;br /&gt;
$fileError = $_FILES[$fieldName][&#039;error&#039;];&lt;br /&gt;
if ($fileError &amp;gt; 0) &lt;br /&gt;
{&lt;br /&gt;
        switch ($fileError) &lt;br /&gt;
	{&lt;br /&gt;
        case 1:&lt;br /&gt;
        echo JText::_( &#039;FILE TO LARGE THAN PHP INI ALLOWS&#039; );&lt;br /&gt;
        return;&lt;br /&gt;
&lt;br /&gt;
        case 2:&lt;br /&gt;
        echo JText::_( &#039;FILE TO LARGE THAN HTML FORM ALLOWS&#039; );&lt;br /&gt;
        return;&lt;br /&gt;
&lt;br /&gt;
        case 3:&lt;br /&gt;
        echo JText::_( &#039;ERROR PARTIAL UPLOAD&#039; );&lt;br /&gt;
        return;&lt;br /&gt;
&lt;br /&gt;
        case 4:&lt;br /&gt;
        echo JText::_( &#039;ERROR NO FILE&#039; );&lt;br /&gt;
        return;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//check for filesize&lt;br /&gt;
$fileSize = $_FILES[$fieldName][&#039;size&#039;];&lt;br /&gt;
if($fileSize &amp;gt; 2000000)&lt;br /&gt;
{&lt;br /&gt;
    echo JText::_( &#039;FILE BIGGER THAN 2MB&#039; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//check the file extension is ok&lt;br /&gt;
$fileName = $_FILES[$fieldName][&#039;name&#039;];&lt;br /&gt;
$uploadedFileNameParts = explode(&#039;.&#039;,$fileName);&lt;br /&gt;
$uploadedFileExtension = array_pop($uploadedFileNameParts);&lt;br /&gt;
&lt;br /&gt;
$validFileExts = explode(&#039;,&#039;, &#039;jpeg,jpg,png,gif&#039;);&lt;br /&gt;
&lt;br /&gt;
//assume the extension is false until we know its ok&lt;br /&gt;
$extOk = false;&lt;br /&gt;
&lt;br /&gt;
//go through every ok extension, if the ok extension matches the file extension (case insensitive)&lt;br /&gt;
//then the file extension is ok&lt;br /&gt;
foreach($validFileExts as $key =&amp;gt; $value)&lt;br /&gt;
{&lt;br /&gt;
	if( preg_match(&amp;quot;/$value/i&amp;quot;, $uploadedFileExtension ) )&lt;br /&gt;
	{&lt;br /&gt;
		$extOk = true;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($extOk == false) &lt;br /&gt;
{&lt;br /&gt;
	echo JText::_( &#039;INVALID EXTENSION&#039; );&lt;br /&gt;
        return;&lt;br /&gt;
}&lt;br /&gt;
	&lt;br /&gt;
//the name of the file in PHP&#039;s temp directory that we are going to move to our folder&lt;br /&gt;
$fileTemp = $_FILES[$fieldName][&#039;tmp_name&#039;];&lt;br /&gt;
		&lt;br /&gt;
//for security purposes, we will also do a getimagesize on the temp file (before we have moved it &lt;br /&gt;
//to the folder) to check the MIME type of the file, and whether it has a width and height&lt;br /&gt;
$imageinfo = getimagesize($fileTemp);&lt;br /&gt;
		&lt;br /&gt;
//we are going to define what file extensions/MIMEs are ok, and only let these ones in (whitelisting), rather than try to scan for bad&lt;br /&gt;
//types, where we might miss one (whitelisting is always better than blacklisting) &lt;br /&gt;
$okMIMETypes = &#039;image/jpeg,image/pjpeg,image/png,imagex-png,image/gif&#039;;&lt;br /&gt;
$validFileTypes = explode(&amp;quot;,&amp;quot;, $okMIMETypes);		&lt;br /&gt;
&lt;br /&gt;
//if the temp file does not have a width or a height, or it has a non ok MIME, return&lt;br /&gt;
if( !is_int($imageinfo[0]) || !is_int($imageinfo[1]) ||  !in_array($imageinfo[&#039;mime&#039;], $validFileTypes) )&lt;br /&gt;
{&lt;br /&gt;
	echo JText::_( &#039;INVALID FILETYPE&#039; );&lt;br /&gt;
        return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//lose any special characters in the filename&lt;br /&gt;
$fileName = ereg_replace(&amp;quot;[^A-Za-z0-9.]&amp;quot;, &amp;quot;-&amp;quot;, $fileName);&lt;br /&gt;
&lt;br /&gt;
//always use constants when making file paths, to avoid the possibilty of remote file inclusion&lt;br /&gt;
$uploadPath = JPATH_SITE.DS.&#039;images&#039;.DS.&#039;stories&#039;.DS.$fileName;&lt;br /&gt;
&lt;br /&gt;
if(!JFile::upload($fileTemp, $uploadPath)) &lt;br /&gt;
{&lt;br /&gt;
	echo JText::_( &#039;ERROR MOVING FILE&#039; );&lt;br /&gt;
        return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If all want well the uploaded files will be in the images/stories folder.&lt;br /&gt;
&lt;br /&gt;
===  Part 6: Flash plugin COOKIE bug on non-IE browsers ===&lt;br /&gt;
&lt;br /&gt;
Also you should pay attention to Flash player cookie bug!&lt;br /&gt;
&lt;br /&gt;
It is described here http://swfupload.org/forum/generaldiscussion/383&lt;br /&gt;
&lt;br /&gt;
The Flash Player Plugin for FireFox, Opera and Safari (and probably other non-IE based browsers) has a bug which sends persistent cookies from IE to the upload URL instead of the cookies from the browser. Session only cookies from IE are not sent.&lt;br /&gt;
&lt;br /&gt;
1) Any cookies from a non-IE browser (ie, authentication, login, etc) will not be sent with the file upload. Rather the cookies from IE will be sent. So, no cookies or the wrong cookies will be sent. In most cases this means sessions and cookie based authentication are lost when making an upload.&lt;br /&gt;
&lt;br /&gt;
2) Cookies set by the upload script do get set, but only for Flash. The browser will not see them.&lt;br /&gt;
&lt;br /&gt;
3) This bug affects Flash 8 and Flash 9 and all versions of SWFUpload&lt;br /&gt;
&lt;br /&gt;
4) You cannot rely on cookies when using SWFUpload (or any Flash based upload tool). You must send the data you need from the cookies in another way. There are several threads regarding this issue in the forum and many of the demos show workarounds for restoring PHP sessions and some sample files show how to restore the cookies so Session and Authentication are restored in ASP.Net.&lt;br /&gt;
&lt;br /&gt;
5) This could be considered a security issue but probably not severe enough to actually compromise any data. The cookies created in IE by Flash still have all the rules and restricts associated with cookies in any browser.&lt;br /&gt;
&lt;br /&gt;
Solution is modify function _start() (libraries\joomla\session\session.php):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$sn = session_name();&lt;br /&gt;
&lt;br /&gt;
if(isset($_COOKIE[$sn]) &amp;amp;&amp;amp; isset($_POST[$sn])) &lt;br /&gt;
   {&lt;br /&gt;
	$_COOKIE[$sn] = $_POST[$sn];&lt;br /&gt;
	session_id($_POST[$sn]);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
session_start();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lemings</name></author>
	</entry>
</feed>