Archive for the ‘Technical’ Category.

Embedding YouTube videos into WordPress

That’s an easy one. On your WordPress edit post page switch to html-view and insert the html-code to embed provided by youtube at the desired position in your article.

The section you insert may look something like this

<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ width=”425″ height=”344″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0″><param name=”allowFullScreen” value=”true” /><param name=”allowscriptaccess” value=”always” /><param name=”src” value=”http://www.youtube.com/v/71kckb8hhOQ&amp;hl=de_DE&amp;fs=1&amp;” /><param name=”allowfullscreen” value=”true” /><embed type=”application/x-shockwave-flash” width=”425″ height=”344″ src=”http://www.youtube.com/v/71kckb8hhOQ&amp;hl=de_DE&amp;fs=1&amp;” allowscriptaccess=”always” allowfullscreen=”true”></embed></object>

Switching back to text view you can add some additional line breaks before and after the video.

That’s all.

Experimenting with hotlinking

Hotlinking refers to embedding resources from a host (that is not yours) into your webpages, forumposts, etc. . Unless the hoster of the resource gives explicit permission, hotlinking should be omited as it has some negativ implications for the hoster of the resource.

How to hotlink

What if i find a resources,  i want to embed in my blog without hosting it on my server? Well, should be easy, shouldn’t it?

E.g. this cartoon on http://www.nichtlustig.de/toondb/100202.html. But i don’t want the whole page, just the picture.

The first thing i do, is to find out if it is available via a static link. First i try by looking at the resource address via a right mouse click->properties (which should be available in every browser). And – ha, there i see this address http://www.nichtlustig.de//comics/full/100202.jpg which shows exactly the picture when i enter the url in a browser. Embedding it in this blog is made easy by wordpress. I’m not going into details on that.

And that is what it looks like:

nichtlustig.de, cartoon, duck in bakery

nichtlustig.de, cartoon, duck in bakery

That’s it. Please not that at the time i wrote this article hotlinking to resources at nichtlustig.de was possible. If nichtlustig.de decides to prevent hotlinking, this image can not be vewed anymore or there may be a replacement that clrifies that hotlinking is not wanted. And please don’t sue me. I have done this for reasons of showing how it is done. I have provided links and props to nichtlustig.de.

The important facts are, now every time this page on my blog is loaded, the browser will download the picture from the host at nichtlustg.de. To a visitor of this page it makes no difference if the picture is hosted on my server or on another. I can dsiplay content that is not mine but a can make it appeare like it is mine (imagine the cartoon not beeing labeled with ‘www.nichtlustig.de’ in the lower left corner).

Additional comments for hotlinkers:

It is not always that easy. Sometimes site owners try to protect static content via javascripts, that do show some warning when you right click on the content. Not that bad too. In that case you just turn off javascript or have a look at the plain html. Maybe use the famouse firefox add-on ‘firebug‘ to examine a sites html, resources and links. Not that the address of the resource has to be static, not the page url. In the above case the resource address is ‘http://www.nichtlustig.de//comics/full/100202.jpg’. The url of the page it is from is ‘http://www.nichtlustig.de/toondb/100202.html’.

If a site does not provide content via static links, then you are done. No static link, no static linking.

Additional comments for resource hosters:

If you run a site, hotlinking may make you furious for two reasons:

  1. Your content is displayed in a distinct location, where you do not have control over the context in which it is displayed. The usage may run counter to your original idea of how to use it.
  2. Every page request in the distinct location generates traffic at your host, because the content resides on it and is downloaded from it. The distinct location just embeds it via a static link.

There is a solution to this problem. Webservers can be configured to not to serve to hotlinks. Just search the internet for your webservers name and the term ‘hotlink‘.

Apache webserver

IIS