Forums › Forums › Slimbox2 plugin › Annoying bug which affects both Multi-level Navigation and Slimbox2 plugins
- This topic has 4 replies, 1 voice, and was last updated 15 years, 7 months ago by
imported_Ryan.
-
AuthorPosts
-
February 6, 2009 at 7:26 am #620
imported_Ryan
MemberThe posts about the bug related to the style.php file and some of the JS files in the two plugins are scattered all over the place. So I’ve made this new topic to try and keep it all in one spot. We can link from here to any related topics when necessary:
The problem we are facing with both plugins, is that when we use the following script in our files, the content is not being served with the correct header by some servers (most are fine):
[code:1pzq291t]<?php
require(‘../../../wp-blog-header.php’);
header(‘Content-type: text/css’);
[/code:1pzq291t]All attempts to figure out what is wrong have failed miserably, including requesting for help from PHP experts and in the WordPress.org support forum.
February 6, 2009 at 7:26 am #5244imported_Ryan
MemberI found the following plugin today by Andrew Rickman who seems to use a different method for calling the WordPress functions:
http://www.wp-fun.co.uk/fun-with-widget … s-01-beta/Here is the code from the top of his style.php file:
[code:kxjeav6n]<?php require_once("../../../../wp-load.php");
header(‘Content-Type: text/css; charset=’.get_option(‘blog_charset’).”);[/code:kxjeav6n]I have no idea why he’s using wp-load.php instead of wp-blog-header.php but I’m guessing that might fix our problem.
Andrew is quite a guru at programming for WordPress so should be able to help. I know him and he has helped with the Multi-level Navigation plugin in the past. I’ll send him an email with a link to this topic to see if we can fill us in on the details of what we’re doing wrong.
February 7, 2009 at 1:03 am #5245imported_Ryan
MemberI’ve heard back from Andrew Rickman. He didn’t think that using wp-blog-header.php is necessary and that we could just call wp-load.php instead. Apparently wp-blog-header.php loads a bunch of stuff we don’t need anyway.
He also suggested changing your header statement from ‘Content-type’ to ‘Content-Type’ (note the capitals).
I’ll release a new version of the Multi-level Navigation plugin with these new features and we’ll see if that helps.
I’ll post back here once it’s released.
February 7, 2009 at 1:33 am #5246imported_Ryan
MemberAttached is a new version with these extra features.
If anyone out there who suffers this problem could try out this version of the plugin and let me know how they get on I’d love to hear from you!
February 8, 2009 at 4:19 am #5247imported_Ryan
MemberAttached is another version which has these features added to the PHP scripts as well.
-
AuthorPosts
- You must be logged in to reply to this topic.