children; if(!isset($children)) { $dbo =& JFactory::getDBO(); $menu =& JSite::getMenu(); $where = Array(); $active = $menu->getActive(); if($active) { $where[] = 'parent = ' . $active->id; $where[] = 'published = 1'; $dbo->setQuery('SELECT COUNT(*) FROM #__menu WHERE '. implode(' AND ', $where)); $children = $dbo->loadResult(); } else { $children = 0; } } return $children; } /** * Load a template file * * @param string $template The name of the template * @param string $filename The actual filename * @return string The contents of the template */ function _loadTemplate($directory, $filename) { global $mainframe, $option; if ($mainframe->getCfg('legacy')) { global $task, $_VERSION, $my, $cur_template, $database, $acl, $Itemid; //For backwards compatibility extract the config vars as globals $registry =& JFactory::getConfig(); foreach (get_object_vars($registry->toObject()) as $k => $v) { $name = 'mosConfig_'.$k; $$name = $v; } } $contents = ''; //Check to see if we have a valid template file if ( file_exists( $directory.DS.$filename ) ) { //store the file path $this->_file = $directory.DS.$filename; //get the file content ob_start(); require_once $directory.DS.$filename; $contents = ob_get_contents(); ob_end_clean(); } // Try to find a favicon by checking the template and root folder $path = $directory . DS; $dirs = array( $path, JPATH_BASE . DS ); foreach ($dirs as $dir ) { $icon = $dir . 'favicon.ico'; if (file_exists( $icon )) { $path = str_replace( JPATH_BASE . DS, '', $dir ); $path = str_replace( '\\', '/', $path ); $this->addFavicon( JURI::base(true).'/'.$path . 'favicon.ico' ); break; } } return $contents; } /** * Parse a document template * * @access public * @param string $data The data too parse * @return The parsed contents of the template */ function _parseTemplate($data) { $replace = array(); $matches = array(); if(preg_match_all('##iU', $data, $matches)) { $matches[0] = array_reverse($matches[0]); $matches[1] = array_reverse($matches[1]); $matches[2] = array_reverse($matches[2]); $count = count($matches[1]); for($i = 0; $i < $count; $i++) { $attribs = JUtility::parseAttributes( $matches[2][$i] ); $type = $matches[1][$i]; $name = isset($attribs['name']) ? $attribs['name'] : null; $replace[$i] = $this->getBuffer($type, $name, $attribs); } $data = str_replace($matches[0], $replace, $data); } return $data; } }
Fatal error: Class 'JDocumenthtml' not found in /home/httpd/vhosts/sleepinglambs.com/httpdocs/libraries/joomla/document/document.php on line 294