Closed (fixed)
Project:
Facebook-style Statuses (Microblog)
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
18 Dec 2008 at 22:39 UTC
Updated:
18 Jan 2009 at 05:00 UTC
Hello,
I just installed 2008-Nov-23 dev release of Facebook-style Statuses. On the Advanced Forum modules support page (http://drupal.org/node/227121) it says that it integrates with Facebook-style Statuses module, however, I don't see any status messages in the forum posts.
Am I missing something here?
Thanks,
Andrey.
Comments
Comment #1
psicomante commentedI'm not so sure, but try to check this page
#343853: Integration of other modules with Advanced Forum and Advanced Profile Kit
Comment #2
michelleFacebook statuses was actually the first to add my code so it shouldn't need to be patched. However, I didn't have the variable printing by default until recently so you may need to add it to advf-author-pane.tpl.php yourself if you have an older version of that.
Michelle
Comment #3
mr.andrey commentedOdd.. in advanced_forum/styles/naked/advf-author-pane.tpl.php, there's already this code:
facebook_status/facebook_status.author-pane.inc has this:
It seems like it should all work...
Now if I add a drupal_set_message('.'.facebook_status_advf($account_id)); line right after the $variables... line in facebook_status_preprocess_author_pane(), it only shows the dots, no actual statuses.
Then if I look in facebook_status.module:
$account->uid returns 0, since $account is actually the uid. So either the facebook_status_advf() needs to change to take in $account as uid or the code in facebook_status.author-pane.inc needs to pass the uid in an $account->uid form.
Any ideas?
Andrey.
Comment #4
mr.andrey commentedReplacing
with:
Fixes the problem.
Best,
Andrey.
Comment #5
icecreamyou commentedMichelle, is this something you would like me to do in facebook_status, or would you prefer to do it in advforum?
I would prefer that it be fixed in advforum because if I remember correctly I use the whole user object to theme the username, so it would save a user_load().
Comment #6
michelleI confirmed that his fix works. Not sure how we had that wrong to begin with... I could have sworn it worked when I tested it way back when you first added it.
Anyway, I don't understand why you think this should be fixed in AF? Did you forget that you were one of the few maintainers that committed the .inc file? :)
Anyway, just change it to use the whole account object instead of the ID like mr.andrey said in #4 and it will work fine.
Michelle
Comment #7
michelleAs long as we're on the subject... Any chance of an FR? Could you possibly set another variable in the preprocess that doesn't include the user name? I've been struggling with where to put this in the author pane and it occured to me that putting it right under the username would be a nice spot. But including the user name would be redundant. Making another variable would give people the option of which they want to use.
Thanks!
Michelle
Comment #8
icecreamyou commentedHaha yep I did forget. I could have sworn it worked too, but I'm still on Alpha 10! Yikes. It probably did work at that point.
The preprocess function is now:
So the facebook_status variable includes the username, the facebook_status_status variable is just the status. Committed in 5.x and 6.x devs.
In the process, I cleaned up the facebook_status_advf() function a little. It looked like I was confused about whether I was dealing with a user object or a UID when I wrote it; I had been re-loading the entire user object using the UID from the passed user object. *shrug*
Comment #9
michelleWow, you're awesome!
The thing I really like about this method is that people don't have to wait for a new AF/APK release from me. They just need to update your module and they've got it. It's too bad most of the other maintainers I approached didn't see the logic in this. :(
Anyway, thanks for adding it! I'll probably be using the plain status one as a default for my modules because I think it will look nice there under the user name. But this way it will continue working like it did for those who are already using it.
Michelle
Comment #10
icecreamyou commentedIt comes to me naturally. :-P
Yep. I think the reality is that most other maintainers just aren't on top of things. Most people write modules because they need them for a project and don't have any motivation to update them afterwards.
That sounds like a good idea to me. I've been thinking about doing that on my own site(s) for awhile now, I'm glad I finally had a reason to get on that. :)
Comment #11
michelleYeah, I guess that's an advantage to having Drupal as a hobby. :)
I'm off to bed. Have a good night.
Michelle
Comment #12
michelleI hate to keep bugging you but is there any chance you could remove the
<p class="submitted">bit? That extra paragraph in there is throwing off the formatting. :( Author pane really just needs the raw info.Thanks,
Michelle
Comment #13
icecreamyou commentedWould it work better with a <span>? I feel like because the text is so long there should be an easy way to reduce the font size through CSS, instead of editing the template.
Comment #14
michelleWe discussed on IRC but just to have it documented... What we have now is:
<div class="author-pane-line author-facebook-status">…<p class="submitted"> is testing</p></div>That paragraph means we can't put anything before / after the status in the template and it also gives a lot of extra spacing. Making the text smaller could already be done with
Michelle
Comment #15
icecreamyou commentedChanged to a span after discussion with Michelle on IRC (and also--I realized later--because there's a necessary title attribute). Added to both branches locally; will commit after I fix another minor problem.