<?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=Yitwail</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=Yitwail"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Yitwail"/>
	<updated>2026-07-02T12:46:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Creating_a_file_uploader_in_your_component&amp;diff=60073</id>
		<title>Archived talk:Creating a file uploader in your component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Creating_a_file_uploader_in_your_component&amp;diff=60073"/>
		<updated>2011-07-06T23:55:12Z</updated>

		<summary type="html">&lt;p&gt;Yitwail: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi&lt;br /&gt;
&lt;br /&gt;
Implementing the SWFUpload Application demo for my component. The joomla document explains only the simple demo  (http://docs.joomla.org/Creating_a_file_uploader_in_your_component )&lt;br /&gt;
&lt;br /&gt;
what are the changes i have to do from the joomla doc. How i rewrite the thumbnail picture function for joomla 1.5&lt;br /&gt;
&lt;br /&gt;
I tried so many time but not works out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
	// This script accepts an ID and looks in the user&#039;s session for stored thumbnail data.&lt;br /&gt;
	// It then streams the data to the browser as an image&lt;br /&gt;
	&lt;br /&gt;
	// Work around the Flash Player Cookie Bug&lt;br /&gt;
	if (isset($_POST[&amp;quot;PHPSESSID&amp;quot;])) {&lt;br /&gt;
		session_id($_POST[&amp;quot;PHPSESSID&amp;quot;]);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	session_start();&lt;br /&gt;
	&lt;br /&gt;
	$image_id = isset($_GET[&amp;quot;id&amp;quot;]) ? $_GET[&amp;quot;id&amp;quot;] : false;&lt;br /&gt;
&lt;br /&gt;
	if ($image_id === false) {&lt;br /&gt;
		header(&amp;quot;HTTP/1.1 500 Internal Server Error&amp;quot;);&lt;br /&gt;
		echo &amp;quot;No ID&amp;quot;;&lt;br /&gt;
		exit(0);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if (!is_array($_SESSION[&amp;quot;file_info&amp;quot;]) || !isset($_SESSION[&amp;quot;file_info&amp;quot;][$image_id])) {&lt;br /&gt;
		header(&amp;quot;HTTP/1.1 404 Not found&amp;quot;);&lt;br /&gt;
		exit(0);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	header(&amp;quot;Content-type: image/jpeg&amp;quot;) ;&lt;br /&gt;
	header(&amp;quot;Content-Length: &amp;quot;.strlen($_SESSION[&amp;quot;file_info&amp;quot;][$image_id]));&lt;br /&gt;
	echo $_SESSION[&amp;quot;file_info&amp;quot;][$image_id];&lt;br /&gt;
	exit(0);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pls help&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Gopi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changed PHP script in Part 5 ==&lt;br /&gt;
&lt;br /&gt;
I made some changes to my own work, before using it. Some tests to use JFile versions and the code is shorter. Return value &#039;&#039;&#039;true&#039;&#039;&#039; on success or else &#039;&#039;&#039;false&#039;&#039;&#039; if there was an error.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
jimport(&#039;joomla.filesystem.folder&#039;);&lt;br /&gt;
&lt;br /&gt;
$fieldName  = &#039;file_upload&#039;;&lt;br /&gt;
$fileTemp   = $_FILES[$fieldName][&#039;tmp_name&#039;];&lt;br /&gt;
$fileName   = JFile::makeSafe( $_FILES[$fieldName][&#039;name&#039;] );&lt;br /&gt;
$fileExt    = strtolower( JFile::getExt( $fileName ) );&lt;br /&gt;
$imageinfo  = getimagesize( $fileTemp );&lt;br /&gt;
$mimetypes  = array( &#039;image/jpeg&#039;, &#039;image/pjpeg&#039;, &#039;image/png&#039;, &#039;image/x-png&#039;, &#039;image/gif&#039; );&lt;br /&gt;
$uploadPath = JPATH_COMPONENT . DS . &#039;images&#039; . DS . $fileName;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
switch ( $_FILES[$fieldName][&#039;error&#039;] ) {&lt;br /&gt;
	case 1:&lt;br /&gt;
		echo JText::_( &#039;FILE LARGER THAN PHP INI ALLOW&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 2:&lt;br /&gt;
		echo JText::_( &#039;FILE LARGER THAN HTML FORM ALLOW&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 3:&lt;br /&gt;
		echo JText::_( &#039;ERROR PARTIAL UPLOAD&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 4:&lt;br /&gt;
		echo JText::_( &#039;ERROR NO FILE&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	default:&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ( $_FILES[$fieldName][&#039;size&#039;] &amp;gt; 2000000 ) {&lt;br /&gt;
	echo JText::_( &#039;FILE BIGGER THAN 2MB&#039; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ( !in_array( $fileExt, explode(&#039;,&#039;, &#039;jpeg,jpg,png,gif&#039;) ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID EXTENSION&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
} else if ( !in_array( $imageinfo[&#039;mime&#039;], $mimetypes ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID FILE TYPE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
} else if ( !is_int( $imageinfo[0] ) || !is_int( $imageinfo[0] ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID FILE SIZE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if( !JFile::upload( $fileTemp, $uploadPath ) ) {&lt;br /&gt;
	echo JText::_( &#039;ERROR MOVING FILE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
return true;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
hasse_bjork&lt;br /&gt;
&lt;br /&gt;
Helpme Please!!&lt;br /&gt;
&lt;br /&gt;
Part 3: Adding The Head Javascript&lt;br /&gt;
&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;?????&amp;quot;,&lt;br /&gt;
                &amp;quot;task&amp;quot; : &amp;quot;????&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where the code is part 5?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Suggestion for Part 6 ==&lt;br /&gt;
&lt;br /&gt;
Instead of editing a core file like libraries\joomla\session\session.php I found an alternative. In your component, create a file that looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
// Restore session that existed prior to flash uplosd&lt;br /&gt;
&lt;br /&gt;
$sn = session_name();&amp;lt;br/&amp;gt;&lt;br /&gt;
if (isset($_COOKIE[$sn]) &amp;amp;&amp;amp; isset($_POST[$sn])) {&amp;lt;br/&amp;gt;&lt;br /&gt;
$_COOKIE[$sn] = $_POST[$sn];&amp;lt;br/&amp;gt;&lt;br /&gt;
session_id($_POST[$sn]);&amp;lt;br/&amp;gt;&lt;br /&gt;
}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
chdir(&#039;../..&#039;);&amp;lt;br/&amp;gt;&lt;br /&gt;
include(&#039;index.php&#039;);&lt;br /&gt;
&lt;br /&gt;
Then in part 3, set upload_url equal to the path to the file you just created. It works for me, at least in localhost. What do you think?&lt;br /&gt;
&lt;br /&gt;
regards,&lt;br /&gt;
John&lt;/div&gt;</summary>
		<author><name>Yitwail</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Creating_a_file_uploader_in_your_component&amp;diff=60072</id>
		<title>Archived talk:Creating a file uploader in your component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Creating_a_file_uploader_in_your_component&amp;diff=60072"/>
		<updated>2011-07-06T23:37:50Z</updated>

		<summary type="html">&lt;p&gt;Yitwail: /* Suggestion for Part 6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi&lt;br /&gt;
&lt;br /&gt;
Implementing the SWFUpload Application demo for my component. The joomla document explains only the simple demo  (http://docs.joomla.org/Creating_a_file_uploader_in_your_component )&lt;br /&gt;
&lt;br /&gt;
what are the changes i have to do from the joomla doc. How i rewrite the thumbnail picture function for joomla 1.5&lt;br /&gt;
&lt;br /&gt;
I tried so many time but not works out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
	// This script accepts an ID and looks in the user&#039;s session for stored thumbnail data.&lt;br /&gt;
	// It then streams the data to the browser as an image&lt;br /&gt;
	&lt;br /&gt;
	// Work around the Flash Player Cookie Bug&lt;br /&gt;
	if (isset($_POST[&amp;quot;PHPSESSID&amp;quot;])) {&lt;br /&gt;
		session_id($_POST[&amp;quot;PHPSESSID&amp;quot;]);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	session_start();&lt;br /&gt;
	&lt;br /&gt;
	$image_id = isset($_GET[&amp;quot;id&amp;quot;]) ? $_GET[&amp;quot;id&amp;quot;] : false;&lt;br /&gt;
&lt;br /&gt;
	if ($image_id === false) {&lt;br /&gt;
		header(&amp;quot;HTTP/1.1 500 Internal Server Error&amp;quot;);&lt;br /&gt;
		echo &amp;quot;No ID&amp;quot;;&lt;br /&gt;
		exit(0);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if (!is_array($_SESSION[&amp;quot;file_info&amp;quot;]) || !isset($_SESSION[&amp;quot;file_info&amp;quot;][$image_id])) {&lt;br /&gt;
		header(&amp;quot;HTTP/1.1 404 Not found&amp;quot;);&lt;br /&gt;
		exit(0);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	header(&amp;quot;Content-type: image/jpeg&amp;quot;) ;&lt;br /&gt;
	header(&amp;quot;Content-Length: &amp;quot;.strlen($_SESSION[&amp;quot;file_info&amp;quot;][$image_id]));&lt;br /&gt;
	echo $_SESSION[&amp;quot;file_info&amp;quot;][$image_id];&lt;br /&gt;
	exit(0);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pls help&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Gopi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changed PHP script in Part 5 ==&lt;br /&gt;
&lt;br /&gt;
I made some changes to my own work, before using it. Some tests to use JFile versions and the code is shorter. Return value &#039;&#039;&#039;true&#039;&#039;&#039; on success or else &#039;&#039;&#039;false&#039;&#039;&#039; if there was an error.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
jimport(&#039;joomla.filesystem.folder&#039;);&lt;br /&gt;
&lt;br /&gt;
$fieldName  = &#039;file_upload&#039;;&lt;br /&gt;
$fileTemp   = $_FILES[$fieldName][&#039;tmp_name&#039;];&lt;br /&gt;
$fileName   = JFile::makeSafe( $_FILES[$fieldName][&#039;name&#039;] );&lt;br /&gt;
$fileExt    = strtolower( JFile::getExt( $fileName ) );&lt;br /&gt;
$imageinfo  = getimagesize( $fileTemp );&lt;br /&gt;
$mimetypes  = array( &#039;image/jpeg&#039;, &#039;image/pjpeg&#039;, &#039;image/png&#039;, &#039;image/x-png&#039;, &#039;image/gif&#039; );&lt;br /&gt;
$uploadPath = JPATH_COMPONENT . DS . &#039;images&#039; . DS . $fileName;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
switch ( $_FILES[$fieldName][&#039;error&#039;] ) {&lt;br /&gt;
	case 1:&lt;br /&gt;
		echo JText::_( &#039;FILE LARGER THAN PHP INI ALLOW&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 2:&lt;br /&gt;
		echo JText::_( &#039;FILE LARGER THAN HTML FORM ALLOW&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 3:&lt;br /&gt;
		echo JText::_( &#039;ERROR PARTIAL UPLOAD&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 4:&lt;br /&gt;
		echo JText::_( &#039;ERROR NO FILE&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	default:&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ( $_FILES[$fieldName][&#039;size&#039;] &amp;gt; 2000000 ) {&lt;br /&gt;
	echo JText::_( &#039;FILE BIGGER THAN 2MB&#039; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ( !in_array( $fileExt, explode(&#039;,&#039;, &#039;jpeg,jpg,png,gif&#039;) ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID EXTENSION&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
} else if ( !in_array( $imageinfo[&#039;mime&#039;], $mimetypes ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID FILE TYPE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
} else if ( !is_int( $imageinfo[0] ) || !is_int( $imageinfo[0] ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID FILE SIZE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if( !JFile::upload( $fileTemp, $uploadPath ) ) {&lt;br /&gt;
	echo JText::_( &#039;ERROR MOVING FILE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
return true;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
hasse_bjork&lt;br /&gt;
&lt;br /&gt;
Helpme Please!!&lt;br /&gt;
&lt;br /&gt;
Part 3: Adding The Head Javascript&lt;br /&gt;
&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;?????&amp;quot;,&lt;br /&gt;
                &amp;quot;task&amp;quot; : &amp;quot;????&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where the code is part 5?&lt;/div&gt;</summary>
		<author><name>Yitwail</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Creating_a_file_uploader_in_your_component&amp;diff=60071</id>
		<title>Archived talk:Creating a file uploader in your component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Creating_a_file_uploader_in_your_component&amp;diff=60071"/>
		<updated>2011-07-06T23:31:52Z</updated>

		<summary type="html">&lt;p&gt;Yitwail: Suggestion for Part 6&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi&lt;br /&gt;
&lt;br /&gt;
Implementing the SWFUpload Application demo for my component. The joomla document explains only the simple demo  (http://docs.joomla.org/Creating_a_file_uploader_in_your_component )&lt;br /&gt;
&lt;br /&gt;
what are the changes i have to do from the joomla doc. How i rewrite the thumbnail picture function for joomla 1.5&lt;br /&gt;
&lt;br /&gt;
I tried so many time but not works out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
	// This script accepts an ID and looks in the user&#039;s session for stored thumbnail data.&lt;br /&gt;
	// It then streams the data to the browser as an image&lt;br /&gt;
	&lt;br /&gt;
	// Work around the Flash Player Cookie Bug&lt;br /&gt;
	if (isset($_POST[&amp;quot;PHPSESSID&amp;quot;])) {&lt;br /&gt;
		session_id($_POST[&amp;quot;PHPSESSID&amp;quot;]);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	session_start();&lt;br /&gt;
	&lt;br /&gt;
	$image_id = isset($_GET[&amp;quot;id&amp;quot;]) ? $_GET[&amp;quot;id&amp;quot;] : false;&lt;br /&gt;
&lt;br /&gt;
	if ($image_id === false) {&lt;br /&gt;
		header(&amp;quot;HTTP/1.1 500 Internal Server Error&amp;quot;);&lt;br /&gt;
		echo &amp;quot;No ID&amp;quot;;&lt;br /&gt;
		exit(0);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if (!is_array($_SESSION[&amp;quot;file_info&amp;quot;]) || !isset($_SESSION[&amp;quot;file_info&amp;quot;][$image_id])) {&lt;br /&gt;
		header(&amp;quot;HTTP/1.1 404 Not found&amp;quot;);&lt;br /&gt;
		exit(0);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	header(&amp;quot;Content-type: image/jpeg&amp;quot;) ;&lt;br /&gt;
	header(&amp;quot;Content-Length: &amp;quot;.strlen($_SESSION[&amp;quot;file_info&amp;quot;][$image_id]));&lt;br /&gt;
	echo $_SESSION[&amp;quot;file_info&amp;quot;][$image_id];&lt;br /&gt;
	exit(0);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pls help&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Gopi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changed PHP script in Part 5 ==&lt;br /&gt;
&lt;br /&gt;
I made some changes to my own work, before using it. Some tests to use JFile versions and the code is shorter. Return value &#039;&#039;&#039;true&#039;&#039;&#039; on success or else &#039;&#039;&#039;false&#039;&#039;&#039; if there was an error.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
jimport(&#039;joomla.filesystem.folder&#039;);&lt;br /&gt;
&lt;br /&gt;
$fieldName  = &#039;file_upload&#039;;&lt;br /&gt;
$fileTemp   = $_FILES[$fieldName][&#039;tmp_name&#039;];&lt;br /&gt;
$fileName   = JFile::makeSafe( $_FILES[$fieldName][&#039;name&#039;] );&lt;br /&gt;
$fileExt    = strtolower( JFile::getExt( $fileName ) );&lt;br /&gt;
$imageinfo  = getimagesize( $fileTemp );&lt;br /&gt;
$mimetypes  = array( &#039;image/jpeg&#039;, &#039;image/pjpeg&#039;, &#039;image/png&#039;, &#039;image/x-png&#039;, &#039;image/gif&#039; );&lt;br /&gt;
$uploadPath = JPATH_COMPONENT . DS . &#039;images&#039; . DS . $fileName;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
switch ( $_FILES[$fieldName][&#039;error&#039;] ) {&lt;br /&gt;
	case 1:&lt;br /&gt;
		echo JText::_( &#039;FILE LARGER THAN PHP INI ALLOW&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 2:&lt;br /&gt;
		echo JText::_( &#039;FILE LARGER THAN HTML FORM ALLOW&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 3:&lt;br /&gt;
		echo JText::_( &#039;ERROR PARTIAL UPLOAD&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
	&lt;br /&gt;
	case 4:&lt;br /&gt;
		echo JText::_( &#039;ERROR NO FILE&#039; );&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	default:&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ( $_FILES[$fieldName][&#039;size&#039;] &amp;gt; 2000000 ) {&lt;br /&gt;
	echo JText::_( &#039;FILE BIGGER THAN 2MB&#039; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ( !in_array( $fileExt, explode(&#039;,&#039;, &#039;jpeg,jpg,png,gif&#039;) ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID EXTENSION&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
} else if ( !in_array( $imageinfo[&#039;mime&#039;], $mimetypes ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID FILE TYPE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
} else if ( !is_int( $imageinfo[0] ) || !is_int( $imageinfo[0] ) ) {&lt;br /&gt;
	echo JText::_( &#039;INVALID FILE SIZE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if( !JFile::upload( $fileTemp, $uploadPath ) ) {&lt;br /&gt;
	echo JText::_( &#039;ERROR MOVING FILE&#039; );&lt;br /&gt;
	return false;&lt;br /&gt;
}&lt;br /&gt;
return true;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
hasse_bjork&lt;br /&gt;
&lt;br /&gt;
Helpme Please!!&lt;br /&gt;
&lt;br /&gt;
Part 3: Adding The Head Javascript&lt;br /&gt;
&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;?????&amp;quot;,&lt;br /&gt;
                &amp;quot;task&amp;quot; : &amp;quot;????&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where the code is part 5?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Suggestion for Part 6 ==&lt;br /&gt;
&lt;br /&gt;
Instead of editing a core file like libraries\joomla\session\session.php I found an alternative. In your component, create a file that looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/*&lt;br /&gt;
 * Restore session that existed prior to flash uplosd&lt;br /&gt;
 */&lt;br /&gt;
$sn = session_name();&lt;br /&gt;
if (isset($_COOKIE[$sn]) &amp;amp;&amp;amp; isset($_POST[$sn])) {&lt;br /&gt;
	$_COOKIE[$sn] = $_POST[$sn];&lt;br /&gt;
	session_id($_POST[$sn]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
chdir(&#039;../..&#039;); //JPATH_SITE&lt;br /&gt;
include(&#039;index.php&#039;);&lt;br /&gt;
&lt;br /&gt;
Then in part 3, set upload_url equal to the path to the file you just created. It works for me, at least in localhost. What do you think?&lt;br /&gt;
&lt;br /&gt;
regards,&lt;br /&gt;
John&lt;/div&gt;</summary>
		<author><name>Yitwail</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5_talk:Developing_a_MVC_Component/Creating_an_Administrator_Interface&amp;diff=14130</id>
		<title>J1.5 talk:Developing a MVC Component/Creating an Administrator Interface</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5_talk:Developing_a_MVC_Component/Creating_an_Administrator_Interface&amp;diff=14130"/>
		<updated>2009-05-07T09:18:00Z</updated>

		<summary type="html">&lt;p&gt;Yitwail: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Renaming Part 4 ==&lt;br /&gt;
I checked out the comment below. ;-) Certainly, the multitude of hello(s) is confusing. What I did is to rename most everything.&lt;br /&gt;
&lt;br /&gt;
Whenever there&#039;s something like HelloWhateverHello, the first Hello represents the component front-end, and the second represents the view/model. By the way, each view has its own model, which I think is pretty much standard MVC architecture. On the other hand, one controller can control several views, although this example doesn&#039;t do so.&lt;br /&gt;
&lt;br /&gt;
Conversely, if you see HellosWhateverHello or HellosWhateverHellos, the first Hellos represents the adminstrative back-end, and the Hello or Hellos at the end refers to the view for editing one greeting or for listing all greetings, respectively. (Replace *Whatever* with Model, View, or Controller as appropriate.)&lt;br /&gt;
&lt;br /&gt;
So, I renamed all this to look like FrontWhateverContent, AdminWhateverEdit, AdminWhateverList, and so on. Then I had to rename directories and files as well, so that models/hello.php became models/content.php in the front-end and models/edit.php in the back-end. Likewise, views/hello/ becomes views/content/ in the front-end and views/edit in the back-end. Also, in the back-end only, models/hellos.php &amp;amp; views/hellos/ become models/list.php &amp;amp; views/list. Lastly, I changed controllers/hello.php to controllers/edit.php, to reflect the change from HellosControllerHello to AdminControllerEdit.&lt;br /&gt;
&lt;br /&gt;
Hope this clears things up a bit. It&#039;s a tedious refactoring exercise to do all this renaming, but it *is* doable. Good luck.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Hello&amp;quot; Overloaded ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m not sure if anybody checks this, but I&#039;m having a difficult time making my own component out of this document. &lt;br /&gt;
&lt;br /&gt;
The first three chapters of this documentation are great.  They are simple and to the point.  The fourth, this page, is very confusing.  &lt;br /&gt;
&lt;br /&gt;
First off, the word &amp;quot;hello&amp;quot; is way over loaded.  In the Creating an Admin Interface there are two models and two views:&lt;br /&gt;
Hello  and Hellos&lt;br /&gt;
&lt;br /&gt;
It&#039;s impossible to know why we need two different models.  Why cant we use one model and two views?&lt;br /&gt;
Its totally impossible to understand which one gets called when.&lt;br /&gt;
&lt;br /&gt;
I have discovered there are a lot of name conventions used here, but after reading this document over and over, it&#039;s still very difficult to know what the conventions are.  This is probably stemming from &amp;quot;hello&amp;quot; being way too overloaded.&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;get()&amp;quot; in JView is called in both views.  It is supposed to automatically know which model to use, and which method to call.  However, I don&#039;t think I followed the naming convention correctly, as it simply is not working (I get empty data with no error).&lt;br /&gt;
&lt;br /&gt;
I think I could untangle the naming conventions myself, but with &amp;quot;hello&amp;quot; so overloaded in this example, I am having no luck guessing.&lt;br /&gt;
&lt;br /&gt;
== Great up to chapter 3 ==&lt;br /&gt;
&lt;br /&gt;
The documentation was great upto chapter 3.  Got confused in 4th chapter.&lt;br /&gt;
&lt;br /&gt;
Also, this doesn&#039;t cover how to create sub menus for a component [[Image:http://www.vojtechovsky.net/joomla/component/tutorial-joomla-1.5-free-component.png]]&lt;br /&gt;
&lt;br /&gt;
== Suggestions for improvement ==&lt;br /&gt;
&lt;br /&gt;
*This is a really long and tedious tutorial with a lot of very useful information in it. I think it would help to break it down into parts or creating separate tutorials covering this material.&lt;br /&gt;
[[Link title]]&lt;br /&gt;
&lt;br /&gt;
== REALLY GOOD DOCUMENTATION ==&lt;br /&gt;
&lt;br /&gt;
Apart from a small error in part 4 which I have now corrected&lt;br /&gt;
&lt;br /&gt;
did read: &lt;br /&gt;
&lt;br /&gt;
        $row =&amp;amp; $this-&amp;gt;items[$i];&lt;br /&gt;
        $checked    = JHTML::_( &#039;grid.id&#039;, $i, $row-&amp;gt;id );&lt;br /&gt;
        $link = JRoute::_( &#039;index.php?option=com_hello&amp;gt;controller=hello&amp;gt;task=edit&amp;gt;cid[]=&#039;. $row-&amp;gt;id );&lt;br /&gt;
&lt;br /&gt;
now reads:&lt;br /&gt;
&lt;br /&gt;
        $row =&amp;amp; $this-&amp;gt;items[$i];&lt;br /&gt;
        $checked    = JHTML::_( &#039;grid.id&#039;, $i, $row-&amp;gt;id );&lt;br /&gt;
        $link = JRoute::_( &#039;index.php?option=com_hello&amp;amp;controller=hello&amp;amp;task=edit&amp;amp;cid[]=&#039;. $row-&amp;gt;id );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Jamesconroyuk|James Conroy]] 16:29, 16 February 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Yitwail</name></author>
	</entry>
</feed>