SA Chat

Started by Diego Andrés, July 21, 2010, 10:36:59 PM

Previous topic - Next topic

crustybum

Strange, i installed it and it worked earlier..now ive come back on and its disappeared and not showing??? its still there in admin.

crustybum

Working perfect in I.E. but not in Firefox????

SA™

What's it not doing in ff the only issue I found in ff is the bar looks different colour
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Shkic

I just want to thank you SA™ for this great MOD. Also I think that localStorage idea will help for forums with a huge traffic :)

Good luck in development!

Cheers from Lithuania.

Jeffrey King

I want to thank SA for this mod.

Delete this

I can't get it to work with smf4mobile themes. If I enable the mobile mod it blanks the screen and the only way to make it work is to disable the chat bar. Even excluding the themes specifically from the sa admin panel doesn't fix it.

SA™

thanks for the report ill look into this when i have some time 8)
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Dylert

When chatting new messages comes on top in the chatbox. Is it possible to get them on the bottom. That's more familiar to most users.

Nicky_uk

#1008
Just installed the mod, but no bar is showing up? Is there something I need to do? Installed on 2.07

Many thanks

Just to add, I tried running 'fix bar' and got the following error msg:

Method Not Implemented

GET to /index.php not supported.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Nicky_uk

Ignor the above, i just changed the file permissions and it seems to have fixed the problem.

nend

I tried local and cookie storage for chat data but ran into problems. Problem with cookies is that two instances can't share data simultaneously. Local storage on the other hand was new at the time and not all browsers supported it. Cookies at that time only stored window location I believe.

Also on older versions, possibly current one too, I know it used a cache system. A heartbeat doesn't necessarily mean a DB query. It just means a file inclusion from the cache which should determine if a DB query is necessary.

The only problem with large forums is the cache was set up to cache conversation say like file(user1-user2.php), which would just have a timestamp in it I believe. Oh the problem, too many files may be created. The whole inode limit thing.

Another caching method might be the server cache.

SA looks like you been doing a great job. I sort of felt like I dumped a burden on you with the chat, looking today you have brought it a long way. Congrats on the top ten.

KungFuJoe

Love this mod and I have it working on a test site.

I have a couple questions.

What does the permission "Allow to choose who to talk to" control?

Also, it appears that anyone can IM anyone and it's not limited to just buddies.  I know you can control your own settings to only show your buddies in the Who's Online list, but it still doesn't prevent anyone from IM'ing you if they choose to, even if they're not your buddy.

Is this intended?

KungFuJoe

Also noticed that even if a user hides their online status, they still show up in the Who's Online window.

SA™

Quote from: nend on February 10, 2014, 12:57:20 PM
SA looks like you been doing a great job. I sort of felt like I dumped a burden on you with the chat, looking today you have brought it a long way. Congrats on the top ten.
thanks nend it was kinda at first a burden cos i didnt know js or jquery to well many late nights sorted that :P


QuoteI tried local and cookie storage for chat data but ran into problems. Problem with cookies is that two instances can't share data simultaneously. Local storage on the other hand was new at the time and not all browsers supported it. Cookies at that time only stored window location I believe.

the way the cookies where done before was the reason for ghost chat boxes and gadgets for instance you could not have two forums on same host using the chat mod
used to just cause havoc 

QuoteAlso on older versions, possibly current one too, I know it used a cache system. A heartbeat doesn't necessarily mean a DB query. It just means a file inclusion from the cache which should determine if a DB query is necessary.

i dont actualy think this works any more tbh not payed that much attention to that it still there and enabled tho i do know that after a few messages it would choke till i chaged the update message function not sure if that would be related tho

QuoteWhat does the permission "Allow to choose who to talk to" control?

that allowes members to change the show only buddys option in profiles/look and layout

QuoteAlso, it appears that anyone can IM anyone and it's not limited to just buddies.  I know you can control your own settings to only show your buddies in the Who's Online list, but it still doesn't prevent anyone from IM'ing you if they choose to, even if they're not your buddy.

yup it is a chat mod after all
but still this ties into abouve members can choose what way they want



QuoteAlso noticed that even if a user hides their online status, they still show up in the Who's Online window.
yup this no support for that yet
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

KungFuJoe

#1014
SA,

Thanks for the answers!

Apologies if this has already been answered...but is there anyway to set new messages to start from the bottom?

Also, the part about "Seeing others as they type" and it not being fully implemented.  Is it something that we can try...what's the risk of checking it?

