|
List Info
Thread: hCard email & type properties
|
|
| hCard email & type properties |

|
2007-03-11 12:48:18 |
Hello,
I am working on an AddressBook type module for Drupal using
hCard and
have run up against a minor quandrum in correctly formatting
email (&
to a lesser extent url) properties. I've read through hCard
information on this mailing list and found a type of answer,
but I'd
like to pick your collective brains, if I may.
The inital problem I encountered with both propeties stemmed
from the
fact that I hook into another Drupal module for link
managment and
click-through tracking, the latter using a redirect after
logging the
click-through. Scanning through the list I found the
following
possible solutions:
http://microformats.org/discuss/
mail/microformats-discuss/2006-April/003605.html
http://microformats.org/discuss
/mail/microformats-discuss/2006-August/005242.html
http://microformats.org/disc
uss/mail/microformats-discuss/2006-September/005643.html
http://microformats.org/wiki/hcard#Human_vs._Machin
e_readable
My confusion comes when trying to impliment email types. I
used the
following markup:
<a href="FooBarRedirect">
<abbr class="email" title="random foo.com">
<span class="type" title="internet
pref">Email FooBar</span>
</abbr>
</a>
Similarly:
<a href="FooBarRedirect">
<abbr class="url"
title="www.foo.com">FooBar
Webpage</abbr>
</a>
>From what I've read through, I believed this would be
correct, while
keeping markup to a minimum. However, checking my hcard
markup using
the Tails & Operator Firefox extensions proved
troublesome in the fact
that when exporting the cards 'Email FooBar' showed up as
the email
address instead of random foo.com. Tails would show
the correct email
address in the sidebar, but not in the exportation.
I realise that potential issues with these extentions are
outside the
scope of this list; I would appreiciate, though, comment or
suggestions on the above markup.
Best regards,
K.Franch
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
| Re: hCard email & type properties |

|
2007-03-11 21:47:17 |
On 3/11/07, Kim Franch <romakimmy gmail.com> wrote:
> <a href="FooBarRedirect">
> <abbr class="email"
title="random foo.com">
> <span class="type"
title="internet pref">Email
FooBar</span>
> </abbr>
> </a>
This markup is incorrect. title can only be used with an
abbr - the
title on a span wont work.
Why aren't you just using a mailto?
>
> <a href="FooBarRedirect">
> <abbr class="url"
title="www.foo.com">FooBar
Webpage</abbr>
> </a>
This works for me in the the current operator. I don't
understand why
you are using this pattern though? Why not just have a
anchor that
points to the web page?
Mike Kaply
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
| Re: hCard email & type properties |
  United States |
2007-03-11 22:07:24 |
On Mar 11, 2007, at 9:47 PM, Mike Kaply wrote:
> This markup is incorrect. title can only be used with
an abbr - the
> title on a span wont work.
To clarify, the title attribute only acts as a replacement
of content
on <abbr>, but the title attribute on <span> is
valid HTML markup for
generally describing content. It's just not particularly
useful for
microformats.
Peace,
Scott
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
| Re: hCard email & type properties |
  New Zealand |
2007-03-11 22:21:43 |
From: "Mike Kaply" <microformats kaply.com>
> On 3/11/07, Kim Franch <romakimmy gmail.com> wrote:
>> <a href="FooBarRedirect">
>> <abbr class="email"
title="random foo.com">
>> <span class="type"
title="internet pref">Email
FooBar</span>
>> </abbr>
>> </a>
>
> This markup is incorrect. title can only be used with
an abbr - the
> title on a span wont work.
Also, if it's email or uri, it will automatically be
internet, and if it's
the only one of its type there, then you have no preferance
(pref) as it's
the only possible choice.
> Why aren't you just using a mailto?
I suspect because he wants people to be directed to a page
where they can
get in touch, instead.
>> <a href="FooBarRedirect">
>> <abbr class="url"
title="www.foo.com">FooBar
Webpage</abbr>
>> </a>
>
> This works for me in the the current operator. I don't
understand why
> you are using this pattern though? Why not just have a
anchor that
> points to the web page?
Perhaps he wants to be a sneaky bastard (tm) and take people
to a different
version of the website (perhaps a wrapper) while allowing
the real website
name to be used by people and tools too.
--
Paul Wilkins
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
| Re: hCard email & type properties |

