Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:15

Sample 8 questions


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 0:34:34 BST

OK..I installed and used the scrolling menu, but it had some instructions with it. I really like sample 8, and it would fit into my site perfectly, so...
Can anyone tell me what to do as far as sample 8 goes?
Do I need to do a clean install?
What do I need to call in my header files?
I tried deleting the old scroll menu files, replacing the old menu call ups with all 4 in version 8 in my includes folder, but all I got was page loading errors, so I went back to the scroll menu.
I kow just eneough about this stuff to really get me in trouble, so some fairly detailed instructions would be a great help.
THX!


Poster: Ruth
Dated: Tuesday September 2 2003 - 0:54:10 BST

A person in my own corner, I also know just enough to get in trouble. Do you have a link so we can see the old menu? It's much easier to answer the questions if we see what you have now.

Ruth

ok


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 1:40:31 BST

here is the link..tho the menus are working fine.
http://www.dogsofwargaming.com/vfl/index.php

Here are the old instructions that came with scroll menu:
Menu navigator version3 for suitable for all phpnuke version and html files.

UPLOADING FILES:

1- Upload in your phpnuke root directory:
menu_array.js
mmenu.js
arrowdn.gif


EDITING FILES:

1- Open the my_header.php located in the includes folder and insert these following lines:

<SCRIPT language=JavaScript src="menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>
Save and upload this file.


NOTE:
The file mmenu.js does NOT require any editing.



HOW TO SETUP YOUR MENU NAVIGATOR TO YOUR REQUIREMENTS:

1- Open the menu_array.js file and replace all http://www.xxxxxxx.xxxx with your url
2- To include more links follow instructions in the menu_array.js file.


NOTE: In the menu_array.js file you can:

a- Include or remove links in the sub menus (follow examples in sub-menus)
b- Change color, menu padding and many other variations to suite you preferences
c- To set the menu static or scrolling ( see line 95 set value to 1 for scrolling and 0 (zero) for static
d- To set up the menu vertical or horizontal position ( see line 96 and set the value 1 for horizontal or 0 (zero) for vertical


IF YOU NEED MORE HELP please go to:
http://www.milonic.co.uk ( the creator of this menu navigator
)

Like I said, the scroll menus work fine, but I'd rather have the sample 8 menu.
Perhaps a better way to look at it is as a new install with no instructions?


Poster: Maz
Dated: Tuesday September 2 2003 - 3:54:44 BST

I don't suppose you found any instructions for the new menu, that would be nice.

First you have more files to be uploaded to the root directory, get all the files in the new menu uploaded.

menu_src.js now has a line to locate file directory and 2 slashes // need to be removed from that line.

In the script line the src file must be first, followed by menu data.

That should help get you started.

maz

thx


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 3:59:54 BST

thx...But it's greek to me..I'm hoping someone could give me a little more detail..I think I'd do fine if I had the instructions like what came with the scroll menu above.
Anyone...
Bueller?


Poster: Hergio
Dated: Tuesday September 2 2003 - 15:01:26 BST

OK let me see if I can help....
Go to the sample page and click the download link for that menu. You will get a zip file with all you need to create the menu, plus examples.

Copy the milonic_src.js, mmenudom.js, mmenuns4.js, and menu_data.js files to some directory in your webserver (preferrably the root). For the sake of this example, I will refer to menuFilesDirectory as whatever directory or directory hierarchy you have placed your menus into.

Open up milonic_src.js (with a wordpad or similar) and find the line near the top that begins with //scriptpath= or a variant of that. Remove the // and make it say scriptpath="/menuFilesDirectory/";
This line tells the menu the directory where the mmenudom and mmenuns4 files are located.

In the page(s) you want the menu, put these two lines in IMMEDIATELY after the body tag.
<SCRIPT src="/menuFilesDirectory/milonic_src.js" ></SCRIPT>
<SCRIPT src="/menuFilesDirectory/menu_data.js" ></SCRIPT>

Then inside of menu_data, you will have it pretty much set up for scrolling thanks to the example. You can see the followscroll set to 1 in the menu, thats why it scrolls. You can edit the style and look of it, and also add remove menus and other things. If you need further explanation, let me know.

ok..


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 17:41:40 BST

First, thank you for your help!
I followed your instructions, but see nothing on my test site located here:

http://dogsofwargaming.com/blackwatchdr ... /index.php

The path where I installed all 4 files is:dogsofwargaming.com/blackwatchdragoons/nuke/html

Here is the code as installed in my includes folder/my header.php

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/

/*
This file is to customize whatever stuff you need to include in your site
when the header loads. This can be used for third party banners, custom
javascript, popup windows, etc. With this file you don't need to edit
system code each time you upgrade to a new version. Just remember, in case
you add code here to not overwrite this file when updating!
Whatever you put here will be between <head> and </head> tags.
*/

?>
<SCRIPT src="/menuFilesDirectory/milonic_src.js" ></SCRIPT>
<SCRIPT src="/menuFilesDirectory/menu_data.js" ></SCRIPT>


and here is how my edited milonic_src.jvs looks:
/*

Milonic DHTML Menu - A JavaScript Website Navigation System.
Version 5.0 Release Candidate 8.0 Built: Monday August 25 2003 - 9:31
Copyright 2003 (c) Milonic Solutions Limited. All Rights Reserved.
This is a commercial application, please visit http://www.milonic.com/ for more information about its use.
See http://www.milonic.com/license.php for Commercial License Agreement
Non profit use of this menu system is free of charge. All Copyright statements must always remain in place
******* PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE *******

License Number: Un-Licensed

*/


scriptpath="http://dogsofwargaming.com/blackwatchdragoons/nuke/html/milonic_src.js";

/*
The scriptpath variable stores the path to your menu JS files.

At some point you may need to enter a scriptpath. This is useful for developing
web pages from your local hard drive. It also enables you to declare a path to your
menu script files if use files in a directory structure.

You need to declare the path to the script as a standard directory structure format
but you must use / for both Windows and Unix file systems and you must end with a /

By default, the variable is empty and assumes the current directory.
*/

_mDepth=2;

[excess code deleted by Admin]


Poster: Hergio
Dated: Tuesday September 2 2003 - 18:00:08 BST

Quote:
<SCRIPT src="/menuFilesDirectory/milonic_src.js" ></SCRIPT>
<SCRIPT src="/menuFilesDirectory/menu_data.js" ></SCRIPT>

Heres your problem, I used menuFilesDirectory as an example...you forgot to swap it out here too. :oops:


Poster: John
Dated: Tuesday September 2 2003 - 18:10:15 BST

Here's part of your problem. You have...
Code:
<head>
stuff...
</head>
stuff...
<head>
more stuff...
</head>

Can't do that. Only one <head></head> is allowed.

ok


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 18:32:38 BST

changed to this, but still no luck.

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/

/*
This file is to customize whatever stuff you need to include in your site
when the header loads. This can be used for third party banners, custom
javascript, popup windows, etc. With this file you don't need to edit
system code each time you upgrade to a new version. Just remember, in case
you add code here to not overwrite this file when updating!
Whatever you put here will be between <head> and </head> tags.
*/

?>
<SCRIPT src="/dogsofwargaming.com/blackwatchdragoons/nuke/html/milonic_src.js" ></SCRIPT>
<SCRIPT src="/dogsofwargaming.com/blackwatchdragoons/nuke/html/menu_data.js" ></SCRIPT>



was the edited milonic_scr.jvs file correct?


jgillett...not sure what you mean..everything copied came from the files I edited, and are two seperate files (seperated by the green remark in the middle)...what do you mean?


Poster: John
Dated: Tuesday September 2 2003 - 18:49:30 BST

In your main HTML you have the following...
Code:
<head>
some code left out here for space...
<SCRIPT src="/dogsofwargaming.com/blackwatchdragoons/nuke/html/milonic_src.js" ></SCRIPT>
<SCRIPT src="/dogsofwargaming.com/blackwatchdragoons/nuke/html/menu_data.js" ></SCRIPT>
</head>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div><script language="JavaScript" src="mydirectory/overlib.js"></script><html>
<head>
<title>Smeraldo</title>
</head>

My point is that as you look through that code you have <head>stuff</head><head>more stuff</head>, and that is invalid markup. You can only have one <head></head> combination. Move the <title>Smeraldo</title> up into the first <head>, and get rid of the second <head></head> combination.

Try this for your scriptpath...

scriptpath="/blackwatchdragoons/nuke/html/";


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 19:02:14 BST

OK ...entered your script path...but for the life of me I don't see what you're seeing as far as the script you're talking about.

How about this.....I already have the scrolling menu on the site that I want to use this menu on. I turned off scrolling, can I make headers and such within the menu to basically achieve the look of sample 8?
If so, will the quick reference guides tell me what I need to know?
If they will can you post the link for me?

If I can do that, I apologize for wasting your time trying to figure out code, but at least I learned a little something, so it's not a total loss!


Poster: Ruth
Dated: Tuesday September 2 2003 - 19:43:19 BST

DevildogMP, go to the page and do a view source, you will see that the
Code:
<head></head>
appears twice on it. Once at the top with the metatags in it and the javascript for the menu. Then there is a div code and right below that div code there is another
Code:
<head></head>
with the page title in it. Just move the title code and the page title up right after the first <.head>and delete the second pair of head codes that's there.

Ruth


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 19:59:59 BST

well, forgive my ignorance, but how do I view the source? when I right click and select view source, or go to the toolbars I get nothing...if I edit the tags what php file might they be under?


Poster: John
Dated: Tuesday September 2 2003 - 20:22:22 BST

It's all towards the top of your index.php page. You look at the source by using whatever editor you are using now to make changes to the page.


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 20:28:32 BST

ok..here is my index.php..what lines do I edit?
Can I make the scroll menu look like menu 8?


<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/

require_once("mainfile.php");
$_SERVER['PHP_SELF'] = "modules.php";
$sql = "SELECT main_module from ".$prefix."_main";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$name = $row[main_module];
$home = 1;

if ($httpref==1) {
$referer = $_SERVER["HTTP_REFERER"];
$referer = check_html($referer, nohtml);
if ($referer=="" OR eregi("^unknown", $referer) OR substr("$referer",0,strlen($nukeurl))==$nukeurl OR eregi("^bookmark",$referer)) {
} else {
$sql = "INSERT INTO ".$prefix."_referer VALUES (NULL, '$referer')";
$result = $db->sql_query($sql);
}
$sql = "SELECT * FROM ".$prefix."_referer";
$result = $db->sql_query($sql);
$numrows = $db->sql_numrows($result);
if($numrows>=$httprefmax) {
$sql = "DELETE FROM ".$prefix."_referer";
$result = $db->sql_query($sql);
}
}
if (!isset($mop)) { $mop="modload"; }
if (!isset($mod_file)) { $mod_file="index"; }
if (ereg("\.\.",$name) || ereg("\.\.",$file) || ereg("\.\.",$mod_file) || ereg("\.\.",$mop)) {
echo "You are so cool...";
} else {
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/module.php")) {
include("themes/$ThemeSel/module.php");
if (is_active("$default_module") AND file_exists("modules/$default_module/$mod_file.php")) {
$name = $default_module;
}
}
if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) {
$modpath = "themes/$ThemeSel/";
}
$modpath .= "modules/$name/$mod_file.php";
if (file_exists($modpath)) {
include($modpath);
} else {
$index = 1;
include("header.php");
OpenTable();
if (is_admin($admin)) {
echo "<center><font class=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"admin.php?op=modules\">"._ADDAHOME."</a> ]</center>";
} else {
echo "<center>"._HOMEPROBLEMUSER."</center>";
}
CloseTable();
include("footer.php");
}
}

