Categories
Programming Web

WordPress Plugin the MVC way

I have to improve a WordPress plugin so it supports more (specific) features. My problem was that I have never worked with WordPress code or even created or modified a WordPress plugin, so I had no experience with WordPress coding. Furthermore I love working with Delphi, C# and PHP, so I do the OOP way – above all because of its many advantages over procedural way (Yeah, I know, there are also disadvantages!). So I searched for a good introduction/code base for implementing the MVC pattern and use it in my plugin. But I did not find anything that satisfied my needs…

That’s why I want to share my code with you which is hopefully a help for everyone who will programm the OOP way ;) You can always find the code at GitHub or downloade it directly as as ZIP file.

Here you can find the readme file.

Categories
Delphi General Programming Windows

Delphi › Projects › Win7LogonScreenDpi

Today I added a new Delphi project for a small issue I had yesterday: I reinstalled Windows 7 on my notebook Lenovo Thinkpad W500 (display resolution: 1920×1200) and Windows set the DPI of logon screen to 120dpi – I think that’s because of the high display resolution. But that is not the DPI I wanna see! So I wanted to change this, but there is no dialog where you can do that. But MSDN helped me: there is only one Registry value that is responsible for settings the logon screens DPI.

Categories
Programming VB.Net

VB.Net: Get type in shared (static) context

Before I start I have to clear one thing, but I do not want to explain it:  that what static means in Delphi is Shared in VB.Net. When you do not know what I am talking about here then please read the documentation!

In Delphi it’s easy to access the class itself (not the instance!) in which a static method is declared: you can use Self to access the class and its static methods and properties. Imho it’s not that easy in VB.Net! I tried some things until is stumbled over this thread. I know that there is the solution for my problem, so why do I post the solution once more? The first reason is that I want to say that the solution postet there works ;) And second one is that I want to spread the solution because I haven’t found it very often via Google.

Categories
Programming VB.Net

VB.Net: Outlook AddIn: Design mode or Runtime?

At the moment I write an AddIn for Microsoft Outlook 2007 in Visual Studio 2010, using .Net Framework 3.5. For this project I added some UserControl components which need to know if current state is design mode or runtime. Well, there is the possibilty to ask the component itself (via Me.DesignMode) but when you want to know that in general you can use this method if you want to know:

Categories
Delphi Programming

Toolbar2000 and SpTBX for Delphi XE2

Because I’m an user of the Toolbar2000 and the SpTBX components for Delphi I had to update them in order to upgrade my projects to Delphi XE2. Without the changes I made it wasn’t possible to use and compile my projects. So I had to sit down a lil’ bit of time and here it is.

Categories
Delphi Programming

Delphi XE: TTimeZone is not threadsafe

This is only a very short post, but perhaps it can help some people out there :) When you want to use the abstract class TTimeZone respectively its derived class TLocalTimeZone then be aware of that it is NOT threadsafe – the two mentioned classes are defined in the unit DateUtils since Delphi XE and are really helpful.

Categories
Programming Windows

Writing a Windows Batch file…

Today I wanted to write a simple Windows Batch file which should create some symbolic links (command: mklink). I thought that something like this is an easy job because I know the basics about batch programming – but that was obviously a mistake… Perhaps this post can help somebody else :)

Categories
Delphi Programming

Enumerations as class type in a generic class/record

Last night I had a really strange compiler error when I tried to translate my new array record. You have to know that I have rewritten the complete record and added generic support to it. Here is a lil’ bit of the code which you need to unterstand why I got this error.

Categories
Delphi Usability/Interface

Update: Editor Theme for Delphi IDE (Version 7-XE2)

Because I do not work with Delphi since some time, I had not the time to provide an updated version of the Delphi IDE theme, so it works with XE3-XE5. But there is a guy from DelphiPRAXiS who updated the theme, so now it’s available for alle IDEs since Delphi 7. Thank You, Rolf Warnecke, for your help und support!

Click here to open the download page on www.bis-programmierung.de which provides the theme for Delphi 7 to XE5.

______________

Some days ago Embarcadero published the new version of the Delphi IDE, called XE2. Rolf Warnecke has already ported the theme to this version and here it is :)

Today I recieved the new version of the my favorite IDE called Delphi XE. Some time ago I created a kind of theme for the its editor so it looks a lil’ bit nicer (for me ;) ). Now I updated the theme so it supports the new version too. You can find my old (german) post below.

Download: Delphi Editor Theme (112.8 KiB, 1,863 hits)

Categories
Programming Web

How to test web applications without having all mobile devices?

Last week I worked on my jQuery plugin apOverlay which will be a part for my apWindow plugin hat gets published in the next two or three weeks. In all modern browsers there are no problems at all – ha, that’s wrong! This is only the half the truth because this statement counts only in normal browser, not completely on mobile devices and its default browsers. But how to test if the implementation is correct? No one wants to buy each phone, PDA, tablet… Well, there is the way to look for simulators but that’s not so easy sometimes :)