[Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Forum rules
This forum is not for support requests.

Only post Modifications for Board3 Portal 1.0.x in this forum.

MadTaffy
Active Member
Posts: 17
Joined: 2. December 2010 03:29
phpBB.com User: MadTaffy

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by MadTaffy »

Hi!

Is there any difference if i'm using mchat_new_version_1_3_4

reason i'm asking is i've found all the files and made the edits but still no chat box on the portal page?

Is there any config i need to do in the acp?

Edits (no portal view installed)

additional_blocks.html

Code: Select all

if (!defined('IN_PHPBB') || !defined('IN_PORTAL'))
{
   exit;
}
    // mChat Block for Board3 Portal 1.0.5 and 1.0.6
    if($load_center)
    {
       if(!defined('MCHAT_INCLUDE'))
       {
          define('MCHAT_INCLUDE', true);
       }
       if(!function_exists('mchat_obtain_guest_count'))
       {
          $mchat_include_index = true;
          include($phpbb_root_path . 'mchat.' . $phpEx);
       }
    }
    // mChat Block END
?>
portal_centre.html

Code: Select all

	<!-- ELSE -->
		<!-- INCLUDE portal/block/news.html -->
	<!-- ENDIF -->
<!-- ENDIF -->
    <!-- INCLUDE mchat_body.html -->
<!-- INCLUDE portal/block/additional_blocks_center.html -->

<!-- IF S_DISPLAY_POLL -->
	<!-- INCLUDE portal/block/poll.html -->
<!-- ENDIF -->
User avatar

Topic author
Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by Marc »

I haven't tried the new version yet. I'll take a look at it as soon as I have some spare time.

MadTaffy
Active Member
Posts: 17
Joined: 2. December 2010 03:29
phpBB.com User: MadTaffy

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by MadTaffy »

Thanks marc that would be much appreciated,

Just a heads up the link quoted in the first post takes you to the latest "mchat_new_version_1_3_4" and not mChat 1.2.17 by RMcGirr83 to get that you need to open the revisions, just thought it might be worth a mention!

I've not tested 1.2.17 on phpbb3.0.8 and I would rather stick to the latest version of mchat that i know works with 0.8, but i would really like to get the mchat on the portal, so i look forward to seeing what you come up with!

Again thanks :D

MT

RMcGirr83
Active Member
Posts: 4
Joined: 11. December 2010 05:06
phpBB.com User: RMcGirr83

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by RMcGirr83 »

Hello, please try changing this

Code: Select all

if (!defined('IN_PHPBB') || !defined('IN_PORTAL'))
{
   exit;
}
    // mChat Block for Board3 Portal 1.0.5 and 1.0.6
    if($load_center)
    {
       if(!defined('MCHAT_INCLUDE'))
       {
          define('MCHAT_INCLUDE', true);
       }
       if(!function_exists('mchat_obtain_guest_count'))
       {
          $mchat_include_index = true;
          include($phpbb_root_path . 'mchat.' . $phpEx);
       }
    }
    // mChat Block END
?>
to this instead

Code: Select all

if (!defined('IN_PHPBB') || !defined('IN_PORTAL'))
{
   exit;
}
    // mChat Block for Board3 Portal 1.0.5 and 1.0.6
    if($load_center)
    {
       if(!defined('MCHAT_INCLUDE'))
       {
          define('MCHAT_INCLUDE', true);
       }
       if(!function_exists('mchat_cache'))
       {
          $mchat_include_index = true;
          include($phpbb_root_path . 'mchat.' . $phpEx);
       }
    }
    // mChat Block END
?>
though this would probably work as well

Code: Select all

if (!defined('IN_PHPBB') || !defined('IN_PORTAL'))
{
   exit;
}
    // mChat Block for Board3 Portal 1.0.5 and 1.0.6
    if($load_center)
    {
		// BEGIN mChat Mod
		$mchat_installed = (!empty($config['mchat_on_index']) && !empty($config['mchat_enable'])) ? true : false;
		if(!defined('MCHAT_INCLUDE') && $mchat_installed && $auth->acl_get('u_mchat_view') && $user->data['user_mchat_index'])
		{
			define('MCHAT_INCLUDE', true);
			$mchat_include_index = true;
			include($phpbb_root_path . 'mchat.' . $phpEx);
		}
		// END mChat Mod
	}
    // mChat Block END
?>
the function that Marc referenced to from the 1.2.17 version was removed from the code (because it now has it's own sessions table) and thanks Marc for the add-on to get the two mods to work together. :)

MadTaffy
Active Member
Posts: 17
Joined: 2. December 2010 03:29
phpBB.com User: MadTaffy

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by MadTaffy »

Hi RMcGirr83,

Many thanks for taking the time to write that out for me, tbh it was on a test board and due to adding to many mods and getting carried away i've messed it up big time so i'm now starting from scratch again, but this will be perfect when i get back to the this stage and of course i'll let you know how i get on,

Again many thanks, its much appreciated!

RMcGirr83
Active Member
Posts: 4
Joined: 11. December 2010 05:06
phpBB.com User: RMcGirr83

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by RMcGirr83 »

User avatar

Topic author
Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by Marc »

Thank you, I updated the first post. Both edits are a little bit different, since S_MCHAT_ENABLE somehow was true and it kept displaying the mChat even though the PHP file hasn't been executed. That shouldn't happen now.

RMcGirr83
Active Member
Posts: 4
Joined: 11. December 2010 05:06
phpBB.com User: RMcGirr83

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by RMcGirr83 »

Cheers Mark, though this may give an unwanted result
$mchat_installed = (!empty($config['mchat_on_index']) && !empty($config['mchat_enable'])) ? true : false;
as it may not matter to the Admin if displaying the mod on the portal acts the same as displaying it on the index page.
User avatar

Topic author
Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by Marc »

That's why I didn't add it. ;)

I updated the first post again in order to prevent the inclusion of mChat if the user is not authorized to use it, as you suggested on your site.

RMcGirr83
Active Member
Posts: 4
Joined: 11. December 2010 05:06
phpBB.com User: RMcGirr83

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by RMcGirr83 »

:D

FWIW, this may present a problem

Code: Select all

   // mChat Block for Board3 Portal 1.0.5 and 1.0.6
   if($load_center)
   {
      if(!defined('MCHAT_INCLUDE'))
      {
         define('MCHAT_INCLUDE', true);
      }
      if(!function_exists('mchat_cache') && !empty($config['mchat_enable']) && $auth->acl_get('u_mchat_view'))
      {
         $mchat_include_index = true;
         include($phpbb_root_path . 'mchat.' . $phpEx);
      }
      $template->assign_var('S_MCHAT_PORTAL', true);
   }
   // mChat Block END

Code: Select all

<!-- IF S_MCHAT_PORTAL --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
according the code you posted in the first post, if the user does not have the auths to view the chat, they will still see the chat html file as the template var will still pass as true. There is switch that is set within includes/functions.php that checks for the auths and such as is

Code: Select all

'S_MCHAT_ENABLE'		=> (!empty($config['mchat_enable']) && $auth->acl_get('u_mchat_view')) ? true : false,
So I would probably use that within the html to include the file. ;)
User avatar

