by axew3 » Sat Oct 01, 2016 12:17 pm
WP_w3all will include, as separated plugin/module to be added or used as separated (as it is very easy to achieve and is useful/cool), adding pages with easy on WP admin, without doing nothing manually: until this is not ready, the joke can be resumed on just this:
(WP_w3all installed, but disabled, removing the path if was already configured)
copy the default wp_w3all /addons/page-forum.php into your WP template folder, naming as you like (any name), so you’ll create the same named blank page in WP (excluded
page- and
.php).
The page that will display in this case your forum, that could be anything else, reduced, will look like this (substitute the page-(forum or whatever wasnamed).php code with this):
Code: Select all
<?php
// wp_w3all pages
function wp_w3all_hook_jresizer() {
$s = "<script type=\"text/javascript\" src=\"".plugins_url()."/wp-w3all-phpbb-integration/addons/resizer/iframeResizer.min.js\"></script>
<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>
";
echo $s;
}
add_action('wp_head','wp_w3all_hook_jresizer');
// END DO NOT MODIFY
// Start a default WordPress page
get_header();
?>
<!-- START iframe div -->
<div class="">
<noscript><h3>Your browser seem to have Javascript disabled, you can't load correctly the forum page at this Url. Please enable Javascript on your browser or <a href="http://url.com">visit the full forum page here</a>.<br /><br /></h3></noscript>
<iframe style="width:100%;border:0 !important;" src="http://localhost/root_integrations/phpbb3_test"></iframe>
<?php
echo "<script type=\"text/javascript\">
iFrameResize({
log : false,
inPageLinks : true,
// heightCalculationMethod:'bodyScroll', // if iframe not resize on phpBB template bottom, uncomment this
messageCallback : function(messageData){ // Callback fn when message is received
$('p#callback').html(
'<b>Frame ID:</b> ' + messageData.iframe.id +
' <b>Message:</b> ' + messageData.message
);
}
});
</script>";
?>
</div>
<!-- END iframe div -->
<?php get_footer(); ?>
change
http://localhost/root_integrations/phpbb3_test with your real phpBB URL.
You can create pages you like in this way, naming as you want, and changing just the link to the embedded iframe.
WP_w3all will include, as separated plugin/module to be added or used as separated (as it is very easy to achieve and is useful/cool), adding pages with easy on WP admin, without doing nothing manually: until this is not ready, the joke can be resumed on just this:
[b](WP_w3all installed, but disabled, removing the path if was already configured)[/b]
copy the default wp_w3all /addons/page-forum.php into your WP template folder, naming as you like (any name), so you’ll create the same named blank page in WP (excluded [i]page-[/i] and [i].php[/i]).
The page that will display in this case your forum, that could be anything else, reduced, will look like this (substitute the page-(forum or whatever wasnamed).php code with this):
[code]<?php
// wp_w3all pages
function wp_w3all_hook_jresizer() {
$s = "<script type=\"text/javascript\" src=\"".plugins_url()."/wp-w3all-phpbb-integration/addons/resizer/iframeResizer.min.js\"></script>
<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>
";
echo $s;
}
add_action('wp_head','wp_w3all_hook_jresizer');
// END DO NOT MODIFY
// Start a default WordPress page
get_header();
?>
<!-- START iframe div -->
<div class="">
<noscript><h3>Your browser seem to have Javascript disabled, you can't load correctly the forum page at this Url. Please enable Javascript on your browser or <a href="http://url.com">visit the full forum page here</a>.<br /><br /></h3></noscript>
<iframe style="width:100%;border:0 !important;" src="http://localhost/root_integrations/phpbb3_test"></iframe>
<?php
echo "<script type=\"text/javascript\">
iFrameResize({
log : false,
inPageLinks : true,
// heightCalculationMethod:'bodyScroll', // if iframe not resize on phpBB template bottom, uncomment this
messageCallback : function(messageData){ // Callback fn when message is received
$('p#callback').html(
'<b>Frame ID:</b> ' + messageData.iframe.id +
' <b>Message:</b> ' + messageData.message
);
}
});
</script>";
?>
</div>
<!-- END iframe div -->
<?php get_footer(); ?>[/code]
change http://localhost/root_integrations/phpbb3_test with your real phpBB URL.
You can create pages you like in this way, naming as you want, and changing just the link to the embedded iframe.