1
tamarix
Custom block : preview OK but Not OK on web page
  • 2004/5/26 15:05

  • tamarix

  • Just popping in

  • Posts: 26

  • Since: 2004/3/1 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 onhttp://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



<?php
$myDirPath = "$DOCUMENT_ROOT/modules/phplayersmenu/";
$myWwwPath = "/modules/phplayersmenu/";
?>

<link rel="stylesheet" href="<?php print $myWwwPath; ?>layerstreemenu.css" type="text/css"></link>
<style type="text/css">
<!--
@import url("<?php print $myWwwPath; ?>layerstreemenu-hidden.css");
//-->
</style>

<script language="JavaScript" type="text/javascript">
<!--
<?php include ($myDirPath . "libjs/layersmenu-browser_detection.js"); ?>

// -->
</script>
<script language="JavaScript" type="text/javascript" src="<?php print $myWwwPath; ?>libjs/layerstreemenu-cookies.js"></script>



<?php
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;
*/
?>

Login

Who's Online

149 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 149


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits