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:29

menudata js to noscript menu converter flaw dataminer.php


Poster: Dijkman
Dated: Monday September 10 2007 - 18:10:44 BST

Hello

does someone maybe know if there is a converter php script
menu_data.js to a html link page for the noscript users/browsers

or am i talking nonsense
and is there another way to convert all links in the menudata.js
to a html page
for non javascript browsers and searchengines

greetings luberth
http://www.snipperdag.com


Poster: John
Dated: Monday September 10 2007 - 20:02:13 BST

Not that I'm aware of.

However, you could make your menu list-based, which will allow it to be read not only by non-JS users (or those who have it turned off), but also the search engines.

It's not quite the high-class spit and polish yet that Andy likes, but it does work without problems. See http://www.milonic.com/listbased/.

Re: menudata js to noscript menu converter


Poster: Dijkman
Dated: Tuesday September 11 2007 - 19:41:01 BST

Yes ok

but maybe someone made an php script to convert
a menu data.js file
to a list based page

i think more people would find such a util handy to greate a list based page from the data.js


or is it possible to get a list based menupage from a menudata.js file
so that i can save it for the noscript part and for searchengines friendly page

but may give probles because i have a frame based menu with two data files for side menu and body frame menu

http://www.snipperdag.com

Re: menudata js to noscript menu converter


Poster: Andy
Dated: Friday September 14 2007 - 16:41:26 BST

php_sitemap will allow you to create sitemaps and UL based menus etc.

it's in the /extras/ directory in the menu download under php_sitemap

-- Andy

Re: menudata js to noscript menu converter


Poster: Dijkman
Dated: Saturday September 15 2007 - 11:47:01 BST

Hello

Thanks much
this is was exactly what i have been searching for
spend hours on it
But didnt find it
So thanks for your helping answer

greetings luberth

example of the output from dataminer.php
a plain text tab based milonic menu

http://www.gravomaster.com/om/menu.php

Re: menudata js to noscript menu converter


Poster: Dijkman
Dated: Saturday September 15 2007 - 20:45:39 BST

Think there is a litle flaw in the dataminer.php script
if there is a url and a showmenu in the aI line
only the showmenu is linked

Honda not linked should be linked to a website (it is in the javascript version off the menu)

* Honda Shadow Club Nederland
* Honda Shadow Owners Club Nederland
* Honda Gold Wing Club Nederland
* Honda Magna Club Nederland

see http://www.snipperdag.com

Re: menudata js to noscript menu converter


Poster: Dijkman
Dated: Sunday September 16 2007 - 7:34:43 BST

Hello

i changed
modified dataminer.php => function outputSitemapItems($mnu)
to correct above flaw ai(text showmenu and url) = url is not linked in sitemap

http://www.gravomaster.com/om/menu.php


Code:



function outputSitemapItems($mnu)
{
   global $_M,$dataMinerOutput;
   $dataMinerOutput.="<UL>\n";
   $items=$_M[$mnu]['items'];
   for($a=0;$a<count($items);$a++)
   {   
      $dataMinerOutput.="<li>\n";
      if(isset($items[$a]['showmenu'])&&$items[$a]['showmenu'])
      {   

//Changed www.snipperdag.com aI(text showmenu and url 16 September 2007         
         if(isset($items[$a]['url'])&&$items[$a]['url'])
          
         {
            $dataMinerOutput.="<a href=".$items[$a]['url'].">".$items[$a]['text']."</a>\n";
         }
              else{
            $dataMinerOutput.=$items[$a]['text']."\n";
         }
//Changed www.snipperdag.com  aI(text showmenu and url)  url was not linked 16 September 2007                                                             

         outputSitemapItems(getMenuByName($items[$a]['showmenu']));
      


}
      else
      {
         if(isset($items[$a]['url'])&&$items[$a]['url'])
         {
            $dataMinerOutput.="<a href=".$items[$a]['url'].">".$items[$a]['text']."</a>\n";
         }
         else
         {
            $dataMinerOutput.="".$items[$a]['text']."\n";
         }
      }
   }
   $dataMinerOutput.="</UL>\n";
}unction outputSitemapItems($mnu)
{
   global $_M,$dataMinerOutput;
   $dataMinerOutput.="<UL>\n";
   $items=$_M[$mnu]['items'];
   for($a=0;$a<count($items);$a++)
   {   
      $dataMinerOutput.="<li>\n";
      if(isset($items[$a]['showmenu'])&&$items[$a]['showmenu'])
      {   
//Changed www.snipperdag.com aI(text showmenu url 16 September 2007         
         if(isset($items[$a]['url'])&&$items[$a]['url'])
          
         {
            $dataMinerOutput.="<a href=".$items[$a]['url'].">".$items[$a]['text']."</a>\n";
         }
              else{
            $dataMinerOutput.=$items[$a]['text']."\n";
         }
//Changed www.snipperdag.com  I(text showmenu url)  url was not linked 16 September 2007                                                             
         outputSitemapItems(getMenuByName($items[$a]['showmenu']));
      


}
      else
      {
         if(isset($items[$a]['url'])&&$items[$a]['url'])
         {
            $dataMinerOutput.="<a href=".$items[$a]['url'].">".$items[$a]['text']."</a>\n";
         }
         else
         {
            $dataMinerOutput.="".$items[$a]['text']."\n";
         }
      }
   }
   $dataMinerOutput.="</UL>\n";
}


http://www.gravomaster.com/om/menu.php