Friday, 07 December 2007

Joomla Main Menu Images Module

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

Funnily enough, we were recently doing a site and realised that you if you choose to display images in the main menu, you still get the text content of the menu. To have you main menu display images only, you need to perform a small hack on the main menu module. The original main menu module has been changes slightly to create this module.

Download

Please Register and Login to download.

Installation

To install the module, simple go to Installers > Modules, choose the file you have downloaded above and click on the upload and install button. 

Compatibility

There are two versions of this module, one for Joomla 1.5 and one for Joomla 1.0.

Configuration

Configuration of the module is done via Modules > Site Modules. Click on the Joomla Main Menu Images item, and you will see a screenshot similar to the one below. It is basically the same as the mainmenu module, with the Show Menu Icon choice selected by default.

Example Setup

Configuration happens in three steps.

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

Images in Stories folder

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

mainmenuitems

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

mainmenualbum

 4. In the Module Parameters (Modules > Site Modules > Joomla Main Menu Images) choose the menu you want to display in the module.

moduleparameters

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

Screenshot 

mainmenuimages.jpg

Please do vote for us or write a small review on the Joomla Extensions site if you like this 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.

 

Support

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

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.

Thanks goes to hiveminds for this hack.

 

 

 

Comments
Search RSS
Srdjan  - Yea   |91.143.221.xxx |2007-12-14 16:51:04
How simple and useful!!

Thx guys!

P.S. I will try to remember to donate when
got ccard
vicomunico.com  - yes it works, and very well to   |80.181.210.xxx |2007-12-31 17:49:47
it's a simple and functional way to "hide" the text of your menu
voices...

thanks!!!
joe  - Great!   |71.108.226.xxx |2008-02-13 22:26:24
Do you think this could be used to create custom menu names. Instead of having
boring h1 text, perhaps a unique jpg for each menu? thanks!
James Mitchell  - Great module   |81.133.186.xxx |2008-02-14 13:40:06
This is a brilliant module !

One idea for the next release: Could it have a
different image for rollover ?

Keep up the brilliant work !

James
epoc  - Lo probaré   |Registered |2008-03-01 14:52:57
recien he podido bajar este modulo, ojala sea lo que estoy buscando, bye
Daniel  - Problems   |200.137.1.xxx |2008-03-18 16:21:41
I installed the module, but when I activate the module, doesn,t show the images,
only the names of the menu itens.

Help Me Please.
DART Creations  - Problems   |217.145.5.xxx |2008-03-18 17:19:57
Are you sure you activated the module and published it to the correct position?
This is usually the most obvious solution to the problem.
222fbj  - Does this Only work with mainm   |Registered |2008-03-19 02:08:43
how can I make it work with other menus?

thanks
DART Creations  - Any menu   |85.232.196.xxx |2008-03-19 07:47:38
It can work with any defined menu, not just with main menu.
AbeOne  - Space between images   |Registered |2008-03-21 08:50:51
how can I reduce space between images?
DART Creations  - Space between images   |85.232.196.xxx |2008-03-22 13:58:57
This can probably be done by changing the main menu style.
Annica  - Doesn't work in IE   |213.112.221.xxx |2008-03-30 15:58:47
Tried this module out, workes just fine in Firefox... but in IE it tries to get
images even for the menuitems that doesn't have an image... tried too look at
the code but looks like there is an "else" who's suppose to fix that...
but it doesn't.
sharemind  - title and image   |Registered |2008-04-03 18:46:18
It looks like a nice module, but how can I show only the images without the text
??

At the moment I see both image ant text, and only the text is a
link.....

can someone help me?

Also, can I make it work with Joomfish
??

Thanks :-)
DART Creations  - title and image   |217.145.5.xxx |2008-04-04 13:29:05
Hi Sharemind, if you are getting image and text then you are defintely doing
something wrong, because with this module it is NOT possible to display the
text! The function of this module allows ONLY the image to be displayed. Make
sure you have the correct module enabled and published, and replacing the
original menu module.
dimitric  - Also text   |Registered |2008-04-04 13:44:23
having same problem as Sharemind.
I published everyhting correctly and
unpublished the org Main menu, but nevertheless I 'm seeing text underneath the
pictures.
anton  - title and image   |213.84.126.xxx |2008-04-09 19:34:34
I have the same problem also nothing happens when I click on the image.

