2.2.9 phpBB WordPress released

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

2.2.9 phpBB WordPress released

Post by axew3 »

Code: Select all

== Changelog ==

= 2.2.9 =
*Release Date - 02 Mar, 2020*
* Fix: 'create_phpBB_user_wpms()' function, to correctly add users into phpBB without errors, on certain configurations
* Fix: same mentioned function to correctly handle last added 'Fix Signups' option
* Fix: (iframe links switch widgets/shortcode) 'function w3all_iframe_href_switch()' wrongly enqueued into wp_head hook (now it has been correctly switched into wp_footer). It was may causing that even with option 'switch links to point to iframe' active into main plugin admin page, the switch for links on widget and shorcodes was not working (and without overall_header.html code applied, phpBB real url display/open, because links were pointing to real phpBB urls (not switched))

Dysphoria
User ww
User ww
Posts: 43
Joined: Tue Feb 11, 2020 8:45 am

Re: 2.2.9 phpBB WordPress released

Post by Dysphoria »

So, for all the new updates I just need to update page-forum.php and the resizer? Or is there anything else? Just to be sure.

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

Re: 2.2.9 phpBB WordPress released

Post by axew3 »

Hello! Nothing at all, just update the plugin.

P.s the created page-forum into template folder, and phpBB js code, are substantially completely independent, not updated when plugin update (that's maybe obvious). Each time something happen about iframe changes (js lib files, page forum or phpBB overall_footerORheader code) it is always noticed into Changelog or releases related forum's posts.

What about the widget result into your example, still with index.php/index.php?

Dysphoria
User ww
User ww
Posts: 43
Joined: Tue Feb 11, 2020 8:45 am

Re: 2.2.9 phpBB WordPress released

Post by Dysphoria »

Oh, thank you!

Yeah, it's still doing that weird thing. Now there are three index.php/, lol.

Code: Select all

https://talkatastic.be/index.php/index.php/index.php/forum/?forum_id=16&topic_id=75&post_id=1189#p1189

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

Re: 2.2.9 phpBB WordPress released

Post by axew3 »

Yeah it was coming out with 3 also before: the fix apllied can't affect the result you have, because this fix affect only the fact that when you point mouse over links into widgets or shortcodes, it is switched to point to WP forum page, instead then direct phpBB real url. It is seo tricky, and with overall_header.html code, you could also disable the option to switch links for iframe, because any real url will cause by the way a page reload, to the WP forum page (with iframed phpBB).
This Javavascript code, was added (wrongly) since last updates, enqueued to header, now into footer but this not change substantially nothing about the problem you have, because in your case it seem to me (but may i'm wrong):
when links are built into views/phpbb_last_topics.php

Code: Select all

 if ( $w3all_iframe_phpbb_link_yn == 1 ){ // if on iframe mode, links are in this way (js trick x seo added)

  	// this build the iframe href to switch to, if iframe links are active: the url to iframed Wp page is only passed onmouseover, so a crawler will see the real phpBB url to topic/post, while user will be redirect to iframed WP page

  	// see wp_w3all.php -> function w3all_widget_iframe_href(){

  	$ih = get_home_url()."/index.php/$wp_w3all_forum_folder_wp/?forum_id=$value->forum_id&topic_id=$value->topic_id&post_id=$value->post_id#p$value->post_id";  

  	$idsh = 'w3all' . $countn . mt_rand(999,500000); // guess (+- surely) to not build a duplicated ID for the 'a' element on page output, even with multiple widgets/shortcodes instances on same page ...
I would really know, what exactly this

Code: Select all

get_home_url()
into above code, cause the fact that it return index.php/index.php/index.php

if you substitute this line:

Code: Select all

$ih = get_home_url()."/index.php/$wp_w3all_forum_folder_wp/?forum_id=$value->forum_id&topic_id=$value->topic_id&post_id=$value->post_id#p$value->post_id";  
with this in your case:

Code: Select all

$ih = "https://talkatastic.be/index.php/$wp_w3all_forum_folder_wp/?forum_id=$value->forum_id&topic_id=$value->topic_id&post_id=$value->post_id#p$value->post_id";  
if you can try this, without having under hand the thing, may we can do a step over about the problem ... this is a stupid fix, like many other could
if you applied let me know the result, so we'll know what about

Code: Select all

get_home_url()
the other is to know, and there are no other possibilities, what $w3all_url_to_cms output here (little more after the above):

Code: Select all

 	if ( $w3all_avatars_yn ){

  	     		  echo "<li class=\"".$w3all_lastopics_style_li_class."\"><table style=\"border-spacing:0;border-collapse:collapse;vertical-align:middle;margin:0;border:0;\"><tr><td style=\"border:0;width:".$w3all_last_t_avatar_dim."px;\">".$w3all_avatar_display."</td><td style=\"border:0;width:auto\"><a id=\"".$idsh."\" onmouseover=\"w3allIframeHref('".$idsh."','".$ih."');\" href=\"$w3all_url_to_cms/viewtopic.php?f=$value->forum_id&amp;t=$value->topic_id&amp;p=$value->post_id#p$value->post_id\">$value->topic_title</a> ".$w3all_post_state_ru."<br />".__( 'by ' , 'wp-w3all-phpbb-integration' )." $value->topic_last_poster_name ".__( 'at ' , 'wp-w3all-phpbb-integration' ) . date_i18n( 'H:i Y-m-d', $value->topic_last_post_time + ( 3600 * get_option( 'gmt_offset' )) ) ."</td></tr></table></li>\n";

  	     	

  	     	} else {

  	     			echo "<li class=\"".$w3all_lastopics_style_li_class."\"><a id=\"".$idsh."\" onmouseover=\" w3allIframeHref('".$idsh."','".$ih."');\" href=\"$w3all_url_to_cms/viewtopic.php?f=$value->forum_id&amp;t=$value->topic_id&amp;p=$value->post_id#p$value->post_id\">$value->topic_title</a> ".$w3all_post_state_ru."<br />".__( 'by' , 'wp-w3all-phpbb-integration' )." $value->topic_last_poster_name ".__( 'at ' , 'wp-w3all-phpbb-integration' ) . date_i18n( 'H:i Y-m-d', $value->topic_last_post_time + ( 3600 * get_option( 'gmt_offset' )) ) ."</li>\n";

  	     	}
adding just before:

Code: Select all

if ( $w3all_avatars_yn ){
this:

Code: Select all

$w3all_url_to_cms = 'https://talkatastic.be/board';
that should be the value you had have set into plugin admin for the option URL that point to phpBB
then we'll know what's wrong with your config/result

Dysphoria
User ww
User ww
Posts: 43
Joined: Tue Feb 11, 2020 8:45 am

Re: 2.2.9 phpBB WordPress released

Post by Dysphoria »

Hey, sorry for my late response. I've done this, but it actually gives the same problem.

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

Re: 2.2.9 phpBB WordPress released

Post by axew3 »

Dysphoria wrote:
Tue Mar 10, 2020 6:16 am
Hey, sorry for my late response. I've done this, but it actually gives the same problem.
Hello! No Found the problem! it is just a javascript problem, into this function, on wp_w3all-php file

Code: Select all

function w3all_iframe_href_switch(){
 echo "<script>function w3allIframeHref(ids,res){ var e = document.getElementById(ids); e.setAttribute(\"href\", res); }</script>";
}:
Links output on widget is now correct, but when you put mouse over last posts (since you activated the switch links for iframe option) links are switched to point to iframe directly, without asking to overall_header code to switch if a direct/real phpBB url presented.

Code: Select all

https://talkatastic.be/board/viewtopic.php?f=16&t=58&p=2303#p2303
when mouseover occur become:

Code: Select all

https://talkatastic.be/index.php/index.php/index.php/index.php/forum/?forum_id=16&topic_id=58&post_id=2303#p2303
so let me check the stupid javascript making it return a correct result.

So strange that the result onmouseover, into your install/configuration lead to this result, since the href is now correct ...
let me wait some little time until solution to this will come out ...
anybody have an idea on how to resolve this (at moment) easy strange thing?

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

Re: 2.2.9 phpBB WordPress released

Post by axew3 »

could you try to switch (since jquery is queued already into your theme)

open wp_w3all.php file and where this:

Code: Select all

function w3all_iframe_href_switch(){
 echo "<script>function w3allIframeHref(ids,res){ var e = document.getElementById(ids); e.setAttribute(\"href\", res); }</script>";
}
replace with this:

Code: Select all

function w3all_iframe_href_switch(){
 echo "<script type=\"text/javascript\">function w3allIframeHref(ids,res){ ids='#'+ids;jQuery(ids).attr('href',res); }</script>
";
}

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

Re: 2.2.9 phpBB WordPress released

Post by axew3 »

The wp_w3all.php file has been patched about this, to try to cover any possibility, so you can also download the patched file on repository:
https://plugins.trac.wordpress.org/expo ... _w3all.php
and replace the file wp_w3all.php
into
/wp-content/plugins/wp-w3all-phpbb-integration/
folder. I guess that this will resolve also your index.php problem?

Post Reply