I was reading through:
http://drupal.org/node/207244 use textimage for menu entries
http://drupal.org/node/190354 Rollover states

I created 2 autoinsert presets:

1. menu:
Affect these tags: a
With these attributes:
In these areas: Left sidebar

2. menu_active:
Affect these tags: a
With these attributes: .active
In these areas: Left sidebar

Unfortunately this setup does not work for me.
Any help would be appreciated.

CommentFileSizeAuthor
#3 sshot-1.png101.04 KBlisa.lite
#3 sshot-2.png110.42 KBlisa.lite
#3 sshot-3.png74.87 KBlisa.lite
#3 sshot-4.png109.21 KBlisa.lite
#3 sshot-5.png101.77 KBlisa.lite

Comments

danielb’s picture

Are you using the 'replace with image' mode? The reason I ask is with the latest version of textimage the 'background' options don't work.
And the reason I added the background option was mainly to help with doing rollover tricks in CSS or JS. I've been waiting for advice on what to do about this, but I may just have to go ahead and do it because I am getting no response in the textimage issue queue.

danielb’s picture

I updated the background stuff in the new release so that should be an issue any more.
I'll leave this open in case it's something else. Can you go into more detail about what you see vs. what you expect if there are still probs?

lisa.lite’s picture

StatusFileSize
new101.77 KB
new109.21 KB
new74.87 KB
new110.42 KB
new101.04 KB

drupal-6.10
textimage-6.x-2.1
textimage_autoinsert-6.x-1.2

Fatal error: Call to undefined function functions_exists() in textimage_autoinsert.module on line 570
I replaced "functions_exists" by "function_exists" and did some tests:

textimage preset 1:
Text Color: #000000
textimage autoinsert preset 1:
Affect these tags: a
With these attributes:
In these areas: Left sidebar

textimage preset 2:
Text Color: #ff0000
textimage autoinsert preset 2:
Affect these tags: a
With these attributes: .active
In these areas: Left sidebar

expectation:
1. the left sidebar menu link <a>menuitem</a> is replaced by a black custom font
2. the left sidebar active menu <a class="active"/>menuitem</a> is replaced by a red custom font

Using this method: Replace text with an img tag for the Textimage
1. the menu link text is replaced by a black textimage and working as intended
2. the active menu text is black and not red (screenshot 1)

Using this method: Add style attribute with Textimage set as background-image
1. the menu link background is a black textimage
2. the active menu background is a red textimage and working as intended (screenshot 2)
3. the w3c validator reports the error: duplicate specification of attribute "style" (screenshot 3)
4. the css style #sidebar-left a {color:transparent; background-repeat:no-repeat;} works in FF 3, Safari 3 but not in IE 5.5, 6, 7 (screenshot 4, 5)
5. I dont know any W3C compatible way to hide the link text in <a class="active" style="background-image:url(path_to_textimage/textimage.png);">Administer</a>

danielb’s picture

OK 3 things here might help clear up whats happening

1) Yes theres a typo I need to fix

2) The order of autoinserts is significant. If you replace all your "a" with a textimage, then there is no longer any "a.active" to replace with the second autoinsert. The a.active needs to be done first. The duplicate 'style' attribute would come from two different autoinserts targetting the same tag twice. Eventually I would like to have 'weights' to these autoinserts so this becomes less annoying to fix.

3) To hide text that has a background the css has to be something like this

a.something {
display: block;
padding: 0 5px; // optional
height: 100px; // height of image
overflow: hidden;
text-indent: -10000px;
line-height: 0px; // for IE
}

So this method can only be used in certain situations

Here are a couple links where the main menu uses textimage autoinsert with rollovers
http://allianceone.dev.aspedia.net/
http://www.publicityqueen.com.au/

danielb’s picture

I've fixed the function_exists thing now.

danielb’s picture

I have noticed that for the 'background' method, there is no check to see if a textimage has already been added there. I will rectify this soon.
I hope that with such a fix, and the added ability to use weights, you should experience less problems. I will think it over a bit more.

danielb’s picture

Status: Active » Fixed

OK I've made some massive changes to accomodate this, you'll have to uninstall the current textimage first though.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.