Page 1 of 5

Get custom page link (and email activation) rewrite to redirect to iframed phpBB?

Posted: Sun Apr 29, 2018 12:14 am
by mLgz0rn
So i got a custom page on my forum called http://rng.clanroyal.dk/forums/app.php/applicationform
Is there any way to link to this so it's still in an iframe on the wp forum page?

I enabled the htaccess trick for right click /copy/paste/ links and because of this it makes the link this when I try to copy it.
http://rng.clanroyal.dk/forums/app.php/ ... frame=true
this then takes me to the wp iframe forum index when I use that link.

Would it be possible to do something like you are doing with the forum links?
like http://rng.clanroyal.dk/index.php/forum ... cationform which then brings you to the custom page iframed?

Re: Get custom page link?

Posted: Sun Apr 29, 2018 6:58 am
by axew3
yes it is possible to pass anything and convert to work with.
The code should be applied into page-forum.php, and it's some quite easy to apply.
This part i wish to fix once for all as soon, before, or on 1.9.0, because it also contain bugs about wrong redirect in some circumstances.

How do you get the page in the way you build resulting with app.php? I know it is a stupid question, but this will speed up my next future answer and fix. Please point me to this so i will prepare on these days the new improved version of this joke.

In the while, i try to explain the thing.

On wp page-forum.php, to get this work also for this kind of links, should be added, where:

Code: Select all

$w3forum_id = isset($_GET["forum_id"]) ? $_GET["forum_id"] : '';
just after or before should be added the line of code that will grab this kind of links (containing app.php) and related value.
SO it need to be sanitized before to be used, adding the check just little below, where all other already added values are checked.
Then, where is the long elseif conditional list, should be added the correct assign of the url to pass for the iframe url if the checked url is of this kind.

Please just let me know how i should build an example page like yours (steps to achieve in short the page.app ... ), so i'll execute and i'll add here (and into default page-forum.php custom template file) the code to get what you want, that lack and need to be added.

The htaccess in this case, just redirect any link containing the iframe word to the iframed page, so you not need to resolve the correct redirect to the iframed page on htaccess instruction, but into page-forum.php that need to contain the code to switch to correct url, that is so passed as iframe src value.

Please, do this for me: explain the fast way to get your phpBB example page in my test.

P.s i see you have not resolve the phpBB loader position problem (question on the other topic). The problem is that the loader position should be changed to appear more on top:
on css file /ext/dmzx/loadingindicator/styles/prosilver/theme/loading_indicator.css
change:

Code: Select all

#loading-indicator {
	top: 40%;
... ...
give to the top value, a minor value (so it will display more on top, and will be visible, like:

Code: Select all

#loading-indicator {
	top: 10%;
try to navigate now and let reload templates, that will change at second time you refresh, the first time the code will be, as obvious, the old one so you still can't see the change:
also, may clean up cache on ACP main page -> Purge the cache -> Run now
if you see no changes take effect about preloader position (and maybe setup recompile stale templates for a while to YES if still nothing change, then reset to NO this value when done, or it will make your phpBB very slow also. About this, and your slow phpBB, it is set normally and actually this value to NO, into your phpBB?).
in accord with the above about css, you'll may (may not because in my test it work the same even changing the follow, but i've not go deep in this) change also the other css declaration where the value isset to 40% changing it into 10% (or to what you'll give as value on the above) so:

Code: Select all

background: url("./images/loading_indicator.gif") 0 10% no-repeat;
As said maybe this second change just in this way, lead to nothing.
Let me know how to apply (link me the how to page or just few lines of explain here in reply) the custom page in phpBB like your, so i not need to loose time on achieve it as example to produce the easy right code: i already lost my time often for my crazy tests, so please be patient and make me the way more easy.
[EDITED]

Re: Get custom page link?

Posted: Sun Apr 29, 2018 7:08 am
by axew3
P.S to be sure i'm on your same page ... (you know my eng is bad)
OR you just want to exclude this kind of links from the right click trick, so the page will be opened at his real URL and not into iframed wp page?

Re: Get custom page link?

Posted: Sun Apr 29, 2018 4:39 pm
by mLgz0rn
Pages in phpbb that comes from app.php are extensions.
So applicationform is an extension I have installed that creates a custom page, resulting in app.php/applicationform.

I have also just found out that you can enable url rewrite in phpbb acp under server settings, which removes app.php from extension links.

so http://rng.clanroyal.dk/forums/app.php/applicationform becomes http://rng.clanroyal.dk/forums/applicationform
As an extension author, you can not control if the link to your controller looks like /app.php/kb/ or /kb/... That is up to the admin (if the admin of the board enables the setting "Enable URL Rewriting" under server settings in the ACP, then it will remove the app.php part).

You should use the controller_helper to generate the URLs for you, i.e.:
'U_KB_LINK' => $phpbb_container->get('controller.helper')->url('kb'),
In my case kb is applicationform

I hope this is what you were asking for.
Here is a link for the extension btw, if you are interested in seeing how it builds that link https://www.phpbb.com/customise/db/exte ... ation_form

Another thing.
I noticed that when you get an email from the board when you have registered, it links to the normal board and not the iframed board in the message.
Image

Re: Get custom page link?

Posted: Sun Apr 29, 2018 4:40 pm
by mLgz0rn
axew3 wrote: Sun Apr 29, 2018 7:08 am P.S to be sure i'm on your same page ... (you know my eng is bad)
OR you just want to exclude this kind of links from the right click trick, so the page will be opened at his real URL and not into iframed wp page?
I want it to open in the iframed wp page :p

Re: Get custom page link?

Posted: Sun Apr 29, 2018 5:00 pm
by axew3
about the email link coming without "iframe" on url:
https://www.axew3.com/w3/2017/04/wp-w3a ... me-how-to/
you need to apply this into yours files as indicated, there are 3 ready on zip, edit all others you need should be easy but
let me know if any problem, i will help on preparing edited files for all others instances.

About my question, Yes it was what to me necessary to start fast!