The Joomla Code Blogger!
{string'Throw new'; HammertimeException("Stop!"); }} catch(HammerTime h) { break_it_down();
Wednesday, January 21, 2009
Custom CSS Class in TinyMCE
Allow Javascript in TinyMCE editor
Reset Virtuemart Invoice Number
Tuesday, January 20, 2009
Auto Expand Sections/Categories in Extended Menu Module for Joomla 1.5
The solution for this is altering some files from the module:
modules/mod_exmenu-j15/exmenu/loader/autoexpandedmenu.menuloader.class.php
Change lines 177 to 192 from:
Code:
switch($menuNode->type) {
case 'content_category':
case 'content_blog_category':
case 'content_archive_category':
if ($contentItemVisible) {
$this->categoryMenuNodeList[] =& $menuNode;
}
break;
case 'content_section':
case 'content_blog_section':
case 'content_archive_section':
if (($categoryVisible) || ($contentItemVisible)) {
$this->sectionMenuNodeList[] =& $menuNode;
}
break;
}
to:
Code:
$tipoMenu = $this->getRawUrlParameter($menuNode->link, 'view');
switch($tipoMenu) {
case 'category':
if ($contentItemVisible) {
$this->categoryMenuNodeList[] =& $menuNode;
}
break;
case 'section':
if (($categoryVisible) || ($contentItemVisible)) {
$this->sectionMenuNodeList[] =& $menuNode;
}
break;
}
This will do the work to generate the links, but Extended Menu won't give then the proper classes when they are active, so it's needed to change one more file:
modules/mod_exmenu-j15/exmenu/loader/menuloader.class.php
Change lines 297 to 303 from:
Code:
switch($task) {
case 'view':
case 'edit':
case 'cancel':
$result = $id;
break;
}
to:
Code:
$result = $id;
Virtuemart hack - Auto Expand all Virtuemart Categories
edit
disable code in line 686 and line 810
$allowed = false;
to
//$allowed = false;
For Dtree:
In components/com_virtuemart/js/vm_dtree.php change line 38 from
$openAll = 'false';
to
$openAll = 'true';