Frug / AJAX-Chat

A fully customizable web chat implemented in JavaScript, PHP and MySQL which integrates nicely with common forum systems like phpBB, MyBB, FluxBB, SMF and vBulletin. A Flash and Ruby based socket connection can be used to boost performance.
http://frug.github.io/AJAX-Chat/
546 stars 300 forks source link

Force settings in config.js on all users #214

Open Bundie opened 8 years ago

Bundie commented 8 years ago

I've always been a big fan of Blue Imp's AJAX Chat. Recently I set it up on a forum, and I've been tweaking the settings to my liking. However, I noticed that when I update things in config.js, everyone still has to manually change their personal setting to match the default I've set. Is there a way I can force certain settings defined in config.js on all users (but then continue to let them edit the settings after it has been set to the new default)?

Patmacessex commented 8 years ago

Why don't you change it in SQL?

Bundie commented 8 years ago

At the risk of sounding naïve, I've never done any SQL editing. Would anyone be able to offer some guidance in this endeavor?

Patmacessex commented 8 years ago

Don't worry everyone has to learn, normally on your server you have PHPMyAdmin in there you just run a query to change the value of the one table or column, have a look here http://stackoverflow.com/questions/23442039/i-have-a-list-of-records-in-a-phpmyadmin-table-i-want-to-change-the-value-of-on

Patmacessex commented 8 years ago

It will change all the values in that one column for you

Patmacessex commented 8 years ago

One more tip, download MySql Workbench from here https://dev.mysql.com/downloads/workbench/ Sql is just a dumb database that holds the data you just need to learn how to manipulate the data in it, it will save you a lot of trouble in the future, you can also change values like is he an admin? user passwords etc.

Frug commented 8 years ago

The settings in config.js that users can change in their own options are only meant to be defaults. If users clear their cookies and log into chat, those are they settings they get. There's no way to force them over to users other than ask them to clear cookies. I don't see a good reason to change this, really. Once someone is in your chat, they can change their own settings.

The config.js file is also cached by user browsers, so they won't know about those changes unless they clear their cache (or unless you modify chat to force it not to cache that file). To do what you want would require a bit of work.