Ming
Forum Replies Created
-
Forum: Plugins
In reply to: display ad every X entriesIf 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.Forum: Fixing WordPress
In reply to: Best way/place to upload images?Check out MWSnap for Windows. It’s free and still one of the best screencap programs I’ve run across.
Forum: Everything else WordPress
In reply to: need site design converted – RFQThe 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/
Forum: Themes and Templates
In reply to: Adding CSS to static pagesMake 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.
Forum: Fixing WordPress
In reply to: Question on comment moderationThis 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.
Forum: Themes and Templates
In reply to: Trouble floating sidebar?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 😉
Forum: Fixing WordPress
In reply to: How to make Mass Edit Mode show more than 20 entriesThis 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/
Forum: Themes and Templates
In reply to: Trouble floating sidebar?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.
Forum: Everything else WordPress
In reply to: The WordPress Support ForumsRather 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.
Forum: Everything else WordPress
In reply to: The WordPress Support ForumsThis 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.
Forum: Fixing WordPress
In reply to: 1.3 beta to 1.5 strayhorn?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.
Forum: Themes and Templates
In reply to: Trouble floating sidebar?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.Forum: Installing WordPress
In reply to: I Can’t get to step 2…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 nameOnce you have those values you can edit the file. Without them you can’t get any further.
Forum: Requests and Feedback
In reply to: “I call it ‘Image-Taking'” – Is this possible?This is what you’re looking for:
http://svn.wp-plugins.org/cache-images/trunk/cache-images.phpNot quite sure what Matt made this for but please do consider the moral/legal implications of it.
Forum: Fixing WordPress
In reply to: My blog is messed up in Internet ExplorerNo 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 sidebarSo 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.