Closed (fixed)
Project:
FriendList
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2009 at 21:31 UTC
Updated:
18 Jun 2009 at 07:33 UTC
Hi,
I try to replace the "friendlist" action links like "Add to friends" or "Remove from friends" with appropriate icons and have the actual link text in the hoover help text. I use popups, so at the moment the hoover text is "[Popup]".
I tried to use the tipps of the readme in section 6 (see below), but I wasn't able to get it done.
ul.friendlist-user-links-multiple li a.popups-form-reload friendlist_ui_TW_BOTH_delete popups-processed {
display: block;
height: 25px;
text-indent: -9999px;
background: url(images/icons/buddy-remove.png) no-repeat left bottom;
}
Can you give me any further help.
Thank you and regards,
Ben
Comments
Comment #1
mariusooms commentedHi Ben...classes can take several elements per class. So the correct code for your instance would:
The two classes, 'popups-form-reload' and 'popups-processed', are inserted by the popups module so that the script can act on the link. 'friendlist_ui_TW_BOTH_delete' is the key class for friendlist depicting the state of the current link.
Also popups alters the title link to [Popup]. I'm not sure why they have it like that. For my site I just commentc it out in their module. You could open a feature request there and ask what the purpose for overriding the title is and if the behavior can be changed.
Regards,
Marius
Comment #2
mariusooms commentedAlso I would say the code for that section would be better like so, I have to adjust the manual:
Make sure you set correct height and width properties for the icon that needs to be displayed:
then ( the overflow attribute makes sure that focus lines don't stretched across the viewport from right to left):
if you'd like to have the icon change on hover (this assumes you know how to make the icon behave like a sprite, see link below):
Here is a good article that explains on how to use sprites, this can come in handy when doing icon replacements. http://www.alistapart.com/articles/sprites/
Regards,
Marius
Comment #3
mariusooms commentedI'm assuming you got this figured out?
Comment #4
bensemmel commentedHi Marius,
sorry for not answering for a long time.
Unfortunately I didn't get it done by taking the approach you suggested in 2. It still just shows the normal friendlist links. Don't know why, but have to investigate a little bit further.
Unfortunately I don't have the time at the moment, but as soon as I can get back to it and can't get it done, I'll reopen this issue.
Thanks again
Ben
Comment #6
bensemmel commentedComing back to this...
Unfortunately I haven't had success with Marius' solution. So I changed it sligtly that it worked for me. So I added the following code to my style.css:
With this the friendlist links are shown as icons, the text is hidden.
As described above I use the popups module and on hovering the icon the link title is only shown as [popup]. By commenting out this in the popups.js, the [popup] addition is gone, but it still doesn't show a descriptive title of the action of the icon.
So I recognized, that the link which is build in the friendlist_ui.module doesn't get a title so I changed line 333 of the friendlist_ui.module
from
to
Like this now on hovering the link text is also shown as the link title and the user knows what action is done by using the icon.
Can you review this and maybe add it to the module
Regards Ben
Comment #7
mercmobily commentedHi,
Quick question: will adding the title affect the way anything looks in FriendList, when people don't use your CSS?
If "not", I don't see why we wouldn't commit it!
Merc.
Comment #8
bensemmel commentedHi Merc,
I think adding the title hasn't a direct relation with the above css. It adds only the link text on hovering the link.
At the moment you don't have a hovering text or if popups is installed you see "[popups]".
Adding the title attribute you are going to see eon hovering the "link text" or "link text [popups]".
Thank you
Ben
Comment #9
mercmobily commentedHi,
Bensemmel: OK I made the change. However, I can't test it properly right now.
Can you please get the latest CVS and check that everything is in order, with or without your CSS theming?
Thanks a lot!
Merc.
Comment #10
bensemmel commentedthanks for comitting, it works as expected...
Comment #11
mercmobily commented