Support » Plugin: WP w3all phpBB » w3all WordPress phpBB mChat integration procedure

  • Resolved traktor

    (@_traktor_)


    Warning: unserialize() expects parameter 1 to be string, array given in /home/public_html/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php on line 2222
    Wordpress, Version: 5.5
    WordPress w3all phpBB integration, Version: 2.3.9
    phpbb 3.3
    extension mChat version: 2.1.3

    If you use the widget(Display the phpBB mChat into a widget):
    Warning: in_array() expects parameter 2 to be array, null given in /home/public_html/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all.widgets-phpbb.php on line 194

    • This topic was modified 5 months ago by traktor.
    • This topic was modified 5 months ago by traktor.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 16 through 28 (of 28 total)
  • Made simpler: added height: 600px to files wp_w3all_phpbb_mchat.php and wp_w3all_phpbb_mchat_short.php;

    <iframe id = "w3all_phpbb_mchat_iframe" name = "w3all_phpbb_mchat_iframe" style = "height: 600px; width: 1px; min-width: 100%; * width: 100%; border: 0;" scrolling = "no" src = "<? php echo $ w3all_url_to_cms_mchat;?>"> </iframe>

    <iframe id = "w3all_phpbb_mchat_iframe" name = "w3all_phpbb_mchat_iframe" style = "height: 600px; width: 1px; min-width: 100%; * width: 100%; border: 0;" scrolling = "no" src = "<? php echo $ w3all_url_to_cms. '/app.php/mchat#w3allmchatif';?>"> </iframe>

    Chat is inserted by the widget.
    How to clear or hide?

    <div id="mchat-legend">
    <div id="page-footer" class="page-footer" role="contentinfo">
    <div id="page-header">
    Plugin Author axew3

    (@axewww)

    Hide the widget, let say, to an user with no specified WP capabilities?
    Or if do not belong to specified phpBB group?

    • This reply was modified 4 months, 3 weeks ago by axew3.
    • This reply was modified 4 months, 3 weeks ago by axew3.

    The widget is displayed in the chat frame. How do I remove (hide) div blocks from the html code of the frame and leave only the chat code ?

    <div id="mchat-legend">
    <div id="page-footer" class="page-footer" role="contentinfo">
    <div id="page-header">
    Plugin Author axew3

    (@axewww)

    mChat iframe, display inside the WP widget.

    <div id="mchat-legend">
    <div id="page-footer" class="page-footer" role="contentinfo">
    <div id="page-header">

    i did not understand the question. Can you provide a screenshot of the problem or where you find the above code?

    https://wordpress.org/support/topic/w3all-wordpress-phpbb-mchat-integration-procedure/#post-13323542
    do you mean this? If not, sorry, please try with a screenshot to make me understand what you want to hide and where

    1. wp-admin/widgets.php
    2. Display the phpBB mChat into a widget -> Display mChat only to logged in users? No
    3. wp-admin/options-general.php?page=wp-w3all-options
    4. phpBB mChat integration -> Yes
    5. Activate [w3allcustomiframe] shortcode -> Yes
    6. open site
    7. viewing the html code of the site

    how to remove completely div block?

    <div id=”page-footer” class=”page-footer” role=”contentinfo”>

    <div id=”mchat-legend”>

    <div id=”page-header”>

    widget mchat

    Plugin Author axew3

    (@axewww)

    There is an online example i can check?
    Because i just installed and tested mChat fully working into prosilver, that ADDING THE code into overall_footer.html correctly hide on widget, the phpBB header and footer.
    If i can take a look to an example, i can see where the problem is in your case, may caused by a theme? Are you in prosilver?

    Plugin Author axew3

    (@axewww)

    The V5 iframe code has been patched to consider mChat integration, missed since V4.

    It is required to change with the new patched, ONLY the overal_footer.html js code:
    https://www.axew3.com/w3/2020/01/phpbb-wordpress-template-integration-iframe-v5/

    May your example was not working due to this lacked consideration, even if you added the other js snippet code, only related to mChat?

    Plugin Author axew3

    (@axewww)

    And the procedure also, because containing not required steps, due to new patched and V5 code.

    If still any problem, let know, i finally re-installed and activated/tested the mChat code. It will be rewritten/improved soon, in the while should work quite fine now.

    Plugin Author axew3

    (@axewww)

    Hey! I’ve got the reply, that seem moderators here removed … awesome result, after all this discussion. But the scroll do not work? And you gived up the toogle button?

    You gone ahead !
    Look so nice in this example, the mchat integrated into wordpress:
    https://zpod.by/obratnaya-svyaz/

    Something little still need to be fixed.
    If any question let know

    p.s i see the scroll work fine, it do not work when you move from mchat to forum, when you click into forum link or some other link that display another phpbb page, that is not mchat

    • This reply was modified 4 months, 2 weeks ago by axew3.

    Everything turned out better than I expected. However, there is no flexibility in the code (plugin) to connect the chat to WordPress. Code minimization and the flexibility of integrating bbphp and wordpress are also relevant.

    Hey! I’ve got the reply, that seem moderators here removed … awesome result, after all this discussion. But the scroll do not work? And you gived up the toogle button?

    Site guests can only watch, registered users – full access to the chat (there is also a button to send a message in the chat – to support mobile devices).

    p.s i see the scroll work fine, it do not work when you move from mchat to forum, when you click into forum link or some other link that display another phpbb page, that is not mchat

    Access to the forum is organized in a different way – direct link (link). Forced measure due to user registration only in wordpress.

    Currently, it is relevant to completely remove <div id = ”page-footer” class = ”page-footer” role = ”contentinfo”> <div id = ”mchat-legend”> <div id = ”page-header”> in the widget wordpress chat due to lack of need.

    Plugin Author axew3

    (@axewww)

    Well done!
    I will go to ask to kasimi (if not wrong it is the name of mchat ext author), any day, if he can consider to add something by default into the mod, as option, that would be a nice thing to integrate mchat iframed: a particular minimized template.
    I will do after phpBB ext images rotation example i’m just doing, that will be supported (seem) from dev version to validated ext, by a cool phpBB guy (or more then one since it will be published into guthub as requested).
    I will re-take a look into how the mchat is done, i’m quite sure there are several things that can be simpler and improved, that i recognize now, and not at the time code was written.

    If any news in the while, let know! cheers!

    traktor

    (@_traktor_)

    Create a chat.php file in the forum root (where app.php is) with the following content:

    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();
    page_header('_Chat_');
    $template->set_filenames(array(
        'body' => 'aboltus.html',
    ));
    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
    // add mchat
    global $phpbb_container, $user, $auth, $template;
    if ($phpbb_container->has('dmzx.mchat.settings') && $auth->acl_get('u_mchat_view')){
        // We use the page_index() method to render mChat so we need to enable mChat on the index page only for this request
        $user->data['user_mchat_index'] = 1;
        $phpbb_container->get('dmzx.mchat.settings')->set_cfg('mchat_index', 1, true);
        $phpbb_container->get('dmzx.mchat.core')->page_index();
        $template->assign_var('MCHAT_PAGE', 'mchat_on_faq_page');
    }
    page_footer();
    ?>

    Create aboltus.html file in {forum\styles\prosilver\template\} with content:

    <!DOCTYPE html>
    <html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
    <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    {META}
    <link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
    <link href="{T_STYLESHEET_LINK}" rel="stylesheet">
    <link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet">
    <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
    	<link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
    <!-- ENDIF -->
    <!-- IF S_PLUPLOAD -->
    	<link href="{T_THEME_PATH}/plupload.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
    <!-- ENDIF -->
    <!-- IF S_COOKIE_NOTICE -->
    	<link href="{T_ASSETS_PATH}/cookieconsent/cookieconsent.min.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
    <!-- ENDIF -->
    <!--[if lte IE 9]>
    	<link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
    <![endif]-->
    <!-- EVENT overall_header_head_append -->
    {$STYLESHEETS}
    <!-- EVENT overall_header_stylesheets_after -->
    </head>
    <body id="phpbb" class="nojs notouch section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
    <!-- EVENT overall_header_body_before -->
    <div id="wrap" class="wrap">
    	<!-- EVENT overall_header_page_body_before -->
    	<div id="page-body" class="page-body" role="main">
    		<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
    		<!-- ENDIF -->
    		<!-- EVENT overall_header_content_before -->
    <!-- IF MCHAT_PAGE == 'mchat_on_faq_page' -->
    <!-- INCLUDE @dmzx_mchat/mchat_body.html -->
    <!-- ENDIF -->
    		<!-- EVENT overall_footer_content_after -->
    	</div>
    <!-- EVENT overall_footer_page_body_after -->
    </div>
    <script src="{T_JQUERY_LINK}"></script>
    <!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
    <script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
    <!-- INCLUDEJS forum_fn.js -->
    <!-- INCLUDEJS ajax.js -->
    <!-- IF S_COOKIE_NOTICE -->
    	<script src="{T_ASSETS_PATH}/cookieconsent/cookieconsent.min.js?assets_version={T_ASSETS_VERSION}"></script>
    	<script>
    		if (typeof window.cookieconsent === "object") {
    			window.addEventListener("load", function(){
    				window.cookieconsent.initialise({
    					"palette": {
    						"popup": {
    							"background": "#0F538A"
    						},
    						"button": {
    							"background": "#E5E5E5"
    						}
    					},
    					"theme": "classic",
    					"content": {
    						"message": "{LA_COOKIE_CONSENT_MSG}",
    						"dismiss": "{LA_COOKIE_CONSENT_OK}",
    						"link": "{LA_COOKIE_CONSENT_INFO}",
    						"href": "{UA_PRIVACY}"
    					}
    				});
    			});
    		}
    	</script>
    <!-- ENDIF -->
    <!-- EVENT overall_footer_after -->
    {$SCRIPTS}
    <!-- EVENT overall_footer_body_after -->
    </body>
    </html>

    edit file: /wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_mchat.php

    <iframe id="w3all_phpbb_mchat_iframe" name="w3all_phpbb_mchat_iframe" style="height:300px;width:1px;min-width:100%;*width:100%;border:0;" scrolling="no" src="<?php echo $w3all_url_to_cms . '/chat.php#w3allmchatif'; ?>"></iframe>

    File archive: https://drive.google.com/drive/folders/1ct3Ris8FNhQJMpZSlXKveMTycJoKYJcb?usp=sharing

Viewing 13 replies - 16 through 28 (of 28 total)
  • You must be logged in to reply to this topic.