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

How to create an image based php mysql menu


Poster: Grout31
Dated: Sunday March 29 2009 - 16:20:44 BST

Hello

I am trying to achieve an imaged based menu that is run purely from the mysql database. Is this possible and or has this been done before?

I have read and viewed the sample but it is only in javascript. I loaded the mini_menu.sql thinking it would give me the image sample, but alas i got the basic menu that comes with the download.

I have been able to change the background colours, font etc. But i am also trying to position the menu from within the database and again i cant see where this is done.

Basically i would like an image based menu 20px high and expands 100% screen width, all run from the mysql database.

Am i asking too much or do i need to do alot more learning?

Thanks in advance.

Steve

Re: How to create an image based php mysql menu


Poster: Grout31
Dated: Monday March 30 2009 - 18:40:46 BST

Is there no answer to this folks?

Has nobody tried this before?

Steve

Re: How to create an image based php mysql menu


Poster: Grout31
Dated: Wednesday April 1 2009 - 15:23:47 BST

Please, if this is not possible can someone at least let me know!!

I have asked a reasonable question i think, even if its a no you cant do it would suffice!!

Re: How to create an image based php mysql menu


Poster: Ruth
Dated: Wednesday April 1 2009 - 16:24:53 BST

Hi,

Well, I just saw this post. I have to tell you up front I do not do anything with sql or data base, however....

I see that in the file called mini_menu.sql up at the top there is a note which says [as an example]


Code:
# Note that if you want to add more menu style properties or menu item properties, just add them to the table.
# For instance, if you want to add tooltips. add a field called tooltips to the menuitems table.
# It's up to you how you structure the fields, for tooltips we recomend field type TEXT but you could use
# varchar(255) if the contents of your tooltips will never exceed 255 characters. This can be changed at any time
# though using your MySQL admin tool
#


Now, there is something down farther called
Code:
# Table structure for table `mm_styles`
and in that area you have a bunch of styles listed, i.e.
Code:
`oncolor` varchar(6) default NULL,
  `onbgcolor` varchar(6) default NULL,


I am assuming that the varchar(6) has to do with how many spaces the color takes, i.e. ffffff etc. So, I would guess that if you wanted an offbgimage and onbgimage then you would add those properties to that mm_styles area. If you are asking about putting an image into each item, that is making each item its own image, then I have to figure you would put those image codes in the mm_items table structure. I would think you would have to add the a field called image, and if you wanted overimage a field for that also in this area

Code:
CREATE TABLE `mm_items` (
  `itemid` int(11) NOT NULL auto_increment,
  `menuid` int(11) NOT NULL default '0',
  `text` text,
  `url` varchar(255) default NULL,
  `showmenu` varchar(40) default NULL,
  PRIMARY KEY  (`itemid`)
) TYPE=MyISAM AUTO_INCREMENT=50 ;


So to answer your question, yes as far as I know it can be done. I suggest that if you need help on this one, you post a question through the online support systems since I don't think that John knows about this type of set up either [but that's a guess] http://www.milonic.com/support/

:lol: most of this has been a 'guess'

I will also post to Milonic.

Ruth

Re: How to create an image based php mysql menu


Poster: Grout31
Dated: Wednesday April 1 2009 - 18:14:11 BST

Thankyou Ruth

I have managed to change the colours, add and remove menu items, but as far as i know you have to make a special database to imput images. Also i haven't found anywhere to change the position.

I look forward to see what Milonic have to say on this matter.

Thankyou again.

Steve

Re: How to create an image based php mysql menu


Poster: Andy
Dated: Wednesday April 1 2009 - 18:18:09 BST

Have you tried adding the fields to the database and populating with data?

Basically, if you need a menu property that is not already in the database you just need to add the field (matching the menu property name) and add some data.

So, I guess as you want and image you need to add a field called "image" to the menuitems table and insert some data.

This also goes for all other properties whether it's the menustyle, menuitem or menu tables

HTH,
Andy

Re: How to create an image based php mysql menu


Poster: Grout31
Dated: Wednesday April 1 2009 - 19:49:07 BST

Thankyou Andy

I have added a image field and am drawing the files from that, i didnt know if some of the examples already had some examples. Doesn't matter as i can play with it to get it right.

I still haven't found a file or field to postion or reposition the menu, sorry am i being really stupid and missing something?

Thanks again

Steve

Re: How to create an image based php mysql menu


Poster: Ruth
Dated: Wednesday April 1 2009 - 23:00:50 BST

Hi,

The top and left position, or if you want to make it relative, i.e. position="relative"; these are menu properties. You can find the various properties of the program under the main menu on the the main Milonic site, mouse over the DHTML Menu item and go down to Menu Quick Reference Guides. You will see links for different things, 3 of them have to do with style, menu and item properties, going to those pages you will be able to see all the various properties that go into the various areas. Anyway, the top and left, and position things are menu properties so they would have to be placed in the Create Table, mm_menu area.

I think below my signature there are links to the different properties. Hope this helps. By the way, if you are placing the menu in a relative position, you need to read the info on that. There are links to that also.

Ruth