Embed not working with BlackFyre theme

Slipscream

Embed not working with BlackFyre theme

Post by Slipscream »

Hi there!

I am having an issue similar to another topic I found here about a tesseract theme.

1. At first NOTHING was showing
2. Now it is showing (I changed nothing to make this happen :?: ) but it is showing FULL width and not being

It tries to load (sliding blue loading bar) but then comes up blank as shown below Image

I'm not sure how to go about correcting this so it works well within the theme.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Embed not working with BlackFyre theme

Post by axew3 »

did you added the code into overall_footer.html and followed procedure?
https://www.axew3.com/w3/2018/12/phpbb- ... iframe-v3/
Slipscream
User w
User w
Posts: 7
Joined: Thu Feb 21, 2019 7:05 pm

Re: Embed not working with BlackFyre theme

Post by Slipscream »

Yes sir. I will attach the file

Code: Select all

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

<!-- EVENT overall_footer_page_body_after -->

<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">{{ 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">
			<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>

<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.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">	
document.domain = 'forums.lmgamers.net'; // MANDATORY! // Set/Change this value to fit your domain (example: axew3.com (or leave localhost if on localhost)) 
var wordpress_url_page_forum = 'https://www.lmgamers.net/forum'; // MANDATORY! // (DO NOT ADD/INCLUDE final slash here) Url that point to your iframed wordpress forum page

var w3all_doc_domain = document.domain;
var w3allappend = false;
var boardU = "{BOARD_URL}";

// Lightbox correct scroll fix:
// https://www.axew3.com/w3/forums/viewtopic.php?f=13&t=885
// 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");

if( /[^-0-9A-Za-z\._#\:\?\/=&%]/ig.exec(href) !== null ){
	return;
}


if( /posting\.php\?mode=[reply|post|bump]/ig.exec(href) !== null || /mcp\.php\?/ig.exec(href) !== null ){
var w3allNOappend = true;
}
// check if link point to external resource
 if ((this.href.indexOf(boardU) > -1) != true){
 if(/^(f|ht)tps?:\/\//i.test(href)){
	e.preventDefault(); // prevent load as we are inside
	parent.location.replace(href);
  return;
 }
}
// check for # short links like on FAQ page
if ( href.charAt(0) == '#' ){
 return;
}

w3allappend = w3allNormalize_phpBBUrl(href);
   var w3all_parent_element_id = $(this).parent().get( 0 ).id; // detect click x ... (ex: return ID smiley-box, onclick post smiles) ... // detect and avoid/allow certain behaviors
   var w3all_onclick_smile  = (w3all_parent_element_id.indexOf('smiley-box') > -1);
   var w3all_onview_topic  = (href.indexOf('viewtopic.php') > -1);
   var w3all_onview_attach  = (href.indexOf('file.php') > -1);
   var w3all_onreview_post = /#[review]+/ig.exec(href);
   var w3all_ck_quickmod  = (href.indexOf('quickmod') > -1);
   var w3all_onreply_topic  = (href.indexOf('mode=reply') > -1);
   var w3all_ck_onindex  = (href.indexOf('index.php') > -1);

// 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;
} */

if ( w3all_onclick_smile == false && w3all_onview_attach == false && w3all_onreview_post == null ) {
  if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,50); // change 50 to another value may 0 or 100 or 500. Top distance gap in px when page scroll top
  }
if ('parentIFrame' in window){
  if( typeof w3allNOappend == 'undefined' ){
    window.parentIFrame.sendMessage(w3allappend);
  }
 }
});
 
///////////////////////////////////////////////////////////////////////////
// w3all Ajax UPDATES for phpBB events
 
//if (window.frameElement) { // if in iframe 
//if ('parentIFrame' in window){
if(window.self !== window.top){
var pmn = "{PRIVATE_MESSAGE_COUNT}"; 
var w3all_phpbb_u_logged = "{S_USER_LOGGED_IN}"; 
// to send to wp at once here 
var w3appendevents = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged; 
//parent.w3all_ajaxup_from_phpbb(w3appendevents); 
// fix vertical iframe centered on viewtopic.php, preview or where # anchor etc (but skip on iOS)
var w3iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
if(w3iOS == false){
$(window).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;");
});
}


} // END if (window.frameElement) {
</script>
<script type="text/javascript" src="https://forums.lmgamers.net/iframeResizer.contentWindow.min.js" defer></script>
</body>
</html>
Also now, just a blank space but I changed nothing :(

Image
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Embed not working with BlackFyre theme

Post by axew3 »

you created the wordpress page, let say for example named forum
and you setup the same value, so forum when you created the forum template page on plugin admin?
this plugin value need to be setup even if you copy/paste manually the page on template folder.
You did this?
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Embed not working with BlackFyre theme

Post by axew3 »

p.s

Code: Select all

document.domain = 'forums.lmgamers.net';
need to be

Code: Select all

document.domain = 'lmgamers.net';
Slipscream
User w
User w
Posts: 7
Joined: Thu Feb 21, 2019 7:05 pm

Re: Embed not working with BlackFyre theme

Post by Slipscream »

axew3 wrote: Thu Feb 21, 2019 8:02 pm you created the wordpress page, let say for example named forum

Yes

and you setup the same value, so forum when you created the forum template page on plugin admin?

Yes

this plugin value need to be setup even if you copy/paste manually the page on template folder.
You did this?

Yes.

I also just noticed an issue with the forum not displaying while under HTTPS - but if I try it with HTTP is shows up no problem (except for the iframe extending past my theme (going full screen width)

If you like, just let me know what files you want to see. I am more than happy to work on this towards a solution.
Post Reply