Added support for XFN 1.1

git-svn-id: http://svn.automattic.com/wordpress/trunk@1538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
emc3 2004-08-17 13:53:06 +00:00
parent b3c8f86b0b
commit c00c69e9d5
3 changed files with 106 additions and 73 deletions

View File

@ -114,82 +114,97 @@ th { text-align: right; }
<td><table cellpadding="3" cellspacing="5">
<tr>
<th scope="row"> <?php _e('friendship') ?> </th>
<td><label for="label">
<input class="valinp" type="radio" name="friendship" value="acquaintance" id="label" />
<?php _e('acquaintance') ?></label>
<label for="label2">
<input class="valinp" type="radio" name="friendship" value="friend" id="label2" />
<?php _e('friend') ?></label>
<label for="label3">
<input class="valinp" type="radio" name="friendship" value="" id="label3" />
<td>
<label for="label1">
<input class="valinp" type="radio" name="friendship" value="acquaintance" id="label1" />
<?php _e('acquaintance') ?></label>
<label for="label2">
<input class="valinp" type="radio" name="friendship" value="contact" id="label2" />
<?php _e('contact') ?></label>
<label for="label3">
<input class="valinp" type="radio" name="friendship" value="friend" id="label3" />
<?php _e('friend') ?></label>
<label for="label4">
<input class="valinp" type="radio" name="friendship" value="" id="label4" />
<?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('physical') ?> </th>
<td><label for="label4">
<input class="valinp" type="checkbox" name="physical" value="met" id="label4" />
<td><label for="label10">
<input class="valinp" type="checkbox" name="physical" value="met" id="label10" />
<?php _e('met') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('professional') ?> </th>
<td><label for="label5">
<input class="valinp" type="checkbox" name="professional" value="co-worker" id="label5" />
<td><label for="label20">
<input class="valinp" type="checkbox" name="professional" value="co-worker" id="label20" />
<?php _e('co-worker') ?></label>
<label for="label6">
<input class="valinp" type="checkbox" name="professional" value="colleague" id="label6" />
<label for="label21">
<input class="valinp" type="checkbox" name="professional" value="colleague" id="label21" />
<?php _e('colleague') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('geographical') ?> </th>
<td><label for="label7">
<input class="valinp" type="radio" name="geographical" value="co-resident" id="label7" />
<td><label for="label30">
<input class="valinp" type="radio" name="geographical" value="co-resident" id="label30" />
<?php _e('co-resident') ?></label>
<label for="label8">
<input class="valinp" type="radio" name="geographical" value="neighbor" id="label8" />
<label for="label31">
<input class="valinp" type="radio" name="geographical" value="neighbor" id="label31" />
<?php _e('neighbor') ?></label>
<label for="label9">
<input class="valinp" type="radio" name="geographical" value="" id="label9" />
<label for="label32">
<input class="valinp" type="radio" name="geographical" value="" id="label32" />
<?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('family') ?> </th>
<td><label for="label10">
<input class="valinp" type="radio" name="family" value="child" id="label10" />
<td>
<label for="label40">
<input class="valinp" type="radio" name="family" value="child" id="label40" />
<?php _e('child') ?></label>
<label for="label11">
<input class="valinp" type="radio" name="family" value="parent" id="label11" />
<label for="label41">
<input class="valinp" type="radio" name="family" value="kin" id="label41" />
<?php _e('kin') ?></label>
<label for="label42">
<input class="valinp" type="radio" name="family" value="parent" id="label42" />
<?php _e('parent') ?></label>
<label for="label12">
<input class="valinp" type="radio" name="family" value="sibling" id="label12" />
<label for="label43">
<input class="valinp" type="radio" name="family" value="sibling" id="label43" />
<?php _e('sibling') ?></label>
<label for="label13">
<input class="valinp" type="radio" name="family" value="spouse" id="label13" />
<label for="label44">
<input class="valinp" type="radio" name="family" value="spouse" id="label44" />
<?php _e('spouse') ?></label>
<label for="label14">
<input class="valinp" type="radio" name="family" value="" id="label14" />
<label for="label45">
<input class="valinp" type="radio" name="family" value="" id="label45" />
<?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('romantic') ?> </th>
<td><label for="label15">
<input class="valinp" type="checkbox" name="romantic" value="muse" id="label15" />
<td><label for="label50">
<input class="valinp" type="checkbox" name="romantic" value="muse" id="label50" />
<?php _e('muse') ?></label>
<label for="label16">
<input class="valinp" type="checkbox" name="romantic" value="crush" id="label16" />
<label for="label51">
<input class="valinp" type="checkbox" name="romantic" value="crush" id="label51" />
<?php _e('crush') ?></label>
<label for="label17">
<input class="valinp" type="checkbox" name="romantic" value="date" id="label17" />
<label for="label52">
<input class="valinp" type="checkbox" name="romantic" value="date" id="label42" />
<?php _e('date') ?></label>
<label for="label18">
<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="label18" />
<label for="label53">
<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="label53" />
<?php _e('sweetheart') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('identity') ?> </th>
<td><label for="label60">
<input class="valinp" type="checkbox" name="identity" value="me" id="label60" />
<?php _e('me') ?></label>
</td>
</tr>
</table></td>
</tr>
</table>

