Resizer is not working

madnnes

Resizer is not working

Post by madnnes »

Hello,

First of all, your script is the best! You really did a great job here! :)

I've tried to implement it and I've reached the point where I see the header of the forum, but not the whole part, like the resizer is not working or something like that.

Image

I've added and modified the lines in the overall_footer.html, but I didn't touched the header as I understood it's necessary to add the script only if I want to redirect the actual forum URL to the iframed one. And I don't want to do that for the moment.

iframeResizer.contentWindow.min.js fil is in the main phpbb folder and I can open it via the absolute path which I've described in the script.

I didn't used the short codes, because I didn't understood how to do it for the moment, but I can try later.

I've also tried to implement your suggestion for a manual resize via <div data-iframe-height=""></div>, but it didn't worked.

Any idea what could have been wrong here?
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Resizer is not working

Post by axew3 »

Hello, thank you! It will be very soon re-written line by line about the iframe integration!
I will return over after years, putting on it all what i can, of the best i know now! Hope it will be awesome :D
Especially the one via shortcode because it fit any modern WP new way to do templates.

About your resize problem: are you able to open the browser console, and see if there is some error?
It is via Shortcode or Page, the template iframe integration?

If it is via shortcode https://www.axew3.com/w3/2022/02/the-aw ... shortcode/
anyway you have to put the overall_header and footer code into phpBB templates files as described here:
https://www.axew3.com/w3/2020/01/phpbb- ... iframe-v5/
that i imagine already you did. The browser's console what say?
madnnes

Re: Resizer is not working

Post by madnnes »

Hey,

I've integrated the plugin via page. Tried via short code, but I'm missing something, because it didn't worked.
I've also added the code in the overall_header, but still the same.
Also what's curious is that keeping document.location.replace(href0); uncomment does not redirect the initial page to the iframed one.

Image
madnnes
User w
User w
Posts: 15
Joined: Tue Sep 26, 2023 8:39 am

Re: Resizer is not working

Post by madnnes »

Hey,

Not sure if you get my last reply, but I found that adding the script into overall_footer and overall_header and modifying it as per your recommendations is not doing anything.

I have tried to test and iframed a forum hosted on a subdomain, but it's the same. Moreover, I get additional errors:

Image

I think there is some article to solve the cross origin issue, but I can't find it anymore. Would you please paste the link here?
Also would you please clarify what should be put in the lines which I need to edit in overall_footer in case that my wordpress is on the main domain and the forum is on subdomain?
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Resizer is not working

Post by axew3 »

Hello, since your forum install is into a subdomain, due to this
https://developer.mozilla.org/en-US/doc ... gin_policy
seem it won't work anymore if you do not apply something on the server, which i discourage to do.

The iframe integration code will be updated to fix this aspect very soon!

Temp solution
https://stackoverflow.com/questions/756 ... low-origin
madnnes
User w
User w
Posts: 15
Joined: Tue Sep 26, 2023 8:39 am

Re: Resizer is not working

Post by madnnes »

Thanks a lot!

And what about my previous post and screenshot where the localhost is not considered as a suffix of the domain?
This is when the forum is located under the same domain where the site is, into a subfolder called 'forum'.
Post Reply