Hi guys, first thx for the biggest work. Fbss is awesome :)

Just a simple question, there is a possibility to make the status view to auto refresh when someone other post on a profile of an user?

For example, i'm on my user page, and user 2 post "hello" on my profile, what i'm saying is: it's possible to do the refresh in ajax automatically instead reload the page or use the refresh link ?

Thx

Luke

Comments

icecreamyou’s picture

Status: Active » Fixed

The page should reload via AJAX by default when a status update is posted.

If you put the status update form in one place and the view you want refreshed in another instead of using for example the Facebook-style Statuses block that can display them both together, you'll need to do a little more work. Specifically you need to figure out what the DOM path of the view you want refreshed is, and enter that in the advanced settings for the relevant contexts at admin/settings/facebook_status/contexts.

GolDRoger’s picture

Status: Fixed » Active

surfing around I've found some features, but thoose features won't fix as expected.

View Hacks

http://drupal.org/project/views_hacks

inside this collection of tools there is one nice, Views Auto-refresh (views_autorefresh).

With a small hack it's possible to put a time interval in the header of a view specifying the time for the next refresh. (For example every minute)

This maybe can solve the problem of autorefreshing. But... A view with AJAX is needed (obviously).

The problem is one, like every fbss user knows, if the view use AJAX, it's impossible to add comments via AHAH otherwise js goes in error.

In my case it's more important add comments in ahah instead having an autoloading of the status view

GolDRoger’s picture

I've partially understood what you explained.

Ok i'm using Panels to overwrite the default user appearence.

So all my profiles are under www.mysite.com/users/username

Inside the Panel i'm using 4 tabs (using the panel tabs module) for

Stream | General Informations | Pictures | Friends

Inside the panel i've loaded the block of Facebook Style Statuses (the block has the option load a view active)

the display selected is block.
But I don't have understood what I have to search for undestanding what is the path.

Or better I've assigned to the block (inside panels) the css class personal_stream and in fbss contexts under
User Profiles i configured the dom selector div.personal_stream

but I don't know if is you was meaning

But the situation doesn't change.

1 I used safari for login with user 1 and i was gone on user 2 profile

2 used FF for login the user 2 and gone on user 2 profile

3 Used user 1 to post on user 2 profile the word Hello. Job done status posted and i can see the post on user 2 profile.

4 Bringed up FF (with user 2 profile open) but nothing happen the post of user 1 early made will not appear. Must reload the page to view it.

icecreamyou’s picture

Status: Active » Closed (works as designed)

Ohhhh. Yeah, that's different -- you want the stream to refresh automatically when other users post status updates. That's out of scope -- it is very performance-intensive to do something like that. Sorry.

GolDRoger’s picture

ohhh ok no problem Ice :)

It was just an information :)

I did not imagine it was performance intensive, good to know, in this case I abandon the idea to install other modules like views refresh.

I have a small dedicated server and I don't want to make it slow like a snail :)

Congratulations another time for this beautiful and useful set of modules you created and especially thx Ice, your help is always precious :)

karlitos’s picture

So just for the record....

Is it posible to have a view display like All Statuses with a block like Facebook-style Statuses so that when you write in the Facebook-style Statuses block the All Statuses view refreshes automatically?

I tried to mess around with the indications from Ice regarding the DOM path, but to be honest I don't know very well what I'm supposed to do exactly.

If someone could throw me a quick guide I would appreciate it.

Thank you

By the way, great work Ice!!

icecreamyou’s picture

Is it posible to have a view display like All Statuses with a block like Facebook-style Statuses so that when you write in the Facebook-style Statuses block the All Statuses view refreshes automatically?

Yes. If you configure the Facebook-style Statuses block's settings to display the All Statuses view, that view will update automatically for you when you save a new status. If you want to put the view somewhere other than immediately below the status update box, you need to figure out the DOM path which is going to be something like .view-id-facebook_status_all and put that in the selector settings in your contexts' advanced settings. (You usually see DOM selectors in CSS, e.g. .view-id-facebook_status_stream { color: red; } in a CSS file would make the text in the facebook_status_stream view red.)

karlitos’s picture

Hi Ice,

Having the view immediately below the status update box is fine with me. The only problem I'm having is that the view I have by default is fbss_ur_stream, which is the same as I'm having on each user profile.

i'd like to change that view to show facebook_status_all. I tried to change the settings in the block's settings but all I have or all I'm seeing is:

Show a view on this block
If enabled, the view displayed is chosen automatically based on the setting for the relevant context.

If I change the view settings I also alter the user profile view, which I don't want to. I've tried all sort of comibinations in the context settings but I don't see any changes.

If I have created a page view, do I need to configure the DOM path in the node's context option?

What am I doing wrong?

Thx

GolDRoger’s picture

You can change views under admin/settings/facebook_status/contexts

