TESSERACT Theme: phpbb not showing and page full width problem

WP_w3all phpBB code with others external plugins
Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

TESSERACT Theme: phpbb not showing and page full width problem

Post by Lee »

Hi guys, thanks for this plugin!

As far as I am aware, I followed the installation instructions correctly, but phpbb does not appear in my forum page that I created.

I am using WP theme TESSERACT. I checked and the file exists wp-content/themes/TESSERACT/page-forum.php
iframeResizer.contentWindow.min.js is in the phpbb root folder
I edited overall_footer.html
My phpbb is located http://buddyhollylegend.com/phpbb/
I named "forum" in WP_w3all phpBB embedded on WordPress Template
Created blank page named "forum"

Did I miss something?

Thanks

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

TESSERACT Theme: phpbb not showing embedded on my forum page

Post by axew3 »

Hello, do not appear or do not resize?
Assuming not appear, the only reason come out at moment:
Is correct the URL setting (this below the path setting) in admin -> settings -> wp_w3all config?
that should be so:
http://buddyhollylegend.com/phpbb

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

Re: phpbb not showing embedded on my forum page

Post by axew3 »

but instead, i've look to your WP page: http://buddyhollylegend.com/forum/ is not found, while http://buddyhollylegend.com/index.php/forum/
is found but do not contain the code that should.

Are you sure the page-forum.php of your wp template folder, contain the code of page-forum.php that is inside wp-w3all-phpbb-integration/addons folder?

the default page-forum.php included add just header and footer. But your page-forum at moment do not contain the strict necessary.

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

Hi, thanks for the reply.

This is the code of my page-forum.php, which islocated in wp-content/themes/TESSERACT/page-forum.php
I used ftp to download page-forum.php from wp-w3all-phpbb-integration/addons and uploaded it to wp-content/themes/TESSERACT, just to make sure they will be the same.

Code: Select all

<?php 
/**
 * The default basic template to display content for WP_w3all embedded phpBB
 * @package WordPress
 * @subpackage wp_w3all
 */
 // - axew3.com - //

// START DO NOT MODIFY

$w3forum_id  = isset($_GET["forum_id"]) ? $_GET["forum_id"] : '';
$w3topic_id   = isset($_GET["topic_id"]) ? $_GET["topic_id"] : ''; 
$w3post_id   = isset($_GET["post_id"]) ? $_GET["post_id"] : '';
$w3mode      = isset($_GET["mode"]) ? $_GET["mode"] : '';
$w3phpbbsid  = isset($_GET["sid"]) ? $_GET["sid"] : '';
$w3phpbb_viewforum  = isset($_GET["viewforum"]) ? $_GET["viewforum"] : '';
$w3phpbb_viewtopic  = isset($_GET["viewtopic"]) ? $_GET["viewtopic"] : '';
$w3phpbb_start  = isset($_GET["start"]) ? $_GET["start"] : '';
$w3allhomeurl = get_home_url();
   
if( preg_match('/[^0-9]/',$w3phpbb_start) OR preg_match('/[^0-9]/',$w3topic_id) OR preg_match('/[^0-9]/',$w3phpbb_viewtopic) OR preg_match('/[^0-9]/',$w3phpbb_viewforum) OR preg_match('/[^0-9]/',$w3forum_id) OR preg_match('/[^0-9]/',$w3post_id) OR preg_match('/[^0-9A-Za-z]/',$w3mode) OR preg_match('/[^0-9A-Za-z]/',$w3phpbbsid) ){

	die("Something goes wrong with your URL request, <a href=\"$w3allhomeurl\">please leave this page</a>.");
}

$w3logout = $w3mode;

$w3urlscheme = parse_url($w3all_url_to_cms);
$w3urlscheme = $w3urlscheme['scheme'];

$w3all_target_server = preg_replace('/^[^\.]*\.([^\.]*)\.(.*)$/', '\1.\2',$w3all_url_to_cms); // REVIEW this

// build correct links x iframe

  if (!empty($w3forum_id) && empty($w3phpbb_viewforum)){
    $uiframe = "/viewtopic.php?f=".$w3forum_id."&p=".$w3post_id."#p".$w3post_id."";
    $w3all_url_to_cms .= $uiframe;
  }  elseif (!empty($w3phpbb_viewforum) && !empty($w3post_id) ) {
     $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&p=".$w3post_id."#p".$w3post_id."";//exit;
    
}
  elseif (!empty($w3forum_id) && !empty($w3topic_id)) {
    $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3topic_id."";
} elseif (!empty($w3phpbb_viewforum) && empty($w3phpbb_viewtopic)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewforum.php?f=". $w3phpbb_viewforum ."";
} elseif (!empty($w3phpbb_viewtopic) && empty($w3phpbb_start)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3phpbb_viewtopic."";
} elseif (!empty($w3phpbb_viewtopic) && !empty($w3phpbb_start)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3phpbb_viewtopic."&start=".$w3phpbb_start."";
} elseif (stristr($w3mode, "register")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=register";
} elseif (stristr($w3mode, "sendpassword")) {
   $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=sendpassword";
} elseif (stristr($w3mode, "login")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=login";
}  elseif (stristr($w3mode, "logout")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=logout&sid=". $w3phpbbsid ."";
} 
 else {
	$w3all_url_to_cms = $w3all_url_to_cms;
}

