help for newbie

krispassion
Posts: 4
Joined: Mon Dec 11, 2017 5:25 pm

help for newbie

Post by krispassion »

Ok, i've red some posts but i'm afraid of blowing up my site or forum.
I've done everything up to the point of the template. Now i want to have a page on my site with the linked forum.

So:
WP_w3all Path and Url configuration - done!

Now, i'm not sure if i upload some template on /forum or on /wp... there's also code i'm not comfortable with..

WP_w3all phpBB embedded on WordPress Template «« at this point i'm stuck.

I've this structure:
Sem Título.png
Sem Título.png (2.16 KiB) Viewed 3344 times
so the link "/forum" already exists, i'm totally lost about this part of the plugin configuration:
print plugin.png
print plugin.png (71.51 KiB) Viewed 3344 times
and i've read the article!

After you have activate the WP_w3all phpBB embedded on WordPress Template iframe links option on admin wp_w3all config, and built/created the forum template page under WP_w3all phpBB embedded on WordPress Template, (read hints on wp_w3all admin config page) and the blank page on WordPress admin (Pages -> Add New, titled as the created wp_w3all template page, so forum or board etc…), to complete the procedure and get the responsive iframe height for the embedded phpBB into WordPress template you need:


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

Re: help for newbie

Post by axew3 »

hello! hey i know my Eng is horrible and i really hope that someone else before or later will put an hand on the messy documentation helping to make it more clear, ... i have promise myself to rewrite it making it really more easy and well structured, but i'm sorry that until now, due to a bad period i've not find out the time. It will be done.

In the while ...
so as i can see, you have install phpBB into a subfolder named forum, where also WP is installed and have his folders (wp-content etc)
SO, you cannot use as name for the page that need to embed the iframe, the name forum.
This because if not, WP will found the folder forum that really exist.

Than you just need: choose forums, board, or one of others available.
example: set forums as name for the template to be build and click to build: it just will create a page-forums.php file into your active WP template folder (operation that you could do also manually, coping the file addons/page-forum.php into your WP active template folder) but more important, set the value of the iframed phpBB page for the plugin.
Now create a new blank page in WP admin (WP admin -> Pages -> Add New), naming it in the same way you've build the page to display the phpBB iframe in WP, so forums and leave it absolutely blank.

Now you should follow all others help instructions to add the code into your phpBB overall_footer.php and fix all the necessary as explained here:
https://www.axew3.com/w3/2016/02/embed- ... esponsive/
and if still in trouble, just post.

P.S check that the file wp_w3all.php has been just patched to resolve a problem, just re.download the plugin and overwrite all files, or just substitute the wp_w3all.php file as explained here:
viewtopic.php?f=2&t=615#p2512
and at wp.org forum, on 1.7.8 patch logs.

1.7.9 is coming and will contain numerous fixes!

[EDITED]
krispassion
Posts: 4
Joined: Mon Dec 11, 2017 5:25 pm

Re: help for newbie

Post by krispassion »

So i decided to call my page community.
Did all the steps. The page is blank... Should i start over? hit the button again?

i thik you can see the page in the link
http://opoarch.com/community/

Shouldn't the new page , 'community' i've created have some king of short code there?

I see the file: "page-community.php" in /public_html/opoarch.com/wp-content/themes/onepress
and the iframeResizer.contentWindow.min.js is in /public_html/opoarch.com/forum/styles/Hexagon/template
already edited.. Do you have any clue what might be wrong? :cry:

Thank you for the help!!
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: help for newbie

Post by axew3 »

ok! All is ok but seem that in some config (so i'll go to patch/update the addons/page-forum.php) the value of the URL setting you should have setup into WP_w3all config page as value:
https://opoarch.com/forum
is lost in some way (have you setup it?), so, open your page-community.php into your template folder and search for this line:

Code: Select all

$wp_w3all_forum_folder_wp = get_option('w3all_forum_template_wppage');
immediately after add the follow:

Code: Select all

$w3all_url_to_cms  = get_option( 'w3all_url_to_cms' );
after, i see that your overall_footer.html isn't containing all the needed code, that in your case should be (almost) this:

Code: Select all

<script type="text/javascript">
	
document.domain = 'opoarch.com'; // THIS IS MANDATORY! Set/Change this value to your domain (example: axew3.com (or leave localhost if on localhost)) 
 
var w3all_doc_domain = document.domain;
 
  $(document).on("click", "a", function() {
   var href = $(this).attr("href");
  $(this).attr("href", href.replace('iframe=true&', '')); // remove! or get loop in htaccess if our var has been appended before ...
   var w3allappend = 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_onview_post = /#p[0-9]+/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);
   var w3all_onsubmit_post = /^post?/ig.exec(href);
  
var mfs = $(this.window).scrollTop() + 0; // may change to 100, or 200 the 0 value here, to better fit your WP theme on scroll 
    if ( w3all_onclick_smile === false && w3all_onview_attach === false ) {
   if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,mfs);
  }
  if ('parentIFrame' in window) window.parentIFrame.sendMessage(w3allappend);
});
 
