1
Hello,
I tried to do a custom block that integrate the "java tree menu" of PHPlayersmenu (
http://phplayersmenu.sourceforge.net/).
I think a module could be made but my PHP/SQL level is so poor that it shouldn't give anything good !!!
So what I did is to make a new block and add an html script (see end of the message).
When I do a preview, the menu appearance is OK (as the one shown on
http://phplayersmenu.sourceforge.net/) but when I look at web page, I only have part of the script printed out.
Since I have no error message, I don't in which direction to look at.
Thanks a lot for any advices ...
Franck
$myDirPath = "$DOCUMENT_ROOT/modules/phplayersmenu/";
$myWwwPath = "/modules/phplayersmenu/";
?>
include ($myDirPath . "lib/PHPLIB.php");
include ($myDirPath . "lib/layersmenu-common.inc.php");
include ($myDirPath . "lib/treemenu.inc.php");
$mid = new TreeMenu();
$mid->setDirroot($myDirPath);
$mid->setLibjsdir($myDirPath . "libjs/");
$mid->setImgdir($myDirPath . "images/");
$mid->setImgwww($myWwwPath . "images/");
$mid->setMenuStructureFile($myDirPath . "layersmenu-vertical-1.txt");
$mid->parseStructureForMenu("treemenu1");
print $mid->newTreeMenu("treemenu1");
/* alternatively:
$mid->newTreeMenu("treemenu1");
$mid->printTreeMenu("treemenu1");
*/
/* alternatively:
$mid->newTreeMenu("treemenu1");
$tree_menu1 = $mid->getTreeMenu("treemenu1");
print $tree_menu1;
*/
?>