Website/forum integration via SSI: how to get theme?

Started by Soapster, April 19, 2008, 07:10:40 AM

Previous topic - Next topic

Soapster

Heya, everybody. I've been using SMF for a while now. I have a website and a forum. The website runs on custom software I wrote, and the forum runs on SMF 2.0 Beta 3 Public (previously SMF 1.1.4).

Now, the site used to have a special piece of code so that if the viewer was logged in on the forum, the site would use the CSS of the theme they chose in their profile.

It worked like this:


<?php
include_once('forums/SSI.php');
$themeurl=ssi_theme();
?>



It would then load the CSS from $themeurl/style.css.

For some reason, this no longer works. Apparently ssi_theme() is not a function. I looked through the code of SSI.php again, and tried to declare $ssi_theme as a global variable and use that instead of $themeurl. Still no go.

Can anybody tell me how I can go around getting the URL for the theme the user is using?

Oldiesmann

I'm not sure where you got the ssi_theme() function, but that function doesn't exist in any default installation of SMF.

After you include SSI.php, the URL to the theme that the user has chosen will be in $settings['theme_url'] - no custom functions are needed.
Michael Eshom
Christian Metal Fans

Advertisement: