english/components/com_aicontactsafe/views/message/view.html.php
// function to call the css file used with this view
function to call the css file used with this view
function to call the css file used with this view
function callCssFile($cssFile = '') {
		$use_css = $this->profile->use_message_css;
		if (strlen($cssFile) == 0) {
			$cssFile = $this->_cssFile;
		}
		if ($use_css) {
			$document =& JFactory::getDocument();
			$nameCssGeneral = JURI::root().'components/com_aicontactsafe/includes/css/aicontactsafe_general.css';
			$document->addStyleSheet($nameCssGeneral);
			if (strlen($cssFile) > 0) {
				jimport('joomla.filesystem.file');
				$template_name = $this->_app->getTemplate();
				$tPath = JPATH_ROOT.DS.'templates'.DS.$template_name.DS.'html'.DS.'com_aicontactsafe'.DS.'message'.DS.$cssFile;
				if (JFile::exists($tPath)) {
					$nameCssFile = JURI::root().'templates/'.$template_name.'/html/com_aicontactsafe/message/'.$cssFile;
				} else {
					$nameCssFile = JURI::root().'media/aicontactsafe/cssprofiles/'.$cssFile;
				}
				$document->addStyleSheet($nameCssFile);
			}
		}
	}
function callCssFile ( $ cssFile = '' ) { $ use_css = $ this -> profile -> use_message_css ; if ( strlen ( $ cssFile ) == 0 ) { $ cssFile = $ this -> _cssFile ; } if ( $ use_css ) { $ document = & JFactory :: getDocument ( ) ; $ nameCssGeneral = JURI :: root ( ) . 'components/com_aicontactsafe/includes/css/aicontactsafe_general.css' ; $ document -> addStyleSheet ( $ nameCssGeneral ) ; if ( strlen ( $ cssFile ) > 0 ) { jimport ( 'joomla.filesystem.file' ) ; $ template_name = $ this -> _app -> getTemplate ( ) ; $ tPath = JPATH_ROOT . DS . 'templates' . DS . $ template_name . DS . 'html' . DS . 'com_aicontactsafe' . DS . 'message' . DS . $ cssFile ; if ( JFile :: exists ( $ tPath ) ) { $ nameCssFile = JURI :: root ( ) . 'templates/' . $ template_name . '/html/com_aicontactsafe/message/' . $ cssFile ; } else { $ nameCssFile = JURI :: root ( ) . 'media/aicontactsafe/cssprofiles/' . $ cssFile ; } $ document -> addStyleSheet ( $ nameCssFile ) ; } } }
function to call the css file used with this view
function to call the css file used with this view
// check if css is activated/deactivated in the current profile // if no cssFile is named call the default one of the class // if css is activated and there is a css file to call, continue the function // import joomla clases to manage file system // determine if to use the css from the template or from the component