english/libraries/joomla/html/html/image.php
/**
	 * Checks to see if an image exists in the current templates image directory
	 * if it does it loads this image.  Otherwise the default image is loaded.
	 * Also can be used in conjunction with the menulist param to create the chosen image
	 * load the default or use no image
	 *
	 * @param   string   $file		The file name, eg foobar.png.
	 * @param   string   $folder		The path to the image.
	 * @param   integer  $altFile	Empty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder.
	 * @param   string   $altFolder	Another path.  Only used for the contact us form based on the value of the imagelist param.
	 * @param   string   $alt		Alternative text.
	 * @param   array    $attribs	An associative array of attributes to add.
	 * @param   bool	$asTag		True (default) to display full tag, false to return just the path.
	 *
	 * @return  string
	 *
	 * @deprecated
	 * @since   11.1
	 */
Checks to see if an image exists in the current templates image directory
if it does it loads this image.  Otherwise the default image is loaded.
Also can be used in conjunction with the menulist param to create the chosen image
load the default or use no image

@param   string   $file              The file name, eg foobar.png.
@param   string   $folder            The path to the image.

@return  string


Checks to see if an image exists in the current templates image directory if it does it loads this image . Otherwise the default image is loaded . Also can be used in conjunction with the menulist param to create the chosen image load the default or use no image @param string $file The file name eg foobar . png . @param string $folder The path to the image . @return string
public static function administrator($file, $folder = '/images/', $altFile = null, $altFolder = '/images/', $alt = null, $attribs = null, $asTag = true)
	{
		$app = JFactory::getApplication();
		if (is_array($attribs)) {
			$attribs = JArrayHelper::toString($attribs);
		}
		$cur_template = $app->getTemplate();
		$alt = html_entity_decode($alt, ENT_COMPAT, 'UTF-8');
		if ($altFile) {
			$image = $altFolder . $altFile;
		}
		else if ($altFile == -1) {
			$image = '';
		}
		else
		{
			if (file_exists(JPATH_ADMINISTRATOR .'/templates/'. $cur_template .'/images/'. $file)) {
				$image = 'templates/'. $cur_template .'/images/'. $file;
			}
			else
			{
				if (substr($folder, 0, 14) == "/administrator") {
					$image = substr($folder, 15) . $file;
				} else {
					$image = $folder . $file;
				}
			}
		}
		if (substr($image, 0, 1) == "/") {
			$image = substr_replace($image, '', 0, 1);
		}
		$image = JURI::base(true).'/'.$image;
		if ($asTag) {
			$image = '<img src="'. $image .'" alt="'. $alt .'" '.$attribs.' />';
		}
		return $image;
	}
public static function administrator ( $ file , $ folder = '/images/' , $ altFile = null , $ altFolder = '/images/' , $ alt = null , $ attribs = null , $ asTag = true ) { $ app = JFactory :: getApplication ( ) ; if ( is_array ( $ attribs ) ) { $ attribs = JArrayHelper :: toString ( $ attribs ) ; } $ cur_template = $ app -> getTemplate ( ) ; $ alt = html_entity_decode ( $ alt , ENT_COMPAT , 'UTF-8' ) ; if ( $ altFile ) { $ image = $ altFolder . $ altFile ; } else if ( $ altFile == - 1 ) { $ image = '' ; } else { if ( file_exists ( JPATH_ADMINISTRATOR . '/templates/' . $ cur_template . '/images/' . $ file ) ) { $ image = 'templates/' . $ cur_template . '/images/' . $ file ; } else { if ( substr ( $ folder , 0 , 14 ) == " /administrator " ) { $ image = substr ( $ folder , 15 ) . $ file ; } else { $ image = $ folder . $ file ; } } } if ( substr ( $ image , 0 , 1 ) == " / " ) { $ image = substr_replace ( $ image , '' , 0 , 1 ) ; } $ image = JURI :: base ( true ) . '/' . $ image ; if ( $ asTag ) { $ image = '<img src="' . $ image . '" alt="' . $ alt . '" ' . $ attribs . ' />' ; } return $ image ; }
Checks to see if an image exists in the current templates image directory
 if it does it loads this image.
Checks to see if an image exists in the current templates image directory if it does it loads this image .
// Strip HTML. // Compability with previous versions. // Prepend the base path. // Outputs actual HTML <img> tag.