Parsing any hCard found on the identity page and storing that too
would be extra cool.
Rel=me might be a bit far-fetched for a login plugin, but maybe?
I realise those last two are really nothing to do with OpenID and
probably should be abstracted into another plugin that... wait! Yes,
thinking out loud here. Plugin that hooks into the create new user
action and parses any hCard/rel=me on that page and stores it with the
new user...
--
- Stephen Paul Weber, Amateur Writer
<http://www.awriterz.org>
MSN/GTalk/Jabber: singp...@gmail.com
ICQ/AIM: 103332966
BLOG: http://singpolyma.net/
This is exactly the point of the wp-profile plugin (mythical so far).
Feel free to start hacking. :-)
If you (or anyone) have code you actually want to donate/submit to go
in the repo, let Chris and I know and we'll get it hooked up.
--Steve
--
Steve Ivy
http://redmonk.net // http://diso-project.org
This email is: [ ] bloggable [x] ask first [ ] private
http://www.diso-project.org/wiki/index.php?title=profiles-brainstorming&action=edit
--Steve.
So I hacked together a basic implementation of what I meant:
<http://singpolyma.net/hcard-import.tar.gz>
It's basically invisible. When a new user is added (by any means) it
checks if there is a URL. (always will be with OpenID ;) ) If there
is, it fetches that page and looks for an hCard. If it finds more
than one it uses tho following rules to pick one (in order of
decreasing priority):
1) If there is an hCard in an <address> element, pick that one
2) If there is an hCard where uid == the page we're fetching, pick that one
3) If there is an hCard where url == the page we're fetching, pick that one
4) Pick the first hCard on the page
Once an hCard has been selected, it copies first name, last name,
email, fn to display name and nickname (assuming these values have not
already been set by the user -- it will no overwrite) all other
properties are imported into meta values that match their hCard class
name.
As an added bonus for me, I added a quick thing to the (as yet
unreleased) avatars plugin I use so that it now looks for a 'photo'
meta key -- meaning those signing in with OpenID who have hCards on
their URIs will get their comment avatar properly set ;)
--
You are totally rocking it!
Can i suggest you do some thinking about how your work can be morphed
into a new wp-profile plugin?
Things we've been discussing:
[x] hcard import
[ ] hcard *subscribing* - update automatically OR via user initiated
[ ] user hcard pages (documented on the wordpress site)
[ ] extended hCard profile fields for users
[ ] multiple url (rel-me) fields in profile
What do you think?
--Steve
Done, although it may need some evolution to 'fit' better
[ ] hcard *subscribing* - update automatically OR via user initiated
Automatically on what event/how often? Overwrite existing values when
we do or no?
[ ] user hcard pages (documented on the wordpress site)
Like, user profile pages that have hCards?
[ ] extended hCard profile fields for users
Yes, I was looking at this today, shouldn't be too hard :)
[ ] multiple url (rel-me) fields in profile
Like, a textarea instead of line edit for URL and then split by
newlines type deal?
On Dec 20, 2007 3:10 PM, Stephen Paul Weber <singp...@gmail.com> wrote:
>
> [x] hcard import
>
> Done, although it may need some evolution to 'fit' better
>
> [ ] hcard *subscribing* - update automatically OR via user initiated
>
> Automatically on what event/how often? Overwrite existing values when
> we do or no?
TBD. :-)
> [ ] user hcard pages (documented on the wordpress site)
>
> Like, user profile pages that have hCards?
Yes.
> [ ] extended hCard profile fields for users
>
> Yes, I was looking at this today, shouldn't be too hard :)
>
> [ ] multiple url (rel-me) fields in profile
>
> Like, a textarea instead of line edit for URL and then split by
> newlines type deal?
I was thinking n number of text fields, but I like your version better.
All the extended profile options now show up on the profile editing
page and all data is stored properly (it's compatible with itself --
imported data makes it to the form, etc).
The first URL for the extended URLs list gets put in the main URL field.
Next:
* Maybe put a button on the profile page that will force import of
hCard from their primary URL/all their URLs? Two buttons -- one to
override data with the hCard and one to only fill in blank fields
* Privacy settings for each field -- to be complemented by
diso-contactlist / other privacy whatever happens?
* Profile pages? With template hacks the author could be done (ie
<http://singpolyma.net/author/singpolyma>), but it seems to give 404
on users that don't have post privileges... I'm debating what for
this should take. Any/all of the following:
display_hcard_for(USERID); //put in author.php as
display_hcard_for(intval($author))
<!--hcard(USERID)-->
Actually generate a /blah page for each user.
user_name();
user_email();
user_photo();
de hCard markup yourself -- best for if you want your own formatting,
but if you want that
$u = get_userdata();
$u->photo
works just as well.
--
Chris
Sent from my iPhone
It's up to the parser to make sense of the links, and in this case the
plugin should only look at the urls that begin with http.
James, you should replace the markup you took out since it was correct
before. ;)
Chris
Sent from my iPhone
So only fill in automatically if they /didn't/ fill in the form themselves :)
--
- Stephen Paul Weber, Amateur Writer
<http://www.awriterz.org>
MSN/GTalk/Jabber: singp...@gmail.com
Chris
Sent from my iPhone