Page 1 of 5

Can't get the embedded phpbb3 forum to work

Posted: Tue Feb 11, 2020 9:49 am
by Dysphoria
Hey there,

So I've edited the overall_footer and the overallheader, but I probably missed something. Can someone take a look?

Overall_footer

Code: Select all

	<!-- EVENT overall_footer_content_after -->
	</div>

<!-- EVENT overall_footer_page_body_after -->

</div>

<div id="page-footer" class="page-footer" role="contentinfo">
	<!-- INCLUDE navbar_footer.html -->

	<div class="copyright">
		<!-- EVENT overall_footer_copyright_prepend -->
		<p class="footer-row">
			<span class="footer-copyright">metrolike style by <a href="http://segwin.ca/">Eric Seguin</a> Updated for phpBB3.3 by <a href="http://phpbbstyles.oo.gd/">Ian Bradley</a></span>
		</p>
		<p class="footer-row">
			<span class="footer-copyright">{{ CREDIT_LINE }}</span>
		</p>
		<!-- IF TRANSLATION_INFO -->
		<p class="footer-row">
			<span class="footer-copyright">{{ TRANSLATION_INFO }}</span>
		</p>
		<!-- ENDIF -->
		<!-- EVENT overall_footer_copyright_append -->
		<p class="footer-row" role="menu">
			<a class="footer-link" href="{{ U_PRIVACY }}" title="{{ lang('PRIVACY_LINK') }}" role="menuitem">
				<span class="footer-link-text">{{ lang('PRIVACY_LINK') }}</span>
			</a>
			|
			<a class="footer-link" href="{{ U_TERMS_USE }}" title="{{ lang('TERMS_LINK') }}" role="menuitem">
				<span class="footer-link-text">{{ lang('TERMS_LINK') }}</span>
			</a>
		</p>
		<!-- IF DEBUG_OUTPUT -->
		<p class="footer-row">
			<span class="footer-info">{{ DEBUG_OUTPUT }}</span>
		</p>
		<!-- ENDIF -->
		<!-- IF U_ACP -->
		<p class="footer-row">
			<a class="footer-link text-strong" href="{{ U_ACP }}">{{ lang('ACP') }}</a>
		</p>
		<!-- ENDIF -->
	</div>

	<div id="darkenwrapper" class="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
		<div id="darken" class="darken">&nbsp;</div>
	</div>

	<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
		<a href="#" class="alert_close">
			<i class="icon fa-times-circle fa-fw" aria-hidden="true"></i>
		</a>
		<h3 class="alert_title">&nbsp;</h3><p class="alert_text"></p>
	</div>
	<div id="phpbb_confirm" class="phpbb_alert">
		<a href="#" class="alert_close">
			<i class="icon fa-times-circle fa-fw" aria-hidden="true"></i>
		</a>
		<div class="alert_text"></div>
	</div>
</div>


<div>
	<a id="bottom" class="anchor" accesskey="z"></a>
	<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>

<script src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.4.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_ALLOW_CDN -->
	<script>
		(function($){
			var $fa_cdn = $('head').find('link[rel="stylesheet"]').first(),
				$span = $('<span class="fa" style="display:none"></span>').appendTo('body');
			if ($span.css('fontFamily') !== 'FontAwesome' ) {
				$fa_cdn.after('<link href="{T_ASSETS_PATH}/css/font-awesome.min.css" rel="stylesheet">');
				$fa_cdn.remove();
			}
			$span.remove();
		})(jQuery);
	</script>
<!-- ENDIF -->

<!-- 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 -->

<!-- IF S_PLUPLOAD --><!-- INCLUDE plupload.html --><!-- ENDIF -->
{$SCRIPTS}

<!-- EVENT overall_footer_body_after -->

<script type="text/javascript">

// START MANDATORY CHANGES
document.domain = 'talkatastic.be'; // MANDATORY! // Set/Change this value to fit your domain (example: axew3.com (or leave localhost if on localhost)) 
var wordpress_url_page_forum = 'http://talkatastic.be/forum'; // MANDATORY! // (DO NOT ADD/INCLUDE final slash here) Url that point to your iframed wordpress forum page
var w3all_custom_wp_w3fancyurl = 'w3'; // MANDATORY! If you changed w3 to have 'fancy URL' query string into WP plugin admin, then change this value to match what your choosed fancy URL setting is
// END MANDATORY CHANGES

var w3all_doc_domain = document.domain;
var w3allappend = false;
var boardU = "{BOARD_URL}";
 
