[CDB] mChat

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
leschek
Registered User
Posts: 789
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [RC] mChat

Post by leschek » Sat Sep 24, 2016 9:25 am

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?

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3937
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [RC] mChat

Post by kasimi » Sat Sep 24, 2016 9:29 am

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.

leschek
Registered User
Posts: 789
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [RC] mChat

Post by leschek » Sat Sep 24, 2016 9:32 am

Thank you.

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [RC] mChat

Post by spaceace » Sat Sep 24, 2016 11:08 am

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 ;)

Leggy
Registered User
Posts: 4
Joined: Sat Sep 24, 2016 12:41 pm

Re: [RC] mChat

Post by Leggy » Sat Sep 24, 2016 12:46 pm

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.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3937
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [RC] mChat

Post by kasimi » Sat Sep 24, 2016 1:08 pm

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.

Leggy
Registered User
Posts: 4
Joined: Sat Sep 24, 2016 12:41 pm

Re: [RC] mChat

Post by Leggy » Sat Sep 24, 2016 1:25 pm

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

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3937
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [RC] mChat

Post by kasimi » Sat Sep 24, 2016 1:39 pm

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. :)

Leggy
Registered User
Posts: 4
Joined: Sat Sep 24, 2016 12:41 pm

Re: [RC] mChat

Post by Leggy » Sat Sep 24, 2016 1:46 pm

ok thanks, i will give that a go.

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [RC] mChat

Post by spaceace » Sat Sep 24, 2016 1:53 pm

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

Leggy
Registered User
Posts: 4
Joined: Sat Sep 24, 2016 12:41 pm

Re: [RC] mChat

Post by Leggy » Sat Sep 24, 2016 4:48 pm

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.

Marshmellooo
Registered User
Posts: 16
Joined: Tue Aug 23, 2016 8:53 pm

Re: [RC] mChat

Post by Marshmellooo » Sat Sep 24, 2016 5:10 pm

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

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3937
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [RC] mChat

Post by kasimi » Sat Sep 24, 2016 5:13 pm

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.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3937
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [RC] mChat

Post by kasimi » Sat Sep 24, 2016 5:21 pm

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.

Marshmellooo
Registered User
Posts: 16
Joined: Tue Aug 23, 2016 8:53 pm

Re: [RC] mChat

Post by Marshmellooo » Sat Sep 24, 2016 5:50 pm

Ah, my bad i was missing some permissions :D
Thanks anyways

Regards

Locked

Return to “Extensions in Development”