Skip to content

dart-creations.com

Advertisement
Home arrow Joomla arrow Joomla Modules arrow Joomla 1.5 Main Menu Images Module
Print E-mail

Joomla 1.5 Main Menu Images Module

This module enables you to create a main menu with images only. 

Following the success of the original version of Main Menu Images module for Joomla 1.0, this version is a hack of the 1.5 menu module, which allows images in menus without any text.

Download

Please Register and Login to download.

Installation

To install the module, simple go to Extensions Install / Uninstall, choose the file you have downloaded above and click on the Upload File and Install button. 

Compatibility

This module has been written for Joomla 1.5 and thus supports Joomla 1.5 natively.

Configuration

Configuration of the module is done via Extensions > Module Manager. Click on the Joomla 1.5 Main Menu Images item. You will need to enter the images for the menu item when creating the actual menu items. The only configuration necessary at the module level will be the menu to display, and the normal module parameters such as position and ordering. There is also an option which allows you to hide the bullets. The only layout supported by this module is the List layout. Legacy layouts are not supported.

Example Setup

Configuration happens in three steps.

1. Upload the images you want to use to the stories folder via the Media Manager

Joomla Media Manager

 

 

 

 

 

 

 

2. Click on the menu which you want to replace with main menu images

Joomla Images Menu

joomla menus

3. Choose the picture you want to diplay from the images you have uploaded in the Menu Image parameter

joomla menu item image

 4. In the Module Parameters (Extensions > Module Manager > JoomlaMain Menu Images) choose the menu you want to display in the module.

joomla module manager

 The end result after you do this for each menu item is the following:

Screenshot 

joomla main menu images screenshot

 Please do vote for us or write a small review on the Joomla Extensions site if you like this module:

http://extensions.joomla.org/extensions/core-enhancements/menu-systems/image-menus/3675/details

Hover Images

The module now supports easy configuration of the hover images. We are know including a javascript file which when enabled, will enable hover images.

The images possible are now:

1. Normal Image

2. Hover Image

3. Active Image

4. Active Hover Image

To enable the menu you need to add the following lines to the <head> section of the index.php of the template you are using.

<?php
  $document = &JFactory::getDocument();
  $document->addScript( 'modules/mod_j15mainmenuimages/imgchange.js' );
 ?>

Now in the same folder where there is your original image, you need to create the additional three versions of the image, and give them the exact following names:

1. Normal image: image.jpg

2. Hover image: image-hover.jpg

3. Active image: image-active.jpg

4. Active hover: image-active-hover.jpg

If you don't want any one of the images, simply create the image with that name, but put the normal image. This ensures that there isn't any error.  The menu style must be list, and if you want active highlighting, Full Active Highlighting must be on in the paramters of the module.

Change Background On Mouse Over

Changing the image when passing the mouse over the image is not strictly possible (currently). However, to achieve a similar effect, it is possible to change the background of the image using CSS.

The following is an example:

li.item55:hover {
  img:url(/images/stories/otherbackground.jpg); }

The above entry in the stylesheet will create an effect on the li with class "item55" will achieve the on mouse over background effect. You'd need to create an entry in the stylesheet for each menu item which you want this effect on. 

Do you like this module? - Buy me a beer (€3)

If you liked this module, please consider buying me a beer Cool Every drop counts! No guarantees that any donations will be spent on new development rather than beer, though every effort will be made to spend all donations on new developments Smile

Please use the Donate button on the bottom right to donate via Paypal.

Support

Please post to the forums of you need help in configuring the module.

 

 

Comments
Search RSS
sfinx  - active state   |Registered |2008-05-14 15:04:31
Is it possible to assign hover and active state wit this module? I cant figure
it out...
sylvain  - don't arrive to use it   |88.182.224.xxx |2008-06-01 22:21:20
Hello,
Can someone help me ... where do we have to insert images and declare
them in the module
MrWhy  - gap between images   |79.208.96.xxx |2008-06-08 14:39:09
Hello,

i have a little problem... there is always a little gap between 2 images
i thnik more or less 2px how can i fix this??

