• About
    • Contact
    • Genalogy

Andreas Loppnow

  • Embed youtube videos, the easy way!

    September 26th, 2014

    I just found a neat piece of code I want to share.

    If you want to let your client embed youtube videos and don’t want to make it to complicated for them make them a Backend textfield where they past the Video URL.

    With this call $video = json_decode(file_get_contents(sprintf(‘http://www.youtube.com/oembed?url=%s&format=json’, urlencode($url)))), you get an object congaing most info you will need about the Video.

    $video->html gives you the embed code, $video->title, you guessed it,  the title.

  • Hello World Just setting this Blog up to…

    August 17th, 2014

    Hello, World.

    Just setting this Blog up to rescue whats left of my old Blog, hosted in Germany.
    That blog got hacked, so I guess this is a good time to cut those ends and stop paying for something I’m not using, eh.

  • my Coda 2 setup

    January 27th, 2014

    I started to use Coda 2 as work environment on my new (company issued) MacBook Pro (thanks again for that 😉 ). I found some helpful plugins for Web Design Work.

    We do a lot of [[WordPress]] and [[Codeigniter]]  work and there a 2 modes that teach Coda built in WordPress and Codeigniter Functions. Upside: Coda now knows all built in functions for WordPress and Codeingiter. Downside : Coda doesn’t learn new functions from installed Plugins we use a lot (or I just missed this function so far).

    I just recently found some neat plugins for Coda making it easier to use Zen Coding , excuse me : Emmet and less. The Less Plugin is a bit tricky to install since it depends on some other libraries but your can figure it out easily with google.

    Coda2 by itself is a very helpful Editor with SVN, Git, FTP and syntax highlighting. I like project management in my editors so this feature is very helpful too.

    For now I’m very happy with Coda and don’t regret the small investment you have to make to get started.

  • CSS Hack for IE 6 and IE 7

    December 6th, 2013

    As Web Developer you always struggle when it comes to support IE 7 and below. The ratio of time spent to fix bugs for IE > 7 and the people seeing your website in those browsers is ridiculous.
    I usually ask myself if I want people who use those Browser visit my website but some people have no choice if, for example your employer equips you with computers.

    Today I found a neat trick to write CSS for those Browsers.

    Just add a ‘*’ infront of your CSS property for IE 7 and a  ‘_ ‘for IE 6.

     

    position:absolute;
     *position:static; /*Hack for IE 7*/
     _position:static; /*Hack for IE 6*/

     

    It works like a Charm.

  • Send E Mails with WordPress

    November 26th, 2013

    For a Project at work I had to implement a solution where [[Wordpress]] sends automated E Mails. In the end it was very easy but it was quite some digging trough the Codex to find what I needed, so I thought I share my work here.

    All Magic happens in the functions.php file of your template, where else 😉

    It all comes down to the wp_mail function
    wp_mail($to, $subject, $message, $headers);

    • $to – is the string or array with recipient E Mail addresses
    • $subject – is the subject line
    • $message – the E Mail body
    • $header – is the an array for all E Mail Settings

    everything pretty straight forward. The Headers array has some easy to use Settings:

    • $headers[] = “Content-type: text/html”; – makes your E Mail an HTML Mail
    • $headers[] = “From: The Sender <test@test.org>; – sets the Senders E Mail address

    That’s all the Fun. Call that with any hook and your WordPress installation sends E Mails like magic (If you have a sendmail handler activated on your server but that’s another story).

  • Less in PHP Designer

    October 28th, 2013

    I started using Less for a project at work. I really liked it: variables, nested CSS all very cool. One Downside. The Editor we use ,PHP Designer 7, doesn’t support Syntax Highlighting out of the box for LESS.

    But I found an easy fix today. In the preferences on the Tab for the File association, just add .less as a file type do CSS and PHP designer adds syntax Highlighting to less files. Easy as pie.
    PHP Designer has some hick ups with nested CSS but it works.

  • New Job

    September 21st, 2013

    Last week I started a new job as wordpress/ PHP developer at Integra Strategic. It is awesome so far. A small (now) 3 person company.
    I’m already working on 2 brand new wordpress projects and it is going along quite nicely

  • automatic generate variable names in PHP

    August 21st, 2013

    I ran into the Problem that I had to write a PHP program that generates individual variable names for objects (a script to create an ics file).
    I’m getting the events from the Database and then I use a for loop to create the object for each event.

    the PHP code


    //get data from DB
    for($i = 0; $i < $count_events; $i++){
    ...
    ${vevent.$i} = & $v->newComponent( "vevent" );
    ${vevent.$i}->setProperty( "dtstart", $start);
    ${vevent.$i}->setProperty( "dtend", $end);
    ...
    }

    ${vevent.$i} creates a new name every time the program runs trough the for loop, adding the counter to the variable name.

    I used this code for a calendar project I was working on. I needed to generate individual variable names in a for loop to creat an [[ics]] file. The events are stored in a MySQL Database. I’m using this little Script to generate the ics file. This file can be imported into Google Calendar or any other Calendar Program.

  • Raspberry Pi

    August 20th, 2013

    I have a new Toy, a Raspberry Pi. Trying to get some Home Automation done.

    Raspberry Pi

    I installed HomeGenie later I will add some [[Z-Wave]] products.

    Home Genie is a modified Version of the Rapsberry OS. It gives you a Web Interface to control your Home. The Software features Drivers for Z-Wave, [[X10]] and some other Home Automation Protocols.

    Software Installation for the Raspberry Pi

    The software installation was pretty easy. I followed (and modified : I used the Home Genie Image) this Tutorial. Then you put the SD Card in the Raspberry and fire it up. Easy as Pi(e).

    The Software Side is up and running, time to get some Hardware!

  • Fort Gorges

    June 17th, 2013

    I made a little Kayak Trip from Peaks Island to Fort Gorges today.
    Nice workout and i also got some nice Pictures to share.

    View all

    Get your own
←Previous Page
1 2 3 4 5 6 … 16
Next Page→

Blog at WordPress.com.

Mastodon
  • Subscribe Subscribed
    • Andreas Loppnow
    • Already have a WordPress.com account? Log in now.
    • Andreas Loppnow
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar