w3all WordPress phpBB mChat integration procedure
-
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.3If 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 4 years, 3 months ago by traktor.
- This topic was modified 4 years, 3 months ago by traktor.
The page I need help with: [log in to see the link]
-
Hello! little delay … Thank for report
It is a long time ago addition, never more tested up.
It will be re-checked on 2.4.1>, maybe not on first 2.4.0.I can follow fixing on fly, even if not directly having the time to test it at moment, so please let know if it still need to be fixed because you note some error.
The file class.wp.w3all.widgets-phpbb.php will be patched on plugin repository asap
Download here for the moment:
[removed]
download link belowThe file has been patched on repository, so you can download directly it from here:
https://plugins.trac.www.ads-software.com/export/HEAD/wp-w3all-phpbb-integration/trunk/class.wp.w3all.widgets-phpbb.phpreplace
/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all.widgets-phpbb.php
with the new patchedWarning: unserialize() expects parameter 1 to be string, array given in /home/public_html/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all.widgets-phpbb.php on line 193
Warning: in_array() expects parameter 2 to be array, bool given in /home/public_html/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all.widgets-phpbb.php on line 194
What other options are there?
PHP version 7.3.21
WordPress Plugins Status of installed plugins.
Broken Link Checker (broken-link-checker) – Version 1.11.14 Active
BulletProof Security (bulletproof-security) – Version 4.1 Active
Compress JPEG & PNG images (tiny-compress-images) – Version 3.2.1 Inactive
Email Users (email-users) – Version 4.8.8 Inactive
Filenames to latin (filenames-to-latin) – Version 2.7 Active
Force Regenerate Thumbnails (force-regenerate-thumbnails) – Version 2.0.6 Inactive
Geolocation IP Detection (geoip-detect) – Version 3.1.1 Active
Google XML Sitemaps (google-sitemap-generator) – Version 4.1.1 Active
hideShowPassword (wp-hide-show-password-master) – Version 2.1.0 Active
Image Cleanup (image-cleanup) – Version 1.9.2 Inactive
Innovation Core (innovation-core) – Version 1.0 Active
Kama SpamBlock (kama-spamblock) – Version 1.8 Active
Loco Translate (loco-translate) – Version 2.4.2 Active
Mistape (mistape) – Version 1.3.8 Active
Passwordless Login (passwordless-login) – Version 1.1.1 Active
Quotes Collection (quotes-collection) – Version 2.5.2 Active
Really Simple CAPTCHA (really-simple-captcha) – Version 2.0.2 Active
RSS for Yandex Turbo (rss-for-yandex-turbo) – Version 1.28 Active
RusToLat (rustolat) – Version 0.3 Active
Sabai (sabai) – Version 1.4.7 Active
Sabai Discuss (sabai-discuss) – Version 1.4.7 Active
SEO Friendly Images (seo-image) – Version 3.0.5 Inactive
Snow Storm (snow-storm) – Version 1.4.5 Inactive
Terms Descriptions (terms-descriptions) – Version 3.3.8 Active
The Events Calendar (the-events-calendar) – Version 4.7.3 Active
The Events Calendar PRO (events-calendar-pro) – Version 4.5 Active
Tiled Galleries Carousel Without Jetpack (tiled-gallery-carousel-without-jetpack) – Version 3.1 Active
User Role Editor (user-role-editor) – Version 4.56 Active
Wordfence Security (wordfence) – Version 7.4.10 Active
WordPress w3all phpBB integration (wp-w3all-phpbb-integration) – Version 2.3.9 Active
WP-Polls (wp-polls) – Version 2.75.5 Active
WP-UserOnline (wp-useronline) – Version 2.87.5 Active
WP No Category Base (wp-no-category-base) – Version 1.1.1 Active
WP Retina 2x (wp-retina-2x) – Version 5.6.1 Inactive
WP User Avatar (wp-user-avatar) – Version 2.2.7 Activethank for report, the file
class.wp.w3all-phpbb.php
has been patched, download here:
https://plugins.trac.www.ads-software.com/export/HEAD/wp-w3all-phpbb-integration/trunk/class.wp.w3all-phpbb.phpreplace
/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php
with the new patchedP.s : as explained on the procedure, phpBB, by default, do not populate the phpbb_acl_groups table by default.
So the query fail, return null.What you have to do to fix the issue is the follow:
access ACP -> TAB Users and Group
Then choose the menu Groups -> Groups permissionsNow choose a group, and submit, on next page
click Advanced permission, change a value into something (like Can save drafts) and click Apply permissions.So phpBB populate the needed table with proper values.
If you want to skip all the joke, you could edit the file
class.wp.w3all.widgets-phpbb.php
open it and where line
$ucan_view_chat = false;
change into
$ucan_view_chat = true;
that mean any user, despite phpBB settings, will be able to see the chat in WP.
Let know if still in trouble or more errors- This reply was modified 4 years, 3 months ago by axew3.
that mean any user, despite phpBB settings, will be able to see the chat in WP.
Let know if still in trouble or more errorswell not exactly: will be able to load the chat container widget, but the chat will display with settings of phpBB, so any options applied to the user, will reflect the same, like so: if user can’t see or use the chat in phpBB, this will be the same of course
-rw-r–r– 1 qwerty qwerty 6582 Aug 8 21:13 class.wp.w3all-admin.php
-rw-r–r– 1 qwerty qwerty 167790 Aug 8 21:13 class.wp.w3all-phpbb.php
-rw-r–r– 1 qwerty qwerty 13634 Aug 26 09:10 class.wp.w3all.widgets-phpbb.php
-rw-r–r– 1 qwerty qwerty 27 Aug 8 21:13 index.php
drwxr-xr-x 2 qwerty qwerty 4096 Aug 8 21:13 languages/
-rw-r–r– 1 qwerty qwerty 78596 Aug 8 21:13 readme.txt
drwxr-xr-x 2 qwerty qwerty 4096 Aug 8 21:13 views/
-rw-r–r– 1 qwerty qwerty 70087 Aug 8 21:13 wp_w3all.phpclass.wp.w3all.widgets-phpbb.php
if(in_array("u_mchat_view",$user_caps)){ // can view chat? $ucan_view_chat = true; } else { $ucan_view_chat = true; }
Warning: unserialize() expects parameter 1 to be string, array given in /home/public_html/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all.widgets-phpbb.php on line 193
Warning: in_array() expects parameter 2 to be array, bool given in /home/public_html/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all.widgets-phpbb.php on line 194
- This reply was modified 4 years, 3 months ago by traktor.
What you have to do to fix the issue is the follow:
access ACP -> TAB Users and Group
Then choose the menu Groups -> Groups permissionsNow choose a group, and submit, on next page
click Advanced permission, change a value into something (like Can save drafts) and click Apply permissions.So phpBB populate the needed table with proper values.
Done. How to check the result via phpmyadmin?
Table
phpbb_acl_groups
that is linked with
phpbb_acl_optionsbut you should have no php errors for the mchat widget now.
in case it display or not due to population of mentioned table.
I’ve now activated it into a test, and go fine, isn’t it in your side?did you updated the file class.wp.w3all-phpbb.php as linked in last post?
- This reply was modified 4 years, 3 months ago by axew3.
but you should have no php errors for the mchat widget now.
in case it display or not due to population of mentioned table.
I’ve now activated it into a test, and go fine, isn’t it in your side?did you updated the file class.wp.w3all-phpbb.php as linked in last post?
Updated file class.wp.w3all-phpbb.php – now displayed, no errors. ??
Now how to display only chat as a widget?
Similar to https://www.axew3.com/www/wordpress-rc/sample-page/Place the
[w3allphpbbmchat]
shortcode, into a WP page or post[w3allphpbbmchat] – This shortcode does the same as the “Display the phpBB mChat into a widget” widget.
How to display only the chat in a widget without a logo and menu, similar to how it is done on your page https://www.axew3.com/www/wordpress-rc/sample-page/?Optional: what is needed on line 51 in the file filecustom_js_css.php ?
At this time, i added this code into phpBB overall_footer.html
<script> // a simple mChat style/display example setup for WP if( /#w3allmchatif/ig.exec(document.URL) != null || /#w3allmchatif/ig.exec(document.location.href) != null ){ var boardU = "{BOARD_URL}"; var hnofollow = 0; $( document ).ready(function() { $( "body" ).on("click", "a", function(e) { var href = $(this).attr("href"); if( typeof href != 'undefined' && this.href[this.href.length -1] != '#' && /\?jumpto=/ig.exec(this.href) == null ) { if( href.indexOf(boardU) < 0 || href.indexOf('i=permissions&mode=setting_user_global') > -1 || href.indexOf('/mchat') > -1 ){ //if(href.indexOf('/mchat') > -1){ if( /[.+[\/mchat]$/ig.exec(href) !== null ){ return; } hnofollow = 1; e.preventDefault(); e.stopPropagation(); window.open(href,'_blank'); return; } else { e.preventDefault(); e.stopPropagation(); window.open(href,'_blank'); return; } } }); $( "#page-header,#page-footer" ).css( { "height" : "0px", "max-height" : "0px", "overflow": "hidden" } ); // can't be none, or events will not affect $( ".page-body,#wrap" ).css( { "margin" : "0px", "padding" : "0px" } ); $( ".page-body h2,#mchat-legend" ).css( "display", "none" ); $( "div.mchat-text blockquote div cite a" ).click(function(e) { if( /\?jumpto=/ig.exec(this.href) == null ){ e.preventDefault(); if(hnofollow < 1){ window.open(this.href,'_blank'); } return; } }); $( "div.list-inner span.mchat-title a" ).click(function(e) { e.preventDefault(); window.open(this.href,'_blank'); return; }); $( "body" ).on("click", ".username,.username-coloured,#mchat-legend a,cite a", function(e) { var href = $(this).attr("href"); if( typeof href != 'undefined' && /\?jumpto=/ig.exec(this.href) == null ){ e.preventDefault(); if(hnofollow < 1){ window.open(href,'_blank'); } return; } }); }); // ready } </script>
As initially mentioned, it need to be considered an example, from where to start from, not the best that can be done, or a totally ready and working snippet. It should work fine into the default phpBB template, or may (may not, i did not tested it too much at this time) works fine into any phpBB template that respect default phpBB template html elements.
A note: this code should be added not into overall_header.html, wrapped into jQuery document.ready$(function() {
….
});
not on footer. But phpBB add jQuery on the footer, so you should change this in case, moving instructions that add jQuery into phpBB, from overall_footer.html to overall_header.html.
This would be more convenient because, when jQuery load, the header has been already loaded with all the phpBB page, so for a second you may see header and footer of phpBB, because jQuery instructions that go to hide phpBB html elements, delay on being executed. (hope the explain is quite clear)NOTE:
Just consider the custom_js_css.php AND NOT
the file w3all_custom_js_css.php you find inside addons folder, it is just a test i done, working but not finished, that about to display the phpBB forum, like the mChat, via shortcode or widget etc, into any WP page, or post. It aim to propose a solution where onclick, phpBB display over WP, into any page, opening it into a full popup box.
Full page phpBB, over any WP page, onclick.My promise is to finish this, complete. I stopped the test of it when i saw it works fine into my localhost. When you click outside the full page box, the board close, when you click into button, like the mchat button, the entire phpBB, slide over WordPress. It is really cool.
At this time, i added this code into phpBB overall_footer.html
<script> // a simple mChat style/display example setup for WP if( /#w3allmchatif/ig.exec(document.URL) != null || /#w3allmchatif/ig.exec(document.location.href) != null ){ var boardU = "{BOARD_URL}"; var hnofollow = 0; $( document ).ready(function() { $( "body" ).on("click", "a", function(e) { var href = $(this).attr("href"); if( typeof href != 'undefined' && this.href[this.href.length -1] != '#' && /\?jumpto=/ig.exec(this.href) == null ) { if( href.indexOf(boardU) < 0 || href.indexOf('i=permissions&mode=setting_user_global') > -1 || href.indexOf('/mchat') > -1 ){ //if(href.indexOf('/mchat') > -1){ if( /[.+[\/mchat]$/ig.exec(href) !== null ){ return; } hnofollow = 1; e.preventDefault(); e.stopPropagation(); window.open(href,'_blank'); return; } else { e.preventDefault(); e.stopPropagation(); window.open(href,'_blank'); return; } } }); $( "#page-header,#page-footer" ).css( { "height" : "0px", "max-height" : "0px", "overflow": "hidden" } ); // can't be none, or events will not affect $( ".page-body,#wrap" ).css( { "margin" : "0px", "padding" : "0px" } ); $( ".page-body h2,#mchat-legend" ).css( "display", "none" ); $( "div.mchat-text blockquote div cite a" ).click(function(e) { if( /\?jumpto=/ig.exec(this.href) == null ){ e.preventDefault(); if(hnofollow < 1){ window.open(this.href,'_blank'); } return; } }); $( "div.list-inner span.mchat-title a" ).click(function(e) { e.preventDefault(); window.open(this.href,'_blank'); return; }); $( "body" ).on("click", ".username,.username-coloured,#mchat-legend a,cite a", function(e) { var href = $(this).attr("href"); if( typeof href != 'undefined' && /\?jumpto=/ig.exec(this.href) == null ){ e.preventDefault(); if(hnofollow < 1){ window.open(href,'_blank'); } return; } }); }); // ready } </script>
As initially mentioned, it need to be considered an example, from where to start from, not the best that can be done, or a totally ready and working snippet. It should work fine into the default phpBB template, or may (may not, i did not tested it too much at this time) works fine into any phpBB template that respect default phpBB template html elements.
A note: this code should be added not into overall_header.html, wrapped into jQuery document.ready$(function() {
….
});
not on footer. But phpBB add jQuery on the footer, so you should change this in case, moving instructions that add jQuery into phpBB, from overall_footer.html to overall_header.html.
This would be more convenient because, when jQuery load, the header has been already loaded with all the phpBB page, so for a second you may see header and footer of phpBB, because jQuery instructions that go to hide phpBB html elements, delay on being executed. (hope the explain is quite clear)NOTE:
Just consider the custom_js_css.php AND NOT
the file w3all_custom_js_css.php you find inside addons folder, it is just a test i done, working but not finished, that about to display the phpBB forum, like the mChat, via shortcode or widget etc, into any WP page, or post. It aim to propose a solution where onclick, phpBB display over WP, into any page, opening it into a full popup box.
Full page phpBB, over any WP page, onclick.My promise is to finish this, complete. I stopped the test of it when i saw it works fine into my localhost. When you click outside the full page box, the board close, when you click into button, like the mchat button, the entire phpBB, slide over WordPress. It is really cool.
- The topic ‘w3all WordPress phpBB mChat integration procedure’ is closed to new replies.