Thank You
dattard  - gap between images   |Registered |2008-06-09 06:27:29
You should be able to change the CSS of your template to remove this.
joomlacques  - same question   |Registered |2008-06-10 05:12:37
where do you insert the images!!!
dattard  - insert images - from menu   |Registered |2008-06-10 06:41:45
The images are inserted as per standard Joomla functionality i.e. in the menu
items. When creating a new menu item, it is possible to create an image for the
item. This is the image used by the module above. For Joomla 1.5, this will be
from the Menus menu.
Daniel  - Active state + hover   |84.174.68.xxx |2008-06-10 09:38:10
As sfinx already asked, are there hover and active states possible ?!
nthhai  - Thanks   |Registered |2008-07-25 06:33:26
Thanks
Matt  - How to?   |86.140.14.xxx |2008-08-01 10:28:53
Is there a detailed instructions on using this mod? im trying to create a image
only menu at the top of teh screen running horizontally
nuwud  - Text menu removal?   |Registered |2008-08-13 16:27:31
Hi,

You guys really hooked it up with this module; thanks!

So, how do I make
the text menu go away? I changed the css, but the basic text link is still
there, although invisible.

It is also above the images, creating a gap.

-ok, I
fixed the gap by playing with a margin in my css. Just need to get rid of
invisible text links now.

-I figured it out, the display tag in my css just
needed to be commented out. Thanks, you make a great sounding board.
DART  - Text menu removal   |Registered |2008-08-14 09:22:50
Great to know everything is fixed
nuwud  - Got another issue with borders   |75.56.223.xxx |2008-08-23 22:22:34
Hi, I can't seem to get the link border to go away in my css. Any clues? I
already tried setting the border width to 0px or none. Didn't work.
nuwud  - Border   |75.56.223.xxx |2008-08-24 16:56:50
I think I tracked it down to the a:link and li css becuase there are two other
images in my template (pdf and print buttons) that also have the border issue.
There isn't supposed to be any border. I used a css tool for my firefox browser
and it displays this: It may just be my template. The url is:
nolinkspls://zzz.notionsofemotions.net

Any suggestions on how to make it go
away?
nuwud  - link to css tool img   |75.56.223.xxx |2008-08-24 16:58:06
nolinkspls://notionsofemotions.net/cssproblem.jpg

Forum didn't accept my img
tag.
nuwud  - I fingered it out again   |Registered |2008-08-24 21:07:48
img {
border: none;
} was the code needed.
DART  - IMG Border   |SAdministrator |2008-08-25 16:08:37
Good to know you figured it out. I suggest you try out FireBug for sorting out
your CSS problems, though your tool seems nice too.
syams  - good idea   |Registered |2008-08-29 22:22:33
i think this a good idea
thanks
haitho37  - thanks   |Registered |2008-09-19 15:27:01
he
kweiland   |67.201.139.xxx |2008-09-30 20:15:22
can these images somehow utilize the mouse rollover option?
cullyh  - Can you make it a horizontal l   |Registered |2008-11-20 17:03:23
This is working great. Is there an easy way to make it a horizontal layout as
opposed to vertical. I need my images/nav to be side by side.
Thanks
sabaaqahmad   |Registered |2008-12-19 05:33:04
This is working great. Is there an easy way to make it a horizontal layout as
opposed to vertical. I need my images/nav to be side by side.
Thanks
DART  - Horizontal Menus   |SAdministrator |2008-12-26 17:35:33
Horizontal menus are now supported, by modifying the code such that it supports
Legacy - Horizontal main menu.
Harinder  - Hozirontal Menus     |202.134.235.xxx |2009-01-10 11:33:44
Did not follow :

"Horizontal menus are now supported, by modifying the code
such that it supports
Legacy - Horizontal main menu."

Do I need to modify
something ? I am not expert enough to modify module code.
DART  - Horizontal menus   |78.133.54.xxx |2009-01-10 12:00:57
Sorry, meants the parameters ... change the parameters to Legacy - Horizontal.
Obviously you'll need legacy mode enabled.
Harinder  - Worked !     |202.134.235.xxx |2009-01-10 15:55:38
Thanks Dart ! Got the Horz menu.

There is a gap between the images.


Noticed a "cellspacing="1" in the legacy.php in the installed
folder. Made that to "0" still the gap persists. Also saw img
border="0" in the page source.

