Forum Replies Created

Viewing 15 replies - 211 through 225 (of 238 total)
  • Forum: Plugins
    In reply to: display ad every X entries

    If you can’t find the plugin here’s the PHP code. This will work on any page using the ‘Loop’.


    <?php
    // These two lines go above your loop
    $i = 0;
    $number_of_posts = 5;
    ?>
    // Now your loop starts
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php
    // If it's a 5th post show the ad otherwise show a post
    if ($i%$number_of_posts==$number_of_posts-1) {
    // AD RELATED CODE GOES HERE
    } else {
    // REGULAR POST TAGS GO HERE
    }
    $i++;
    ?>

    <?php endwhile; ?>
    // Page continues on
    ...

    The // lines can removed.
    The $number_of_posts can = whatever.

    Check out MWSnap for Windows. It’s free and still one of the best screencap programs I’ve run across.

    http://www.mirekw.com/winfreeware/mwsnap.html

    The WP-PRO mailing list if the one you’re looking for. More info on WP mailing lists can be found at http://lists.automattic.com/

    Make sure you have this line at the top of page:

    <?php require(‘./wp-blog-header.php’); ?>

    That’s where the WP functions like bloginfo() are defined.

    This is the main support page for comment spam.

    http://codex.wordpress.org/Combating_Comment_Spam

    If it doesn’t answer all your questions post back here so we can answer them and update the Codex.

    No offense taken by anyone. Discussion forces me to make sure what I said was correct (and depending on the night that can be a 50-50 proposition).

    Personally, I intend to master floats. I also expect to accomplish this shortly before the sun burns out 😉

    This is the plugin you’re looking for. Good timing really, it was only released two days ago.

    http://www.coldforged.org/archives/2005/03/03/where-the-hell-are-my-comments/

    If it’s wrong, then why does it work? 😉

    http://archivist.incutio.com/viewlist/css-discuss/31743

    Root has a good point. If all the columns are floated you can play with the source order. Another possibility is to change which column is floated. For instance, instead of floating the sidebar right why not float the content left? Then it can come first in the source order. Check out the default WordPress stylesheet since that’s what it does.

    In terms of accessibility issues and (possibly) search engines I would recommend either floating left or floating both.

    Rather than fork bbPress I think we should fork Matt and Ryan. I don’t know if cloning is still legal here in Canada but if not, I know the perfect dark alley.

    Everyone would win. By competing clones against developers we will get even more amazing code. Plus, the winning group (clones or originals) would get to absord the other, like in that Superman movie.

    This isn’t regarding categories but something else I’d like to see in the forums is whether a thread is closed with a solution or open and still requesting assistance. This will save people time when searching for a problem because they’ll narrow in on the solution instead of reading several threads that went nowhere. It would also let people who answer questions quickly find where their assistance is needed. This means we could also see what kinds of questions we can answer here and what kinds we generally can’t.

    An extension of that is some sort of rating system. ‘Did this thread answer your question?’. That sort of thing. The whole point is that instead of just being a support forum, given time it wil also become a knowledge base.

    I thought it wasn’t really necessary to run the upgrade script but I sure got caught by that. I was moving from beta to beta every few weeks and at somepoint IE stopped being able to view my site although it worked fine in Mozilla. It turns out the content-type was no longer correct in the database and IE didn’t know what to do with my site (heck, sometimes I don’t either). I ran the upgrade script and everything works perfectly. Lesson learned, I now bow to the upgrade script.

    Hey Dawg,
    One of the tricks to floats is that they have to come first in the source code. So you need to move your sidebar above the content. If your index.php is standard that should be as simple as moving the include(‘sidebar.php’) line above div id=”content”.

    Also, you need to remove ‘clear: both’ from .feedback If you don’t you’ll have a big gap in your post where the feedback line is pushed down to match the end of the sidebar.

    Easy mistakes:
    – Don’t forget your title
    – You’ll probably want to change .menu to #menu in style.css and div class=”menu” to div id=”menu” in index.php. You should do this because the rest of your menu styles use ID instead of class (ie #menu form, #menu input). If you don’t change it they won’t have any affect.

    The database is where all your posts and WordPress options will be stored. For WP to connect to your database it needs to know 4 pieces of information.

    The short story being if you don’t know the required values then you need to email your host. Tell them you’re going to install WordPress and ask what are the values for:
    your database host
    your database username
    your database password
    your database name

    Once you have those values you can edit the file. Without them you can’t get any further.

    This is what you’re looking for:
    http://svn.wp-plugins.org/cache-images/trunk/cache-images.php

    Not quite sure what Matt made this for but please do consider the moral/legal implications of it.

    No problem. What you’ll want to change is one of these 3 lines in your style.css

    #rap { width: 620px; } <– Width of your whole page
    #content { width: 469px; } <!– Width of your posts
    #menu { width: 120px; } <!– Width of your sidebar

    So for instance, you could change #content to #content { width: 450px; } That’ll make your post area a little smaller so your sidebar should fit. You’ll have to play with that number, 450px is just an estimate.

    Unfortunately, there’s a bigger problem to fix first.

    If you look at your sidebar you’ll see that it’s a mess of

      and

    • tags. The problem is they’re not properly closed and that can cause major display problems. You need to go through your sidebar.php file and make sure the tags open and close properly.

    You can see examples of how lists work at http://htmldog.com/guides/htmlbeginner/lists/

    To make it easier to work you might want to make a backup of your sidebar.php and then erase most of your sidebar content. Just focus on getting one section, say the Categories, laid out properly. Once it’s working you can add back in the other sections following your working example.

    Oh, when you get the category formatted properly, if the sidebar is still below the posts you might want to change the #content to #content { width: 400px; } so there will definitely be enough room to display side by side. Once it’s all figured out you can increase this value upwards until the sidebar is pushed down. That’s the ol’ brute force method to getting the width right!

    It’s probably a little confusing but give it a try and let me know how it’s going.

Viewing 15 replies - 211 through 225 (of 238 total)