// Lightbox scroll fix:
// remove /* and */ to activate, also more below to complete ...
/*
$(".postimage").on("click", function(event) {
var pos = event.pageY - 100;
 $(parent.window).scrollTop( 200 );
var el = document.getElementById("lightbox");
$("#lightboxOverlay").on("click", function() {
$(parent.window).scrollTop( pos );
});
$(".lb-close").on("click", function() {
$(parent.window).scrollTop( pos );
});
$(".lightbox").on("click", function() {
$(parent.window).scrollTop( pos );
});
});
*/
 
function w3allNormalize_phpBBUrl(href){
// try to 'normalize' passed relative links: needed all after last slash /
// exception are kind of passed urls like: /phpbb323/app.php/help/faq
// and if SEO mods that may assign some different kind of links values
// by the way, SEO absolute urls http(s) should be (all?) already considered here ...
var phpbbRUrl = href.split(/^.+?(\w+.+)$/);
if( href.indexOf('app.php') > -1 ){ // since the previous not 'normalize' this type of passed value (and may miss something else)
	 phpbburl = href.split(/^.+?(app\.php.+)$/);
	 w3allappend = phpbburl[1];
 } else if ( /^https?/ig.exec(href) !== null ){ // absolute http(s) passed: try to 'normalize' a possible seo mod
   phpbburl = href.split(boardU);
	 w3allappend = phpbburl[1];
 } else if ( phpbbRUrl[1] && phpbbRUrl[1].length > 1 ){ // 'normalize' any other
   w3allappend = phpbbRUrl[1];
 } else if ( phpbbRUrl[0].length > 1 ){
   w3allappend = phpbbRUrl[0];
   }
// ... if still not normalized
if(/^\W/ig.exec(w3allappend) !== null){
 	w3allappend = w3allappend.split(/^.+?(\w+.+)$/);
 	if(w3allappend[1]){
 		w3allappend = w3allappend[1];
 	}
 	if ( w3allappend[1] && w3allappend[1].charAt(0) == '/' ){
 		w3allappend = w3allappend[1].substr(1);
 	}
}
return w3allappend;
}
 
 
$(document).on("click", "a", function(e) {
  var href = $(this).attr("href");
 
// really basic
if( this.getAttribute('target') !== null ){
  e.preventDefault();
  window.open(href,'_blank');
return;
}

// # short links?
if ( href.charAt(0) == '#' ){
 return;
}

// external link?
if ((this.href.indexOf(boardU) > -1) != true){
 if(/^(f|ht)tps?:\/\//i.test(href)){
	e.preventDefault();
	parent.location.replace(href);
 return;
 }
}

if ( href.indexOf('view=print') > -1 !== false || /\/adm\//ig.exec(href) !== null ){
 e.preventDefault();
 window.open(href,'_blank');
return;
}

if ( href.indexOf('quickmod') > -1 ) {
	 w3allNOappend = true;
  	return;
}

if( /posting\.php\?mode=[reply|post|bump]/ig.exec(href) !== null || /mcp\.php\?/ig.exec(href) !== null ){
	w3allNOappend = true;
}

// complete Lightbox correct attachment display // activate removing /* and */ 
// or used to open on new tab attachments
/*
if(w3all_onview_attach !== false){
e.preventDefault();
window.open(href,'_blank');
return;
} */

w3allappend = w3allNormalize_phpBBUrl(href);

if ('parentIFrame' in window){
  if( typeof w3allNOappend == 'undefined' || w3allNOappend == false ){
    window.parentIFrame.sendMessage(w3allappend);
  }
 }
});

$("#quickmod,.bookmark-link").on("click", function(event) {
pos = event.pageY - 100;
  $(parent.window).scrollTop( 200 );
$("#darkenwrapper").on("click", function() {
  $(parent.window).scrollTop( pos );
});
 $("#darken").on("click", function() {
  $(parent.window).scrollTop( pos );
});
});

///////////////////////////////////////////////////////////////////////////
// w3all UPDATES for phpBB events
 
