Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This patch adds a title attribute to each term which will show the description of the term as a tool tip when hovering with the mouse over the term. (This is the default behavior with taxonomy terms when shown in nodes.)
The feature was requested in http://drupal.org/node/390870 and the solution described in http://www.drupalcenter.de/node/16915 (including screenshots).
Frank
Comment | File | Size | Author |
---|---|---|---|
#9 | 393494_Tagadelic_title_tags.png | 2.35 KB | Frank Ralf |
#8 | 393494.jpg | 24.44 KB | tobiasb |
#5 | tagadelic_393494_title_attributes4.patch | 1.57 KB | tobiasb |
#3 | tagadelic_393494_title_attributes3.patch | 1.62 KB | tobiasb |
#2 | tagadelic_393494_title_attributes2.patch | 1.76 KB | Frank Ralf |
Comments
Comment #1
Frank Ralf CreditAttribution: Frank Ralf commentedComment #2
Frank Ralf CreditAttribution: Frank Ralf commentedSlightly improved patch as recommend in http://www.drupalcenter.de/node/16915#comment-59445
Frank
Comment #3
tobiasbComment #4
Frank Ralf CreditAttribution: Frank Ralf commentedThanks for checking the code and improving it!
I had another look at the context of that title attribute code in taxonomy.module and tagadelic.module and found that neither strip_tags() nor check_plain() is actually needed in tagadelic.module because here the whole is wrapped in the link function l() which cares itself for removing all HTML and PHP tags from a tooltip:
So the change in tagadelic.module can be simplified to
'title' => $term->description,
.Frank
Comment #5
tobiasbComment #6
Frank Ralf CreditAttribution: Frank Ralf commentedThanks!
Comment #7
Bèr Kessels CreditAttribution: Bèr Kessels commentedI like it.
Can someone please give it a quick test on a site with real information?
After one or more positive tests, I will commit it to HEAD and Drupal 6.x.
Comment #8
tobiasbLooks ok. see screenshot.
Comment #9
Frank Ralf CreditAttribution: Frank Ralf commentedDoes work as promised (see screenshot). I really would like to see it committed to HEAD.
tia
Frank
Comment #10
Frank Ralf CreditAttribution: Frank Ralf commentedchanged status
Comment #11
Frank Ralf CreditAttribution: Frank Ralf commentedchanged status
Comment #12
Bèr Kessels CreditAttribution: Bèr Kessels commentedCommitted to 6 dev.
Comment #13
Frank Ralf CreditAttribution: Frank Ralf commentedThanks!