SA™

QuoteApologies if this has already been answered...but is there anyway to set new messages to start from the bottom?

curently no but this will chage when i can figar out scrolling issue hopfully next version

QuoteAlso, the part about "Seeing others as they type" and it not being fully implemented.  Is it something that we can try...what's the risk of checking it?
main risk with this is server overload the way it is currently done enableing it will not make any differenc as it is commented out in the code
the next version this is done slitly different but there will always be resource issues with that wouldent recommend it on a shared host

i have been kinda busy these last few weeks so havent had much time to test new version much yet but it is gonna come
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

KungFuJoe

Quote from: SA™ on February 12, 2014, 05:12:40 AM
QuoteApologies if this has already been answered...but is there anyway to set new messages to start from the bottom?

curently no but this will chage when i can figar out scrolling issue hopfully next version

QuoteAlso, the part about "Seeing others as they type" and it not being fully implemented.  Is it something that we can try...what's the risk of checking it?
main risk with this is server overload the way it is currently done enableing it will not make any differenc as it is commented out in the code
the next version this is done slitly different but there will always be resource issues with that wouldent recommend it on a shared host

i have been kinda busy these last few weeks so havent had much time to test new version much yet but it is gonna come

Thanks!

KungFuJoe

Apparently, running this mod has been causing high CPU usage on my shared hosting.  Just got an alert on cpanel about restricting my account.  I run a small site...only about 60 members, but there is a fair amount of activity as most of them post throughout the day.

Can someone give some instructions/recommendations on how the heartbeat settings are used and if there's anyway to make the chat bar less resource intensive?

Also, on the load checking...what exactly is it checking on the backend?  It looks like you set a number as a max threshold before it disables the bar...but what is the number in reference to?

SA™

QuoteAlso, on the load checking...what exactly is it checking on the backend?  It looks like you set a number as a max threshold before it disables the bar...but what is the number in reference to?

it checks the cpu usage using the passthru(); php function if it is greater than the value you set in admin it will disable the bar and what not

QuoteCan someone give some instructions/recommendations on how the heartbeat settings are used and if there's anyway to make the chat bar less resource intensive?

there is a min  and max heartbeat setting the min heart beat is the normal beat now after say 10 heat beats with out no chat activty it will slow down the beat to the max beat setting

making the chat less resource intensive is something im working/looking into been trying different things html5 mostly and local storage but im actualy thinking of starting again to try using xml cos ithink this would be better than jquery exspecily after seeing a certain post on fb from a dev
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Arantor

Well, for checking server load, SMF already does this when load balancing is enabled in the admin panel and IIRC it is $modSettings['load_avg'] where this is stored which you can use for comparison purposes.

As far as using local storage/HTML5/jQuery/XML... can I just stop you there?

They're all inter-related technologies that each have their place and so on. They all work together, not disparately.

XML is a transport mechanism, a way of putting data into a container that can be read. It is over a decade old, with plenty of supporting libraries on both the client and server side. As far as using it for communication, it's a toss-up between JSON and XML as the container for serving data back and forth, nothing more than that... and realistically I'd actually suggest XML. JSON is more compact, sure, but its support in PHP is... interesting. Firstly, json_encode and json_decode are UTF-8 only, while SMF does not necessarily operate in UTF-8 only (XML is character-set agnostic, like HTML), and there are issues with handling numbers in JSON if you're using different locale settings, e.g. various of the European countries that use , (comma) as the decimal point indicator instead of . (period).

Ultimately whatever you're doing, XML or JSON will be part of your solution.

localStorage is useful for local storage - but that's all you can do with it. You don't store things it that you're not sending back and forth (so it's no good for session data for example), but it might be useful for client side preferences in chat where you can just load them client side and process them client side. I'm not sure what benefit you would get from it for what you do, though. The only benefit I can really see is that you might archive part of the chat history to localStorage.

jQuery... hmm. jQuery in itself isn't entirely terrible. Thing is, most people seem to view it as a magic bullet to solve any problem, and quite often you don't need it. If it's already loaded, great, use it. If you're not targeting older browsers, you probably don't need it. It's only really IE below 9 that you actually find yourself needing it to any great degree, as most other code can be handled with native equivalents or shorter functions. For example, SMF has code to handle AJAX GET and POST requests and jQuery won't be needed for those things.

More information: http://youmightnotneedjquery.com/

Advertisement: