Page 4 of 5
Re: Get custom page link (and email activation) rewrite to redirect to iframed phpBB?
Posted: Mon Apr 30, 2018 5:18 pm
by axew3
ok i've understand now, thank you to explain this in other words: also this domain is running in an "onion server" like your, a shared virtual server where at same ip are running thousand of domains: i remember time ago i have try out to check all these registered domains: it was something like to knowing the real domain ip, passing it to a common check domain online tool ... i was impressed on how many domains were resulting running at same ip! While w3tasks.com is a dedicated server and if this example were installed there, it would be really more fast.
i will try to check if there is possible something in the way you have well explain, but that maybe it isn't applicable here, let me think/see on it some while, or to some other solution.
One right now in mind ... change the server hosting provider! Can i ask you were your domain is hosted and how much it cost to you by month?
Re: Get custom page link (and email activation) rewrite to redirect to iframed phpBB?
Posted: Mon Apr 30, 2018 5:27 pm
by mLgz0rn
axew3 wrote: ↑Mon Apr 30, 2018 5:18 pm
ok i've understand now, thank you to explain this in other words: also this domain is running in an "onion server" like your, a shared virtual server where at same ip are running thousand of domains: i remember time ago i have try out to check all these registered domains: it was something like to knowing the real domain ip, passing it to a common check domain online tool ... i was impressed on how many domains were resulting running at same ip! While w3tasks.com is a dedicated server and if this example were installed there, it would be really more fast.
i will try to check if there is possible something in the way you have well explain, but that maybe it isn't applicable here, let me think/see on it some while, or to some other solution.
One right now in mind ... change the server hosting provider! Can i ask you were your domain is hosted and how much it cost to you by month?
I cost me nothing :p it's hosted on a virtual server at my friends work.
So there's not really much I can do.
Re: Get custom page link (and email activation) rewrite to redirect to iframed phpBB?
Posted: Mon Apr 30, 2018 5:41 pm
by axew3
ah ok!
https://www.arubacloud.com/
you can also try it for free for a month (voucer on bottom of page). The cost is really low, do not know if there is over all internet a chip service like this: they can deploy your virtual cloud machine also in England (but maybe you're USA).
I say this not because they are Italian, but because they work really nice. You may have the ability to manage a dedicated server like these.
Maybe in USA or elsewhere there are more chip offers, working fine like this. I assume you had choose one if it was what you wanted.
... Of course, your service seem to be unbeatable about cost, since it is free, just ask your friends to give you more bandwidth!
Re: Get custom page link (and email activation) rewrite to redirect to iframed phpBB?
Posted: Mon Apr 30, 2018 8:11 pm
by axew3
on fly and with custom links passed, this test code should work.
change/substitute the part of JS code related to the
onclick trick, that you have add into
overall_footer.html
Code: Select all
$( "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&', ''));
});
with this code:
Code: Select all
$( "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.
// for app.php url type
var ckApp = (href.indexOf('app.php/') > -1);
if ( ckApp == true ){
var hrefApp = href.split('app.php/');
var hA = hrefApp[0] + 'app.php/iframe=true/' + hrefApp[1];
$(this).attr("href", hA); // send out before mouseup ...
//http://rng.clanroyal.dk/forums/app.php/iframe=true/applicationform
}
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");
var ck0 = (href.indexOf('iframe=true/') > -1);
if ( ck0 == true ){
$(this).attr("href", href.replace('iframe=true/', ''));
} else {
$(this).attr("href", href.replace('iframe=true&', ''));
}
});
it can be coded better, so maybe this will not be the definitive coming code version to add into overall_footer.html, and that will be published on plugin update, but the result will be leaved in place, with this or some other code that will lead to same results for
app.php url types.
I'll go to clean up this thread by posts that aren't strictly about the topic, because it start to be a good tutorial/remind to sticky.
Let know if this work as expected.
Re: Get custom page link (and email activation) rewrite to redirect to iframed phpBB?
Posted: Tue May 01, 2018 10:45 pm
by mLgz0rn
axew3 wrote: ↑Mon Apr 30, 2018 8:11 pm
on fly and with custom links passed, this test code should work.
change/substitute the part of JS code related to the
onclick trick, that you have add into
overall_footer.html
Code: Select all
$( "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&', ''));
});
with this code:
Code: Select all
$( "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.
// for app.php url type
var ckApp = (href.indexOf('app.php/') > -1);
if ( ckApp == true ){
var hrefApp = href.split('app.php/');
var hA = hrefApp[0] + 'app.php/iframe=true/' + hrefApp[1];
$(this).attr("href", hA); // send out before mouseup ...
//http://rng.clanroyal.dk/forums/app.php/iframe=true/applicationform
}
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");
var ck0 = (href.indexOf('iframe=true/') > -1);
if ( ck0 == true ){
$(this).attr("href", href.replace('iframe=true/', ''));
} else {
$(this).attr("href", href.replace('iframe=true&', ''));
}
});
it can be coded better, so maybe this will not be the definitive coming code version to add into overall_footer.html, and that will be published on plugin update, but the result will be leaved in place, with this or some other code that will lead to same results for
app.php url types.
I'll go to clean up this thread by posts that aren't strictly about the topic, because it start to be a good tutorial/remind to sticky.
Let know if this work as expected.
Okay so that does not work exactly as expected
First time I rightclick the page I get
http://rng.clanroyal.dk/forums/app.php/ ... frame=true
if I rightclick it one more time I get
http://rng.clanroyal.dk/forums/app.php/ ... frame=true
Oh and by the way, I fixed the loading times of the iframed wp forum with some sick caching
Re: Get custom page link (and email activation) rewrite to redirect to iframed phpBB?
Posted: Wed May 02, 2018 9:52 am
by axew3
ok maybe change with this then:
Code: Select all
$( "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.
// for app.php url type
var ckApp = (href.indexOf('app.php/') > -1);
if ( ckApp == true ){
var hrefApp = href.split('app.php/');
var hA = hrefApp[0] + 'app.php/iframe=true/' + hrefApp[1];
$(this).attr("href", hA); // send out before mouseup ...
//http://rng.clanroyal.dk/forums/app.php/iframe=true/applicationform
}
else 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");
var ck0 = (href.indexOf('iframe=true/') > -1);
if ( ck0 == true ){
$(this).attr("href", href.replace('iframe=true/', ''));
} else {
$(this).attr("href", href.replace('iframe=true&', ''));
}
});
I've not test it with a real example, but now should work fine in this way (i assume the code was executed by the way, now should only when needed).
Nice about your solution about loading so have a nice follow up, cheers