View File

@ -13,9 +13,10 @@ function xfn_check($class, $value = '', $type = 'check') {
echo ' checked="checked"';
}
if ('' == $value) {
if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') ) echo ' checked="checked"';
if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') ) echo ' checked="checked"';
if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') && !strstr($link_rel, 'kin')) echo ' checked="checked"';
if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact') ) echo ' checked="checked"';
if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor') ) echo ' checked="checked"';
if ('identity' == $class && !strstr($link_rel, 'me') ) echo ' checked="checked"';
}
}
@ -380,82 +381,94 @@ th { text-align: right; }
<label for="label">
<input class="valinp" type="radio" name="friendship" value="acquaintance" id="label" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label>
<label for="label2">
<input class="valinp" type="radio" name="friendship" value="friend" id="label2" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label>
<input class="valinp" type="radio" name="friendship" value="contact" id="label2" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label>
<label for="label3">
<input name="friendship" type="radio" class="valinp" id="label3" value="" <?php xfn_check('friendship', '', 'radio'); ?> />
<?php _e('none') ?></label>
<input class="valinp" type="radio" name="friendship" value="friend" id="label3" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label>
<label for="label4">
<input name="friendship" type="radio" class="valinp" id="label4" value="" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('physical') ?> </th>
<td>
<label for="label4">
<input class="valinp" type="checkbox" name="physical" value="met" id="label4" <?php xfn_check('physical', 'met'); ?> />
<label for="label10">
<input class="valinp" type="checkbox" name="physical" value="met" id="label10" <?php xfn_check('physical', 'met'); ?> />
<?php _e('met') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('professional') ?> </th>
<td>
<label for="label5">
<input class="valinp" type="checkbox" name="professional" value="co-worker" id="label5" <?php xfn_check('professional', 'co-worker'); ?> />
<label for="label20">
<input class="valinp" type="checkbox" name="professional" value="co-worker" id="label20" <?php xfn_check('professional', 'co-worker'); ?> />
<?php _e('co-worker') ?></label>
<label for="label6">
<input class="valinp" type="checkbox" name="professional" value="colleague" id="label6" <?php xfn_check('professional', 'colleague'); ?> />
<label for="label21">
<input class="valinp" type="checkbox" name="professional" value="colleague" id="label21" <?php xfn_check('professional', 'colleague'); ?> />
<?php _e('colleague') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('geographical') ?> </th>
<td>
<label for="label7">
<input class="valinp" type="radio" name="geographical" value="co-resident" id="label7" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> />
<label for="label30">
<input class="valinp" type="radio" name="geographical" value="co-resident" id="label30" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> />
<?php _e('co-resident') ?></label>
<label for="label8">
<input class="valinp" type="radio" name="geographical" value="neighbor" id="label8" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> />
<label for="label31">
<input class="valinp" type="radio" name="geographical" value="neighbor" id="label31" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> />
<?php _e('neighbor') ?></label>
<label for="label9">
<input class="valinp" type="radio" name="geographical" value="" id="label9" <?php xfn_check('geographical', '', 'radio'); ?> />
<label for="label32">
<input class="valinp" type="radio" name="geographical" value="" id="label32" <?php xfn_check('geographical', '', 'radio'); ?> />
<?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> family </th>
<td>
<label for="label10">
<input class="valinp" type="radio" name="family" value="child" id="label10" <?php xfn_check('family', 'child', 'radio'); ?> />
<label for="label40">
<input class="valinp" type="radio" name="family" value="child" id="label40" <?php xfn_check('family', 'child', 'radio'); ?> />
<?php _e('child') ?></label>
<label for="label11">
<input class="valinp" type="radio" name="family" value="parent" id="label11" <?php xfn_check('family', 'parent', 'radio'); ?> />
<label for="label41">
<input class="valinp" type="radio" name="family" value="kin" id="label41" <?php xfn_check('family', 'kin', 'radio'); ?> />
<?php _e('kin') ?></label>
<label for="label42">
<input class="valinp" type="radio" name="family" value="parent" id="label42" <?php xfn_check('family', 'parent', 'radio'); ?> />
<?php _e('parent') ?></label>
<label for="label12">
<input class="valinp" type="radio" name="family" value="sibling" id="label12" <?php xfn_check('family', 'sibling', 'radio'); ?> />
<label for="label43">
<input class="valinp" type="radio" name="family" value="sibling" id="label43" <?php xfn_check('family', 'sibling', 'radio'); ?> />
<?php _e('sibling') ?></label>
<label for="label13">
<input class="valinp" type="radio" name="family" value="spouse" id="label13" <?php xfn_check('family', 'spouse', 'radio'); ?> />
<label for="label44">
<input class="valinp" type="radio" name="family" value="spouse" id="label44" <?php xfn_check('family', 'spouse', 'radio'); ?> />
<?php _e('spouse') ?></label>
<label for="label14">
<input class="valinp" type="radio" name="family" value="" id="label14" <?php xfn_check('family', '', 'radio'); ?> />
<label for="label45">
<input class="valinp" type="radio" name="family" value="" id="label45" <?php xfn_check('family', '', 'radio'); ?> />
<?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('romantic') ?> </th>
<td>
<label for="label15">
<input class="valinp" type="checkbox" name="romantic" value="muse" id="label15" <?php xfn_check('romantic', 'muse'); ?> />
<label for="label50">
<input class="valinp" type="checkbox" name="romantic" value="muse" id="label50" <?php xfn_check('romantic', 'muse'); ?> />
<?php _e('muse') ?></label>
<label for="label16">
<input class="valinp" type="checkbox" name="romantic" value="crush" id="label16" <?php xfn_check('romantic', 'crush'); ?> />
<label for="label51">
<input class="valinp" type="checkbox" name="romantic" value="crush" id="label51" <?php xfn_check('romantic', 'crush'); ?> />
<?php _e('crush') ?></label>
<label for="label17">
<input class="valinp" type="checkbox" name="romantic" value="date" id="label17" <?php xfn_check('romantic', 'date'); ?> />
<label for="label52">
<input class="valinp" type="checkbox" name="romantic" value="date" id="label52" <?php xfn_check('romantic', 'date'); ?> />
<?php _e('date') ?></label>
<label for="label18">
<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="label18" <?php xfn_check('romantic', 'sweetheart'); ?> />
<label for="label53">
<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="label53" <?php xfn_check('romantic', 'sweetheart'); ?> />
<?php _e('sweetheart') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('identity') ?> </th>
<td>
<label for="label60">
<input class="valinp" type="checkbox" name="identity" value="me" id="label60" <?php xfn_check('identity', 'me'); ?> />
<?php _e('me') ?></label>
</td>
</tr>
</table></td>
</tr>
</table>

View File

@ -447,3 +447,8 @@ textarea, input, select {
height: 1.5em;
margin: 0;
}
/* keep labels and their form controls together: */
label {
white-space: nowrap;
}