Forum Replies Created

Viewing 15 replies - 16 through 30 (of 42 total)
  • That’s a good question…I honestly don’t know. If you can do it, you’d have to leave the category ID outside of quotes, since it’s a value and not a string. So that would give you:
    <?php
    if (2 != $cat) {
    include(ABSPATH . 'wp-comments.php');
    }
    ?>

    …but I don’t know if that will work or not. Give it a shot ??

    Boy…that formatting didn’t really work. Let me try again:

    // Faking multiple templates for #subcolumn
    if ($single) {
    require('includes/subcolumn-single.php'); // individual posts
    } else if ($cat) {
    require('includes/subcolumn-category.php'); // categorical listings
    } else if ($m) {
    require('includes/subcolumn-month.php'); // monthly listings
    } else if ($year) {
    require('includes/subcolumn-year.php'); // yearly listings
    } else {
    require('includes/subcolumn-home.php'); // home page
    }

    One way you could possibly do this would be to set an arbitrary variable to be equal to days_since(09,28,2004); or whatever function you want, and then pass that variable as the string for the corresponding argument in the php the_date() function. So that would give you something like:
    <?php
    $since = " - Day " . days_since(09,28,2004) . " of 25</h2>";
    the_date('','<h2>', $since);
    ?>

    Although, to be honest, I’m not sure if the_date function will work with a variable as an argument. Plus, you might have to configure days_since to return a value, rather than echo it. Give it a shot!

    Personally, I don’t think the day is needed…unless you’re making multiple entries in one day, or enough that you just can’t keep track of them unless you split the month down into smaller units, I’d say that just having the year and month is fine.
    See Anne’s post about the perfect weblog system, under the URI structure -> individual entries section. Maybe it’s just that 3/4 of people just leave it at the default settings for the permalink.

    Just kidding, you can add the style tag in there…looks like you’ve got it working more the way you intended…if you still want the text to be away from there, add in an extra margin attribute, and you can have both the border and the spacing.

    One thing that stands out at first is float: center…there’s no such value allowed, it has to be either left or right. The title boxes are most likely being collapsed because you haven’t specified a width for the .menuul class. It also looks like you might need some text-align values to make things consistent between the two browsers.
    Overall it looks like a weird implementation with the class structure (ie. treemenu, treenode, treeclosed) If you didn’t write it up originally, it might be a good idea just to try and write something from scratch, and do one step at a time until you achieve the same effect.

    Thread Starter elasticdog

    (@elasticdog)

    Ahhh…thanks for the link. It looks like the way he did it wouldn’t save me much coding since it uses a filter to search for the code. I may as well just code my own filter to do what I need and not have two separate functions called. I was hoping that one of the default filters is what disallowed embedded php code or something…but cest la vie.

    There are two plugins that do it conditionally, which can be controlled by adding meta data to your entry…I also wrote a plugin, which hasn’t been put up anywhere yet, that just turns off the auto-formatting by for all entries, with no control since I like to control my output…I figure if Ibreak it, I’ll fix it ??
    If you’re interested in the code, I can put it up somewhere real quick.

    Thread Starter elasticdog

    (@elasticdog)

    I figured it out…it was inserting a carriage return on the lines, thus when I trimmed those off, it all started working. Darn Unix/Windows return differences.
    Not that it would probably be too helpful to anyone else, but I may publish it as a plugin for anyone to use…

    Thread Starter elasticdog

    (@elasticdog)

    Trying to indent just the source code…I’d like for it all to be properly indented, but can’t figure out how to test for the blank lines. If you go to https://elasticdog.com/ it’s indenting the code in between the entry <h3> and the “posted”

    Thread Starter elasticdog

    (@elasticdog)

    Yarrr…tried to edit it and fix it, but that didn’t quite do it. Here we go again:

    function indent_content($text) {
    $lines = explode("\n", $text);
    foreach ($lines as $line) {
    if ("" == $line) {
    $fixed_text = $fixed_text.$link."\n";
    } else {
    $fixed_text = $fixed_text."\t\t\t".$line."\n";
    }
    }
    return $fixed_text;
    }

    Thread Starter elasticdog

    (@elasticdog)

    Ohh, and benjamin, re-ordering the entry IDs would have more of an impact, especially if you aren’t using cruft-free urls for your permalinks. If you really want to get rid of those first few IDs, since you were just testing things out, you can edit the database with phpAdmin.
    Also, if anyone would like to see the comments output so far, my work-in-progress can be seen at https://elasticdog.com/index.php

    Thread Starter elasticdog

    (@elasticdog)

    I figured out a solution for myself, although it’s not perfect for a few reasons…
    Right after if ($comments) { in wp-comments.php, I initialized a variable count and assigned it a value of 1:
    $count = 1;
    Then, in the comments loop, I used <?php echo "$count"; ?> where I needed it, and at the end of the comments loop, just put:
    $count++;
    I’m using the count variable not only to display a running tally on the page, but to make the id and hyperlink to the individual comment. The downside to this is if you delete a comment, the numbers for the comments after the deleted one will change. This really only effects spam messages and such, and would cause problems if someone had already grabbed the link location for a comment posted after one you got rid of.
    I thought it would be an okay tradeoff considering the links themselves won’t get used too often, and I’ll probably filter out the spam well before the time they actually do get linked to. I’d much rather have a link be logical and point to article/#comment3 if it’s the third comment on an individual article, rather than using the comment_id() and ending up with a link like: article/#comment4628 for the third comment on the page.

    Forum: Plugins
    In reply to: Disable wpautop Formatting?
    Thread Starter elasticdog

    (@elasticdog)

    That is EXTREMELY weird…just for giggles, I tried a different approach. I knew that the Unformatted plugin worked, and so I installed it and slowly took away the lines of code I didn’t need. Once I took away all of those and tested it along the way, I started adding my own info and what I needed until I had pretty much the exact same file as before, but for some reason, the new one works.
    Thanks for all your suggestions!

    Forum: Plugins
    In reply to: Disable wpautop Formatting?
    Thread Starter elasticdog

    (@elasticdog)

    Yes, there was a return after the last ?>, which I have now removed, but I’m still getting the same error.
    I vaguely remember reading about an extra space or return after the php ending, and notice that other plugins don’t have one, but most of the php code for WP itself does…is this a requirement for plugins only?
    Any other ideas what could be causing the error?

Viewing 15 replies - 16 through 30 (of 42 total)