Hi IceCreamYou,

Do you have time to help build a FB Status form plugin for use with the Ajax module? This would allow for the aforementioned Ajax Views Refresh module to use Facebook Status form submissions as cues for refreshing a view AJAX-style, and hence allow people like me to stop using the AHAH hack. I started an AJAX issue thread already, here: http://drupal.org/node/582446

Thanks,

Thomas

CommentFileSizeAuthor
#4 ajaxadmin.png46.9 KBpribeh

Comments

icecreamyou’s picture

Status: Active » Postponed (maintainer needs more info)

From what I understand,

Ajax.module supports most forms out of the box.

The AJAX module should "just work" with FBSS without any extra configuring, although I haven't tested it. You'll notice it's already in the documentation.

So what exactly did you have in mind?

pribeh’s picture

Sorry for not specifying more clearly but I would only post this after having installed the AJAX and AJAX Views Refresh modules and found out that this was not the case. On the AJAX settings page the default supported forms you'll see user (login) and content-type forms. In order to use FBSS I'm sure we'll have to make, what the AJAX developers call, a "plug-in" for it but I'm not a good programmer so I'll let you decide that. Integration with AJAX would be amazing as I'm experiencing a lot of issues with the AHAH hack - which has served amazingly well for the last little while though.

icecreamyou’s picture

The AJAX module documentation says it should automatically detect forms and use AJAX to submit them. I've looked at the code and it looks like it is designed to do that. You may need to disable AJAX submission in the FBSS advanced settings for it to work--otherwise you probably wouldn't notice the difference.

Normally, if it was determined that some explicit integration must be made, I would be willing to make the changes in FBSS. On the other hand, the AJAX module seems to have taken it upon itself to support other forms (CAPTCHA, for instance) so maybe this would be more appropriate in the AJAX queue.

You might try adding '#ajax' => array('enabled' => TRUE); somewhere in the FBSS form and '#ajax' => array('submitter' => TRUE), in the submit button array (function facebook_status_box()) and see if that makes magic happen.

pribeh’s picture

StatusFileSize
new46.9 KB

Thanks for your help Ice. I've tried finding a way to get AJAX to respect FBSS but I can't. Basically - if you haven't checked AJAX out yet - AJAX has a single admin page which (if you have AJAX VIEWS REFRESH installed) gives you the option (checkbox) to select whether a form should "refresh views upon submit". I've attached a screen shot.

I've tried adding the code above but am really unsure where in the form to put it (without breaking it) and keep screwing up - sorry. I still can't get FBSS to show up on the admin page.

Also, I have started a thread on the AJAX issue cue (http://drupal.org/node/582446) to see if we can get help from the AJAX people.

Thomas

icecreamyou’s picture

Status: Postponed (maintainer needs more info) » Postponed

Okay. I'll take a look when I've got some time and see what I can do.

icecreamyou’s picture

Status: Postponed » Needs review

I just committed some changes that should get FBSS working with AJAX, although I haven't tested it myself. You should fully refresh your Drupal caches after upgrading to the latest dev (run update.php) before testing.

Please test this fix and set this issue to "fixed" if it works for you.

pribeh’s picture

Thanks so much for getting to this Ice. I just tried this on a fresh backup of my site.

Installed latest dev of FBSS, ran update.php, enabled (along with checking disable redirect and ajax refresh) facebook_statuses in ajax admin, flushed cache, placed view block (with "use ajax: yes") in (overrided) profile panel with nothing else other than the facebook status submit form. With AHAH turned off in the FBSS admin section submitting a status gets me no response from the view. I'm pretty sure I'm to have AHAH turned off but I tried with it turned on and it gives me a blank submit form and no response from the view after submitting a status.

Thomas

icecreamyou’s picture

Status: Needs review » Needs work

I didn't really follow that, but I would at least expect that you have AJAX turned off everywhere you can, including in the view. I'll try to find some time to install the AJAX module myself next week.

pribeh’s picture

According to the ajax instructions you should have the "use ajax:" in a view switched on ("yes"). In #7 I was simply noting that I've followed every proper step and got negative results. What I was asking toward the end their was whether or not I should have "AHAH refresh on submit" off or on in the FBSS admin section. Thanks Ice.

icecreamyou’s picture

Status: Needs work » Postponed

I won't be able to work on this until at least November 8th.

pribeh’s picture

Cool. I'm simply uber glad you're working on it. Thanks for giving a time frame.

icecreamyou’s picture

Status: Postponed » Closed (duplicate)

Marking as duplicate of #582446: Facebook-Style Statuses module form plugin

FBSS is correctly integrated with the AHAH module. To me, it looks like the AHAH Views Refresh module just isn't working -- not something I can fix, unfortunately, and the maintainer of both modules has been MIA for awhile.

pribeh’s picture

Thanks Ice. I'll look into this further.

adam_c’s picture

SUBSCRIBING

boblangdon’s picture

SUBSCRIBING