I AM LISTENING TO
|
WAS ICH LIEBE
  • Englisch
  • Deutsch


BLOG FILTER



Just add that to your themes functions.php.

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

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

„Holland America Line Reisprofile Test“ provides an interface for customers to find out which cruise type they are.
By sliding the images you are choosing your preferences and define your cruise type, which allows you to get an individual set of cruises sent to you.

readmore

svgmagic2

SVGMagic is a jQuery plugin that provides a nice server side fallback to convert SVG images to PNGs for older browsers (IE8, Android 2.*).

Also works for background images.

SVGMagic

Serverside conversion of SVG to PNG

  1. PHP: phpsvg
  2. Python: CairoSVG

readmore

Visual Composer for WordPress provides many ways to extend its functionality. There are already many add-ons available for this dynamic page builder, but its easy to do the extending yourself,  by following the hints in the documentation ;)

In this small tutorial we are adding a „type“ field to allow a special css class to be added to each of our row containers.

New Visual Composer element properties can be easily added by using the vc_add_param function. See documentation for more information. In our case we are adding a property to the vc_row element.
Extending the Visual Composer Row element with a new property weiterlesen

readmore

web_rtc

IN A PERFECT WORLD

In a perfect world all current browsers would allow the usage of WebRTC natively, but that is as always not the case ;)

WHAT IS WEBRTC ?

„WebRTC (Web Real-Time Communication) is an API definition drafted by the World Wide Web Consortium (W3C) that supports browser-to-browser applications for voice calling, video chat, and P2P file sharing without the need of either internal or external plugins.“ – Wikipedia

Using Web RTC in your web application weiterlesen

readmore
1. September 2014

Git Auto Deployment with PHP

Doing Git / Bitbucket Deployment for most of my project these days. This is another compact solution, that should allow almost anyone to start using Git to distribute updates automatically.

Always nice to be able to go a step back fast ;)

Git Auto Deployment

His website is offline, but you can still reach it through the Web Archive: http://web.archive.org/web/20131209120053/http://wpcopilot.net/git-auto-deployment/

readmore