///////////////////////////////////////////////////////////////////////////
// w3all Ajax UPDATES for phpBB events
 
if (window.frameElement) { // if in iframe mode ... to avoid js error w3all_ajaxup_from_phpbb is not a function when forum called not iframe mode (that you can also trascure maybe) if phpBB is surfed by full address and not iframe
 
/* // remove this line to activate the follow to activate ajax PM count update for iframe page forum
window.onload = function() {
var pmn = "{PRIVATE_MESSAGE_COUNT}";
var w3all_phpbb_u_logged = "{S_USER_LOGGED_IN}";
// to send to wp at once here, like this: #w3all_phpbbpmcount=val#w3all_phpbbnotifycount=val#etc etc etc
var w3appendevents = '#w3all_phpbbpmcount=' + pmn + '#w3all_phpbb_u_logged=' + w3all_phpbb_u_logged;
parent.w3all_ajaxup_from_phpbb(w3appendevents);
}
 
/* // remove this line to activate
///////////////////////////////////////////////////////////////////////////
 
///////////////////////////////////////////////////////////////////////////
// htaccess trick for right click /copy/paste/ links
// to apply htaccess rules and rewrite urls for this and email notification, please read this tutorial:
// https://www.axew3.com/w3/2017/04/wp_w3all-htaccess-javascript-rewrite-links-point-iframe-how-to/
 
// remove starting /* and ending */ 
// that wrap the code here below to activate
 
/* // remove this line to activate click /copy/paste/ links x htaccess
 
$( "a" ).contextmenu(function() {
  var href = $(this).attr("href");
  var shortlink = /^#p[0-9]+/ig.exec(href);
	var ck  = (href.indexOf('iframe=true') > -1);
	var ckl = /^(http[s]?:\/\/[-a-z0-9\.]+)/ig.exec(href); // check if link point to external resource: a passed phpBB url (attr("href")) is relative, not absolute: so we assume that if http(s) is present, 
	// than it should be a link that point to an external iframe resource. Can be improved further more using this same pattern result.
	
	 if ( ck == false && ckl == null && shortlink == null ){ // not re-append // not append if short link like #p49 (link of the post on viewtopic) or passed link point to an external resource
	 	  var href0 = href.split('?');
	 	  if(href0[1] == null){ href0[1] = ''; } else { href0[1] = '&' + href0[1]; }
      var href1 = href0[0] + '?iframe=true' + href0[1];
    $(this).attr("href", href1); // send out before mouseup ...
   }
});
$( "a" ).mouseup(function() { // but remove on mouseup, or leaving iframe=true we'll loop with htaccess ...
  var href = $(this).attr("href");
  $(this).attr("href", href.replace('iframe=true&', ''));
});
 
*/  // remove this line to activate click /copy/paste/ links x htaccess
///////////////////////////////////////////////////////////////////////////
 
// TO ACTIVATE phpBB lightbox events remove /* and */ here below
// NOTE: Due to last update fix, this should not be more required, as in any other phpBB mod
/* 
$(document).on('mouseup', '.postimage', function(){
 //var w3allappend = "getw3all_lightbox";
 if ('parentIFrame' in window) window.parentIFrame.scrollToOffset(0,0);
 //if ('parentIFrame' in window) window.parentIFrame.sendMessage(w3allappend);
});
*/
 
} // END if (window.frameElement) {
</script>
<script type="text/javascript" src="https://opoarch.com/forum/iframeResizer.contentWindow.min.js" defer></script>
remember to rebuild the phpBB template.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: help for newbie

Post by axew3 »

p.s yours WP_w3all PATH and URL settings:

about the path, try to get it looking into this help:
viewtopic.php?f=7&t=61#p216

about your url setting should be:
https://opoarch.com/forum

the default addons/page-forum.php at WordPress repository has been patched/updated to fix the problem about the fact that in some template or WP configurations, the URL setting is lost:
https://plugins.trac.wordpress.org/expo ... -forum.php
krispassion
Posts: 4
Joined: Mon Dec 11, 2017 5:25 pm

Re: help for newbie

Post by krispassion »

THANK YOU

Its a bit awkward now, i can only see a slice of the forum, but i remember seeing somewhere something about height problems (witch ill start looking for right now).

So at least everything else must have been done right i think. Because the only change i did now was your code on overall_footer.html
The line in page-community.php i had already made, so no changes there.

I admit, was about do use bbpress or asgaros - though it was not the intended result! Those are not complete forum like.

I'll post again if in any trouble! :D
Post Reply