if(window.self !== window.top){
var pmn = "{PRIVATE_MESSAGE_COUNT}"; 
var w3all_phpbb_u_logged = "{S_USER_LOGGED_IN}"; 

var hash = window.location.hash.substr(1);
    location.hash = "#" + hash;
  if( location.hash.length < 2 ){
  	var w3all_lochash = 0;
  } else {
  	var w3all_lochash = $(location.hash).offset().top;
  }

var w3appendevents = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged + '#w3all_lochash=' + w3all_lochash; 
//if( w3appendevents.indexOf('w3allmchatif') == -1 ){
//if(parent.location.href.indexOf(wordpress_url_page_forum) > -1){
if( typeof w3allNOappend == 'undefined' || w3allNOappend == false ){
$( window ).on( "load", function() {
parent.w3all_ajaxup_from_phpbb(w3appendevents); 
});
}
//}
//}

// fix vertical iframe centered on certain cases
var w3iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
if(w3iOS == false){
$(window).on( "load", function() {
var bd = document.getElementsByTagName("body");
for (var i = 0; i < bd.length; i++) { 
    var bdID = bd[i].getAttribute("id"); 
}
var elt = document.getElementById(bdID);	
elt.setAttribute("style", "position:fixed;top:0%;left:0%;width:100%;margin:0px;");
});
}
 
/*$( "a" ).contextmenu(function() {
 var ohref = $(this).attr("href");
 var href = this.href; // treath like an external because only open New tab or New window
  d = w3allNormalize_phpBBUrl(href);
  hrefEnc = window.btoa(unescape(encodeURIComponent(d)));
  href1 =  wordpress_url_page_forum + '/?' + w3all_custom_wp_w3fancyurl + '=' + hrefEnc;  
    
  $(this).attr("href", href1); // send out encoded
  $(this).mouseleave(function() { // reset (replaced 'mouseup')
  $(this).attr("href", ohref);
  });
});*/
 
} // END if (window.frameElement) {
</script>
<script type="text/javascript" src="https://talkatastic.be/forum/iframeResizer.contentWindow.min.js" defer></script>
</body>
</html>


Overall_header

Code: Select all

<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}
<title>
<!-- IF not S_IS_BOT --><script>
// START MANDATORY CHANGES
var wordpress_url_page_f = 'https://talkatastic.be/forum'; // MANDATORY! // (DO NOT ADD/INCLUDE final slash here) Url that point to your iframed wordpress forum page
var w3all_custom_wp_w3fancyurl = 'w3' // MANDATORY! If you changed w3 to have 'fancy URL' query string for the WP page forum, then change this value to match what your fancy URL setting is after you changed it on plugin admin page
// END MANDATORY CHANGES

function w3all0Normalize_phpBBUrl(u){
	var bu = "{BOARD_URL}";
	w3allappend = "{BOARD_URL}"; 
 if ( /^https?/ig.exec(u) !== null ){ 
   phpbburl = u.split(bu);
	 w3allappend = phpbburl[1];
 } 
if(/^\W/ig.exec(w3allappend) !== null){
 	w3allappend = w3allappend.split(/^.+?(\w+.+)$/);
 	if(w3allappend[1]){
 		w3allappend = w3allappend[1];
 	}
 	if ( w3allappend[1] && w3allappend[1].charAt(0) == '/' ){
 		w3allappend = w3allappend[1].substr(1);
 	}
}
return w3allappend;
}
 
if ((window.self !== window.top) != true) {
 if(/adm\//ig.exec(window.location.href) === null){ // avoid x ACP
  var w3all_r = window.location.href.replace(/sid=.+/gi, '');
 w3all_r = w3all0Normalize_phpBBUrl(w3all_r);
  hrefEnc = window.btoa(unescape(encodeURIComponent(w3all_r)));
  href0 =  wordpress_url_page_f + '/?'+ w3all_custom_wp_w3fancyurl + '=' + hrefEnc;
  //document.location.replace(href0);
}}
// END force w3all to iframe redirect
</script>
<!-- ENDIF -->

<!-- Oude code vanaf hier -->

<!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>

<!-- IF S_ENABLE_FEEDS -->
	<!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{{ path('phpbb_feed_index') }}"><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{{ path('phpbb_feed_news') }}"><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{{ path('phpbb_feed_forums') }}"><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{{ path('phpbb_feed_topics') }}"><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPICS_ACTIVE --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{{ path('phpbb_feed_topics_active') }}"><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{{ path('phpbb_feed_forum', { forum_id : S_FORUM_ID } ) }}"><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{{ path('phpbb_feed_topic', { topic_id : S_TOPIC_ID } ) }}"><!-- ENDIF -->
	<!-- EVENT overall_header_feeds -->
<!-- ENDIF -->

<!-- IF U_CANONICAL -->
	<link rel="canonical" href="{U_CANONICAL}">
<!-- ENDIF -->

