good news! thanks for the update…
any other issues still lingering?
I now have a functional forum system using the css only theme. Which is good. Is there any chance of using other S:P themes, or shouldn’t I even think of that, given how difficult it was to get this theme to work with my WP theme (Karma)?
Personally before doing anything I would shoot off a quick question to your hosting support to ask them if there is any reason in the Apache/PHP configuration why you should not be able to load a php file as a CSS file in the format:
<link rel='stylesheet' id='sp-theme-css' href='http://simple-press.dev/wp-content/sp-resources/forum-themes/default/styles/default.php?color=cool-blue' type='text/css' media='all' />
and if so what is the reason. If they say there is none then we can perhaps work out what in the Wp theme is the problem
I asked them, and this is what they said:
Looking at this issue you may just need to add a add-handler to make this function properly. I am not quite sure what it is you are trying to do so I am not sure what else to look into on this account.
I have no idea what it means, I hope your do?
I can ask them more questions, they are pretty responsive.
unfortunately, we have not been able to get a straight answer from the handful of hosts where this has been a problem… wish we knew what handler they require because 99% of the hosts simply allow for php processing of css files… if we could find out, we could attempt to handle it in our code…
This is hosted by Bluehost and they have been very forthcoming in terms of support for many years. Can you formulate the question more precisely? Then I will put that to them and eventually we should be able to get an answer.
I can try…
A commonly used and simple method for enabling CSS to be more dynamic is to actually create CSS as a PHP file which is then parsed to output pure CSS. In this way, php variables can be assigned values and used in the final CSS output.
We utilise this method and also create secondary php files that contain all of the variable assignments. When the php file (masquerading as a CSS file) is loaded a query variable is attached to include the necessary variable def file which we call an ‘overlay’. The final html that is created looks something like this:
<link rel='stylesheet' href='/style-file.php?overlay=blue' type='text/css' media='all' />
For probably 99% plus of hosts, this works just fine. But every now and then it fails as if there is a block on loading anything other than a file with a .css extension as type text/css. And/or the call fails to pass the query variable on the http request.
While we appreciate we may be able to place an AddHandler rule in an .htaccess file this is clearly not an ideal solution and could result in us asking users to make manual entries. We are trying to understand exactly what causes this to fail so that we can review what options may be available to programatically make adjustments if such a path is available.
Does that do any better?
okay, thanks… as mentioned, if we knew the actual cause in these rare circumstances, we ‘might’ be able to adjust…
Here it is:
The handler meaning = Which version of php do they require? 5.4 ? 5.2? Do they need fcgi enabled or is suphp just fine? Maybe the software needs specific extensions on such as ioncube loader or imagick. When we ask about the handler we just need to know what THEIR software requires to run. Also if you could please give us the filepath to this forum / site we can look to see what errors it’s reporting. This will make it much easier to find out what’s going on.
I gave them the file path.
By now, I am actually pretty happy with the css-only theme. It’s minimal, which is a good thing. I am just a bit worried that the plug ins of S:P won’t work without the php working. Do you know?
Well… that doesn’t come even close to answering the question. I don’t think the person who answered that actually thought about the issue. Or perhaps they are just not very technical or knowledgeable. Never mind, It was worth a try.
Giving them the file path to the forum wont help them much without the other theme being active as there will be no errors for them to look at.
On your final question then this very specific issue only effects the theme loading. There are no other instances of this behaviour within SP. Whether there are other conflicts along the way I can not answer of course but for the vast majority there are not.
Okay, I’ll let it go. This could result in a long back and forth between you and them. I’ll just be happy with the css only theme. Less time consuming… If they should come up with something from the file path I’ll let you know.
Latest response from Bluehost:
Being on a VPS, Add handler will NOT work. Find out exactly what version of php they use (Specify that you would prefer to use 5.4, which is installed on your VPS) and any modules that are required, such as ioncube, etc