I AM LISTENING TO
|
WHAT I LIKE
  • English
  • German


BLOG FILTER



The SVG converter is a web frontend to a jQuery Plugin, that allows you to include those line drawings on your webpage.

Lazy Line Painter

readmore

Single inheritance has often been the limitation for PHP. This means that a class can only inherit from one other class. Often classes share the same methods and it would be beneficial to allow reuse and prevent duplication.

In PHP 5.4 a new feature was added, known as Traits. A Trait is like a Mixin, allowing to use / mix classes into existing classes. This means code reduction and less duplication.

Example of a Trait

This trait can than be used in other classes:

Both classes can now use the Shareable trait.

The benefit is less code duplication. The drawback is, that not all used methods are visible within the source-code of the class. So before moving a method to a trait, make sure that you will actually reuse it ;)

I have been restructuring huge amounts of code over the past months and traits are helping to keep things far more organized.

In combination with __autoload its a real nice way to cleanup your code toolbox.

Happy coding
Alex

  1. Traits
  2. Autoload

readmore

When projects are getting bigger, its always nice to split things up and prepare parts of your code for general reuse.

PHP Traits (PHP 5.4+) are a nice way to do this. Adding multiple Traits or classes, requires you to make sure all are being included.

Here is a nice way to register both with the __autoload function

Traits are loaded when you specify their use in a class.

 

 

readmore

Normally the functions.php in your CHILD theme is called before the PARENT functions.php. In some cases, you might like to alter functionality loaded through the PARENT theme in your CHILD theme, which is not possible without some changes.

From the WordPress Codex :”Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)”

For our new setup, I am using a base class in our PARENT theme to define all our defaults. Some of the CHILD themes need to overwrite or adjust functionality. This allows to have a pure foundation, than alter and extend as needed.

PARENT functions.php
is extending the TimberSite class in my case, as I am using Timber (TWIG for WordPress) for my themes

CHILD functions.php

Cheers
Alex

readmore

At portalZINE TV we produce Internet TV since 2008. “Das Magazin” is our flagship magazine format that started in 2010 and was broadcasted via satellite for over 3 years (Tec Time TV).

Portfolio

readmore

I have been working on a full integration of fullpage.js into Visual Composer for WordPress. This allows to easily build fullpage layouts, with different pages and full slide capabilities. Also added iScroller functionality, to allow overflow content to work nicely on certain pages. All  of this is working with simple drag & drop :) and can be used by any unexperienced user.

I am currently cleaning up the addon, but I am not sure yet if I will offer it as a commercial addon or keep it for my internal projects only :)

Will post a video later this week.

Cheers
Alex

Visual Composer for WordPress
fullpage.js
iScroller

readmore

Currently reading up on the IMAP protocol, as one of my customers is using a server without IMAP support compiled :)

RFC 3501

I will be using a simple INBOX check for failed email notifications (sockets are your best friend). That will allow me  to set a flag for every new user account that is still unconfirmed and used a broken email address for their registration. These accounts can than be verified manually :)

Happy socket = happy customer.

Btw, here is a nice piece of code to quickly parse the email header in PHP

 

readmore
25. February 2015

Time for some fresh ideas :)

Time to give all our network sites some fresh paint :)

Cheers
Alex

readmore

The PCTV Broadway HD-S2 is currently my favorite network sat receiver. It is tightly integrated into many of our network clients.

As the PCTV Broadway HD-S2 provides a nice and clean REST Api, I decided to start writing a small desktop client to access the streams and recordings (My main focus is Mac OSX / Linux for now). Sure, you can use VLC for that or just use the web interface, but I wanted something more customizable .

The Broadway PHP Api is working nicely and I am tempted to integrate the same functionality into the desktop client  :)

Basic functionality working so far:

  • Auto-discover Broadway on the network (which is more of a hack, but works nicely)
  • Check stream availability
  • Channel listing
  • Working on a channel preview grid
  • Select favorites
  • Watch live streams
  • EPG now and upcoming  ….soon ;)

Cheers
Alex

readmore

“A widget for running scripts in the Today View in OS X Yosemite’s Notification Center”

Latest Version – Github

Here a nice list of sample uses
Wiki
Reddit 1
Reddit 2

Example of colorized memory display

 

readmore