Topic author
Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by Marc »

Now it should be correct. The S_MCHAT_PORTAL of course should be inside the brackets of the above if-statement. The problem with using S_MCHAT_ENABLE is that if the user forgets to edit the additional_blocks.php by accident or removes it and forgets to remove the code inside the HTML file, the mChat block will still display. By using S_MCHAT_PORTAL, we can make sure that the normal user won't see a weird looking block just because someone forgot to edit the additional_blocks.php.

intempest
Active Member
Posts: 3
Joined: 2. February 2011 10:17
phpBB.de User: intempest
phpBB.com User: intempest

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by intempest »

Hello, i've been reading through the forums and have re read this one several times. i did the edits, and nothing is posted on the portal page. on the 2nd page of this thread i was completely lost as to which files you were talking about editing. I have mchat working on this board, but nothing comes into the center custom portal. Is there a line of code i need to enter in the ACP? Is there a new module that has to be enabled? or maybe another little something i may have missed. I'm just alittle lost ^^;

My board is
http://furandfeathers.org/phpBB3/portal.php

thank you very mch
User avatar

Four Symbols
Active Member
Posts: 1
Joined: 2. February 2011 13:31

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by Four Symbols »

Thanks for this great mod. After a few problems with the installation and style (vistablue) integration, it works fine and looks great: http://www.forum.friendsofzep.de
...and remember the days of old,
when magic filled the air...

Efferd75
Active Member
Posts: 30
Joined: 9. April 2011 04:23

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by Efferd75 »

Guten Abend

Ich habe folgendes installiert:

phpbb 3.0.8 ( prosilver Style ) + Portal 1.0.6 + Gallery 1.0.6 + Portal Gallery Block + Portalview 1.0.0rc3 & mchat 1.3.5

Ich habe es so gemacht das der chat nur im Portal und nicht im Forum selbst zu sehen ist. Jetzt möchte ich aber, das der chat nicht im Center Block ist sonden links ganz oben.
Hab schon versucht die entsprechenden Zeilen in die prosilver/template/portal/portal_left.html einzubauen, wenn ich das aber hochlade, alles aktualiesiere & den cache leere kommt eine Fehlermeldung.

Dann wüsste ich gerne, wie oder wo ich die überschrift des chats ändern und zentrieren kann.

Vielleicht kann mir da jemand weiterhelfen.

Forum
User avatar

Topic author
Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München

Re: [Release] mChat Block for Board3 Portal 1.0.5 & 1.0.6

Post by Marc »

Es wäre schön zu wissen was für eine Fehlermeldung du bekommst.

Ich schätze aber mal, dass du vielleicht nicht ganz korrekt kopiert hast. Achte darauf, dass wenn es ein <!-- IF ... --> gibt muss es auch ein <!-- ENDIF --> geben. ;)

Return to “board3 Portal v1.0.x - Modifications”