Page 84 of 98

Re: [RC] mChat

Posted: Sat Sep 24, 2016 9:25 am
by leschek
kasimi wrote:No selector needed, just type 48 hours, 1 day, 11 weeks etc. :)
What about people who doesn't speak English or plurals? Should users write 1 day and 2 days?

Re: [RC] mChat

Posted: Sat Sep 24, 2016 9:29 am
by kasimi
You're right, this option only understands English, but plurals aren't important, you can also write 1 days or 5 day.

I'll think about making the option translatable.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 9:32 am
by leschek
Thank you.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 11:08 am
by spaceace
kasimi wrote:This sure sounds like a bug. To be clear, this happens even if you don't touch the scrollbars? How often does that happen? Is there any special content (BBCode, image, content from another extension) in those messages that stop the auto-scrolling?
i have noticed in several versions of mChat that on initial load of the page with chat that the message window is not scrolled all the way to the bottom on sites with a lot of js in them. i have reported this to dmzx on his site as well as to Martin on his and it still has this random issue that they seem to not see. i tested this on several different computers/laptops using firefox and chrome. that being said, when i had designed my chat for messages scrolling up, to avoid that issue, i set it up to use mainly css to control the scroll and that method seems to work across all browsers that i have tested with as well as devices. i'm just letting you know that there is another way to control message scroll ;)

Re: [RC] mChat

Posted: Sat Sep 24, 2016 12:46 pm
by Leggy
Hi,

Being a complete idiot i was having troubles with an associated ext for mchat (mChat.2.0.0-RC5.board3.extension)

I deleted some database entries and wondered if anyone knew in which file i can find the mchat's database original mysql tables entries so i can manually rebuild it.

I am unable to access our site due to the missing mysql entries, any help will be greatly appreciated.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 1:08 pm
by kasimi
spaceace wrote:i set it up to use mainly css to control the scroll
Can you point me to an example or to the respective code in your extension?
Leggy wrote:in which file i can find the mchat's database original mysql tables entries
phpBB uses migrations to populate the database. You can find mChat's migrations in ext/dmzx/mchat/migrations.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 1:25 pm
by Leggy
ah i see that , thanks for the swift response,

Can i just point my browser to that file for it to repopulate the database with the relevant tables ??

Again thanks for your time

Re: [RC] mChat

Posted: Sat Sep 24, 2016 1:39 pm
by kasimi
No, that won't work. Running all migrations while some of the schema is still present will likely produce errors. I would try this: install a clean board with only mChat, export the schema that is missing on your live board and import it in on your live board. No idea if it works but that would be my second approach. The first one is restoring a backup. :)

Re: [RC] mChat

Posted: Sat Sep 24, 2016 1:46 pm
by Leggy
ok thanks, i will give that a go.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 1:53 pm
by spaceace
kasimi wrote:Can you point me to an example or to the respective code in your extension?

the js part...
https://github.com/LMOspaceace/ajaxchat ... #L179-L185

the css to go with it...
https://github.com/LMOspaceace/ajaxchat ... #L382-L385

the js serves partially to scroll as well as stops the autoscroll of messages when hovering while going through previous/older messages

Re: [RC] mChat

Posted: Sat Sep 24, 2016 4:48 pm
by Leggy
kasimi wrote:No, that won't work. Running all migrations while some of the schema is still present will likely produce errors. I would try this: install a clean board with only mChat, export the schema that is missing on your live board and import it in on your live board. No idea if it works but that would be my second approach. The first one is restoring a backup. :)
Thanks for the help, creating the tables on a fresh install worked, thanks for that, very much appreciated.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 5:10 pm
by Marshmellooo
So I've added something to my forum and i would like to have the mchat always at the bottom
I have the global user display of mchat set to the bottom and I don't want users to change the location so i've change the permissions but it still shows for some users on top

Could anybody help?

Regards

Re: [RC] mChat

Posted: Sat Sep 24, 2016 5:13 pm
by kasimi
Leggy wrote:Thanks for the help, creating the tables on a fresh install worked, thanks for that, very much appreciated.
Thanks for confirming. It might help others in the future.
spaceace wrote:the js part
dmzx reported a similar issue with the flash BBCode. It looks like mChat's scrolling fails because the height is calculated before the full content is loaded. I got it fixed by continuing to scroll until the bottom is reached. For those who want to test the code: https://github.com/kasimi/mChat/commit/ ... 9ce616ae66

spaceace, you're kind of cheating in your JS as you delay the scrolling for a constant 200 ms. Granted, it's unlikely that the calculation of the message height takes longer than that, but it doesn't feel clean. Also, I think you want to use setTimeout() instead of setInterval(). As far as I can see you never cancel the timeout and start another one for each new message which starts clogging your CPU pretty heavily because of the constant checks whether the message container needs scrolling.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 5:21 pm
by kasimi
Marshmellooo wrote:i've change the permissions
To make sure the permission takes effect go to the ACP -> Users & Groups -> Manage user page for a user who has this problem. Go the Preferences page of that user and make sure the option Location on the index page is greyed out and set to bottom. If it isn't greyed out you missed a permission.

Re: [RC] mChat

Posted: Sat Sep 24, 2016 5:50 pm
by Marshmellooo
Ah, my bad i was missing some permissions :D
Thanks anyways

Regards