Choose the context you prefer, for example User profile and set wich view it has to use.

In another way you can build a custom panel page, and add in a column the Facebook Style Statuses block (found under miscellanous) and the view facebook_status_all.

karlitos’s picture

Hi golDroger,

thing is that my profile settings are just fine. I've created a page view with all user statuses and basically I'd like to add the auto-refresh benefit, that way users can see all users statuses that are done without the need of havinf to refresh the page.

I deduce that since I've created a page view with the All Statuses display and I have add the status update box block, I should configure the DOM path under the node context settings.

I added the DOM that Ice suggested me but it didn't do anything, right now I'm trying all sort of DOM selectors.

karlitos’s picture

Assigned: Unassigned » karlitos

Finally I got it to work as Ice said it was the selector .view-id-facebook_status_all but with the div tag before:

div..view-id-facebook_status_all

under the user profile context settings.

Now everything works as I wanted to, so happy!!!!!

great module and awesome creators!!!

GolDRoger’s picture

Assigned: karlitos » Unassigned

I've created a page view with all user statuses and basically I'd like to add the auto-refresh benefit, that way users can see all users statuses that are done without the need of havinf to refresh the page.

This sounds like what I've asked to Ice,

Panel page Statuses:
--------------
| Status block |
|------------- |
| view_status_all |
| |
| |
| |
--------------

So if i'm user 4 and i'm in this page and I have this situation :

user 1 Hello world

user 2 Hey ppl

user 3 Back to home

Now i'm gonna to post my own status (i'm user 4)

I type: I'm happy today

press send

view refresh

the situation is:

user 4 I'm Happy

user 1 Hello world

user 2 Hey ppl

user 3 Back to home

Now imagine user 1 is logged to your site and is on the Panel page Statuses

the situation for this user is

user 1 Hello world

user 2 Hey ppl

user 3 Back to home

For view your last post it must push button refresh (provided by the module) or reload the page.

Unlucky the refresh can't be done automated in real time like facebook do when someone post a new status.

Btw if is only one view and u don't need to show comments try to use http://drupal.org/project/views_hacks

Once enabled the module views auto refresh you can add in the header of your view this code

 <?php
$interval = 5000;
print theme('views_autorefresh', $interval);
?>

And set the time interval for the next refresh. This can be done only in your case, because if u use comments in a fbss view she can't be in ajax otherwise you got some errors while try to commenting (if u have selected AHAH for comments)

karlitos’s picture

Assigned: Unassigned » karlitos

GolDRoger,

Now I understand your situation, to be honest I did not take in consideration your situation. it would be nice to have something like you expose.

I'm really interested in what you're saying about the auto-refresh, I'm using the comments module provided with the facebook_status module, does that mean I can use the views hack module?

GolDRoger’s picture

Maybe I misunderstood what u was explaining.

view hack is perfect because you can set an interval of seconds and the view refresh without hit buttons (for example every 2 minutes)

I told you about comments because like facebook fbss let you comment an user status.
And comments can be added in normal mode (wehn u press send comment drupal refresh the page to append the comment) or via AHAH (appending a comment whithout reload the page)

(You can set this under the facebook style statuses settings)

And if u like appending comments in AJAX (via AHAH) the view must not have AJAX enabled. Otherwise when you try to post a comment you get a javascript error.

View auto refresh needs AJAX active.

But if I have understood correctly, your view only show statuses of your users without comments.

That's good, so you can turn AJAX on your view and put the upper code inside the header.

In this case you have a situation where your view auto refresh every 2 mins or less without hitting any buttons

karlitos’s picture

No, my user statuses have the option to be commented too. I've installed the views hack and works perfectly. I set an interval of 30 seconds. So far I did not have any issues.

GolDRoger’s picture

Really? Good to know :D

If u try to comment a status from the view you get errors?
Your comments are appended in ajax?

Because with my view facebook_style_statuses with ajax option enabled and comments with the option of AHAH enabled gived me some errors in js

karlitos’s picture

I have ajax enabled in my views display and ahah enabled and I don't get errors whatsoever, however I encountered the first problem with views hack. When you link a video URL in a status, and you watch it, depending on the length of the refresh interval of the views hack plug in will close your video.

Putting a very long interval to auto-refresh does not make any sense, so I think I will sacrifice the auto-refresh versus been able to watch videos without any interruptions.

GolDRoger’s picture

Mhhh, nice to know.

I need video feature too :(
Maybe open the link in a new window can solve the problem?

lameei’s picture

Would you please describe a bit more the contexts. I don't understand them.
I'm trying to gather all the status messages on one page with the message box itself and have the list updated when a new message gets published by anybody. I think this might not be doable (I mean having the list refresh automatically). Am I correct?

Originative’s picture

I have same problem on the video feature also.

Is it have any solution on this?