How to reduce the gap to zero and also
size the images ?
Harinder  - Images are not links     |202.134.235.xxx |2009-01-10 16:27:05
Also noticed the images are not links ! when I select "Legacy
Horizontal" .. the img tag is not nested inside the ga> tag
DART   |78.133.54.xxx |2009-01-10 19:26:34
Check your CSS, I think you should be able to sort most of your problems through
the CSS. Not sure about the link though ... should be ok. However, please if you
still have problems get in touch via the Contact Us, you're one of the first
testers of the Horizontal menu, so expect some problems. We'll make sure you'll
be fine though
vgarmy  - Blank screen   |85.224.155.xxx |2009-02-06 07:36:21
Dosen't work, get a blank screen, HELP
fepia  - roll over   |79.89.130.xxx |2009-04-28 16:47:55
Hi,

First thank you for your work, but I have a little probleme...

All is
working but the exemple CSS code for roll over don't work.

What's
img:url..... ?
I tried background-image but didn't work to, althought
:

li.item1:hover{
border: solid 10px;
}

work....

it maybe conflit between
CSS classes but I change or delete menu classes one by one without success.

Is
there a solution?
Mac  - Premium Theme   |98.111.171.xxx |2009-05-20 14:37:15
I am using the Genre theme from JoomlaXTC. By default the theme is set to use
either moomenu or suckerfish for the mainmenu. I have tried commenting out the
code for both, and publishing this module to "mainmenu" with no success.
What am I missing? I can't supply a link, as I'm building this site locally.
DART   |92.251.85.xxx |2009-05-20 14:59:09
Leave the code there, and instead of commenting out the code, unpublish the menu
modules from the Modules, and leave the Main Menu Images Module only published.
However, if you are commenting the code, none of them will work I'm guessing ...
Mac   |98.111.174.xxx |2009-05-20 15:42:36
Thanks for your speedy reply. I uncommented out all code (actually just replaced
my edited file with the stock one), and unpublished the menu modules. No such
luck. Thinking that I missed something, I unpublished ALL modules, yet the
standard main menu at the top is still displayed. When I go into my template
manager to preview it, it appears that area is labeled, "[submenu
outline]" although that is not one of the positions available for the
module. In addition, the Main Menu Images Module is displaying and functioning
correctly when I publish it to the Right, horizontally. I know it's hard to
diagnose without me providing a link, but any help is appreciated.
DART   |78.133.13.xxx |2009-05-20 16:52:18
I guess the template author is not using standard Joomla functionality then!
Best to get in touch with them to see whether the menus can be switched off.
DestructiveDreaming  - Single character of space appearing between each i   |24.192.85.xxx |2009-08-20 02:13:21
I'm trying to display my images in Legacy horizontal, and for some reason
between the images there is a single character of whitespace -- I can't get them
to display flush against each other, which is necessary for my layout to work. I
saw the other posts about spacing, but they seemed to address different issues.
Do you guys know what the problem might be?
kellysmith  - Menu Items from Dreamweaver don't work in Joomla     |75.142.252.xxx |2009-08-20 20:28:59
I created a Nav Bar with Dreamweaver and coming here made me realize why it
isn't working. How to I get the 5 main large buttons in the middle of this site
to be full-fledged rollover like in regular html with Down, Up, Over and
Over-Down modes? Is that not possible in Joomla
1.5?

nolinkspls://66.147.242.193/~osirenoc/

Righ t now they all go to the same
page but don't worry about that. That will change. I just want the 4 versions of
each button to do their magic like regular html.

