Posts: 13
Threads: 3
Joined: Jun 2022
Hello,
I correctly integrate a website into my installation of website.
But now I want to use my second site without installation.
How is it possible ?
I tried to integrate with iframe but I can not modify styles.
I tried to use with php : file_get_contents
But I do not know parameters.
Please help.
Posts: 2,905
Threads: 59
Joined: Jun 2010
Hi Ben,
The only way to integrate a second website is to use the iFrame integration.
You can modify the styles using the built-in CSS Editor module, but the styles will affect both your first website and second website, so choose a style that suits both if possible.
Have
you completed
the interview?
Posts: 13
Threads: 3
Joined: Jun 2022
Many thanks Steven.
Now, I have this error message : Error: Could not be loaded from the domain 'monglucko.com'
What could I do ?
Is it possible to integrate a specific style after mini.style.css of commentics ?
Like : domain.com.css if file is present ?
Posts: 2,905
Threads: 59
Joined: Jun 2010
Have
you completed
the interview?
Posts: 13
Threads: 3
Joined: Jun 2022
Many thanks for your answers.
Posts: 13
Threads: 1
Joined: Nov 2024
(26-Jul-2023, 03:35 PM)Steven Wrote: Hi Ben,
The only way to integrate a second website is to use the iFrame integration.
You can modify the styles using the built-in CSS Editor module, but the styles will affect both your first website and second website, so choose a style that suits both if possible.
I tried a different approach to supporting two sites. At first I just tried to use it cross-origin, but then I found my permissions weren't allowing the server-side include done by the require statement. So I put a separate instance of Commentix in each domain, but pointed them to the same database. I saw no reason why they couldn't both share the same settings and data, if both sites were listed in Manage / Sites and there was no ambiguity between the page identifiers. But it still doesn't work: site B renders resources from site A which then get blocked as cross-site, and when you hit the submit button it tries to post back to site A's instance, even though the form was rendered from site B.
My best guess is that which server it's requesting clientside resources from and posting the input back to must be controlled by the System settings. Given this fact, I don't understand what the Sites list is even good for, but maybe it's useful for iframes. I didn't want to use that approach but maybe it beats trying to synchronize the settings between two databases. Ideally, maybe the host site should be set in config.php like the database credentials, instead of within the database itself.
Posts: 13
Threads: 1
Joined: Nov 2024
I tried using iframe mode. It did not help! It still failed to either load resources or post the comment because site B was rendering references to site A inside the iframe. It renders the form but then you can't use it. I gained nothing by creating two instances of the PHP code.
(Site A works fine. It uses inline mode.)
Posts: 13
Threads: 1
Joined: Nov 2024
(07-Nov-2024, 03:11 AM)paulkienitz Wrote: I tried using iframe mode. It did not help! It still failed to either load resources or post the comment because site B was rendering references to site A inside the iframe. It renders the form but then you can't use it. I gained nothing by creating two instances of the PHP code.
(Site A works fine. It uses inline mode.)
Maybe I can go back to one instance with allow-same-origin on the iframe?
Posts: 13
Threads: 1
Joined: Nov 2024
Okay, using a single instance with an iframe works. It's hosted on A, and site A has it inline while site B uses the iframe. Now I just have to edit a bunch of CSS to try to get the iframe version looking like the inline version.
Posts: 13
Threads: 1
Joined: Nov 2024
There is one distinct drawback to using an iframe from another host, besides the extra CSS editing I had to do: the cookie to prefill the name and email fields isn't working. Maybe I can tweak the iframe permissions or something.