Ciao caro!
First: the mChat wp forum post
https://wordpress.org/support/topic/w3a ... -procedure
... there is nothing i can imagine, i, like anybody else at this point, if i do not see an online example that let me see the code on console/DOM, because ...
Allora ... i just activated the mchat, with v5 code and it result to work fine.
I'm testing into phpBB 3.3.0 and prosilver
I'm on wp 5.5, since into my localhost the wp at moment, under php 7.4.7 (but it is probably not the reason of the problem), refuse to update (and i see it is a problem of many on last 5.5)
I downloaded the plugin 2.3.9, and replaced into this test on localhost, all plugin files (patched last days to fix something about mChat widgets/shortcode) to be sure i'm with all plugin's patches applied.
I installed mChat into the linked phpBB, and applied on ACP, for the group admins, which i'm testing the user i'm logged in with, that is an admin, under Groups permissions, advanced, Set to yes all permissions about mchat, then saved.
Then i activated the mChat widget into wp, and works fine.
At this point, the mChat display with all phpBB header and footer inside the widget: so as suggested into the post at wp.org, i applied into
overall_footer.html, as reported on procedure, this code (that's exactly the same, i changed nothing into my working test):
Just after:
<!-- EVENT overall_footer_body_after -->
add the follow:
Code: Select all
<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>
May the documentation lack to remember, because it is not mentioned (not sure i've not re-read the procedure) that is by the way inline into this file:
/wp-content/wp-w3all-phpbb-integration/addons/custom_js_css.php
this part that need to be switched if:
/* activate this only if on shortcode mode */
Code: Select all
<style type="text/css">
#w3all_phpbb_mchat_iframe{
/* activate this only if on shortcode mode */
/* position:absolute;top:0px; */
}
which i do not activated, since i'm on
widget test, and not shortcode
All seem to work fine into my fly test. phpBB Header and Footer hidden on widget. May some theme differ by the default prosilver, and the code need to be adjusted to match correct DOM elements, it is easy do for javascript programmers, even if not so skilled like me
The correct result that display to me in prosilver raw/fly test:
- wpMchat.png (25.57 KiB) Viewed 3512 times
- wpMchatsub.png (13.28 KiB) Viewed 3512 times
All will be updated soon, it is a raw procedure that can be improved to be easier and perfect.