Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Abavagada on July 11, 2022, 02:22:01 PM

Title: Profile popup from website
Post by: Abavagada on July 11, 2022, 02:22:01 PM
I'm working to build a website around SMF 2.1.1.

I've got a page with calls to load SSI and the css and javascript.

I've copied in the code for the profile popup at the top left.

All seems to work fine. When I click on the member name to load the profile popup, the "loading..." line appears, but the popup doesn't load.
There is no other script on the page to interfere with it, and the javascript is obviously working well enough to load the "loading..." line.

To clarify:
This is called before everything:
require_once('...path to forum.../SSI.php');

Then in the header:
template_css();
template_javascript();

Then after everything:
ssi_shutdown();

Any suggestions?
Title: Re: Profile popup from website
Post by: Kindred on July 11, 2022, 02:43:25 PM
please 1- provide/attach your whole code  and 2- provide a URL to test the issue?
Title: Re: Profile popup from website
Post by: Arantor on July 11, 2022, 02:47:15 PM
That's really not all the code you need. The "loading" is there by default without you doing anything, what you need is the definition and call out to the smcPopupMenu for it to load its content via AJAX.

It was never really designed to be called via SSI unless using template_header in its entirety.
Title: Re: Profile popup from website
Post by: Abavagada on July 12, 2022, 08:39:32 AM
Solved it. It was an issue with the COR security. Needed to be set to allow sharing.