// the modal screen // css

function wp_w3all_css_modal_login() {
 	
 $w3all_cssmodal = "<style type=\"text/css\">
 .w3allmodalDialog {
	position: fixed;
	font-family: Arial, Helvetica, sans-serif;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.8);
	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.w3allmodalDialog:target {
	opacity:1;
	pointer-events: auto;
}

.w3allmodalDialog > div {
	width: 400px;
	position: relative;
	margin: 10% auto;
	padding: 5px 20px 13px 20px;
	border-radius: 10px;
	background: #fff;
	background: -moz-linear-gradient(#fff, #999);
	background: -webkit-linear-gradient(#fff, #999);
	background: -o-linear-gradient(#fff, #999);
}
.w3allclose {
	background: #606061;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: -12px;
	text-align: center;
	top: -10px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
	-moz-box-shadow: 1px 1px 3px #000;
	-webkit-box-shadow: 1px 1px 3px #000;
	box-shadow: 1px 1px 3px #000;
}

.w3allclose:hover { background: #333; }
</style>
";

	echo $w3all_cssmodal;
 	
}

 add_action('wp_head','wp_w3all_css_modal_login');

 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 w3all_cssmodal_login div -->
<div id="w3allopenModal" class="w3allmodalDialog">
	<div>
		<a href="#w3allclose" title="Close" class="w3allclose">X</a>
		<form method="post" action="<?php echo $w3all_url_to_cms; ?>/ucp.php?mode=login" class="">
	<h3><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=register">Register</a></h3>
			<label for="username"><span>Username:</span> <input type="text" tabindex="1" name="username" id="username" size="10" class="" title="Username"></label>
			<label for="password"><span>Password:</span> <input type="password" tabindex="2" name="password" id="password" size="10" class="" title="Password" autocomplete="off"></label>
							<br /><br /><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=sendpassword">I forgot my password</a>
										<span class="">|</span> <label for="autologin">Remember me <input type="checkbox" tabindex="4" name="autologin" id="autologin"></label>
						<input type="submit" tabindex="5" name="login" value="Login" class="">
			<input type="hidden" name="redirect" value="<?php echo $w3urlscheme . "://" . $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; ?>">
	</form>
	</div>
</div><!-- END w3all_cssmodal_login div -->
<!-- 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="<?php echo $w3all_url_to_cms;?>">visit the full forum page here</a>.<br /><br /></h3></noscript>
<iframe style="width:100%;border:0 !important;" src="<?php echo $w3all_url_to_cms; ?>"></iframe>

		<?php

		echo "<script type=\"text/javascript\">

    	iFrameResize({
    
				log                     : false,
				inPageLinks             : true,
			  targetOrigin: '".$w3urlscheme."://".$w3all_target_server."', 
       // 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
					);
		
				// w3all simple js check and redirects
				
				var w3all_passed_url = messageData.message.toString();
				

				
			  var w3all_ck = \"".$_SERVER['SERVER_NAME']."\";
        
         var w3all_pass_ext  = (w3all_passed_url.indexOf(w3all_ck) > -1);

    if (w3all_pass_ext == true) {
     	window.location.replace(w3all_passed_url); 
     }

   if (/^(f|ht)tps?:\/\//i.test(w3all_passed_url)) {
    window.location.replace(w3all_passed_url); 
   }
  
  var   w3all_ck2 = 'ucp.php?mode=login';
  var w3all_pass_login  = (w3all_passed_url.indexOf(w3all_ck2) > -1);

 if (w3all_pass_login == true) {

   var w3_login_modallink = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?#w3allopenModal';
    window.location.replace(w3_login_modallink);
  } 
  
   var   w3all_ck3 = 'ucp.php?mode=logout';
   var w3all_pass_login_out  = (w3all_passed_url.indexOf(w3all_ck3) > -1);
 
 if (w3all_pass_login_out == true) {
    window.location.replace('".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/'); 
   }
   
    var   w3all_ck4 = 'quickmod';
   var w3all_phpBBquickmod  = (w3all_passed_url.indexOf(w3all_ck4) > -1);
 
 if (w3all_phpBBquickmod == true) {
 window.scrollTo(0, 200);
   }
   
       var   w3all_ck_reply = 'mode=reply';
   var w3all_1_ck_reply  = (w3all_passed_url.indexOf(w3all_ck_reply) > -1);
 
 if (w3all_1_ck_reply == true) {
 window.scrollTo(0, 200);
   }

// if phpBB lightbox
   
   var   w3all_ck5 = 'getw3all_lightbox';
   var w3all_phpBB_lightbox  = (w3all_passed_url.indexOf(w3all_ck5) > -1);
 
     if (w3all_phpBB_lightbox == true) {
     window.scrollTo(0, 150);
   }
   
  
// push passed url to the browser history if on index.php
       var   w3all_ck8 = 'index.php';
       var w3all_viewmainindex_push  = (w3all_passed_url.indexOf(w3all_ck8) > -1);
      if (w3all_viewmainindex_push == true) {
        var w3matches = /index\.php$/ig.exec(w3all_passed_url);
       if (w3matches) {  
        w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."';
        history.replaceState('', 'Index', w3all_passed_url_push); 
      }  
     }
   
// push passed url to the browser history if on viewforum.php
       var   w3all_ck7 = 'viewforum.php';
    var w3all_viewforum_push  = (w3all_passed_url.indexOf(w3all_ck7) > -1);
    if (w3all_viewforum_push == true) {

    var w3matches = /viewforum\.php\?f=([0-9]+)/ig.exec(w3all_passed_url);
       
      w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1];
      history.replaceState('', 'Forum', w3all_passed_url_push); 
     }
     
   
   
// push passed url to the browser history if on viewtopic.php

    var   w3all_ck6 = 'viewtopic.php';
    var w3all_viewtopic_push  = (w3all_passed_url.indexOf(w3all_ck6) > -1);
    
  if (w3all_viewtopic_push == true) {

       var w3matches = /viewtopic\.php\?.*([0-9]+).*&(p|t)=([0-9]+)(&start=|#p)?([0-9]+)?/ig.exec(w3all_passed_url);
       
    if(!w3matches[4]){
       w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&viewtopic=' + w3matches[3];
     	history.replaceState('', 'Topic', w3all_passed_url_push); 
     } else if (w3matches[4] == '#p'){
           w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&post_id=' + w3matches[5];
          	history.replaceState('', 'Topic', w3all_passed_url_push); 
      } else {
       w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&viewtopic=' + w3matches[3] + w3matches[4] + w3matches[5];
     	history.replaceState('', 'Topic', w3all_passed_url_push); 

   } }
   

				}
			});


 var w3allogout = '".$w3logout."'; 
   if (w3allogout == 'logout') {
    window.location.replace('".$w3allhomeurl."' + '/wp-login.php?action=logout');
    
   }
   


</script>";
?>

</div>
<!-- END iframe div -->
<?php get_footer(); ?>

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

axew3 wrote:Hello, do not appear or do not resize?
Assuming not appear, the only reason come out at moment:
Is correct the URL setting (this below the path setting) in admin -> settings -> wp_w3all config?
that should be so:
http://buddyhollylegend.com/phpbb
The url is /home3/lee/public_html/buddyhollylegend.com/phpbb, it seems to be connected ok, I can login to wp with my phpbb admin now.
Should I change this to http://buddyhollylegend.com/phpbb

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

Here's some screens..
01.png
01.png (13.87 KiB) Viewed 6252 times
page-forum.png
page-forum.png (23.23 KiB) Viewed 6252 times
03.png
03.png (15.76 KiB) Viewed 6252 times

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

Re: phpbb not showing embedded on my forum page

Post by axew3 »

no i mean the setting about URL in WP_w3all admin config page, where:

(REQUIRED) URL - Real phpBB URL - NOTE: do NOT add final slash '/' here. Example: https://www.axew3.com/forum

but: are you sure that your page-forum.php in the template folder, contain the code of the WP_w3all plugin /addons/page-forum.php?

Because the needed code, that need to display into the page source, isn't present as you can see here:
view-source:http://buddyhollylegend.com/index.php/forum/

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

Re: phpbb not showing embedded on my forum page

Post by axew3 »

ops sorry ok, it contain the code .... i had not read the latest message as still not moderated ...
what contain your WP root .htaccess? can you post?

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

axew3 wrote:ops sorry ok, it contain the code .... i had not read the latest message as still not moderated ...
what contain your WP root .htaccess? can you post?
Ok cool thanks. Here is my WP Root .htaccess

Code: Select all

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

Ok I found the problem here.
My TESSERACT WP theme allows to create a full width page, I always choose this when I create a new page. I tried again and chose "default template" and now the embed works.
http://buddyhollylegend.com/index.php/community/

But I still have issues, because the width is less in the embedded page and the wp footer displays above the phpbb. Although this will fix if I do a hard refresh, but I have to do that every time I visit the page. I will try clear cache to see if it will fix this. Also I can't scroll in phpbb ACP. I thing I can find answerd for these in other topics here, I will search.

One more thing I discovered, maybe useful to add to installation instructions.
If you use a different username for phpbb and wordpress admin, make sure they do not have the same email address, otherwise it will not be possible to log in. I went to the database and changed the wp admin email address to fix this.

Thanks :)

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

Re: phpbb not showing embedded on my forum page

Post by axew3 »

Oh! hello, thank you for the report. This need to be fixed, i've just read and and not test the issue, if it is,
If you use a different username for phpbb and wordpress admin, make sure they do not have the same email address, otherwise it will not be possible to log in. I went to the database and changed the wp admin email address to fix this.
this is a bug that need as soon fixed.

About your template that have width not full on page, two reasons:
or your phpBB template is width fixed, that is not the case, as it display more big about width at real url http://www.buddyhollylegend.com/phpbb/index.php

so i think this is a problem about the template that embed the default wp page, as it is build by wp and not by the theme template process.
Can you try to post your default template page.php, as it is on your template folder you use (that is presumably used to create others).

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

Ok thanks for looking.
For my install, the admin email address must not be the same, if username is different in wordpress admin and phpbb admin.

This is my wp theme page.php

Code: Select all

<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package Tesseract
 */

get_header(); 

?>

	<div id="primary" class="content-area sidebar-left">
		<main id="main" class="site-main" role="main">

			<?php while ( have_posts() ) : the_post(); ?>

				<?php get_template_part( 'content', 'page' ); ?>

				<?php
					// If comments are open or we have at least one comment, load up the comment template
					if ( comments_open() || get_comments_number() ) :
						comments_template();
					endif;
				?>

			<?php endwhile; // end of the loop. ?>

		</main><!-- #main -->
	</div><!-- #primary -->

<?php if ( !is_plugin_active('woocommerce/woocommerce.php') || ( is_plugin_active('woocommerce/woocommerce.php') && ( !isset( $layout_default ) || !$layout_default || ( $layout_default == 'sidebar-left' ) || ( $layout_default == 'sidebar-right' ) ) ) ) get_sidebar(); ?>
    
<?php get_footer(); ?>


Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

It looks like the theme footer goes to the bottom of viewport by default, rather than bottom of content.
I added

Code: Select all

<p style="clear:both;"></p>
in the community page, but it didn't fix the issue. I will maybe try to add this in phpbb footer to see it it will work.

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

Re: phpbb not showing embedded on my forum page

Post by axew3 »

maybe in this way will be fixed, two versions on fly, this one add default divs as i've see theme add on your home page that is full, not sure if all the two are necessary, you can try to see and remove one of the two (or both) if necessary, in case remove also closing divs and look to the comment about woocoomerce on bottom: ......

[REMOVED] look posts more below for correct answer

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

Hi, thanks, I appreciate your time with this.

These solutions do not fix this issue unfortunately. I am trying to put a div somewhere in the theme index to clear the footer div, but this also does not work yet, so this issue is with my theme.

If I use the original code for this theme page.php, the issue will fix after ctrl+f5. strange!

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

Re: phpbb not showing embedded on my forum page

Post by axew3 »

but in this exact moment it look right to me!

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: phpbb not showing embedded on my forum page

Post by Lee »

Haha yes, well I managed to solve it, but not how I would really like.
I set the footer position:fixed; bottom:0; in my theme >> style.css
It is not ideal, because now the footer is always on top, but at least it works like this.. :)