Thanks
Kelly
DART   |217.145.5.xxx |2009-08-21 08:33:51
The regular Joomla menus don't do that, and neither does our extension. You
would have to find another extension which can do that.
Charles888   |213.46.17.xxx |2009-08-23 19:03:08
The plugin for webimages can't be found after installation and there is no image
in the menu's. Is this a plugin for 1.0 or for 1.5?
E.g. I have no option "
Unique ItemID= No/Yes".
knigherrant   |115.72.236.xxx |2009-09-17 06:42:50
surender   |115.252.45.xxx |2009-11-10 22:42:28
wingnut   |68.200.13.xxx |2009-11-21 15:56:40
Is there a way to get the rollovers working in Legacy-Horizontal?
Xilver   |81.69.198.xxx |2009-11-30 12:07:20
I just fixed the gap with CSS.
I used the letter-spacing function, and that
works fine.
CafeVino  - Where do you put letter-spacing?     |75.148.126.xxx |2010-03-22 18:42:50
Where do you put the letter-spacing code?
CafeVino  - Also...     |75.148.126.xxx |2010-03-22 18:53:14
It appears that the code is rendered in a way that causes space in-between
horizontal menu items. In HTML the TD tag needs to be on the same line as the
last menu item, and the menu items themselves should butt together, perhaps all
of this on one line from the TD tag..to the... /TD tag. I'd change the source if
I could find where to do it. Anyone know where?
CafeVino  - FIXED THE SPACING ISSUE     |75.148.126.xxx |2010-03-22 19:26:47
I found the code that is causing the spacing issue. It's in the
modules/mod_j15mainmenuimages/legacy.php file on line 307. The space between the
single quotes needs to be removed.

From: $txt = $txt1 . ' ' . $image .
$txt2;
To: $txt = $txt1 . '' . $image . $txt2;
sharktooth   |121.97.203.xxx |2010-04-29 05:03:51
hey tHanks!! that solved my problem..
ronydjohan  - hover not working   |118.96.112.xxx |2009-12-16 12:43:18
hi, i have installed this module, but the hover effect not working, i have done
what you explained. fyi i use joomla 1.5.15, please help me, thanks
ronydjohan  - hover not working on legacy horizontal   |118.96.112.xxx |2009-12-16 12:46:08
sorry, something left, the hover seems to work just in " LIST Menu Style
", pls help me figure it out, thanks.
DART   |78.133.11.xxx |2009-12-16 21:20:34
It works on List menu style, best is to use CSS to style your menu if you want
the hover to work.
k_prateesh  - Problem in horizontal   |59.95.76.xxx |2010-01-04 12:17:03
Hi It works fine in list order..but if i am changing it to horizontal. It is not
hovering, i mean it shows properly the images but not at mouse over..
What
should i do plz help..
DART   |78.133.11.xxx |2010-01-07 22:33:10
It only works well in List mode...
stevemcc   |86.9.44.xxx |2010-01-21 12:40:31
Works great, however my website has 5 seperate menus down the left hand side and
I can only get it to work on one menu.

Tried installing it more than once in
order to use it on different menu modules but it won't allow.

Help !
tacotac   |98.223.14.xxx |2010-01-25 05:51:35
I get this showing up on my page when I put the script into the head of my
index.php file:

Warning: Parameter 1 to modMainMenuImagesHelper::buildXML()
expected to be a reference, value given in
C:\xampp\htdocs\joomla15\libraries
\joomla\cache\handler\callback.php on line 99


What on earth
does it mean, and how can I get rid of it?

The menu anyways works great. At
first below my images, text links were showing and the gap from that space
bumped my images out of the box. I just fixed it by going into my css and making
a fixed size of the image for the links as well as adding the overflow:hidden,
hehe.
DART   |78.133.16.xxx |2010-01-25 19:52:24
Just disable warning messages in php ...
tacotac   |98.223.14.xxx |2010-01-25 20:57:24
I had the messages turned off in a php.ini file, but perhaps I don't know where
this file should go. I am working from Joomla on my own comp right now before I
put it on the server, but I tried putting the file in my templates folder, in
Joomla, and various other places, but the error message still appears. What is
intersting though, is when I disable the menu images module, it still works, but
then the error message disappears.
DART   |78.133.16.xxx |2010-01-25 22:19:11
Try the php.ini in the root folder.
apaindo  - Nice     |125.160.142.xxx |2010-01-25 17:32:44
Thanks fo your module.
audiofilou  - Great module   |79.207.173.xxx |2010-02-01 14:44:04
Thanks a lot for this module. Easy to implement and just works !!

