PHP 


I just added a feature that shows how many seeders and downloaders there are on a torrent directly in the post without having to click the status link. I’ve been meaning to make this feature for a long time, I just haven’t gotten around to it.

It looks like this:

status <- you should see the current number of seeders and dowloaders next to "status" (if you have an AJAX compatible browser, e.g. Firefox, IE7 or Chrome).

When this post was written it looked like this:

screenshot

… Continue reading

 

I use the PHP function strrpos in some of my code. Last night I discovered that it behaves very strangely. The fact that it has worked this far is a miracle.

The purpose of strrpos … Continue reading

 

I’ve added a feature to the site that allows the visitors who use the browser in the PlayStation Portable to save the videos and thumbnails without %20 and similar in the file name (that the PSP browser refuses to decode for some reason). It’s not that difficult to implement, I know, but I wanted to find a way of doing it without using PHP to serve the file. Since I haven’t found any other way, I’m now using PHP for serving locally hosted files.

Now, the only thing you have to do to save the file is click the download link and then click the thumbnail link and choosing “/VIDEO” as the save folder, as illustrated below.

How to save

The example is from this post.

Let me know if you have any problems downloading with the PSP. The new links should also work in Internet Explorer 7.

 

It seems that my web host is becoming slower and slower. I’ve installed WP-Cache that caches the output in the blog which results in shorter loading time for the visitors. I’m using Counterize for website stats and to be able to run that together with WP-Cache I’ve had to make my own stats script that adds the stats without using any Wordpress functions. Since I had to make this change I took the opportunity to collect stats by loading the script via an image tag instead of loading it directly in the PHP. This is the way I did it back in the day. A benefit of this is that most bots aren’t logged since they don’t load the images, so there’s less maintenance needed for the bots exclude list.

The gallery is not a part of this caching yet. I’m going to make my own solution there when I have the time. Until then I’m afraid the long load times is something you’ll have to live with.

I’m happy to report that since I made my little alteration to the comment form I’ve had a total of zero spam comments. A couple of bots have been caught in the traps I’ve laid out, but most bots don’t even get that far. I know how I would develop the idea further, but I don’t have to worry about doing that until the bots figure out how to post the spam.

 
fasio

Today I’ve written my first Wordpress plugin! It was surprisingly easy. I wrote a plugin that lets me add pictures from the gallery to my blog posts. I used to generate the HTML code for the thumbnails with a script and copy-paste that code into my blog post which is far from optimal. Now I let the same script generate a string like this: [\mrdeus_plogger:60,59,15,14] (without the backslash) and the plugin transforms that into the images below. The BoA image to the right is also generated by the plugin.

  • Cutie Nail 01
  • Cutie Nail 02
  • Cutie Nail 03
  • Cutie Nail 04

It’s generated on the fly, so any changes I make in the gallery are shown directly in the blog. It will also re-generate any missing thumbnails. Now I can take this off my to-do list, but while writing this plugin I found a number of bottle necks in the Plogger code the gallery is based on, so I’ll have to add a couple of new points to the list instead ;)

 

I’ve temporarily disabled the commenting function in the gallery. This is because I haven’t had time to implement an anti-spam solution yet (I’m going to use Akismet like I do in the blog). I’ve started getting some spam and I won’t have Internet access for a few days, so it’s disabled for now.

Though this is not really big news, I’ve started using Jerome’s keywords plugin which gives me these nice tag clouds that I use in the about page and in sidebar on the main page. I’ve modified the plugin a little, but nothing significant. Thanks to Jerome for a great plugin.

 

Today is an important day in the history of this site. I got my first comment spam! Yay, I’m popular! Luckily I installed Akismet a few days ago. “Luckily” if you didn’t want to hear about penis enlargment pills that is :lol:

 

Believe it or not, the gallery is now up and running. I ended up using Plogger, which I found very easy to work with. It is very easy to modify and I’ve made quite a few changes. Well, I guess it’s time to start filling the gallery up :)

 

I’m currently looking into some image gallery plugins I could use for this site. I was meaning to program the gallery myself. I was meaning to program the whole site myself, but I’ve come to realize that it would take me forever to make everything I want just the way I want it. Since I’ve settled for the Wordpress blog, I’m now installing plugins with the features I want. After I’ve tweaked the plugins a little and made my own site layout I’ll start filling this place with goodies. I got my J9 New + Party Collection CD today and it comes with some very nice images of Jolin Tsai that I’m eager to scan and put on the site.