|
2007-03-12 06:35:40 |
Thank you all for your comments so far.
> The type of internet and preferred aren't necessary, as
internet is the
> default email type, and as there is only one email
address listed for
> them, there is strictly no preferred one to refer to.
>
Noted and thank you. Though I started this module for my own
ends, I
think it might prove useful for the Drupal community and am
thus
attempting to make it as flexible as possible, including
multiple
email addresses, url & IM's per entry/hCard. It's still
in a very
rough stage and you just pointed out a point where I need to
smooth
the edges out, so to speak.
> Why not then have the normal URL in the markup then use
an onmousedown event
> to update the URL to be what it should with the
clickthrough tracking?
Because I'd like to stay away from JS for a variety of
reasons.
A) I'm not that proficient with JS and it drives me rather
batty
B) I try to KISS and stay away from JS for reasons of
accessibility,
flexibility, and browsers that have JS disabled/have
proprietary DOMs
C) Keeping with the sneaky bastard-ess (tm) moniker, for my
own
personal project I'd need to keep track of clicks as
mentioned
previously (Think something along the lines of an
advertiser's
directory or a type of yellow pages for a site). The aim is
to
eventually try to filter known robot 'clickthroughs' as
opposed to
actual human clickthroughs. As such, I'm much more
comfortable
tinkering around with PHP than JS to achieve this end.
D) See: A
> > I suspect because he wants people to be directed
to a page where they can
> > get in touch, instead.
For my own project, yes I have been considering this as well
so users
can keep track of who/when they have contacted.
> So the goal is to have the href attributes point to
click-tracking URLs,
> but have microformat parsers read the original URLs.
Even though this is
> possible (as others have explained), it seems to
violate the microformat
> principle of designing for humans first, machines
second. In this case,
> machines are getting more useful links than humans.
Scott, may I ask you to expound a bit more on this? I
suspect my
morning cappuccino hasn't kicked in yet, but your last
sentence is
flying over my head right now. I'm working on this module
precisely
because I want humans to be able to download/import
information from
an hCard into their address books/PIMs/PDAs etc. If this
info is
included in the hCard, why would a redirect link be more
useful to
machines than humans when the large majority of end users
wouldn't
know a redirect if it bit them on the bum?
best regards,
Kim
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
| Re: hCard email & type properties |
  United States |
2007-03-12 10:24:40 |
On Mar 12, 2007, at 6:35 AM, Kim Franch wrote:
>> So the goal is to have the href attributes point to
click-
>> tracking URLs,
>> but have microformat parsers read the original
URLs. Even though
>> this is
>> possible (as others have explained), it seems to
violate the
>> microformat
>> principle of designing for humans first, machines
second. In
>> this case,
>> machines are getting more useful links than
humans.
>
> Scott, may I ask you to expound a bit more on this? I
suspect my
> morning cappuccino hasn't kicked in yet, but your last
sentence is
> flying over my head right now. I'm working on this
module precisely
> because I want humans to be able to download/import
information from
> an hCard into their address books/PIMs/PDAs etc.
If I right-click on a URL and choose "Add Link to
Bookmarks" in my
browser, I should ideally get the same link that I would get
if I
clicked on my microformat parser and imported the hCard. It
sounds
like I'm getting a different link, that you're presenting
different
content to different user agents, which is less than ideal.
> If this info is
> included in the hCard, why would a redirect link be
more useful to
> machines
hCards are intended for machines to parse. Humans can read
the
content without hCards, but machines can't, so what humans
see in
their browser is what I mean by "human-readable
content," though
obviously humans are eventually using the hCard content as
well. In
your example, the human-readable (browser-rendered) content
is less
useful than the machine-readable hCard. It's a subtle
difference, as
both links should eventually end up in the same place, but
we should
avoid these differences where possible.
Peace,
Scott
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
| Re: hCard email & type properties |
  New Zealand |
2007-03-13 15:24:19 |
From: "Kim Franch" <romakimmy gmail.com>
> Point taken. Thank you for the further explaination
Scott. Back to the
> drawing board for me.
What we've taken to doing is to provide the proper url in
the href, so that
tools can make good use of it, and use the onmousedown
event, so that should
someone click on it, the url is rewritten to incorporate
clickthrough data.
<script>
function clickthru(this, click) {
// this.href = whatever rewrite is required
}
</script>
<a href="www.example.org"
onmousedown="clickthru(this, '12345')">
--
Paul Wilkins
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
| Re: hCard email & type properties |
  United Kingdom |
2007-03-11 14:37:40 |
In message
<c222a03b0703111048k5914737dxca74566d96d18bc1 mail.gmail.com>, Kim
Franch <romakimmy gmail.com> writes
>random foo .com
foo .com is registered; please use "example.com",
which is reserved for
such purposes, for your examples.
See:
<http://e
n.wikipedia.org/wiki/Example.com>
and RFC 2606, Section 3:
<http://
www.rfc-editor.org/rfc/rfc2606.txt>
Thank you.
--
Andy Mabbett
<http://www
.pigsonthewing.org.uk/uFsig/>
Welcome to the world's longest week!
_______________________________________________
microformats-discuss mailing list
microformats-discuss microformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
|
|
[1-8]
|
|