Is there any
option to preload the hover and active images for faster display at first sight.
Would it be possible to include that in the imagechange.js ??
Lonsdale   |91.64.3.xxx |2010-02-12 11:32:31
When I installed it in Joomla 1.5.15 and php 5.3 I had a Fatal error. To correct
this just delete the & sign on line 23 of the helper.php file inside the module.
bigbadroo   |220.253.185.xxx |2010-02-16 06:02:05
Hi

I have a vertical menu on my site here:

http://nolinkspls://backlash.net.au/joomla/

I was getting a border and space around each menu image, so applied the
following to my template.css file, which fixed it up in IE, but not
Firefox and
Safari.

img {
border:none;
margin-toppx;
margin-bottompx;
 margin
-leftpx;
margin-rightpx;
padding-toppx ;
padding-bottompx;
padding-
leftpx;
padding-ri ghtpx;
}

Am I misunderstanding something
when formatting the Main Menu Images Module?

Thanks for your time and
help.

Shaun
ucaka  - workin   |78.90.84.xxx |2010-02-16 12:43:51
I figured out how to make a horizontal menu with workin hover and active states.
You need to disable the module and use your joomla module menu. In the menu
module enter other parameters and change Show menu images to yes and Menu Image
Link to yes. Use LIST as Menu Style. Include the JS code in the head of the
index.php file. And again make all the states of the images with their names in
the joomla image directory under Stories.
With css you can style the list to be
horizontal by float:left li. This should work.
tutut  - which css-class?   |84.152.170.xxx |2010-05-16 09:27:33
Hello ucaka,
I tried your instructions, but I was not able to set the style
sheet horizontally. Where can I do this? I tried it in several classes, but
nothing changed. Thanks.
test12345   |93.192.144.xxx |2010-03-15 03:12:02
First of all: thanks for creating this mod,
it's the one I was looking
for a very long time!!!

When I was integrating the mod in my page I
had
several problems which this forum had already solved
(thanks to all
writers!). But I had one additional
problem with 'hovering': in my
Sub-Menu all the items where
marked as active (and not only the first
one).
The main items of the menu instead didn't have this
problem.

I think this is a bug. I changed the
js-file imgchange.js
as followed and it worked for me:


