Template integration: parent WP page URLs push and common solutions
Posted: Wed Jul 10, 2024 8:31 am
This topic is reserved to explore all possible solutions, so to not have URLs pushed into the Parent WP forum page (the WP page that embed/display the phpBB iframed), and to have as result, at mean time, a good users navigation experience. Because it is not a point about SEO, that probably impact 0,1% of the total, due to the aspect above mentioned (maybe not completely well explained), anyway how much, it depend by how many external links you'll loose due to this, that could rank up your site and instead, maybe will not.Think that Peerke refer to the fact that for example, an user could copy the URL base64 encoded (WP page url) and go to share it, so it is true that:
1) if the template integration code will be removed, then those links will lead to nowhere.
2) if a BOT/SPIDER go to check it, because it has been pasted by someone into an external site, will be probably redirected to a NOT FOUND even while the template integration is used, because or will follow the redirect (but i do not know what bots/spiders do in those cases, normally they completely ignore javascript) or also just as the code is, since bots are excluded by run the overall_header js code (it start with <!-- IF not S_IS_BOT --><script>) then again, the BOT will not found any URL.
Of course bots access to the forum at the real url, and the js code do not affect, but if it is true that a ranking for a site is given also by how many external sites links his url, who know (i don't) if the bots will consider anyway to top up the ranking or simply ignore because the link url do not exist?
The first solution is very easy, do NOT push URLs into the Parent WP page, so users are forced to copy urls within the iframe, without the possibility to copy on the parent address bar:
open up page-forum(orWhateverNamed).php into your active template folder or the shortcode file /wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_iframe_short.php (depend which you are using, maybe both) then into, change this:
Chnage this line of code:
Code: Select all
history.replaceState({}, \"\", w3all_passed_url_push);
Code: Select all
//history.replaceState({}, \"\", w3all_passed_url_push);
ADD the follow:
Code: Select all
let w3all_passed_url_push = '".$w3allhomeurl."/".$wp_w3all_forum_folder_wp."/';
history.replaceState({}, \"\", w3all_passed_url_push);
The unique point here, that IS NOT covered, is this fact:
IF YOU RELOAD the page (the WP parent page), the iframe will always load on refresh, the phpBB index, NOT the post or topic we are on at the time we go to refresh.
I am over to fix this aspect, anybody know how it could be fixed?
[EDITED 3 times]