Forum Replies Created

Viewing 15 replies - 121 through 135 (of 238 total)
  • Ming

    (@ming)

    Is there a column called time_modified? I know there’s one called post_modified. Is this a typo or maybe the Northern theme includes a plugin that modifies the post table?

    Ming

    (@ming)

    The returns are caused by your <h2> (<h2>Bloggers</h2>). Adding display: inline to them works in firefox and should work in the rest. Definitely probably 🙂

    Ming

    (@ming)

    Search your style sheet for ‘#rmenu ul ul li:before’. That’s adding the >>

    Ming

    (@ming)

    As long as the older, shortened posts follow right after the newer posts it’s easy to do by having PHP count the number of posts you’ve displayed. If it’s less than 5 (an example number) we’ll style them like full posts and if it’s more than style them like older posts.

    Here’s the loop from the default template. Changes are in bold. You’ll have to make this fit with your templates. Let me know if you’re having problems with that.


    <?php if (have_posts()) : ?>

    <?php $i = 0; ?>

    <?php while (have_posts()) : the_post(); ?>

    <?php if ($i < 5) { ?>

    // ...WordPress tags to display newer posts...

    else {

    // ...WordPress tags to display older posts...

    <?php } ?>
    <?php $i++; ?>

    <?php endwhile; ?>

    This will only work if the older posts follow the newer posts. If you want to put older posts somewhere else in the page you’ll need to do a whole new query and loop.

    Ming

    (@ming)

    Some rounded boxes would definitely polish it off.

    Ming

    (@ming)

    It looks like it’s your navigation (<div class=”navigation”>). With that removed the spacing is better. Even though the div’s are empty, and they don’t show, they still take up space.

    Ming

    (@ming)

    http://static.wordpress.org/archive/ contains old releases. It doesn’t have 1.5 there yet. Hopefully it will soon.

    Ming

    (@ming)

    Oh, I know you mentioned you didn’t want to fix the bug but in case you didn’t know there are css hacks that specifically target the Mac IE browser allowing you to add or exclude styles at will.

    http://www.sam-i-am.com/work/sandbox/css/mac_ie5_hack.html

    Ming

    (@ming)

    Each browser reports a user agent string to the server. They look something like this:
    Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
    (Not all browsers report them and they can also be faked)

    Browser detection is nothing more than searching this string for potential matches. So we’ll use PHP to check the user agent for “mac” and “msie 5”.


    <?php
    // Shorten the string to "$ua" to save my lazy fingers
    $ua = $_SERVER["HTTP_USER_AGENT"];

    // If "mac" and "msie 5" are found redirect to a different URL
    if (stristr($ua, "mac")) && (stristr($ua, "msie 5")) {
    header("Location: http://example/macwarning.html");
    exit;
    }

    // If no matches are found then exit the script and continue the page

    ?>

    You don’t have to redirect away. You could do anything where the Location code is including using a different stylesheet or simply printing a message saying “Because you’re using Mac IE5 this page may not look correct. Please consider upgrading to …”. This way they’d get the message and at least a peak at the content.

    I haven’t tested the script but it looks correct. You can add ‘elseif’ statements to continue checking for other browsers.


    <?php
    $ua = $_SERVER["HTTP_USER_AGENT"];

    // Find browsers containing "mac" and "msie 5"
    if (stristr($ua, "mac")) && (stristr($ua, "msie 5")) {
    header("Location: http://example/maciewarning.html");
    exit;
    }

    // Find all browsers with "win" in the user_agent
    elseif (stristr($ua, "win")) {
    header("Location: http://example/winallwarning.html");
    exit;
    }

    ?>

    Ming

    (@ming)

    You’d want the browser check to come as soon as possible if you’re actually redirecting to another URL. If you’re using browser detection to change the CSS for instance, then you’d need to include it in the header.php file of your current active theme (for version 1.5).

    There are lots of browser redirect scripts on the web and they all vary in the number of browsers/versions/operating systems they detect. Search google for ‘php browser redirect script’ and you’ll find them and they usually include instructions for use.

    With some more details about why you’re doing the browser detection I can be more specific.

    Forum: Fixing WordPress
    In reply to: allow_url_fopen?
    Ming

    (@ming)

    Yup, I’ll confirm this too. Thanks for letting us know rlparker.

    Ming

    (@ming)

    1.5 sports a new cache plugin hook that executes near the beginning of WP code vs regular plugins that execute at the end. Now you can cache most of WP’s PHP code saving considerable processing. Ricardo Galli’s WP-Cache uses this hook.

    Forum: Fixing WordPress
    In reply to: allow_url_fopen?

    Are you running PHP as a CGI module or as the Apache user? (You can check in the panel by going to domains -> manage and then selecting ‘edit’ in the web section for that domain – There will be a checkbox saying ‘Run PHP as CGI’)

    allow_url_fopen works when your website is run as a CGI.

    Can I get the link for this site? I checked the Cookie Factory but didn’t see any comment links.

    You’re missing an <ul> (unordered list) elements around your <li>...</li> (list item).

    Try changing your code to this:
    <ul><?php get_links_list(); ?></ul>

Viewing 15 replies - 121 through 135 (of 238 total)