SimplePortal
Customization => Themes and Graphics => Topic started by: cwoodson on August 23, 2011, 01:28:52 AM
-
Is it possible to have a background image for the portal only, if so where in the portal.css would it be? Or how would I modify simple portal to allow a separate background for the portal page. If you see the screenshot below, as of right now I have it as my theme background but I want it only for my portal page
Any help is appreciated
Thanks!
-
The easiest way to do this would be to use a different theme for the portal page.
The theme would be based on your default theme. The only difference would be in the CSS -- you'd want to have index.css and, probably, portal.css in this new custome theme.
-
Ahh okay not a bad idea, I'll try that out!
Thanks!
-
That did the trick, only problem I am having now is I use the page module built into Simple Portal. In turn the custom pages I use get the background of the portal page...
Any way around this?
-
Of course, there is a way around this. It would take a little bit of custom coding.
I am not certain where, exactly, the theme decision is made for the custom pages.
So I look in Load.php. I find out the theme is loaded with function loadTheme.
I look everywhere for loadTheme, and I see it is called in index.php, with no parameters.
Back to function loadTheme, I look for how loadTheme makes a decision when it has not been passed a theme ID. I find
// Maybe we have a portal specific theme?
if (!isset($_GET['action']) && !isset($_GET['board']) && !isset($_GET['topic']) && ($modSettings['sp_portal_mode'] == 1 || !empty($sp_standalone)) && !empty($modSettings['portaltheme']))
$id_theme = (int) $modSettings['portaltheme'];
So now I know the right place to make a change. Now I need to know how to tell it "but not if it is a custom page."
So I go to my website, click on a link to a page, and observe the URL is like: index.php?page=
So I know that, in this case isset($_GET['page']) will be true. So I decide to try the following:
[/b] // Maybe we have a portal specific theme?
if (!isset($_GET['action']) && !isset($_GET['board']) && !isset($_GET['topic'])
&& ( $modSettings['sp_portal_mode'] == 1 || !empty($sp_standalone))
&& !empty($modSettings['portaltheme'])
&& !isset($_GET['page'])
)
$id_theme = (int) $modSettings['portaltheme'];
And then, I would test this, to make sure it would work. And, after I was done testing, put it all back on one line to match the surrounding code. I only introduced the extra spaces to make it easier on my eyes while testing.
Please test and see if this works for you.
-
Ahh perfect that did the trick! Haven't received any errors yet!
Thanks for your help!
-
Glad to help. Marked solved.