I think maybe I'm gonna look for another theme and that will solve it for me. I only use this theme for the full width page template and the menu, otherwise all my static pages are my own html/css.

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

TESSERACT Theme: ok but no width 100% example

Post by axew3 »

Tesseract theme center iframe fixed width how to

Code: Select all

<?php 
/**
 * The default basic template to display content for WP_w3all embedded phpBB
 * @package WordPress
 * @subpackage wp_w3all
 */
 // - axew3.com - //

// START DO NOT MODIFY

$w3forum_id  = isset($_GET["forum_id"]) ? $_GET["forum_id"] : '';
$w3topic_id   = isset($_GET["topic_id"]) ? $_GET["topic_id"] : ''; 
$w3post_id   = isset($_GET["post_id"]) ? $_GET["post_id"] : '';
$w3mode      = isset($_GET["mode"]) ? $_GET["mode"] : '';
$w3phpbbsid  = isset($_GET["sid"]) ? $_GET["sid"] : '';
$w3phpbb_viewforum  = isset($_GET["viewforum"]) ? $_GET["viewforum"] : '';
$w3phpbb_viewtopic  = isset($_GET["viewtopic"]) ? $_GET["viewtopic"] : '';
$w3phpbb_start  = isset($_GET["start"]) ? $_GET["start"] : '';
$w3allhomeurl = get_home_url();
   
if( preg_match('/[^0-9]/',$w3phpbb_start) OR preg_match('/[^0-9]/',$w3topic_id) OR preg_match('/[^0-9]/',$w3phpbb_viewtopic) OR preg_match('/[^0-9]/',$w3phpbb_viewforum) OR preg_match('/[^0-9]/',$w3forum_id) OR preg_match('/[^0-9]/',$w3post_id) OR preg_match('/[^0-9A-Za-z]/',$w3mode) OR preg_match('/[^0-9A-Za-z]/',$w3phpbbsid) ){

	die("Something goes wrong with your URL request, <a href=\"$w3allhomeurl\">please leave this page</a>.");
}

$w3logout = $w3mode;

$w3urlscheme = parse_url($w3all_url_to_cms);
$w3urlscheme = $w3urlscheme['scheme'];

$w3all_target_server = preg_replace('/^[^\.]*\.([^\.]*)\.(.*)$/', '\1.\2',$w3all_url_to_cms); // REVIEW this

// build correct links x iframe

  if (!empty($w3forum_id) && empty($w3phpbb_viewforum)){
    $uiframe = "/viewtopic.php?f=".$w3forum_id."&p=".$w3post_id."#p".$w3post_id."";
    $w3all_url_to_cms .= $uiframe;
  }  elseif (!empty($w3phpbb_viewforum) && !empty($w3post_id) ) {
     $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&p=".$w3post_id."#p".$w3post_id."";//exit;
    
}
  elseif (!empty($w3forum_id) && !empty($w3topic_id)) {
    $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3topic_id."";
} elseif (!empty($w3phpbb_viewforum) && empty($w3phpbb_viewtopic)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewforum.php?f=". $w3phpbb_viewforum ."";
} elseif (!empty($w3phpbb_viewtopic) && empty($w3phpbb_start)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3phpbb_viewtopic."";
} elseif (!empty($w3phpbb_viewtopic) && !empty($w3phpbb_start)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3phpbb_viewtopic."&start=".$w3phpbb_start."";
} elseif (stristr($w3mode, "register")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=register";
} elseif (stristr($w3mode, "sendpassword")) {
   $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=sendpassword";
} elseif (stristr($w3mode, "login")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=login";
}  elseif (stristr($w3mode, "logout")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=logout&sid=". $w3phpbbsid ."";
} 
 else {
	$w3all_url_to_cms = $w3all_url_to_cms;
}

