Page 1 of 5

Refresh in iframe mode:Can we stay on topic somehow?

Posted: Sun Apr 24, 2016 9:02 am
by falcon
Hi!

If we are on some topic and click on refresh button that will take us on Borad index. Is it possible to stay on the current topic (page) after refresh?

Thanks!

Refresh in iframe mode:Can we stay on topic somehow?

Posted: Sun Apr 24, 2016 9:15 am
by axew3
Before or later, i was sure this kind of question will come out.
Yes, but the thing need to be built. As soon i can!

Refresh in iframe mode:Can we stay on topic somehow?

Posted: Sun Apr 24, 2016 9:24 am
by falcon
Nice. Thanks! :)

Re: Refresh = Borad Index. Can we stay on topic somehow?

Posted: Sun Apr 24, 2016 1:23 pm
by axew3
In case viewing a topic, and refresh page: as part of the code that will be added on future, when all about maybe will be also rewrite to be more comfortable, (also to maintain), to achieve the above just do the follow:

open your page-(forum or board etc).php
search for this line:

Code: Select all

var w3all_passed_url = messageData.message.toString();
immediately after add this:

Code: Select all

var w3all_ck_r1 = 'viewtopic.php';
var w3all_pass_ck_r1  = (w3all_passed_url.indexOf(w3all_ck_r1) > -1);
var w3matches = /.*([0-9]+).*([0-9]+)/.exec(w3all_passed_url);
  if (w3all_pass_ck_r1 == true) {
  w3all_passed_url_push = '".$w3gohomeurl."/index.php/".$wp_w3all_forum_folder_wp."/?forum_id=' + w3matches[1] + '&topic_id=' + w3matches[2];
    window.history.pushState('', 'Topic', w3all_passed_url_push); 
     }
[/size]
Should work and solve the problem.

Refresh in iframe mode:Can we stay on topic somehow?

Posted: Sun Apr 24, 2016 9:57 pm
by falcon
Not work... :(
The requested topic does not exist.

Re: Refresh = Borad Index. Can we stay on topic somehow?

Posted: Mon Apr 25, 2016 12:46 am
by axew3
ok justified, i had 5 minutes waiting for motoGP, you know Valentino fever ...
So Nice! We have to fix for 1.2.6 the remember me autologin now i'm sure. In some circumstances fail. OK.
Less important but important, for iframe mode, we need to fix also the problem about when click into new reply, if there are many post the active textarea to write into is on top... same behavior as phpBB gallery photo. We will fix it adding the code. OK.

For the moment this instead should only fix the show correct topic on reload requested issue if you can test (the modification are little but important so to be sure instead to copy paste, simple substitute the page-(forum or board etc).php with this ( tested right now working this time, but let know as here are 03.00 in the morning here )

[attachment=0]page-forum(x1.2.6)_correct.zip[/attachment]

p.s also the correct regex pattern to apply was this:

Code: Select all

var w3matches = /.*([0-9]+).*&(p|t)=([0-9]+)/ig.exec(w3all_passed_url);