Is
there a howto ??
DART Creations  - title and image   |85.232.196.xxx |2008-04-10 16:06:42
Well it works well on my installation, so you'll need to provide more details
and a URL if you want me to try to help!
antonvdh  - title image   |Registered |2008-04-14 14:02:28
www.antoons.org

details like ?
antonvdh  - title and im age   |Registered |2008-04-14 14:12:02
I do'nt see that screenshot.
I am using joomla 1.0.13
DART Creations  - antondvh   |217.145.5.xxx |2008-04-14 14:31:59
Contact us directly via the Contact Us link anton
shubhada  - image   |59.97.192.xxx |2008-05-02 05:22:24
hi,
can any one tell me how to make this menu horizontal.I mean i want to
display it as horizontal.
Ben adams  - How to make mainmenu images horizontal   |213.136.114.xxx |2009-05-21 09:51:52
open mod_mainmenuimages.php
search the css class mainlevel and replace it by mainlevelimages by exemple. save the modification.

what we done, we have changed the
default css class for the module, we can now add the new css class
in the css file of ur template and ajust width. in default css class,
width is 100% thats why horizontal align go wrong

excuse me but im
not american, excuse my wrong speakin

ben adams
christel  - manual   |84.83.64.xxx |2008-05-15 06:56:43
Hi, is there a manual for how to customise the Joomla Main Menu Images Module? I
have installed it, but I don't know how to let it work...Thank you!
dev21  - 1.5   |88.184.141.xxx |2008-05-21 15:11:37
It dosen't work in Joomla 1.5 i've got this:






the / on the end of the
Gluip  - images showing as non hyperlin   |87.208.18.xxx |2008-05-22 12:19:17
I had problems with text showing and images not being hyperlinks. I fixed my
problem by Setting the 'Show Title' option of the menu to false. I guess it did
not initialize properly since this should not have anything to do with image
functionality etc.
eka   |75.49.3.xxx |2008-05-22 14:52:56
hi,

