Page 1 of 1
shortcut to disable chat service ?

Posted:
Tue May 01, 2012 2:20 am
by fanartie
Hi
I would like to disable chat service to avoid my guest meeting to each other.
I understand there is not the feature to disable it for now, so I would like to have a shortcut to stop chat going.
Here are my quick alternative ideas… I will be appreciate if you could help any…
1. I am able to trigger an api to clear out the chat log every 10 minutes etc… , if you can provide me the api spec (I cannot find from your documentation)
2. I am able to run a java routine to clear out chat log from db, if you could provide me the function call
3. to make chat-db readonly, so new chat will not be saved.
4. or to disallow certain api communication to stop my client submit new chat
Please advise
Thanks
Arthur Fan
Re: shortcut to disable chat service ?

Posted:
Tue May 01, 2012 3:44 pm
by BKKKPewsey
One slightly "klunky" workaround is to disable "show chat messages" in settings personal for the users who you do not want to access chat.
However this means you have to disable them from changing their settings otherwise they can turn the option back on.
So create a user with allowed to change settings ticked - then log on as that user - untick show chat messages - save.
Then via admin a/c untick allow change to settings for that user.
It works but .........

Re: shortcut to disable chat service ?

Posted:
Tue May 01, 2012 5:00 pm
by hakko
Do you want to disable it completely? You could alter the file "right.jsp" (no re-compilation necessary then) and remove everything that's inside the c:if test="${model.showChat}" block.
Re: shortcut to disable chat service ?

Posted:
Tue May 01, 2012 6:03 pm
by fanartie
thanks for your answers, BUT...
my guests are using iphone iSub APP which has chat api function.... so... I have no concern about webpage.
I would like to stop chat api feature and I understand it may cause error on APP, but I don't care.
any idea ?
Re: shortcut to disable chat service ?

Posted:
Tue May 01, 2012 7:12 pm
by hakko
Since you mentioned building some Java code in your first post, I'd suggest altering the source code. I haven't touched that part myself but I'd guess this is a good starting point:
http://subsonic.svn.sourceforge.net/vie ... iew=markupline 1226
I'd just remove the for loop that adds stuff to the builder list. That should give the iPhone app the impression that no new chat messages are available. (no guarantees that it'll work though, it's just a guess)
Re: shortcut to disable chat service ?

Posted:
Thu May 17, 2012 4:29 pm
by fanartie
thanks for your help
I believe it should work !
but I have some challenge on compiling.
may I ask a quick question here ? can I just compile single java source into class and replace the production ?
Re: shortcut to disable chat service ?

Posted:
Thu May 17, 2012 4:38 pm
by hakko
You can, but you'd still need to set up a working classpath to compile a single java file.
Try checking out the whole Subsonic directory structure (starting from subsonic, containing subsonic-main) and issue the command "mvn package" in folder "subsonic-main". It should build a new subsonic.war in the folder "target". You just need to install Maven if you don't have it already.
Re: shortcut to disable chat service ?

Posted:
Thu May 17, 2012 9:08 pm
by fanartie
I appreciate your instruction, it works great !
Thank you Hakko !
Re: shortcut to disable chat service ?

Posted:
Thu May 17, 2012 9:46 pm
by hakko
No problem.

I've spent way too much time the last months modding Subsonic.