| 1559 |
} |
} |
| 1560 |
} |
} |
| 1561 |
} |
} |
| 1562 |
|
if ($Itemid == 0 && !count($result)){ |
| 1563 |
|
$result[0] = new stdclass; |
| 1564 |
|
$result[0]->id = 1; |
| 1565 |
|
$result[0]->link = 'index.php?option=com_frontpage'; |
| 1566 |
|
$result[0]->parent = 0; |
| 1567 |
|
$result[0]->type = 'components'; |
| 1568 |
|
$result[0]->browserNav = 0; |
| 1569 |
|
$result[0]->name = 'Home'; |
| 1570 |
|
} |
| 1571 |
return $result; |
return $result; |
| 1572 |
} |
} |
| 1573 |
|
|
| 2591 |
<?php |
<?php |
| 2592 |
} |
} |
| 2593 |
} |
} |
| 2594 |
|
/** |
| 2595 |
|
* Render head tags |
| 2596 |
|
* tags are assembled into an associative array with the following elements: |
| 2597 |
|
* - title |
| 2598 |
|
* - meta |
| 2599 |
|
* - mambojavascript |
| 2600 |
|
* - custom (custom head tags) |
| 2601 |
|
* - livebookmark |
| 2602 |
|
* - favicon |
| 2603 |
|
* @param unknown keys - array elements to output (null = output all) |
| 2604 |
|
* @param unknown exclude - array elements to exclude in output |
| 2605 |
|
* |
| 2606 |
|
* Usage: mosShowHead() - to render all tags |
| 2607 |
|
* mosShowHead('title') - to render a single tag |
| 2608 |
|
* mosShowHead(array('title', 'meta')) - to selectively render tags (in order) |
| 2609 |
|
* mosShowHead(null, 'custom') - to exclude a single tag |
| 2610 |
|
* mosShowHead(null, array('custom','favicon')) - to exclude multiple tags |
| 2611 |
|
*/ |
| 2612 |
|
function mosShowHead($keys='', $exclude='') { |
| 2613 |
|
if (!is_array($keys)) |
| 2614 |
|
if ($keys !== '' && !is_null($keys)) |
| 2615 |
|
$keys = array($keys); |
| 2616 |
|
else $keys = array(); |
| 2617 |
|
if (!is_array($exclude)) |
| 2618 |
|
if ($exclude !== '') |
| 2619 |
|
$exclude = array($exclude); |
| 2620 |
|
else $exclude = array(); |
| 2621 |
|
|
| 2622 |
|
$this->_head['output'] = array(); |
| 2623 |
|
|
| 2624 |
|
$head = array();; |
| 2625 |
|
$head['title'] = '<title>'.$this->_head['title'].'</title>'; |
| 2626 |
|
|
|
function mosShowHead () { |
|
|
global $_VERSION; |
|
|
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
|
| 2627 |
$this->appendMetaTag( 'description', mamboCore::get('mosConfig_MetaDesc'), true ); |
$this->appendMetaTag( 'description', mamboCore::get('mosConfig_MetaDesc'), true ); |
| 2628 |
$this->appendMetaTag( 'keywords', mamboCore::get('mosConfig_MetaKeys'), true ); |
$this->appendMetaTag( 'keywords', mamboCore::get('mosConfig_MetaKeys'), true ); |
| 2629 |
echo $this->getHead(); |
$head['meta'] = array(); |
| 2630 |
if (mamboCore::get('mosConfig_sef')) { |
foreach ($this->_head['meta'] as $name=>$meta) { |
| 2631 |
echo "<base href=\"$mosConfig_live_site/\" />\r\n"; |
if ($meta[1]) $head['meta'][] = $meta[1]; |
| 2632 |
|
$head['meta'][] = '<meta name="' . $name . '" content="' . $meta[0] . '" />'; |
| 2633 |
|
if ($meta[2]) $head['meta'][] = $meta[2]; |
| 2634 |
} |
} |
| 2635 |
|
$head['meta'] = implode( "\n", $head['meta'] ); |
| 2636 |
|
|
| 2637 |
$my = mamboCore::get('currentUser'); |
$my = mamboCore::get('currentUser'); |
| 2638 |
if ( $my->id ) { |
$head['mambojavascript'] = $my->id ? "<script language=\"JavaScript1.2\" src=".mamboCore::get('mosConfig_live_site')."/includes/js/mambojavascript.js\" type=\"text/javascript\"></script>" : ''; |
| 2639 |
?> |
|
| 2640 |
<script language="JavaScript1.2" src="<?php echo $mosConfig_live_site;?>/includes/js/mambojavascript.js" type="text/javascript"></script> |
$head['custom'] = array(); |
| 2641 |
<?php |
foreach ($this->_head['custom'] as $html) |
| 2642 |
} |
if (trim($html) !== '') |
| 2643 |
|
$head['custom'][] = $html; |
| 2644 |
|
if (count($head['custom']) !== 0) |
| 2645 |
|
$head['custom'] = implode( "\n", $head['custom'] ); |
| 2646 |
|
else |
| 2647 |
|
$head['custom'] = ''; |
| 2648 |
|
|
| 2649 |
|
ob_start(); |
| 2650 |
$this->liveBookMark(); |
$this->liveBookMark(); |
| 2651 |
// outputs link tag for page |
$head['livebookmark'] = ob_get_contents(); |
| 2652 |
|
ob_end_clean(); |
| 2653 |
|
|
| 2654 |
$configuration =& mamboCore::getMamboCore(); |
$configuration =& mamboCore::getMamboCore(); |
| 2655 |
?> |
$head['favicon'] = "<link rel=\"shortcut icon\" href=\"".$configuration->getFavIcon()."\" />"; |
| 2656 |
<link rel="shortcut icon" href="<?php echo $configuration->getFavIcon();?>" /> |
|
| 2657 |
<?php |
foreach($head as $key=>$value) |
| 2658 |
} |
$this->_head['output'][$key] = "$value"; |
| 2659 |
|
|
| 2660 |
|
$tags = $this->_head['output']; |
| 2661 |
|
if (count($keys) == 0) { |
| 2662 |
|
foreach($tags as $key=>$value) |
| 2663 |
|
if (!in_array($key, $exclude)) |
| 2664 |
|
if ($value !== '') |
| 2665 |
|
echo trim($value)."\n"; |
| 2666 |
|
} else { |
| 2667 |
|
foreach($keys as $key) |
| 2668 |
|
if (isset($tags[$key])) |
| 2669 |
|
if(trim($tags[$key]) !== '') |
| 2670 |
|
echo trim($tags[$key])."\n"; |
| 2671 |
|
} |
| 2672 |
|
} |
| 2673 |
|
|
| 2674 |
/** |
/** |
| 2675 |
* retained for backward compatability |
* retained for backward compatability |
| 3618 |
//$Debug [$Group][$Number] = "Message, can by with $Value"; |
//$Debug [$Group][$Number] = "Message, can by with $Value"; |
| 3619 |
//$Group[0] - Errors |
//$Group[0] - Errors |
| 3620 |
//$Group[1] - Notice |
//$Group[1] - Notice |
| 3621 |
$Debug[0][0] = "Error, can NOT read file: " . $Value . "<br>"; |
$Debug[0][0] = "Error, can NOT read file: " . $Value . "<br />"; |
| 3622 |
$Debug[0][1] = "Error, can't find maching char \"". $Value ."\" in destination encoding table!" . "<br>"; |
$Debug[0][1] = "Error, can't find maching char \"". $Value ."\" in destination encoding table!" . "<br />"; |
| 3623 |
$Debug[0][2] = "Error, can't find maching char \"". $Value ."\" in source encoding table!" . "<br>"; |
$Debug[0][2] = "Error, can't find maching char \"". $Value ."\" in source encoding table!" . "<br />"; |
| 3624 |
$Debug[0][3] = "Error, you did NOT set variable " . $Value . " in Convert() function." . "<br>"; |
$Debug[0][3] = "Error, you did NOT set variable " . $Value . " in Convert() function." . "<br />"; |
| 3625 |
$Debug[0][4] = "You can NOT convert string from " . $Value . " to " . $Value . "!" . "<BR>"; |
$Debug[0][4] = "You can NOT convert string from " . $Value . " to " . $Value . "!" . "<br />"; |
| 3626 |
$Debug[1][0] = "Notice, you are trying to convert string from ". $Value ." to ". $Value .", don't you feel it's strange? ;-)" . "<br>"; |
$Debug[1][0] = "Notice, you are trying to convert string from ". $Value ." to ". $Value .", don't you feel it's strange? ;-)" . "<br />"; |
| 3627 |
$Debug[1][1] = "Notice, both charsets " . $Value . " are identical! Check encoding tables files." . "<br>"; |
$Debug[1][1] = "Notice, both charsets " . $Value . " are identical! Check encoding tables files." . "<br />"; |
| 3628 |
$Debug[1][2] = "Notice, there is no unicode char in the string you are trying to convert." . "<br>"; |
$Debug[1][2] = "Notice, there is no unicode char in the string you are trying to convert." . "<br />"; |
| 3629 |
|
|
| 3630 |
if (DEBUG_MODE >= $Group) |
if (DEBUG_MODE >= $Group) |
| 3631 |
{ |
{ |