Page 4 of 8

Re: Last topic widget + registration redirect to iframe

Posted: Thu Feb 20, 2020 5:13 pm
by axew3
Code on page-forum is wrong, because append two times query string, if the url is not fancy url! (as it is here, not default w3), so this the reason why the wrong result into your install, and not here!

Download the fixed page-forum, and replace into your active template folder, then rename into
page-board.php (as it is for you)
after you eliminated the existent page-board.php
page-forum.zip
(4.34 KiB) Downloaded 257 times
We should be now up and running ...
unfortunately, i will then release the 2.2.2 immediately, explaining that will be required to rebuild page-forum (or substitute manually like may you'll do and as above explained). Now all will work fine.


Changed code into page-forum:

this code

Code: Select all

// default
if( isset($_GET["w3"]) ){
 $phpbb_url = trim(base64_decode($_GET["w3"]));
 $w3all_url_to_cms = $w3all_url_to_cms . '/' . $phpbb_url;
	 if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/ui',$phpbb_url) ){
    $w3all_url_to_cms = $w3all_url_to_cms;
   }
}
// fancy
if( isset($_GET[$w3all_iframe_custom_w3fancyurl]) ){
 $phpbb_url = trim(base64_decode($_GET[$w3all_iframe_custom_w3fancyurl]));
 $w3all_url_to_cms = $w3all_url_to_cms . '/' . $phpbb_url;
	 if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/ui',$phpbb_url) ){
    $w3all_url_to_cms = $w3all_url_to_cms;
   }
}
has been fixed to be:

Code: Select all

if( isset($_GET["w3"]) ){ // default
 $phpbb_url = trim(base64_decode($_GET["w3"]));
 $w3all_url_to_cms = $w3all_url_to_cms . '/' . $phpbb_url;
	 if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/ui',$phpbb_url) ){
    $w3all_url_to_cms = $w3all_url_to_cms;
   }
} elseif ( isset($_GET[$w3all_iframe_custom_w3fancyurl]) && empty($w3forum_id) ){ //fancy
 $phpbb_url = trim(base64_decode($_GET[$w3all_iframe_custom_w3fancyurl]));
 $w3all_url_to_cms = $w3all_url_to_cms . '/' . $phpbb_url;
	 if( preg_match('/[^-0-9A-Za-z\._#\:\?\/=&%]/ui',$phpbb_url) ){
    $w3all_url_to_cms = $w3all_url_to_cms;
   }
}
2.2.2 has been released, it contain the new page-forum.php
/wp-content/plugins/wp-w3all-phpbb-integration/addons/page-forum.php
[EDITED]

Re: Last topic widget + registration redirect to iframe

Posted: Thu Feb 20, 2020 6:33 pm
by Dysphoria
It is solved, thanks!

To be sure. What else should be updated besides the page-forum.php?

Re: Last topic widget + registration redirect to iframe

Posted: Thu Feb 20, 2020 6:47 pm
by axew3
Just update the plugin to latest 2.2.2 just released, that will contain then the updated page-forum.php
Then you can rebuild into plugin admin, automatically, the page-forum.php, OR manually copy it into
/wp-content/plugins/wp-w3all-phpbb-integration/addons/page-forum.php
and paste into the active template folder, renaming as needed (that you already done)
OR as explained above, edit manually existing page-forum code.

In your case, you have to do nothing, since you updated it manually. Update the plugin if not already done, to 2.2.2, this just will update the file into
/wp-content/plugins/wp-w3all-phpbb-integration/addons/page-forum.php, nothing else (except that the plugin will result updated to latest)

Re: Last topic widget + registration redirect to iframe

Posted: Thu Feb 20, 2020 8:24 pm
by Dysphoria
Thanks!

But sorry, I've got another issue now. When I'm logged out the last topic links and the register links don't redirect to their pages anymore. When I'm logged in, the last topic links seem to work.

Re: Last topic widget + registration redirect to iframe

Posted: Thu Feb 20, 2020 9:27 pm
by axew3
Dysphoria wrote: Thu Feb 20, 2020 8:24 pm But sorry, I've got another issue now. When I'm logged out the last topic links and the register links don't redirect to their pages anymore. When I'm logged in, the last topic links seem to work.
Why your links returns something like:

Code: Select all

https://talkatastic.be/index.php/index.php/index.php/forum/?mode=sendpassword
what is the url you setup into plugin admin, where url setting?

Re: Last topic widget + registration redirect to iframe

Posted: Thu Feb 20, 2020 9:29 pm
by Dysphoria
No clue, it didn't do that before.

Code: Select all

https://talkatastic.be/board