isAdmin()) { return; } if(!file_exists(JPATH_PLUGINS.'/editors/jckeditor')) { return; } $doc = JFactory::getDocument(); if($doc->getType() != 'html') { //If not correct document type exit return; } jimport('joomla.plugin.helper'); $editor = JPluginHelper::getPlugin('editors','jckeditor'); if(is_string($editor->params)) //always must do this check $params = @ new JRegistry($editor->params); else $params = $editor->params; if(!$params->get('jcktypography', false)) { return; // nothing to do } if(!$params->get('jcktypographycontent', '')) { return; // nothing to do } $data = $doc->getHeadData(); $stylesheet = array(); $url = JURI::base(true).'/plugins/editors/jckeditor/typography/typography2.php'; $stylesheet[$url]['mime'] = 'text/css'; $stylesheet[$url]['media'] = null; $stylesheet[$url]['attribs'] = array(); $data['styleSheets'] = $stylesheet + $data['styleSheets']; $doc->setHeadData($data); } } _plugin = JPluginHelper::getPlugin('system', 'GoogleAnalytics'); $this->_params = new JParameter($this->_plugin->params); } function onAfterRender() { // Initialise variables $type = $this->params->get('type', ''); $trackerCode = $this->params->get('code', ''); $domain = $this->params->get('domain', ''); $verify = $this->params->get('verify', ''); $verifyOutput = ''; $javascript = ''; $app = JFactory::getApplication(); // skip if admin page if ($app->isAdmin()) { return; } //getting body code and storing as buffer $buffer = JResponse::getBody(); if ($type == 'asynchronous') { //embed Google Analytics code $javascript .= " "; } if ($type == 'universal') { //embed Google Analytics code $javascript .= " "; } // adding the Google Analytics code in the header before the ending tag and then replacing the buffer $buffer = preg_replace("/<\/head>/", "\n\n" . $verifyOutput . "\n\n" . $javascript . "\n\n", $buffer); //output the buffer JResponse::setBody($buffer); return true; } } ?> ติดต่อเรา
ceit logo

 

ศูนย์นวัตกรรมและเทคโนโลยีการศึกษา

(The Center for Educational Innovation and Technology:CEIT)

มหาวิทยาลัยเทคโนโลยีสุรนารี
ต.สุรนารี อ.เมือง จ.นครราชสีมา 30000

โทรศัพท์ 0-4422-4994 โทรสาร 0-4422-4974
E-Mail : This email address is being protected from spambots. You need JavaScript enabled to view it.

 

Admin : นิยม ประทุมมา (This email address is being protected from spambots. You need JavaScript enabled to view it.)

 

ceit map