Closed (duplicate)
Project:
Location
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2006 at 17:49 UTC
Updated:
8 Mar 2008 at 01:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
Tobias Maier commentedhere comes the first patch for this.
Changes:
theme_location()andtheme_location_de()One issue/question: What should we do (which hcard-class) with $location['name']? We can't say if it is the organization or the name of a person or anything else...
?>at the end of location.inc and location.de.incComment #2
Tobias Maier commentedI forgot to mention that I added the $hide argument for functions like theme_location_de()...
btw. it seems like that this function can't be overwritten (like every other theme-function)
Comment #3
Tobias Maier commentedsince the class "fn" is required I added this one to $location['name']
Comment #4
Tobias Maier commentedHere is an example you can find on one of my sites:
standorte/waschsalon-albertrosshaupterstrasse-munchen
btw. I like the Tails extension for Firefox 2.0 to view and export microformats from websites.
Comment #5
m3avrck commentedThis patch looks much bigger than it should, I'm guessing it's a line ending problem, either unix or windows based.
Not sure if location module had it wrong or your patch but be good to double check that :-)
Comment #6
Tobias Maier commentedit is so big, because I removed blanks in the end of lines...
They were so much so that this patch got far too big...
I putted this in an own patch: http://drupal.org/node/100830
it is really not an important patch, but the code looks cleaner IMHO...
Comment #7
Tobias Maier commentedI hope this patch works...
is clean now..
Comment #8
sillygwailoBuilding on the patches above, I added http://microformats.org/wiki/geo support. My patch definitely needs review because a) I applied the above patches manually and ended up moving around some curly braces (some possibly in the wrong spot).
Comment #9
ankur commentedOh man. I gotta learn about microformats and geo-microformats before I can even test these patches? Any volunteers? I'm curious myself, but can't expense the time at the moment.
Taking a quick look at the microformat classes, I'm anxious to get both 'geo' and 'adr' class support.
Richard, if you're not sure your braces are in the right places, would you mind testing it and seeing if it works and outputs the appropriate HTML?
Tobias, would you be willing to a look if you get a chance. I would like to commit a verifiedly working version of this patch soon.
-Ankur
Comment #10
Tobias Maier commentedI added Richards' patch to my one and made it translatable
You can see it live at
http://www.muenchner-waschsalon.de/standorte/waschsalon-aidenbachstrasse...
But to be honest: I dont like the way lat/lon gets presented to the end user.
my second thought is that I dont even know if we should bother the end-user with such specific data like this...
Comment #11
Tobias Maier commentedoh sorry
I tried a new editor which added a few new tabulators instead of two blanks.
here comes the corrected patch
Comment #12
Tobias Maier commentedHello Ankur,
whats your opinion about this?
Personally I prefer the version without lat/lon (#7).
Comment #13
ankur commentedYeah, it would probably look aesthetically displeasing to have the lat/lon displayed for every address that has a pair figured out. Perhaps we can make it something configurable? or leave it up to the themer if the themer chooses to replace the theming function with one of their own.
Will update the patch so that it is configurable.
In the meantime, do microformats support fields that can be a part of a microformatting, but somehow hidden and parseable by something that collects microformat data?
Comment #14
m3avrck commentedSure, you could hide the microformat text using CSS.
Would be a technique similar to one of these: http://www.mezzoblue.com/tests/revised-image-replacement/
That would probably be the best be to comply fully with the microformat, no?
Comment #15
m3avrck commentedFor reference, this is exactly what Flickr does as evidenced here:
Comment #16
Tobias Maier commentedthe right way to do the same what flickr does is
and if you want to never show it then this should be right
see point 5 of http://microformats.org/wiki/hcard#Semantic_XHTML_Design_Principles
Comment #17
m3avrck commentedTobias, right on.
And we should *not* hardcode display:none, that should go into the CSS file.
Just wanted to illustrate the point that we can use the full geo format and CSS to hide what we don't need, just like Flickr. That way people can use CSS to turn on and off what they don't want.
Seems like that solves this issue -- time for an updated patch?
Comment #18
Tobias Maier commentedallright, here it is
it uses
<abbr />to hide latitude and longitude in generalComment #19
geodaniel commented+1
Haven't tested the patch yet, but I like the idea of adding microformats for the addresses, and it fixes #109954 as well, which didn't close the tags properly in the .de include.
Comment #20
ankur commentedApplied to DRUPAL-4-7 and DRUPAL-5
Comment #21
panchosubscribing
Comment #22
ankur commentedPancho, you're subscribing to an issue that's been marked fixed? Did the application of this patch break something?
Comment #23
(not verified) commentedComment #24
geodaniel commentedI have just spotted a little bug in this: the latitude variable is being used twice, one in the right place and one in place of the longitude variable. Also, I can't see this in the current 5.x version of location.inc. Was it intentionally taken out in 1.45.2.5?
For testing these out by the way, the Operator toolbar for Firefox is very handy.
Comment #25
jiangxijay commentedHas this been fixed?
Comment #26
bdragon commentedIt moved to the .theme file.
Fixed in seperate issue, thanks.
Comment #27
bdragon commentedCommitted a followup change to follow the recommendation from #16