Watch and learn. Jet Li, Bruce Lee, Jackie Chan and the likes would be put out of business if moves like this went mainstream. It's messed up and very violent. Grab some popcorn.
Looking forward to your feedback on this bloody scene.
Google offers some cool AJAX APIs that can do a bunch of things and today we cover language detection. When you ... let's say ... scrape ... text sometimes you could use a sentence of few words to verify the language. This is not easy viable to do on your own but Google offers a way. It's probably part of the Globalization Agenda Google's part of but I won't discuss this here. Just enjoy it! Read the rest of this entry »
This is big and this post is a sticky. It will remind you the right way you need to handle code and plugins you get from this site. Simple handling and storing instructions. Read the rest of this entry »
Eval is real cool and can give a lot more versatility to a coder. Eval for PHP has a small functionality issue one beginner would not expect. If you eval, the parameter has to be a PHP code string. But if you have HTML and inline PHP code, there's a catch.
eval("<b>cool <?=' stuff'?></b>");
If you try to eval the above it will fail as it's not PHP code. It's HTML with PHP inside. And, as eval evaluates the expression as if it was executed in the place where it's called, this eval will never work. On the other hand this will work:
eval("echo 'stuff';");
This can be evaled easily no matter what. It's only PHP code, the whole point of EVAL. Read the rest of this entry »
As most of you know I had a very popular GZDecode version on my old blog. But, it was not really as good as it looked like. I found the problems when I was trying to expand a monthly GZEncoded raw access log. I realized it was a file made of many welded GZEncoded entities each on its own. So my way of expanding did not work. Read the rest of this entry »
When you display a sidebar it's great to check if that sidebar actually has widgets inside. You may end up with an empty rectangle if you did not add any widgets to a sidebar. There are two methods to actually do this.
You can output buffer the sidebar and see if it has any text inside. If length is zero don't display it. Or ... you can use the missing is_sidebar_active(). It's actually missing but here is how it should look like. This function will check if a sidebard has widgets inside and, if it's empty, you can skip it. Read the rest of this entry »
I bet all of you know what cookies are (especially cookie stuffing). Now I will show you the easier way to set them in Wordpress. As you are aware the setcookie function in PHP has a whole bunch of parameters. These, in Wordpress, must be setup a little differently. Read the rest of this entry »
I've been dragging my ass for quite a while and finally I upgraded the blog. With all the changes to my plugins and eLIB, I could not safely update the blog without a bit of manual labour and change stuff inside to work with the new plugin base.
I took a deep breath this weekend and, in a few hours, I was done. There are many changes in the blog but the most important is my ability to sell stuff using PayPal. This was the only setback that kept me from selling the Plugins and scripts quite a bunch of you were requesting by email. I didn't feel like handling that stuff (orders) myself so the plugins should do it properly. Read the rest of this entry »
The blog has been down for an entire day and everything was updated: all my plugins, eLIB and a changes to the theme itself. After all these changes, there may be dragons bugs. Keep an eye out and if you bump into anything peculiar please notify me here.
I've looked around with a critical eye and it seems to work but gimme a hand here and don't hold back if you spot abnormal behaviour during your enjoyable visits.
Thanks ;)
PS: You will notice a lot of cool things in the next days.
I was working on a plugin and wanting to add a checkbox near a text area to toggle it's wrap. I add the basic jQuery code and use …attr('wrap', 'off') but figure this: IT'S NOT WORKING! Read the rest of this entry »