SimplePortal
Support => English Support => Topic started by: Joscerelle on May 09, 2013, 12:16:47 PM
-
I'm trying to figure out how to best do this. I have images that I would like to display depending on which theme one chooses so that everything matches in colors. I'm not entirely sure how to do this. Does anyone have any suggestions or can they point me in the right direction?
-
You can use Complex Display Options. When you are editing a block you have the Advanced Options checkbox in the Display Options area. When you click on that, you should be able to see the Custom Display Options textbox. As an admin you can add PHP expressions there using the $php prefix. For this specific purpose, you can use such a rule for Custom Display Options:
$php global $settings; return $settings['theme_id'] == 1 && {$action} == '';
A block with such a custom display option will only be displayed when the uses choses the theme with id 1 and view the portal page. You can modify it to your liking.
-
Your answer so far was very helpful, but unfortunately I am so new to php, like this afternoon new. Where do I find the theme ID and where in that code do I modify whether the block can be viewed on the portal, forums, or everywhere?
-
You can find the theme ID of a theme by actually looking at the URL of the theme. Go into your theme preferences (or administration panel) and look at the links that associate with each theme.
-
Joscerelle -- did that work?