<!--
	phpBB style name:   Metrolike
	Based on style:     prosilver (this is the default phpBB3 style)
	Original author:    Tom Beddard ( http://www.subBlue.com/ )
	Modified by:        Eric Seguin ( http://segwin.ca/ )
	Updated for 3.3 by: Ian Bradley ( http://phpbbstyles.oo.gd/ )
-->

<!-- IF S_ALLOW_CDN -->
<script>
	WebFontConfig = {
		google: {
			families: ['Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese']
		}
	};

	(function(d) {
		var wf = d.createElement('script'), s = d.scripts[0];
		wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js';
		wf.async = true;
		s.parentNode.insertBefore(wf, s);
	})(document);
</script>
<!-- ELSE -->
	<link href="{T_THEME_PATH}/fonts.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<!-- ENDIF -->
<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
<link href="{T_STYLESHEET_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="headerwrap" class="headerwrap">
	<div class="wrap">
		<a id="top" class="top-anchor" accesskey="t"></a>
		<div id="page-header">
			<div class="headerbar" role="banner">
			<!-- EVENT overall_header_headerbar_before -->
				<div class="inner">

				<div id="site-description" class="site-description">
					<a id="logo" class="logo" href="<!-- IF U_SITE_HOME -->{U_SITE_HOME}<!-- ELSE -->{U_INDEX}<!-- ENDIF -->" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->"><span class="site_logo"></span></a>
					<h1>{SITENAME}</h1>
					<p>{SITE_DESCRIPTION}</p>
					<p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
				</div>

				<!-- EVENT overall_header_searchbox_before -->
				<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
				<div id="search-box" class="search-box search-header" role="search">
					<form action="{U_SEARCH}" method="get" id="search">
					<fieldset>
						<input name="keywords" id="keywords" type="search" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search tiny" size="20" value="{SEARCH_WORDS}" placeholder="{L_SEARCH_MINI}" />
						<button class="button button-search" type="submit" title="{L_SEARCH}">
							<i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span>
						</button><br>
						{S_SEARCH_HIDDEN_FIELDS}
					</fieldset>
					</form>
					<a href="{U_SEARCH}" class="ml-advsearch" title="{L_SEARCH_ADV}">
						{L_SEARCH_ADV}
					</a>
				</div>
				<!-- ENDIF -->
				<!-- EVENT overall_header_searchbox_after -->

				</div>
				<!-- EVENT overall_header_headerbar_after -->
			</div>
			
		</div>
	</div>
</div>

<div id="navwrap" class="navwrap">
	<div class="wrap">
			<!-- EVENT overall_header_navbar_before -->
			<!-- INCLUDE navbar_header.html -->
	</div>
</div>

<div id="wrap" class="wrap">
	<!-- EVENT overall_header_page_body_before -->

	<a id="start_here" class="anchor"></a>
	<div id="page-body" class="page-body" role="main">
		<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
		<div id="information" class="rules">
			<div class="inner">
				<strong>{L_INFORMATION}{L_COLON}</strong> {L_BOARD_DISABLED}
			</div>
		</div>
		<!-- ENDIF -->

		<!-- EVENT overall_header_content_before -->

Re: Can't get the embedded phpbb3 forum to work

Posted: Tue Feb 11, 2020 10:48 am
by axew3
All seem to be ok, what's the problem/issue you experience?
Not resizing? Or what?
iframeResizer.contentWindow.min.js has been uploaded into the phpBB forum root?

Re: Can't get the embedded phpbb3 forum to work

Posted: Tue Feb 11, 2020 11:30 am
by Dysphoria
Well, the problem is that nothing happens, haha.
Yes, that's there. I'm probably missing something, but I don't know what.

Re: Can't get the embedded phpbb3 forum to work

Posted: Tue Feb 11, 2020 11:33 am
by axew3
Did you built/created into plugin admin, the page via plugin (even if you added page-forum manually, this setting need to be setup exactly with the page name like/as the blank page you go to create in wordpress, and which you'll go to open to see the embedded phpBB into wordpress?

Re: Can't get the embedded phpbb3 forum to work

Posted: Tue Feb 11, 2020 11:42 am
by Dysphoria
You mean this, right?

Image

Image

Yeah, I did that.
.
Do I needed to do something with page.forum.php? I uploaded that to my wordpress template

Re: Can't get the embedded phpbb3 forum to work

Posted: Tue Feb 11, 2020 11:51 am
by axew3
mh, why you choose to name the page Forum, and not forum?
wordpress return by the way forum, and not Forum, while the created page as you setup, will be page-Forum.php.

Could this lead into some problem into some server? To check, delete wp page, re-create as forum
The same into plugin, re-build as forum

Then check that into your active template folder, there is this file created, so page-forum.php .
Also note that if phpBB is installed into a folder named forum , then you NEED to choose another name for the page you choose to display the forum in WP, if it is into same WP root!