window.addEvent('domready', function() {

var i=0;

$$('#current img,
.active img').each(function(img) {
i++;

  var src =
img.getProperty('src');
var extension
= src.substring(src.lastIndexOf('.'),src.length)

  if (i==1){


 img.setProperty('src',src.replace(exten...
test12345   |93.192.144.xxx |2010-03-15 03:15:33
oh sorry, text too long...
here the code again:

window.addEvent('domready', function() {
var i=0;
$$('#current img,
.active img').each(function(img) {
i++;
 var src =
img.getProperty('src');
var extension
= src.substring(src.lastIndexOf('.'),src.length)
  if (i==1){


 img.setProperty('src',src.replace(extension,'-acti ve' + extension));

}  
});
$$('.menu img').each(function(img)
{
var src = img.getProperty('src');
var extension
= src.substring(src.lastIndexOf('.'),src.length)
i mg.addEvent('mous
eenter', function()
{ img.setProperty('src',src.replace(extension,'-hove r' + extension));
});
img.addEvent('mouseleave', function() {
img.setProperty('src',src);
});
}); 
});


@Dart: Please consider fixing this in your download-file...thanks
sharktooth  - a bit confuse   |121.97.203.xxx |2010-04-29 04:03:11
I followed every step in the process but I get this error at the end.. This is
shown in my website.. 'Warning: Parameter 1 to
modMainMenuImagesHelper::buildXML() expected to be a reference, value given in
C:\xampp\htdocs\sampleJoomla\libra
ries\joomla\cache\handler\callback .php on line 99'
I couldn't
find out what seems to be problem in the code..
Can anyone help??
Thanks..
sharktooth   |121.97.203.xxx |2010-04-29 04:21:09
don't bother.. somehow I got it all figured out.. thanks anyway..
sandeshsrao  - Menu Link not working correctly     |122.169.46.xxx |2010-05-14 10:02:32
Firstly I want to thank DC for this awesome module. I just have one problem with
the horizontal menu. When clicking the sub menu item the first time, I either
get the contents of the second main menu or a 404 page. Repeated clicks on the
sub menu item finally brings up the actual page. Please advise how to fix this
problem. Also please be as specific as possible as I m just a beginner. Thanks
!!
Makar  - Menu not working correctly   |94.247.105.xxx |2010-08-06 09:17:49
Very good module. But I have a problem. When I use the standard search module of
joomla (in IE 6), in which case the script does not work (imgchange.js) to
change the image. The same thing happens in a demonstration of this
module. Help me, please
skalitz  - two problems   |213.89.134.xxx |2010-08-30 12:29:34
Hello,

Firstly, thanks for an awesome extension.

I run Joomla 1.5.20 with very
simple template that I created in a template creator called Artisteer.

My first
problem is that I can't get the hover function to work. I use a horizontal
legacy menu and I tested every setting imaginable and can't get the hover or
active to work.
I've read above that it doesnt work when using a legacy menu,
men there was one person who managed to get it working but I can't seem to get
what he did.

My second problem is showing sub-items. All the settings are
correct and I've assigned a css-class for the submenu and I still cant get it to
expand.

I'm going nuts here so if someone can help me I'd be very greatful.


Ceers,
John
stbearabus  - Alt tag   |24.99.161.xxx |2011-04-30 17:23:09
Hi!

I have been using this module for a couple years now. It's great and I
have gotten a lot of miles out of it. I sure appreciate it. I recently got a
request to add an alt tag to all my images on the navigation. I wanted to see if
you or anyone ever found a way to make this happen.

Thanks and look forward to
hearing something!

Seth
helvecio  - How to make hover and active-menu work?   |200.152.98.xxx |2011-05-17 02:42:39
I followed the tutorial but nothing happened.
I put the PHP code inside the HEAD
tag of my template but nothing shows when I open the source code.
If you can
clear this for me it's gonna be a REAL life saver!!
Miele Servisi  - Miele servisi     |78.190.179.xxx |2011-06-14 13:17:13
Can someone help me ... where do we have to insert images and declare
them in
the module
einsteinh4  - Good work     |62.156.14.xxx |2011-12-26 14:05:05
I had a little trouble to get started but it works also fine with Joomla
1.7.

Thank you.

Greeting

einsteinh4
einsteinh4  - Adaption   |79.252.176.xxx |2011-12-30 11:26:34
Here is my adaption using the code of test12345 for the file
imgchange.js:

window.addEvent('domready', function() {
var i=0;
$$('#current img,
.active img').each(function(img) {
i=i+1;
var src
= img.getProperty('src') ;
var extension
= src.substring(src.lastIndexOf('.'),src.length);
if (i==1){
img.setPr
operty('src',src.replace(extensio n,'-active' + extension)) ;
}
});
var
topImg = $$('#current li, .active li');
topImg.each(function(li) {
var
cl = li.getProperty('class') ;
if (cl.match(/active/i) != null)
{if
(li.firstChild.firstChild.nodeName == "IMG" )
{var src
= li.firstChild.firstChild.getProperty('src') ;
var extension
= src.substring(src.lastIndexOf('.'),src.length);
li .firstChild.first
Child.setProperty('src',src.repla ce(extension,'-active' +
extension));
}
}
});
einsteinh4   |79.252.176.xxx |2011-12-30 11:29:51
continue...

$$('.menu img').each(function(img) {
var src = img.getProperty('src');
var
extension
= src.substring(src.lastIndexOf('.'),src.length);
im g.addEvent('mouse
enter', function()
{ img.setProperty('src',src.replace(extension,'-hove r' + extension));
});
img.addEvent('mouseleave', function() {
img.setProperty('src',src);
});
}); 
});


Please delete the unnecessary white spaces like in "hov
er".
Thank you for providing this very helpful module for
joomla...

Greetings einsteinh4
admindart   |SAdministrator |2011-12-30 12:15:42
It would be great if you could send me the modified code on spam-me (a t)
dart-creations.com so that I can share with the rest of the community

Thanks
in advance!
einsteinh4   |79.252.176.xxx |2011-12-30 16:23:00
I've sent it to given adress...

I'm glad to be of service.

Greetings
einsteinh4
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

Buy us a beer!

If we've helped you, consider buying a beer €3. It will inspire us to keep on giving! Cheers!


Pagerank
Generated in 0.37589 Seconds