Annoying bug which affects both Multi-level Navigation and Slimbox2 plugins

Forums Forums Slimbox2 plugin Annoying bug which affects both Multi-level Navigation and Slimbox2 plugins

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #620

    The 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.

    #5244

    I 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.

    #5245

    I’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.

    #5246

    Attached 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!

    #5247

    Attached is another version which has these features added to the PHP scripts as well.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.