?>


Poster: Ruth
Dated: Tuesday September 2 2003 - 20:28:46 BST

And that reminds me, John or anybody, I meant to ask about the view source. I can view it in any browser but IE anyone know why ie prevents it...I've got ie5.0?

Ruth


Poster: John
Dated: Tuesday September 2 2003 - 20:41:13 BST

That is NOT the code I see when I go to the link you provided as index.php (http://dogsofwargaming.com/blackwatchdragoons/nuke/html/index.php). It looks like this...
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PHP-Nuke Powered Site </title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<META NAME="RESOURCE-TYPE" CONTENT="DOCUMENT">
<META NAME="DISTRIBUTION" CONTENT="GLOBAL">
<META NAME="AUTHOR" CONTENT="PHP-Nuke Powered Site">
<META NAME="COPYRIGHT" CONTENT="Copyright (c) 2003 by PHP-Nuke Powered Site">
<META NAME="KEYWORDS" CONTENT="News, news, New, new, Technology, technology, Headlines, headlines, Nuke, nuke, PHP-Nuke, phpnuke, php-nuke, Geek, geek, Geeks, geeks, Hacker, hacker, Hackers, hackers, Linux, linux, Windows, windows, Software, software, Download, download, Downloads, downloads, Free, FREE, free, Community, community, MP3, mp3, Forum, forum, Forums, forums, Bulletin, bulletin, Board, board, Boards, boards, PHP, php, Survey, survey, Kernel, kernel, Comment, comment, Comments, comments, Portal, portal, ODP, odp, Open, open, Open Source, OpenSource, Opensource, opensource, open source, Free Software, FreeSoftware, Freesoftware, free software, GNU, gnu, GPL, gpl, License, license, Unix, UNIX, *nix, unix, MySQL, mysql, SQL, sql, Database, DataBase, Blogs, blogs, Blog, blog, database, Mandrake, mandrake, Red Hat, RedHat, red hat, Slackware, slackware, SUSE, SuSE, suse, Debian, debian, Gnome, GNOME, gnome, Kde, KDE, kde, Enlightenment, enlightenment, Interactive, interactive, Programming, programming, Extreme, extreme, Game, game, Games, games, Web Site, web site, Weblog, WebLog, weblog, Guru, GURU, guru, Oracle, oracle, db2, DB2, odbc, ODBC, plugin, plugins, Plugin, Plugins">
<META NAME="DESCRIPTION" CONTENT="Your slogan here">
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
<META NAME="REVISIT-AFTER" CONTENT="1 DAYS">
<META NAME="RATING" CONTENT="GENERAL">
<META NAME="GENERATOR" CONTENT="PHP-Nuke 6.5 - Copyright 2003 by http://phpnuke.org">
<LINK REL="StyleSheet" HREF="themes/Smeraldo/style/style.css" TYPE="text/css">
<SCRIPT src="/dogsofwargaming.com/blackwatchdragoons/nuke/html/milonic_src.js" ></SCRIPT>
<SCRIPT src="/dogsofwargaming.com/blackwatchdragoons/nuke/html/menu_data.js" ></SCRIPT>
</head>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div><script language="JavaScript" src="mydirectory/overlib.js"></script><html>

<head>
<title>Smeraldo</title>
</head>

<body background="themes/Smeraldo/images/line1.jpg">
etc.

Change that as I indicated.


Poster: John
Dated: Tuesday September 2 2003 - 20:42:13 BST

Don't know, Ruth. Not having any trouble in IE6.


Poster: DevildogMP
Dated: Tuesday September 2 2003 - 20:52:45 BST

Got me. I dunno.
Can you provide me links where those quick reference guides are and I'll play around ith my current scroll menu..I just don't want to mess anything up at this point


Poster: Ruth
Dated: Tuesday September 2 2003 - 21:40:49 BST

Ok, this is weird, but if you download the pages, then Devil is right, it doesn't show a duplicate of the head code. I have no idea why it does it when you view them on the web. Just thought I'd let ya'll know that you're not going nuts.... :lol:

Ruth


Poster: Hergio
Dated: Wednesday September 3 2003 - 2:56:02 BST

Ok Devil...when alot of php pages render, they include other pages. So basically your php page will be alot of if else statements that include different things and set variables along the way, so you are not going to see a whole lot of HTML markup. Basically what your phpNuke template is doing is including three files (and also a footer, but I am ignoring that), two of which have a head defined in them. This is poor HTML and just might be causing some problems...not your fault. There are three includes I can see,
include("themes/$ThemeSel/module.php");
include($modpath);
include("header.php");
The variables are the strings that start with $, so they are dynamic. You need to figure out what themes you are using and find the php files that are being included, as well as whats in the header.php file, and see where your duplicate heads are coming from.

And the links to the quick references are at http://www.milonic.com and they are located under the menu item "DHTML Menu"...can't miss 'em.


Poster: DevildogMP
Dated: Wednesday September 3 2003 - 5:22:08 BST

ok...well I may be getting in over my head then.
Will I be able to achieve the effects of sample 8 using the scrolling menu?


Poster: bobwill
Dated: Wednesday September 3 2003 - 13:51:46 BST

The only way I could get my menu to work using the "scriptpath" variable was to leave off the leading "/". This is was also true with the loading of the scripts.

scriptpath="mypath/";

<SCRIPT src="mypath/milonic_src.js" ></SCRIPT>
<SCRIPT src="mypath/menu_data.js" ></SCRIPT>

The menu would not load with leading "/". Why is this?


Poster: Hergio
Dated: Wednesday September 3 2003 - 18:40:07 BST

That leading / means start looking from the ROOT of the website. So basically if your website is http://www.blah.com then if you say /dir1 it will start looking for files in blah.com/dir1 and so on. Basically this refers to the wwwroot of your site most of the time.


Poster: DevildogMP
Dated: Friday September 5 2003 - 7:08:05 BST

OK..I ended up reconfiguring my old menu to get the effect I wanted..the question I have now is...is it possible to place the menu inside of a block in php? Right now the menu won't allow blocks to be placed on the left side, and if I do it places the block on the inside (center) of the menu. Ideally the menu would replace the "modules" or menu block in php.


Poster: Maz
Dated: Friday September 5 2003 - 10:17:13 BST

I'm a complete novice at php without good instructions. I tried searching to see if you can add a template, nothing, it makes everything so much easier to insert content. Perhaps there are instructions for inserting a menu in the header somewhere?


Poster: DevildogMP
Dated: Friday September 5 2003 - 15:24:34 BST

Thxs for looking...looks like an extensive search thru a few sights I know! I certaily didn't expect you to take that much time, and I sure do appreciate it!


Poster: Hergio
Dated: Friday September 5 2003 - 18:18:26 BST

I am not sure exactly what your asking...but if you want to say, INCLUDE the menu code into a php, yeah thats possible. That way you would have one copy of it and it would be on all your pages. Look up php includes if thats what you want to do, otherwise, I'm sorry, explain exactly what it is you want to do.


Poster: DevildogMP
Dated: Friday September 5 2003 - 19:30:55 BST

I want to put the code in a block in php..that way I can retain the overall appearance of php (left, center and right blocks) Right now my menu appears on every page, but I would like to have the left hand blocks appear as well..which I can't do currently. If the menu appeared within a block, it would appear on any page, and the block can be placed in any position. I can enter the info into a blaock as html...would pure html work?