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

View File

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

View File

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