Show mchat on all pages

Support area for phpBB's mChat extension
Markus
Donor
Posts: 15
Joined: 11 Mar 2018, 20:19

Show mchat on all pages

#1

Post by Markus » 04 Aug 2018, 06:52

Hi,

Would it be possible to program the Mchat so that the Mchat can be seen on all pages ?

The Shillbox of Killbill can do that.

I finally want to get away from this jv shoutbox and would like to use the mchat.

Especially since the JV Shoutbox is always connected to its domain. If his domain is not callable, then the whole shoutbox hangs. :(

Thanks in advance.

User avatar
kasimi
mChat developer
Posts: 728
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Show mchat on all pages

#2

Post by kasimi » 04 Aug 2018, 09:28

Hi Markus,

yes, that's certainly possible. The instructions are here: [HowTo] Add mChat on any page of your board. If you want mChat displayed on every page, without exception, you should take look at the page_header() function in includes/functions.php, as well as the overall_header.html or overall_footer.html template file, depending on where exactly on the page you want to display mChat.

If you want to display mChat similar to Facebook chat, have a look at the mChat Sticky Footer addon. You can test this extension on this board, just go to your UCP and enable Display mChat at the bottom of every page in the mChat tab.

Markus
Donor
Posts: 15
Joined: 11 Mar 2018, 20:19

Re: Show mchat on all pages

#3

Post by Markus » 04 Aug 2018, 11:15

Thank you kasimi.

But I can not get it without mistakes.

Can you please tell me exactly where it comes into the functions.php and where exactly in the overall_header.

I want to have the mchat on every page.

Many Thanks

User avatar
kasimi
mChat developer
Posts: 728
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Show mchat on all pages

#4

Post by kasimi » 05 Aug 2018, 10:49

Hi Markus,

I haven't tested this but here's how I would go about it:
  1. Add the code from the HowTo's first step here.
  2. Put the HTML code from the second step either here if you want to display mChat at the top of every page, or here for bottom. Basically you can put the HTML anywhere you want as long as it's inside the <body> element, you just need to find a place where you like it best.
Please check the index page and mChat's custom and archive pages after you've done the edits, as you might be seeing mChat twice on those pages. Report pack if you have any issues.

Markus
Donor
Posts: 15
Joined: 11 Mar 2018, 20:19

Re: Show mchat on all pages

#5

Post by Markus » 05 Aug 2018, 10:57

I made the changes as you wrote.

put it in the overall_header.html.


The mchat can now be seen on all pages. But on the index side, the mchat is now 2 times. :(

And if you log out, then the logo is gone and that is displayed.

Image

User avatar
kasimi
mChat developer
Posts: 728
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Show mchat on all pages

#6

Post by kasimi » 05 Aug 2018, 11:14

I updated the first two lines of PHP code in the HowTo topic. This should fix the broken display issue when being logged, please test.

Markus
Donor
Posts: 15
Joined: 11 Mar 2018, 20:19

Re: Show mchat on all pages

#7

Post by Markus » 05 Aug 2018, 11:18

ok if you log out, then everything goes back.

Thank you.

Unfortunately, the Mchat can still be seen twice on the index page.

User avatar
kasimi
mChat developer
Posts: 728
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Show mchat on all pages

#8

Post by kasimi » 05 Aug 2018, 12:44

Are you using phpBB 3.2.1 or later? Then try this to fix mChat being displayed twice:
  • Open includes/functions.php
  • Find:

    Code: Select all

    if ($phpbb_container->has('dmzx.mchat.settings') && $auth->acl_get('u_mchat_view'))
  • Replace with:

    Code: Select all

    if ($phpbb_container->has('dmzx.mchat.settings') && $auth->acl_get('u_mchat_view') && !$template->retrieve_var('MCHAT_PAGE'))

Markus
Donor
Posts: 15
Joined: 11 Mar 2018, 20:19

Re: Show mchat on all pages

#9

Post by Markus » 05 Aug 2018, 12:49

I use 3.2.2

After this change, the Mchat is only 1 time to see and on all sides.

Thanks a lot for this.

Can not change the next update of the mchat that he can be seen on all pages or where you can set in ACP where he should be displayed everywhere.

That would be great.

Because if you z.b. update from phpbb makes use of multiple styles, you always have to add everything manually.

User avatar
kasimi
mChat developer
Posts: 728
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Show mchat on all pages

#10

Post by kasimi » 05 Aug 2018, 12:56

I'm glad it works. :+1:

Did you have a look at the Sticky Footer addon? It does what you want, except that it displays mChat in the bottom right corner, and because it's a separate extension it will survive any future update of both mChat and phpBB.

Post Reply

Who is online

Users browsing this forum: andares and 2 guests