Random Image

Recent Posts

  • Recent Comments:

  • Archives

    Topics

  • Polls

    • What would you like to see me do more of?

      View Results

      Loading ... Loading ...
  • Visit J-List Now
    J-List is a peaceful island of Japanese pop culture for you
    CLICK NOW to find over 2000 rare products from Japan
    You've got a friend in Japan at J-List!

    « | Main | »

    I’m a bloody genius!


    Dre

    By Dre | November 15, 2008

    Nah I’m not, but I am extremely happy at this moment. If you’ve been lurking for the past day or so, you would have noticed the the sudden addition of the random image widget in the left sidebar over there. You also would have notice that if you click on one of the images, one out of three things would have happen.

    1.You would go to the larger version of the image.
    2.You would get a link to some random page with a extension like “/34-revision-7″
    3. You would go to the actual post the image was from.(very rarely I might add)

    Well, the truth was I was having some serious complications with the plugin. I wanted the damn thing to show random images from my past posts and link those images back to my past posts so those of whom are too lazy to check my history or my artwork page can see and even comment on my old achievements accordingly. This wasn’t the case obviously. It took me some time but I manage to figure out what was the problem. When I create and edit posts, Wordpress stores ALL of my edits and call them (du du du duuuuuuuuu) Revision! These “revisions” are stored in the same place my original posts are store in via sql.

    And since the random image plugin couldn’t tell the difference between my actual posts and the revision snake like shed skin counter parts, I was getting linked to not only the real posts but also the none existence revision posts.

    You don’t know how angry this made me. I thought I would never get this fixed, but then my mastery interweb searching skillz came through. First of all, I had to disable that damn revision. Done! No more will it cause me angry and take up database space. Secondly, I had to delete all my old revision posts. This was the tricky part. Due to my ignorance, I was stuck here for a while. But once I fully understood what the hell I needed to do, it was done and done.

    Sad to say, just getting rid of all the revision didn’t stop the images from linking to the revision posts. At this point I knew the source of problem could be no where but the plugin itself. And I was right. In the process of scanning the posts to create thumbnails out of them, the plugin also stores information on the sql database. This damn information is where it was getting it flawed links from. I quickly backed up my database and deleted that fucker with the fury of a thousand suns.

    And there you have it folks. The story of how I got a simply plugin to work right and wasted time I could have been using to better my life.

    WALL OF TEXT COUNTER ATTACK!!!!!

    Video completely unrelated…

    Topics: News, Random | 2 Comments »

    2 Responses to “I’m a bloody genius!”

    1. Nobody
      Nobody Says:
      November 20th, 2008 at 8:43 pm

      Yay Hatsune Miku!!….wait isn’t that song from Sgt. Frog?

    2. Dre
      Dre Says:
      November 20th, 2008 at 9:47 pm

      Yay Hatsune Miku!!….wait isn’t that song from Sgt. Frog?

      Um…I guess. My ignorance stretches far and wide. :(

    Comments