PHP – Make Youtube embed code from an Url

A small php function that transforms a youtube url in its embed script. function make_youtube_embed_from_url($url) { $url = str_replace(‘?v=’,’/v/’,$url); $out = ‘<object width=\”425″ height=\”350\”><param name=\”movie\” value=\”‘. $url .’\”></param><param name=\”wmode\” value=\”transparent\”></param><embed src=\”‘. $url .’\” type=\”application/x-shockwave-flash\” wmode=\”transparent\” width=\”425\” height=\”350\”></embed></object>’; return $out; }

"PHP – Make Youtube embed code from an Url"

Drupal:: How to Add User Pictures

Unlike most basic things in drupal, adding a user pictures to nodes like the forum, is not such an easy intuitive task. So after looking around i gathered this: To add a user picture on posts: – select pictures in /admin/user/settings – allow pictures in the theme at admin/build/themes/settings (also in the specific used theme if there is one)

"Drupal:: How to Add User Pictures"

(Ogre) Embedding Python in C++ Example

I decided that I want to find a good way to put Python in my C++ Ogre applications. Now, one method of doing this would be to write an interface forĀ import game_namemy application at a high level. Lets say that Python is going to handle scripting in an RPG-type game. I would need it to do things like “move character to this position, do some spell particle effects, say this dialog”. To accomplish this, I’d…

"(Ogre) Embedding Python in C++ Example"

Psyco and PyPy

After working with an issue in PyOgre I decided to take a closer look at Psyco (the Python JITer). Taking a look at how Psyco works is like learning how sausages are made. You just don’t want to go down that road. This isn’t to say that Psyco is poorly written, badly executed, or anything like that. I just mean that the actual internals of Psyco are incredibly complex, and not something that can be…

"Psyco and PyPy"