Forum Replies Created

Viewing 15 replies - 1 through 15 (of 40 total)
  • Does /websites/MYSITE.com/html/wp-content/themes/MYtemplate exist?

    Do you have a link to the site so that we can see the problem in action?

    Forum: Fixing WordPress
    In reply to: updating posts

    The specs say that the datetime attribute on an ins or del tag should be in a standard UTC format. The +00:00 means that the datetime is in Greenwich Mean Time. So, in short, it is using the “correct time,” in a format that is unambiguous and universally correct. (That is, the actual time when you click the button and to make the insert.)

    See: https://www.htmlhelp.com/reference/html40/values.html#datetime

    Edit: Of course, the argument could be made that it ought to tell the actual time zone that you’re in, and enter the datetime with that time zone. After all, that tells someone whether it was late at night or early in the morning when you posted the change, as well as the actual moment in time that you made the change.

    But, from an HTML point of view, it is telling the time “accurately,” in the sense that it’s referring to the correct moment.

    If you use UTW, then Technorati can pick up your “internal” tags just as easily as any other kind. As long as the A element has a rel="tag" attribute, it’ll realize that it’s a tag.

    You can also use (i think) “technoratilist” as one of the format options when you call the tag functions, if you’d like the tags to link to Technorati. Read the help file that comes with the plugin.

    Forum: Plugins
    In reply to: Snow Plugin?

    Put this in your theme’s header.php, between the <head> tags.

    <script type="text/javascript" src="https://domain.com/path/to/script.js"></script>

    The theme file to change is at /wp-content/themes/theme_name/header.php.

    Put the JavaScript in the script.js file, without any <script> tags.

    If you use Ultimate Tag Warrior, then you could use either George_Bush or George-Bush.

    https://www.neato.co.nz/ultimate-tag-warrior/

    The tricky thing about that is that the hash (the part of the url after the #) isn’t sent to the server, AFAIK.

    However, you can get this client-side through location.hash. This technique could work for you.

    DISCLAIMER: Not tested, so it might need fixing. I stand by the concept, though.

    1. Create a file called blogger_redirector.html.
    2. In that file, put this:

    <html><head><title>just a redirecter</title>
    <script type="text/javascript">
    // fill in with your info
    var prefix = 'https://mywebsite/.../';
    // the long tedious part...
    var a = new Array();
    // fill in the following lines appropriately.
    // this will be long and boring. I'm not sure if there's any
    // place in WordPress where it stored the blogger key,
    // or else you could maybe generate this automagically.
    // a[blogger key] = wordpress id;
    a[11308646211680666] = 1;
    a[18470128712861927] = 2;
    a[12897918734298716] = 3;
    // ...
    a[20098781672308612] = 500;
    var h=location.hash;
    var done=false;
    if(h)
    {
    if(a) {
    if(a[h]) {
    done = true;
    location.replace(prefix + '?p=' + a[h]);
    }
    }
    }
    if(!done)window.location.replace(prefix);
    </script>
    </head>
    <body>
    You got here somehow. That's odd. <a href="index.php">How about you go here instead?</a>

    </body></html>

    3. Then, in your .htaccess file, outside the WordPress section, add this rule:

    RewriteRule ^[0-9]{4}_[0-9]{2}_[0-9]{2}_blogarchive.html /blogger_redirector.html [NC,L]

    The way it works is this: the client requests a page, and your server gives him the redirector page instead. Then, it looks at the hash portion of the URL, and redirects client-side appropriately.

    The downside is that it won’t work if the client doesn’t have javascript enabled, but since you really can’t do this server-side, it’s the only way that I can think of.

    –i

    Thread Starter isaacschlueter

    (@isaacschlueter)

    The only pinging site that I have is pingomatic, the default.

    It doesn’t really matter, though. I can turn off pings and plugins, and save a draft with 3 words in it, then publish that draft, and it’ll still be “saving” into next week.

    I’m completely stumped. The only thing that I can think to do is to walk through the code line by line looking for loops that might not be breaking properly, but it’ll take a really long time since I’m not that familiar with that part of the code, and it’s time that I really don’t have.

    :\

    Aha.

    Well, you could create a custom template file for that category. Get the category ID number, and then go into your main template directory. Open up category.php (if it’s there), or archive.php (if it’s not) and save it as category-6.php, but replace “6” with the ID of the photo category.

    Then, change the code of that file to not loop through posts, but instead just show one and break out of The Loop. Since I don’t have access to your template to tell you exactly how to do this, the super-quick and super-dirty way that will almost certainly work is to just put a break; right before the endwhile;.

    It’s probably designed to loop through a bunch of posts, and usually that loop is wrapped in while( have_posts() ): the_post; and endwhile; Right before the endwhile;, you put a break; which says, “Break out of this loop, and don’t continue.” Since it already finished the first run through, it’ll just show one post, and then quit.

    Then, the link to give is just https://your.site.com/category/photos/

    Try this. Define this function somewhere (in a plugin, in your template somewhere, whatever you prefer.)

    Then, call latest_in_category_link('photos'); to display the link, or $link = latest_in_category_link('photos',false); to just return the value (if you want to do something with it.)

    <?php
    function latest_in_category_link($catname, $disp = true)
    {
    $blah = '';
    $my_query =& new WP_Query('category_name=photos&showposts=1');
    while( $my_query->have_posts() )
    {
    $my_query->the_post();
    $blah = '<a href="' . apply_filters('the_permalink', get_permalink($my_query->post->id)) .
    '" title="Latest post in the ' . htmlentities($catname) . ' category">' .
    apply_filters('the_title', $my_query->post->post_title, $my_query->post) . '</a>';
    }
    if( $disp ) echo $blah;
    return $blah;
    }
    ?>

    DISCLAIMER: This is untested and may cause big errors. If you have problems, just respond to this post, and I’ll try to help.

    There’s really nothing to stop a robot from parsing the form and sending a post request to the appropriate location. Chances are, these submissions are bots that are designed to look for comment forms, and happen to mistake your contact form for something that they can use to spam your website. I’d recommend Referer Karma and Spam Karma 2:
    https://unknowngenius.com/blog/wordpress/spam-karma/
    https://unknowngenius.com/blog/wordpress/ref-karma/

    However, the newer version of the script (1.3) does prevent email injection attacks, which could have been used (in the 1.2 version) to send spam emails to countless recipients using your server’s resources, and leaving you to blame.

    What were your old URIs like? If you can come up with a rule for translating the URIs, then I or someone else here can surely tell you what to put in your .htaccess file to make it happen.

    Forum: Plugins
    In reply to: New Plugin: Cannonical URL
    Thread Starter isaacschlueter

    (@isaacschlueter)

    That problem, along with a few others, has been solved in the new version, available now.

    Forum: Plugins
    In reply to: New Plugin: Cannonical URL
    Thread Starter isaacschlueter

    (@isaacschlueter)

    Ah! Thanks, Lynk!

    Problem fixed now. It’s kind of odd that get_permalink returns something even when there are no posts.

    Ok, so the problem isn’t that you need to “redirect”, per se, but that you need to use index.php instead of index.html for any requests that don’t explicitly set the filename.

    This rule will do that:

    DirectoryIndex index.php index.html

    That says, If no file is specified in a directory, look for index.php. Failing that, look for index.html. Failing that, just list the files.

    Is that what you’re after?

    Second recommendation:
    Get a host that supports mod_rewrite. There’s simply no excuse for being bass ackwards like that these days. ??

    Jamie,

    If you only tell us what you know,
    And you don’t provide a URL,
    And you don’t give us the details that mean nothing to you,

    Then

    We can only possibly know what you know.
    And clearly, that isn’t enough to solve your problem, or you would have solved it by now.

    I’m not trying to be snotty, just impart a useful bit of information. Please provide:

    1. A URL where we can go and see the problem.
    2. Details that may affect the problem, such as the permalink style that you’ve selected, or the .htaccess rules that WordPress has generated, or anything that you have done or not done differently than normal.

    Remember always the Second Law of Tech Support:

    If it changes, then something changed.

    In other words, if the behavior of X is different than the behavior of Y, then X is different from Y in some way.

    ??

Viewing 15 replies - 1 through 15 (of 40 total)