Currently, the profile fields on a user's account page are being output like this:
<dd>
<div>Facebook name: John Smith</div>
<div>Interests: rock climbing, riding bikes, kickball</div>
</dd>
This makes the text hard to read, as we are not able to theme the field label separately from the field content. Some semantic output/classes would be super helpful:
<dl class="facebook_info">
<dt>Facebook name:</dt>
<dd>John Smith</dd>
<dt>Interests:</dt>
<dd>rock climbing, riding bikes, kickball</dd>
</dl>
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | fbconnect-363276-5.patch | 2 KB | aaron stanush |
| #4 | fbconnect-363276-3.patch | 1.04 KB | aaron stanush |
Comments
Comment #1
poundy commentedI agree completely. making the output themeable would be very very helpful.
Comment #2
LaNets commentedAdded in BETA6.
Thanks
Comment #3
aaron stanush commentedIt looks like this was not fixed in the best way. The only change that was made is that the wrapping div now has a class:
This still does not fix the issue that themers cannot visually separate the title "Interests" from the list of interests. These sections are especially hard to read when the list of items is long. The problem with the fix is it still does not provide a wrapper for the title, in this example the word "Interests." This could be accomplished by using the
<dt>and<dd>elements suggested in the original issue description (above)Bad: Here is how a user's profile currently looks (screenshot)
Good: Here is how the profile could look with some proper HTML elements and CSS classes (screenshot)
Comment #4
aaron stanush commentedPlease disregard this patch, I found some errors. I will be submitting a new one shortly.
Comment #5
aaron stanush commentedUpdate: This patch creates a .css file, but does not alter the .module file so that the stylesheet is automatically loaded. See comment #7 to see how to do this manually until the next patch is rolled out.
Here is a patch which accomplishes what is outlined in comment #3. Here are the changes it makes to fbconnect.module:
<div>around each Facebook profile field<dt>around the$labelitems<dd>around the$valueitems<dl>inside the<div class="facebook_info">wrapper<div class="clear"></div>after the<div class="facebook_info">wrapperNotes
<dt>and<dd>elements. Applying the patch inside /modules/fbconnect/ will create a new file at /modules/fbconnect/fbconnect.css.div.clear {clear: both;}to be set in the CSS. This is so the floated Facebook field elements will play nicely with the rest of the content on the profile page. There is probably a better way to do this, but I have included this code in the fbconnect.css file for now.Comment #6
aaron stanush commentedI've also noticed that this module places the
<div class="facebook_info">in a strange hierarchy in the HTML (inside a<dd>element)-
<div class="profile">--
<div class="picture">--
<dd>---
<div class="facebook_info">--
<h3>History</h3>--
<dl class="user-member">Recommendations:
<dd>container for<div class="facebook_info"><div class="facebook_info">to a<dl>element, i.e.<dl class="facebook_info">Comment #7
aaron stanush commentedUntil the next patch is released, you can manually edit fbconnect.module so that it will automatically load the stylesheet (fbconnect.css)
Find the following line:
And add this line below it
Comment #8
LaNets commentedComment #9
LaNets commented