Archive for May, 2007

WordPress “You don’t have permission to do that” error

If you have a fresh install of WordPress with plugins deactivated and no special tweaks, it most certainly should not be telling you that you don’t have permission to do things. If it does:
This is a javascript error. I noticed the glitch when I was trying to create new categories - which is an Ajax [...]

If you have a fresh install of WordPress with plugins deactivated and no special tweaks, it most certainly should not be telling you that you don’t have permission to do things. If it does:

This is a javascript error. I noticed the glitch when I was trying to create new categories - which is an Ajax function. A helpful user on the WordPress forums discovered the solution:

Go into your wp-includes/pluggable.php file. Find this code, or something very similar to it (mine was slightly different, but most of the lines were exact). Now, make a copy of this file before you proceed, because then if it screws something up horribly, you can fix it.

$cookie = explode('; ', urldecode(empty($_POST['cookie']) ? $_GET['cookie'] : $_POST['cookie'])); // AJAX scripts must pass cookie=document.cookie
foreach ( $cookie as $tasty ) {
if ( false !== strpos($tasty, USER_COOKIE) )
$user = substr(strstr($tasty, ‘=’), 1);
if ( false !== strpos($tasty, PASS_COOKIE) )
$pass = substr(strstr($tasty, ‘=’), 1);
}

Replace it with:

$user = $_COOKIE[USER_COOKIE];
$pass = $_COOKIE[PASS_COOKIE];

Comments (1)

Wordpress custom theme generator

Here’s a tool that will generate a custom WordPress theme for you - it has tons of options and it shows an ever-changing preview that updates Ajax style every time you make a tweak. I’ve never seen a generator this good before. I’m going to be creating a bunch of sites sometime soon, so I’ll [...]

Here’s a tool that will generate a custom WordPress theme for you - it has tons of options and it shows an ever-changing preview that updates Ajax style every time you make a tweak. I’ve never seen a generator this good before. I’m going to be creating a bunch of sites sometime soon, so I’ll definitely be trying it out.

Leave a Comment

How to own your blog’s comments

Aviva Directory has a list they call Blogger Law. The items on it are potential legal issues that could affect bloggers, with advice on how to operate so you won’t get in trouble. Most of it’s nothing new, exactly, but it cites some court cases that you should be aware of. Most of them should [...]

Aviva Directory has a list they call Blogger Law. The items on it are potential legal issues that could affect bloggers, with advice on how to operate so you won’t get in trouble. Most of it’s nothing new, exactly, but it cites some court cases that you should be aware of. Most of them should not apply to simple opinion and thought blogs, but since most lawmakers and judges are probably much less internet-savvy than we are, there’s always a potential for misapplication of the law, so why not protect yourself?

There is one change I immediately implemented on some of my sites. I’ve used it before, but forgot to re-do it when I last changed themes. Comments left on your blog technically belong to their author, not you. To grant yourself the right to delete and edit them as you see fit, you should include at the very least a commenting guideline or TOS somewhere on your site which spells out your rights. I also include a bolded paragraph right above the "submit" button which says that "by commenting here, you agree" to follow the rules, grant me the right to edit or delete your comments as I see fit, and grant me the right to cite your comments.

If you have any troll humiliation devices in place, I suggest mentioning those up front, too.

Remember: to anyone who’s spent much time in the blog or forum world, it’s pretty obvious that some people delete entire threads on whims and there’s no point crying about it. But when a sue-happy nutcase realizes lawmakers are ignorant about all this stuff and the law is kinda sorta technically on their side, you don’t want to be on the wrong side of that stupidity.

Leave a Comment

Robots and WordPress

I’ve been researching the best ways to tell search engine robots just exactly which parts of your WordPress site they should index, and which parts to avoid. Robots.txt is one obvious way to go about this, but there’s no shortage of conflicting opinions about just what to block. The goal here is mainly to avoid [...]

I’ve been researching the best ways to tell search engine robots just exactly which parts of your WordPress site they should index, and which parts to avoid. Robots.txt is one obvious way to go about this, but there’s no shortage of conflicting opinions about just what to block. The goal here is mainly to avoid duplicate content in Google, which will toss pages into the Supplemental Index. But I’ve seen Yahoo index some pretty bone-headed pages before, so there are multiple reasons to do something with your robots.txt file.

Then I found a really interesting little chunk of code you can stick in your header.php file. It tells the bots to follow links in every case, but only index single posts, static pages and the home page:

<?php if(is_single() || is_page() || is_home()) { ?>
    <meta name="googlebot" content="index,noarchive,follow,noodp" />
    <meta name="robots" content="all,index,follow" />
  <meta name="msnbot" content="all,index,follow" />
<?php } else { ?>
    <meta name="googlebot" content="noindex,noarchive,follow,noodp" />
    <meta name="robots" content="noindex,follow" />
  <meta name="msnbot" content="noindex,follow" />
<?php }?>

At this point I think I’m just going to leave that for a bit and see what happens. I’m not wild about messing with robots.txt - I’m not confident I know what I’m doing with it. I do have my wp-admin folder blocked, but that’s it. I can’t figure out why anyone would want pages from wp-content indexed either, but some people recommend leaving them in so… yeah, I’m just going to see what this code does.

Leave a Comment

SEOMoz’s page strength tool

If you’re trying to learn new ways to look at your site’s viability - other than Pagerank - check out SEOMoz’s page strength tool. It tracks some pretty interesting metrics - as usual, any of these can be "meh" on their own, but if you put them together you can hardly avoid getting a clear [...]

If you’re trying to learn new ways to look at your site’s viability - other than Pagerank - check out SEOMoz’s page strength tool. It tracks some pretty interesting metrics - as usual, any of these can be "meh" on their own, but if you put them together you can hardly avoid getting a clear picture of where your site stands.

I’m going to use this tool on all my sites every month or so for a while. It should help me spot some trends and things I can work on.

Leave a Comment

Wordpress Feedburner replacement for total subscription tracking

Yesterday I tested Feedburner Plugin V2.2 on one of my sites. My main concern was that it not change the feed in any way visible to readers because I don’t want to lose my current subscribers. When I accessed my test feed, I noticed it added a direct link to the comments below the post [...]

Yesterday I tested Feedburner Plugin V2.2 on one of my sites. My main concern was that it not change the feed in any way visible to readers because I don’t want to lose my current subscribers. When I accessed my test feed, I noticed it added a direct link to the comments below the post - that was the only change and I didn’t consider it a negative one.

As promised, now the plugin has Feedburner tracking all my subscribers, no matter what feed reader they use (also includes Feedburner email subscriptions, if you’re set up for those). Turns out I have a lot more subscribers on some of my sites than I realized. :)

Leave a Comment