// the modal screen // css

function wp_w3all_css_modal_login() {
 	
 $w3all_cssmodal = "<style type=\"text/css\">
 .w3allmodalDialog {
	position: fixed;
	font-family: Arial, Helvetica, sans-serif;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.8);
	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.w3allmodalDialog:target {
	opacity:1;
	pointer-events: auto;
}

.w3allmodalDialog > div {
	width: 400px;
	position: relative;
	margin: 10% auto;
	padding: 5px 20px 13px 20px;
	border-radius: 10px;
	background: #fff;
	background: -moz-linear-gradient(#fff, #999);
	background: -webkit-linear-gradient(#fff, #999);
	background: -o-linear-gradient(#fff, #999);
}
.w3allclose {
	background: #606061;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: -12px;
	text-align: center;
	top: -10px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
	-moz-box-shadow: 1px 1px 3px #000;
	-webkit-box-shadow: 1px 1px 3px #000;
	box-shadow: 1px 1px 3px #000;
}

.w3allclose:hover { background: #333; }
</style>
";

	echo $w3all_cssmodal;
 	
}

 add_action('wp_head','wp_w3all_css_modal_login');

 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 w3all_cssmodal_login div -->
<div id="w3allopenModal" class="w3allmodalDialog">
	<div>
		<a href="#w3allclose" title="Close" class="w3allclose">X</a>
		<form method="post" action="<?php echo $w3all_url_to_cms; ?>/ucp.php?mode=login" class="">
	<h3><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=register">Register</a></h3>
			<label for="username"><span>Username:</span> <input type="text" tabindex="1" name="username" id="username" size="10" class="" title="Username"></label>
			<label for="password"><span>Password:</span> <input type="password" tabindex="2" name="password" id="password" size="10" class="" title="Password" autocomplete="off"></label>
							<br /><br /><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=sendpassword">I forgot my password</a>
										<span class="">|</span> <label for="autologin">Remember me <input type="checkbox" tabindex="4" name="autologin" id="autologin"></label>
						<input type="submit" tabindex="5" name="login" value="Login" class="">
			<input type="hidden" name="redirect" value="<?php echo $w3urlscheme . "://" . $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; ?>">
	</form>
	</div>
</div><!-- END w3all_cssmodal_login div -->
<!-- START iframe div -->

<div id="primary" class="full-width-page no-sidebar">

		<main id="main" class="site-main" role="main">


<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="<?php echo $w3all_url_to_cms;?>">visit the full forum page here</a>.<br /><br /></h3></noscript>
<iframe style="width:100%;border:0 !important;" src="<?php echo $w3all_url_to_cms; ?>"></iframe>

		<?php

		echo "<script type=\"text/javascript\">

    	iFrameResize({
    
				log                     : false,
				inPageLinks             : true,
			  targetOrigin: '".$w3urlscheme."://".$w3all_target_server."', 
       // 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
					);
		
				// w3all simple js check and redirects
				
				var w3all_passed_url = messageData.message.toString();
				

				
			  var w3all_ck = \"".$_SERVER['SERVER_NAME']."\";
        
         var w3all_pass_ext  = (w3all_passed_url.indexOf(w3all_ck) > -1);

    if (w3all_pass_ext == true) {
     	window.location.replace(w3all_passed_url); 
     }

   if (/^(f|ht)tps?:\/\//i.test(w3all_passed_url)) {
    window.location.replace(w3all_passed_url); 
   }
  
  var   w3all_ck2 = 'ucp.php?mode=login';
  var w3all_pass_login  = (w3all_passed_url.indexOf(w3all_ck2) > -1);

 if (w3all_pass_login == true) {

   var w3_login_modallink = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?#w3allopenModal';
    window.location.replace(w3_login_modallink);
  } 
  
   var   w3all_ck3 = 'ucp.php?mode=logout';
   var w3all_pass_login_out  = (w3all_passed_url.indexOf(w3all_ck3) > -1);
 
 if (w3all_pass_login_out == true) {
    window.location.replace('".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/'); 
   }
   
    var   w3all_ck4 = 'quickmod';
   var w3all_phpBBquickmod  = (w3all_passed_url.indexOf(w3all_ck4) > -1);
 
 if (w3all_phpBBquickmod == true) {
 window.scrollTo(0, 200);
   }
   
       var   w3all_ck_reply = 'mode=reply';
   var w3all_1_ck_reply  = (w3all_passed_url.indexOf(w3all_ck_reply) > -1);
 
 if (w3all_1_ck_reply == true) {
 window.scrollTo(0, 200);
   }

// if phpBB lightbox
   
   var   w3all_ck5 = 'getw3all_lightbox';
   var w3all_phpBB_lightbox  = (w3all_passed_url.indexOf(w3all_ck5) > -1);
 
     if (w3all_phpBB_lightbox == true) {
     window.scrollTo(0, 150);
   }
   
  
// push passed url to the browser history if on index.php
       var   w3all_ck8 = 'index.php';
       var w3all_viewmainindex_push  = (w3all_passed_url.indexOf(w3all_ck8) > -1);
      if (w3all_viewmainindex_push == true) {
        var w3matches = /index\.php$/ig.exec(w3all_passed_url);
       if (w3matches) {  
        w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."';
        history.replaceState('', 'Index', w3all_passed_url_push); 
      }  
     }
   
// push passed url to the browser history if on viewforum.php
       var   w3all_ck7 = 'viewforum.php';
    var w3all_viewforum_push  = (w3all_passed_url.indexOf(w3all_ck7) > -1);
    if (w3all_viewforum_push == true) {

    var w3matches = /viewforum\.php\?f=([0-9]+)/ig.exec(w3all_passed_url);
       
      w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1];
      history.replaceState('', 'Forum', w3all_passed_url_push); 
     }
     
   
   
// push passed url to the browser history if on viewtopic.php

    var   w3all_ck6 = 'viewtopic.php';
    var w3all_viewtopic_push  = (w3all_passed_url.indexOf(w3all_ck6) > -1);
    
  if (w3all_viewtopic_push == true) {

       var w3matches = /viewtopic\.php\?.*([0-9]+).*&(p|t)=([0-9]+)(&start=|#p)?([0-9]+)?/ig.exec(w3all_passed_url);
       
    if(!w3matches[4]){
       w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&viewtopic=' + w3matches[3];
     	history.replaceState('', 'Topic', w3all_passed_url_push); 
     } else if (w3matches[4] == '#p'){
           w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&post_id=' + w3matches[5];
          	history.replaceState('', 'Topic', w3all_passed_url_push); 
      } else {
       w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&viewtopic=' + w3matches[3] + w3matches[4] + w3matches[5];
     	history.replaceState('', 'Topic', w3all_passed_url_push); 

   } }
   

				}
			});


 var w3allogout = '".$w3logout."'; 
   if (w3allogout == 'logout') {
    window.location.replace('".$w3allhomeurl."' + '/wp-login.php?action=logout');
    
   }
   


</script>";
?>
</main><!-- #main -->

</div>
<!-- END iframe div -->
<?php get_footer('custes'); ?>

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

Re-solved: TESSERACT Theme: 100% width example how to

Post by axew3 »

Tesseract theme 100% iframe full width how to

before to start with something else, i've no time to go deep with, but on fly this can be a fix very fast that will achieve the result of 100% width for your forum page on TESSERACT theme.

The problem: the theme, append to <div id="content_TesseractTheme" on each page call , the class="cf site-content" that is responsible (maybe you can check for this on css to fix in different way via css) of width in this case.

The fly solution:

Open your tesseract header.php template file, search on bottom for the follow code:

Code: Select all

<!-- #masthead -->

<?php if ( $tesheadr_layout == 'vertical-left' ) { ?>

<div id="content_TesseractTheme" class="cf site-content" style="margin-left:<?php echo $tesheadr_vertpadding; ?>px;">

<?php } elseif ( $tesheadr_layout == 'vertical-right' ) { ?>

<div id="content_TesseractTheme" class="cf site-content" style="margin-right:<?php echo $tesheadr_vertpadding; ?>px;">

<?php } else { ?>

<div id="content_TesseractTheme" class="cf site-content">

<?php } ?>
replace with:

Code: Select all

<!-- #masthead -->

<?php if (stripos($_SERVER['REQUEST_URI'], 'forum')) { ?>
<div id="content_TesseractTheme" style="margin-left:<?php echo $tesheadr_vertpadding; ?>px;">
<?php } elseif ( $tesheadr_layout == 'vertical-left' ) { ?>

<div id="content_TesseractTheme" class="cf site-content" style="margin-left:<?php echo $tesheadr_vertpadding; ?>px;">

<?php } elseif ( $tesheadr_layout == 'vertical-right' ) { ?>

<div id="content_TesseractTheme" class="cf site-content" style="margin-right:<?php echo $tesheadr_vertpadding; ?>px;">

<?php } else { ?>

<div id="content_TesseractTheme" class="cf site-content">

<?php } ?>
so with forum page, like this:

Code: Select all

<?php 
/**
 * The default basic template to display content for WP_w3all embedded phpBB
 * @package WordPress
 * @subpackage wp_w3all
 */
 // - axew3.com - //

// START DO NOT MODIFY

$w3forum_id  = isset($_GET["forum_id"]) ? $_GET["forum_id"] : '';
$w3topic_id   = isset($_GET["topic_id"]) ? $_GET["topic_id"] : ''; 
$w3post_id   = isset($_GET["post_id"]) ? $_GET["post_id"] : '';
$w3mode      = isset($_GET["mode"]) ? $_GET["mode"] : '';
$w3phpbbsid  = isset($_GET["sid"]) ? $_GET["sid"] : '';
$w3phpbb_viewforum  = isset($_GET["viewforum"]) ? $_GET["viewforum"] : '';
$w3phpbb_viewtopic  = isset($_GET["viewtopic"]) ? $_GET["viewtopic"] : '';
$w3phpbb_start  = isset($_GET["start"]) ? $_GET["start"] : '';
$w3allhomeurl = get_home_url();
   
if( preg_match('/[^0-9]/',$w3phpbb_start) OR preg_match('/[^0-9]/',$w3topic_id) OR preg_match('/[^0-9]/',$w3phpbb_viewtopic) OR preg_match('/[^0-9]/',$w3phpbb_viewforum) OR preg_match('/[^0-9]/',$w3forum_id) OR preg_match('/[^0-9]/',$w3post_id) OR preg_match('/[^0-9A-Za-z]/',$w3mode) OR preg_match('/[^0-9A-Za-z]/',$w3phpbbsid) ){

	die("Something goes wrong with your URL request, <a href=\"$w3allhomeurl\">please leave this page</a>.");
}

$w3logout = $w3mode;

$w3urlscheme = parse_url($w3all_url_to_cms);
$w3urlscheme = $w3urlscheme['scheme'];

$w3all_target_server = preg_replace('/^[^\.]*\.([^\.]*)\.(.*)$/', '\1.\2',$w3all_url_to_cms); // REVIEW this

// build correct links x iframe

  if (!empty($w3forum_id) && empty($w3phpbb_viewforum)){
    $uiframe = "/viewtopic.php?f=".$w3forum_id."&p=".$w3post_id."#p".$w3post_id."";
    $w3all_url_to_cms .= $uiframe;
  }  elseif (!empty($w3phpbb_viewforum) && !empty($w3post_id) ) {
     $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&p=".$w3post_id."#p".$w3post_id."";//exit;
    
}
  elseif (!empty($w3forum_id) && !empty($w3topic_id)) {
    $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3topic_id."";
} elseif (!empty($w3phpbb_viewforum) && empty($w3phpbb_viewtopic)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewforum.php?f=". $w3phpbb_viewforum ."";
} elseif (!empty($w3phpbb_viewtopic) && empty($w3phpbb_start)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3phpbb_viewtopic."";
} elseif (!empty($w3phpbb_viewtopic) && !empty($w3phpbb_start)) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/viewtopic.php?f=". $w3phpbb_viewforum ."&t=".$w3phpbb_viewtopic."&start=".$w3phpbb_start."";
} elseif (stristr($w3mode, "register")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=register";
} elseif (stristr($w3mode, "sendpassword")) {
   $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=sendpassword";
} elseif (stristr($w3mode, "login")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=login";
}  elseif (stristr($w3mode, "logout")) {
    $w3all_url_to_cms = $w3all_url_to_cms . "/ucp.php?mode=logout&sid=". $w3phpbbsid ."";
} 
 else {
	$w3all_url_to_cms = $w3all_url_to_cms;
}

// the modal screen // css

function wp_w3all_css_modal_login() {
 	
 $w3all_cssmodal = "<style type=\"text/css\">
 .w3allmodalDialog {
	position: fixed;
	font-family: Arial, Helvetica, sans-serif;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.8);
	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.w3allmodalDialog:target {
	opacity:1;
	pointer-events: auto;
}

.w3allmodalDialog > div {
	width: 400px;
	position: relative;
	margin: 10% auto;
	padding: 5px 20px 13px 20px;
	border-radius: 10px;
	background: #fff;
	background: -moz-linear-gradient(#fff, #999);
	background: -webkit-linear-gradient(#fff, #999);
	background: -o-linear-gradient(#fff, #999);
}
.w3allclose {
	background: #606061;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: -12px;
	text-align: center;
	top: -10px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
	-moz-box-shadow: 1px 1px 3px #000;
	-webkit-box-shadow: 1px 1px 3px #000;
	box-shadow: 1px 1px 3px #000;
}

.w3allclose:hover { background: #333; }


</style>
";

	echo $w3all_cssmodal;
 	
}

 add_action('wp_head','wp_w3all_css_modal_login');

 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 w3all_cssmodal_login div -->
<div id="w3allopenModal" class="w3allmodalDialog">
	<div>
		<a href="#w3allclose" title="Close" class="w3allclose">X</a>
		<form method="post" action="<?php echo $w3all_url_to_cms; ?>/ucp.php?mode=login" class="">
	<h3><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=register">Register</a></h3>
			<label for="username"><span>Username:</span> <input type="text" tabindex="1" name="username" id="username" size="10" class="" title="Username"></label>
			<label for="password"><span>Password:</span> <input type="password" tabindex="2" name="password" id="password" size="10" class="" title="Password" autocomplete="off"></label>
							<br /><br /><a href="<?php echo $wp_w3all_forum_folder_wp; ?>/?mode=sendpassword">I forgot my password</a>
										<span class="">|</span> <label for="autologin">Remember me <input type="checkbox" tabindex="4" name="autologin" id="autologin"></label>
						<input type="submit" tabindex="5" name="login" value="Login" class="">
			<input type="hidden" name="redirect" value="<?php echo $w3urlscheme . "://" . $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; ?>">
	</form>
	</div>
</div><!-- END w3all_cssmodal_login div -->
<!-- START iframe div -->

<div id="primary" class="full-width-page no-sidebar" style="">

		<main id="main" class="site-main" role="main">


<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="<?php echo $w3all_url_to_cms;?>">visit the full forum page here</a>.<br /><br /></h3></noscript>
<iframe style="width:100%;border:0 !important;" src="<?php echo $w3all_url_to_cms; ?>"></iframe>

		<?php

		echo "<script type=\"text/javascript\">

    	iFrameResize({
    
				log                     : false,
				inPageLinks             : true,
			  targetOrigin: '".$w3urlscheme."://".$w3all_target_server."', 
       // 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
					);
		
				// w3all simple js check and redirects
				
				var w3all_passed_url = messageData.message.toString();
				

				
			  var w3all_ck = \"".$_SERVER['SERVER_NAME']."\";
        
         var w3all_pass_ext  = (w3all_passed_url.indexOf(w3all_ck) > -1);

    if (w3all_pass_ext == true) {
     	window.location.replace(w3all_passed_url); 
     }

   if (/^(f|ht)tps?:\/\//i.test(w3all_passed_url)) {
    window.location.replace(w3all_passed_url); 
   }
  
  var   w3all_ck2 = 'ucp.php?mode=login';
  var w3all_pass_login  = (w3all_passed_url.indexOf(w3all_ck2) > -1);

 if (w3all_pass_login == true) {

   var w3_login_modallink = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?#w3allopenModal';
    window.location.replace(w3_login_modallink);
  } 
  
   var   w3all_ck3 = 'ucp.php?mode=logout';
   var w3all_pass_login_out  = (w3all_passed_url.indexOf(w3all_ck3) > -1);
 
 if (w3all_pass_login_out == true) {
    window.location.replace('".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/'); 
   }
   
    var   w3all_ck4 = 'quickmod';
   var w3all_phpBBquickmod  = (w3all_passed_url.indexOf(w3all_ck4) > -1);
 
 if (w3all_phpBBquickmod == true) {
 window.scrollTo(0, 200);
   }
   
       var   w3all_ck_reply = 'mode=reply';
   var w3all_1_ck_reply  = (w3all_passed_url.indexOf(w3all_ck_reply) > -1);
 
 if (w3all_1_ck_reply == true) {
 window.scrollTo(0, 200);
   }

// if phpBB lightbox
   
   var   w3all_ck5 = 'getw3all_lightbox';
   var w3all_phpBB_lightbox  = (w3all_passed_url.indexOf(w3all_ck5) > -1);
 
     if (w3all_phpBB_lightbox == true) {
     window.scrollTo(0, 150);
   }
   
  
// push passed url to the browser history if on index.php
       var   w3all_ck8 = 'index.php';
       var w3all_viewmainindex_push  = (w3all_passed_url.indexOf(w3all_ck8) > -1);
      if (w3all_viewmainindex_push == true) {
        var w3matches = /index\.php$/ig.exec(w3all_passed_url);
       if (w3matches) {  
        w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."';
        history.replaceState('', 'Index', w3all_passed_url_push); 
      }  
     }
   
// push passed url to the browser history if on viewforum.php
       var   w3all_ck7 = 'viewforum.php';
    var w3all_viewforum_push  = (w3all_passed_url.indexOf(w3all_ck7) > -1);
    if (w3all_viewforum_push == true) {

    var w3matches = /viewforum\.php\?f=([0-9]+)/ig.exec(w3all_passed_url);
       
      w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1];
      history.replaceState('', 'Forum', w3all_passed_url_push); 
     }
     
   
   
// push passed url to the browser history if on viewtopic.php

    var   w3all_ck6 = 'viewtopic.php';
    var w3all_viewtopic_push  = (w3all_passed_url.indexOf(w3all_ck6) > -1);
    
  if (w3all_viewtopic_push == true) {

       var w3matches = /viewtopic\.php\?.*([0-9]+).*&(p|t)=([0-9]+)(&start=|#p)?([0-9]+)?/ig.exec(w3all_passed_url);
       
    if(!w3matches[4]){
       w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&viewtopic=' + w3matches[3];
     	history.replaceState('', 'Topic', w3all_passed_url_push); 
     } else if (w3matches[4] == '#p'){
           w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&post_id=' + w3matches[5];
          	history.replaceState('', 'Topic', w3all_passed_url_push); 
      } else {
       w3all_passed_url_push = '".$w3allhomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?viewforum=' + w3matches[1] + '&viewtopic=' + w3matches[3] + w3matches[4] + w3matches[5];
     	history.replaceState('', 'Topic', w3all_passed_url_push); 

   } }
   

				}
			});


 var w3allogout = '".$w3logout."'; 
   if (w3allogout == 'logout') {
    window.location.replace('".$w3allhomeurl."' + '/wp-login.php?action=logout');
    
   }
   


</script>";
?>
</main><!-- #main -->

</div>
<!-- END iframe div -->
<?php get_footer('custes'); ?>
you'll have the 100% correct width for your embedded forum iframe.

p.s note that the little code you substitute into your header, contain this to achieve the result

Code: Select all

if (stripos($_SERVER['REQUEST_URI'], 'forum'))
change forum with the name of your page (so board if page-board.php) if different.
Hope now you'll have a good point to start from. This is a way, there are many of course.

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

Re-solved: TESSERACT Theme 100% width correct example result

Post by axew3 »

header and footer, and correct full width for the iframe
Attachments
ScreenHunter_85 Nov. 07 09.53.jpg
ScreenHunter_85 Nov. 07 09.53.jpg (114.8 KiB) Viewed 4892 times
ScreenHunter_84 Nov. 07 09.52.jpg
ScreenHunter_84 Nov. 07 09.52.jpg (121.41 KiB) Viewed 4892 times

Lee
User w
User w
Posts: 11
Joined: Thu Oct 27, 2016 7:59 pm

Re: TESSERACT Theme: phpbb not showing and page full width problem

Post by Lee »

Wow amazing! I'm gonna try this now! Thanks :)

Post Reply