how to make the active menu has the same image as hoover one?
sgualembro  - Module Installation Error   |62.211.214.xxx |2008-05-27 07:43:41
In joomla 1.5.3 I have this error:
Impossible to copy selected file *
JInstaller::install:opt/lampp/htdocs/joomla/tmp/in
stall_483bc7c71f2c4/mod_j15mainmenuimages/tmpl/ind ex.html a
opt/lampp/htdocs/joomla/modules/mod_j15mainmenuima ges/tmpl/index.html
I have
set the legacy mode end changed the legacy.php file but I have the same error.
Why? How can I do? Thanks
DART Creations  - Installation Error   |81.133.241.xxx |2008-05-27 08:43:09
Try setting up the FTP layer, you don't the need Legacy mode on.
Eric  - Not working   |82.118.65.xxx |2008-06-04 14:52:55
Same problem as Gluip above. Found that if this is the first menu on the page
it works. As soon as you have another showuing befroe it, it fails. Nice try
though
kanenable99  - Show Submenu?   |75.80.208.xxx |2008-06-04 18:23:38
Am I able to show submenus? If so, where do I enable that? I have show
submenus set to always. I'm trying to make flyout menus for the submenu. It's
worked great for the main menu though! Thanks!
mdmaynard1  - Active/Hover State   |Registered |2008-06-06 17:49:25
How do you define the Active and Hover state images?
eMCe  - no menu without text :(   |Registered |2008-06-19 08:03:25
It doesn't work with 1.0.15 I've the same problem like sharemind and Gluip.
Nothing change, your menu is exactly the same as main menu with icons and text.
Exerything was activacet corretly by me
If this problem can change, tell me,
if we can use this module for two menus on one site.
eMCe  - works with 1.0.13   |86.111.108.xxx |2008-06-19 08:54:50
Nice works with 1.0.13 and really simple to use it twice on one site Only
rename installation files and some names in this files and packes. Greate work!
Anonymous  - custom images?   |216.254.139.xxx |2008-06-25 19:38:54
I'm new to using this so please bare with me! I'm unsure of how to change the
preset images to custom made images!

can someone PLEASE HELP!

I'd be greatly
appreciated (:
DART  - Custom images   |Registered |2008-06-27 05:55:01
To change the images to your own, you need to go to the menu which you are
displaying, and change the relevant image for the menu item.
slam   |216.254.139.xxx |2008-06-27 18:56:15
thank you very much for your help! I was able to fix that
HOWEVER...
the new
images automatically place overlap eachother and I am wondering what code I need
to change to alter the spacing!
slam   |Registered |2008-07-02 14:02:53
actually i was able to find out that the browsers alter the spacing of the
buttons for some reason. It seems to work best with IE 6 but does not show up
well at all with IE 7. is there anyway to adjust the compatibility or fix this
issue?
rexkramer  - Alt Menu Modules - exMenu is d   |Registered |2008-07-03 00:23:46
Extended Menu - ExMenu
http://de.siteof.de/extended-menu.html
http
://extensions.joomla.org/component/option,com_mtre
e/task,viewlink/link_id,163/Itemid,35/
Anyone interested in a super-configurable
Menu module... please consider using ExMenu ! O.K. it has many advanced
parameters, but believe me: It is worth it. Playing with and testing is
absolutely necessary. Not simple on first-sight. It also has an Image-only
setting. BTW Joomla 1.0 and 1.5 native!


J!1.0 alternatives:

Simple Image Menu
Module
http://extensions.joomla.org/component/opti
on,com_mtree/task,viewlink/link_id,1303/Itemid,35/

Thumbnails
Menu
http://extensions.joomla.org/component/option
,com_mtree/task,viewlink/link_id,1789/Itemid,35/


MosCmenuTree
http://extensions.joomla.org/componen
t/option,com_mtree/task,viewlink/link_id,942/Itemi d,35/

CU
bepos  - thanx!   |Registered |2008-07-24 08:34:32
i bought you a beer. have fun!

hope it inspire for more nice and simple
features like this one.
DART  - Cheers mate   |Registered |2008-07-24 16:41:32
Nice to know the effort is appreciated!
augustito  - putolino   |Registered |2008-07-28 02:48:35
It work baby yehaaa cool¡¡¡
han  - the images aren't showing   |68.193.76.xxx |2008-07-30 21:19:41
I install this module in Joomla1.0, I activeted, and the only that I got is the
text for the main menu !!!!
It's the first time I am using this module, can
anybody help me please?
knandini  - menu   |Registered |2008-08-01 09:01:41
dfdeffrgtr
Leksi  - Tutorial?   |69.254.23.xxx |2008-08-02 20:17:24
Anyway someone would do a tutorial? I cant get this thing to work for beans. I
know its something simple that I'm missing, but not sure at all.
charles33   |Registered |2008-08-04 09:04:36
Same Problem as sharemind, dimitric, anton, antonvdh, Eric, Gluip, and
eMCE.

Detailed discription:
My original menu name: LEFT-MENU2
(mod_mainmenu)
Assigned Menu Images to all the Menu Items in
LEFT-MENU2.
Published your module (mod_mainmenuimages), assisned LEFT-MENU2 as
the Menu Name.
Unpublished LEFT-MENU2 and also tried as
published!

Problem:
The Menu Item Image and Text is displayed; the same as
the joomla (mod_mainmenu). The image is not linkable, but the text is. Unless I
dig into the mod_mainmenuimages.php to fix the problem or really to revamp your
hack, your module is not working properly. Can you please fix the bug and
provide a newer version.

Thanks

My clean install:
Joomla! 1.0.13 Stable [
Sunglow ]
DART  - Problems   |Registered |2008-08-04 09:19:56
We'll test and update asap.
Charles33   |68.57.1.xxx |2008-08-04 09:41:25
DART, I figured a workaround!

For sharemind, dimitric, anton, antonvdh, Eric,
Gluip, and eMCE.

Instead of reinventing the wheel, I figured this workaround
because, I need to get this site up ASAP. So for the time being this fix will
work temporarily until DART can fix the bug.

To get this to work do not install
DART's module instead, rename it to mod_mainmenu.php and overwrite the existing
joomla version in joomla install/modules/ directory.

Assign Menu Images to your
existing Menu Items which need images.
Go to Modules>Site Modules>Select your
Menu> And under Class suffix give it any name you want, (i.e. menu_image)

By
giving it a class it won't conflict with your current css settings for your text
version menu items, and you can give it more styling in your css.

Done! O yes
make a back up copy of your joomla mod_mainmenu.php.

If anyone has any problems
with this workaround let me know here, and I'll try to help.

Charl...
DART  - Fix   |Registered |2008-08-05 16:39:17
Charles and all,

a new version has been issued which solves the bug without any
hacking if Joomla core files.
yangseng  - Space between two images...   |Registered |2008-08-10 23:11:33
Is it possible to change the spacing between two elements (images) of the main
menu image? How can i do that?
I tried to enlarge the images but it's a more
dificult process (and takes more time).
Thanks in advance,

Nuno
DART  - Space between images   |Registered |2008-08-11 04:12:24
This should be easily done using CSS. Try adding padding to the top and bottom
of the li tag. If you have difficult post on the forums and I'll try to
experiment and find a solution.
Don  - SH404SEF   |71.117.132.xxx |2008-08-12 16:52:54
I'm having all kinds of issues with this menu module and sh404SEF. Has anyone
been able to get it to work? My templates do not work properly and secondary
menu items do not display.
Don  - sh404SEF   |71.117.132.xxx |2008-08-12 16:53:51
Anyone get this module to work with sh404SEF?
Andrea  - Great!!!   |217.202.173.xxx |2008-08-20 14:33:47
Many compliment!!! Great Job raga!!
DA PAURAAAAAA!

from italyy
jodalry  - Download Link   |Registered |2008-08-25 12:51:47
Can you tell me where the download link for J1.5 is please? All I can see is the
link for J1.0.

Thanks
DART  - Download   |SAdministrator |2008-08-25 15:10:51
Joomla 1.5 download
http://www.dart-creations.com/component/

option,com_docman/task,doc_download/
gid,8/Itemid, 67/
Samson  - cant download for J1.5   |79.188.32.xxx |2008-08-25 19:12:40
Link you provided is not working.
Could you just put version for J1.5 in the
download section? Like others mods are available.
DART  - Download   |SAdministrator |2008-08-25 20:13:54
Its working now ... was unpublished for a moment.
NeveAddict  - Horizontal menu?   |Registered |2008-09-02 22:09:23
Module is working great. However I don't see the option to display my menu as
legacy-horizontal.
Would be great because I designed the website i'm working on
with a horizontal main-menu.
Is there a way to do this?
liberty  - List is only menu style availa   |Registered |2008-09-03 19:24:54
I am having the same problem as NeveAddict (last comment) using Joomla v 1.5.4.
I only have the List option available for the Menu Style.
tao2r  - Roll Over Image   |Registered |2008-09-12 20:51:09
How do I also have Roll Over Images?
Subrata  - where to download   |122.160.87.xxx |2008-09-19 05:38:06
My upload manager is not working , can you tell me where to put the files . And
secondly how do i configure the module from joomla. (module manager)
anthonytl  - Images and text, top-aligned   |Registered |2008-09-19 18:51:43
I would like images and text in my menus, with the image and text aligned at the
top (so I can have a 100x100 image, with a few lines of text to the right of the
image). Can this feature be added?
DART  - Images and text   |SAdministrator |2008-09-20 16:17:11
If you want images and text, you don't need to use this mod, you can use the
standard Joomla main menu.
petaka  - Menu Style   |Registered |2008-09-22 12:52:48
Hello, how can i change menu style of the module? I have list style only.Can i
add another style?
Thanks!
Leon  - Menu Style   |89.131.108.xxx |2008-10-01 20:48:16
I have the same problem than petaka. I've tried to copy some menu styles of the
XML archive of mainmenu but doesn't work... Some ideas?
DART  - Menu styles   |SAdministrator |2008-10-02 05:54:21
Hi Petaka / Leon,

what kind of styles are you looking for? Please suggest and
I will implement for your needs. Get in touch via Contact Us if necessary.
DART  - Menu styles   |SAdministrator |2008-10-02 05:54:59
Hi Petaka / Leon,

what kind of styles are you looking for? Please suggest and
I will implement for your needs. Get in touch via Contact Us if necessary.
spaceman1973  - mainmenu   |125.164.196.xxx |2008-10-05 16:29:45
upload to working
spaceman1973   |125.164.196.xxx |2008-10-05 16:30:58
to working
_barmaley  - on mouse move   |Registered |2008-10-06 12:27:43
Hi! How i can to change image on mouse over?
Ihhha  - Horizontal menu   |212.176.18.xxx |2008-10-06 16:49:48
i've made it with CSS using

.menu li{display:block;float:left}
dorjano  - Excelenta, but missing somethi   |Registered |2008-10-30 10:44:20
Hi there

Really an excellent MOD. the only thing missing here, in my opinion,
is a lack of tooltip. If you could integrate one would be perfect.
Good work
though!
giuseppina  - Changing the menu of other for   |Registered |2008-11-26 10:02:43
Urgent.I installed the module, it works but I noticed that I can only change the
menu module MainMenu, you can change MainMenu addition to the rest of the voices
of other forms? hello and thank you
giuseppina  - Changing the menu of other for   |Registered |2008-11-26 10:05:37
I can also change the other modules so they are all equal?
DART  - Other menus   |SAdministrator |2008-11-26 11:25:18
I'm not sure I understand your problem but yes, you should be able to replace
all menu modules with the main menu images module.
SusanProctor  - on mouse over   |Registered |2008-12-09 08:32:09
This question has been asked before. I really need to change the menu images
(replace an image with another) on mouse over event! Any idea how it is done?
benadams  - on mouse over   |Registered |2008-12-12 16:56:52
i get he same problème how to change the menu images on mouse over event!how
how hoooooow, help me please
DART  - OnMouseOver   |SAdministrator |2008-12-14 09:23:35
Basically, since the module use imgs not CSS to display the images, this is not
strictly possible (at least with my knowledge of CSS which is limited). However,
what I did manage to do is create a CSS style which changes the background of
the image.

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

}

Where item55 is the style of the menu item class (i.e. you'd need to change
this accordingly).

Hope this helps.
nooknook   |77.38.140.xxx |2009-02-13 01:06:59
In fact, the proposed roll-over workaround won't work for IE and FF. Let me
thank you for your efforts, Dart. But I'd like to ask you
this:
while redefining standard output for a menu (in a helper.php, I assume), one of the variables reconstructs, sends to buffer and
subsequently transforms it to output the "image" object. Why would
you do that? For the sake of simplicity, why instead of ul > li > a > img construction not make in just ul > li > a?
That would make CSS roll-overs as simple as it could be.
Could you
please change *.php - code accordingly?
Thank you,
Nook.
DART  - Roll over   |Administrator |2009-02-13 17:58:56
Nook, it would be great if you could get in touch via the Contact Us page, so we
can discuss this in further detail. We'd love to get a solution for this!
megyesi126  - Horizontal Menu Option   |70.58.25.xxx |2008-12-18 03:41:47
I only have menu style "List"
Can we have the other styles, like
"legacy-horizontal" or "legacy-vertical" or "legacy-flat
list"
giosuperman  - come   |Registered |2008-12-18 13:25:31
non riesco a scaricarlo
fosterdairy  - menu image rollover   |Registered |2008-12-30 04:31:10
I've been wanting to convert a website over to joomla for at least a year but
the client at www.fosterdairy.com wants to keep their rollover images. If I
could have a way to use this module and add another image for a rollover - then
it would be awesome. please contact anyone at site if that is available already
or if there is something else that would allow me to do that.
DART  - image rollover   |SAdministrator |2008-12-30 08:17:03
You can use something such as the hover as suggested in the article above.
reb197  - Change image for selected menu item   |82.196.231.xxx |2009-02-16 15:33:06
Hi
This works great, but I need to have a different image for the menu item that
is selected (actually clicked on, not just a hover roll-over). Is this possible
with this module?
Thanks!
DART  - Change image   |Administrator |2009-02-16 17:49:01
It is possible to do this with CSS, however its not very straight forward, and
probably its better to look at another module / component to help you out ...
Tomas  - can it works with joomfish ?   |147.32.228.xxx |2009-02-23 14:19:32
I have more languages on my website. Your modul works fine, but when i change
language the image menu still the same.I need change images with language. I use
joomfish modul. Is it possible to works with joomfish ? Thanx
Tomas  - re:can it works with joomfish ?   |147.32.228.xxx |2009-02-23 14:28:00
its me again. I reply myself. Its great i found it. Your module works with
joomfish . UNBELIVEABLE. Thanx guys
Mad_Griffith   |151.32.138.xxx |2009-10-07 11:00:19
can you please explain how to do that? thank you!
bg  - Fatal error: Cannot redeclare mosgetmenulink() (pr   |222.248.138.xxx |2009-03-19 07:04:18
i have an error when i tried to use the module..please help...tia

here's the
error:
Fatal error: Cannot redeclare mosgetmenulink() (previously declared in
/home/olympich/public_html/modules/mod_j15mainmenu images/legacy.php:20) in
/home/olympich/public_html/modules/mod_mainmenu/le gacy.php on line 162
iainM  - Same fatal error for me!!   |81.130.169.xxx |2009-03-19 15:33:10
same error for me - module only working with list option. As soon as you select
any other option you get this error:

Fatal error: Cannot redeclare
mosgetmenulink() (previously declared in
/***/modules/mod_mainmenu/legacy.php:20) in
/***/modules/mod_j15mainmenuimages/legacy.php on line 162
DART  - Fatal error   |Administrator |2009-03-19 16:20:35
I believe this happens because you are using both our menu and the default
joomla menu, and this might be causing this conflict when legacy mode is
enabled.
iainM  - works in legacy   |81.130.169.xxx |2009-03-20 10:20:38
Hi! the fatal error occurred every time any legacy menu style was selected -
regardless of menu, module position or template. HOWEVER it works when legacy
mode is enabled??
DART  - Legacy mode   |Administrator |2009-03-20 12:52:26
Well this functionality is by design. Some of the styles only work in Legacy
mode.
iainM  - Oops - incorrect   |81.130.169.xxx |2009-03-20 14:46:35
Sorry - incorrect info on previous post. 'Dart' your theory was correct - fatal
error caused by both menus - the Image Menu and the default joomla menu. Is
there any workaround for this as I have default menus throughout the site and
only one (critical) application of the Image Menu?
DART  - Legacy   |Administrator |2009-03-21 16:36:41
Can't you leave Legacy on?
IainM   |81.148.192.xxx |2009-03-23 10:10:59
Hi - sorry to be a pain - i can't use both menus together even with legacy
enabled. It works in "list mode" but i need it in horizontal. every time
i enable the picture menu and the standard joomla menu the error is generated.
DART   |Administrator |2009-03-23 19:41:18
Hmmm ... I did replicate the error, and uploaded a new version. Please download
and test
djspessore  - hover   |93.33.133.xxx |2009-03-31 13:59:50
i dont see hover effect, i'm using in template.css:
li.item55:hover {

img:url(/images/stories/hoverimage.jpg);
}

please help me
JMB Designs  - PERFECT!     |98.122.69.xxx |2009-06-03 21:55:33
PERFECT. Worked "out of the box" on J1.5.1. Great Job. Hope you
enjoyed the beer
borja  - To show several images   |88.23.51.xxx |2009-06-14 18:18:22
Hola

I would like to show two menus with images in a web. How can i dow that?
that is i would have a top menu and a main menu? i try to change the name of the
module to top and tto hae two module but didn´t work properly.
jamesreed  - To get hover mouseover images working     |92.0.133.xxx |2009-07-27 13:42:12
Hi DART, to get mouseover hover images working, just add these lines. Then just
add an image to images/stories called _hover.jpg and my code will swap between
them.
eg. if your menu image is called 'menu1.jpg' add another image called
'menu1_hover.jpg'.

Edit helper.php
Line 295

if ($iParams->get('menu_image')
&& $iParams->get('menu_image') != -1) {
// make mouseout and mouseover images
by James
$hoverimage=preg_replace("/\.(png
|jpg|gif|bmp)$/",'_hover\0',$iParams->get(
'menu_image'));
$mouseout="onmouseout=\
"this.src='/images/stories/".$iParams->get
('menu_image')."';\"";
$mouseov
er="onmouseover=\"this.src='/images/st
ories/".$hoverimage."';\"";
$image =
'get('menu_image').'" alt="" />';

Sorry for formatting just
copy/paste it.

thanks,
James
Boonk  - Can't get it to work :(   |92.198.69.xxx |2009-07-30 11:56:56
sry for my bad english

I need you help, I can get it to work

That is
my
helper.php (line 288-299)

$iParams = new JParameter($tmp->params);

if
($iParams->get('menu_image') && $iParams->get('menu_image') != -1) {

// make
mouseout and mouseover images by
James
$hoverimage=preg_replace("/\.(png
|jp
g|gif|bmp)$/",'_hover\0',$iParams->get
('me
nu_image'));
$mouseout="onmouseout=\&
#34;t
his.src='/images/stories/".$iParams->get
('menu
_image')."';\"";
$mouseover
="o
nmouseover=\"this.src='/images/sto
ries/
4;.$hoverimage."';\"";
//$i mage =
get('menu_image').'"
alt="" />';

$image =
'get('menu_image').'"
alt="" />';
} else {
$image = null;
}



can
u
see what is wrong ? or can u mail me your helper.php ?

Thanks,
Daniel
Boonk     |92.198.69.xxx |2009-07-31 16:32:33
ok its work now!

James Code
Code:

$image = get('menu_image').'" alt="" />';


is probably incomplete ..

the correct code is 

Code:

$image =
'img src="'.JURI::base(true).'/images/stories/'.$iP arams->get('me
nu_image').'" '.$mouseover.' '.$mouseout.'/>';


(fuck editor^^, u must add a "less-than sign" bevor img and write
iParams together ... thats maybe why James Code is
incomplete xD)


Thanx, Daniel

if sb need the working helper.php with
mouseover feel free to send me a mail
samipr   |190.36.208.xxx |2009-09-01 23:46:29
hey boonk i send you a lots of email but no have response, can you please upload
the helper.php file on rapidshare, megaupload, etc... o you cand send me the
file by email?

Thanks!
jamesreed  - To get hover mouseover images working     |92.0.229.xxx |2009-09-03 16:56:34
Sorry, seems the formatting on this editor messed up my code:

I've put my
working helper.php file here:

http://www.startnet.co.uk/downloads/mod_j15main...

Right-click Save-As to download it.
blacklucho  - it does not work on 1.5.14 !!!   |148.223.119.xxx |2009-09-01 19:29:29
I can´t make it work on 1.5.14, can some one help me with some pics?? 'cause
the ones showed here are for joomla 1.0 right?.I really need this can you help
me?
DART   |Administrator |2009-09-02 19:25:47
Yes the pictures are for Joomla 1.0, but there is a version, and it works fine
with Joomla 1.5, the steps are pretty much the same.

View updated instructions
here:
http://www.dart-creations.com/joomla/joomla-
modules/joomla-1.5-main-menu-images-module.html
ilmari2k  - How to get active and rollover -effects     |62.78.165.xxx |2009-09-28 07:15:00
Hi!
Thanks for nice module. It lacks the ability to have different images
for Active menuitem and Rollover as well. I made a simple mootools
-based hack which fixed it. It's quite simple. Create a .js file
containing the following lines

Code:
window.addEvent('domready', function() {
$$('#current img,
.active img').each(function(img) {
var src
= img.getProperty('src');
var extension
= src.substring(src.lastIndexOf('.'),src.length)
 
 img.setProperty('src',src.replace(extension,'-acti ve' + extension));

});
});

where "-active" would be suffix for your active state image. You
must place both your normal and active image to same folder.

You
can add hover image with the same way (here is a tutorial / code
snippet: http://davidwalsh.name/mootools-image-mouseovers)
 Ah. And of
course you must include the .js file i...
DART   |Administrator |2009-09-28 08:16:44
Can you get in touch with me via the Contact Us page, I'd be glad to put the
code in the module to enable all to use it!
dkdc77  - issue with end tag   |98.204.81.xxx |2009-10-01 23:03:37
for some reason when the code is applied to my menu, it loses the closing tags
surrounding each item. any ideas on how to fix this?
DART   |Administrator |2009-10-02 17:46:13
Can you explain further what's going on?
dmukesh   |61.11.67.xxx |2009-10-13 08:46:56
Hello Boonk,

i have followed your modified code, but didn't work. images are
coming but i didn't get the hover effect. here is my helper.php code

$iParams =
new JParameter($tmp->params);
if ($iParams->get('menu_image') &&
$iParams->get('menu_image') != -1)
{
$hoverimage=preg_replace("/\.(png|jpg|gi
f|bmp)$/",'_hover\0',$iParams->get('menu_i
mage'));
$mouseout="onmouseout=\"this.
src='/images/stories/".$iParams->get('menu_ima
ge')."';\"";
$mouseover="onmou
seover=\"this.src='/images/stories/".$
hoverimage."';\"";
$image = 'get('menu_image').'"
'.$mouseover.' '.$mouseout.'/>';
//$image = 'get('menu_image').'"
alt="" />';
} else {
$image = null;
}
MauiSpud  - Great product. Worked right out of the box!     |66.91.182.xxx |2009-11-09 04:37:50
Aloha,

Great job Dart!

Are you considering allowing this module to work with
suckerfish sub menus? What I am looking for is to have text submenus drop down
when hovering over the main menu image. If I install Superfish, it shoves the
images off to the side and only uses text. If you could allow submenus then I
would not need superfish.

Mahalo,

Don
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."

Last Updated ( Wednesday, 23 September 2009 )