WebDev Blog

Comments Disabled

I've temporarely disabled comments for users other than members as this blog is receiving a lot of comment spam lately. I can't be bothered i writing a fix or whatever; this blog will run on a new application soon anyway(yes yes, I'm taking forever, I'm busy ok! :p)

08:33:24 AM on 05/26/2010 by Maghiel - Misc - comments

Page-level navigation in the Zend Framework documentation (Zend Framework Component Navigation)

From the Zend Framework general mailinglist:

I don't know about y'all, but whenever I'm navigating the ZF manual I get extremely frustrated with the lack of on-page navigation. For example, take a look at the Zend_Validate documentation and try to find one of the components in the middle (or a list of all the standard validation classes to quickly determine if one exists). I've filed two issues related to this problem:

http://framework.zend.com/issues/browse/ZF-9509 http://framework.zend.com/issues/browse/ZF-9509

But until a decision is made about those, I needed a temporary solution. Take a look at:

http://userscripts.org/scripts/show/72873

It essentially adds a nice "Page Navigation" block to the right side of the navbar: http://screencast.com/t/NzNiNjE0YmMt

Right now it adds it at the top, but if y'all think it should be at the bottom (below the current TOC) I'll move it. Let me know if anyone comes across a bug. I've only tested it in Fx 3.6.

Cheers, Chris Morrell Web: http://cmorrell.com Twitter: @inxilpro

02:33:51 PM on 03/31/2010 by Maghiel - PHP - 5 comments

Making Colors Transparent in The Gimp

Follow these steps to make a color transparent in The Gimp

  • Open your image in the gimp.
  • Right click the image and go to LAYERS then ADD ALPHA CHANNEL. You won't notice anything happening, but don't be concerned. It basically adds a transparent layer at the bottom of your image so when we erase the colors.....it's shows the transparent layer. Which of course would show whatever was under it on the screen.
  • Right click on the image again and go to SELECT and then down to BY COLOR. A window that is all black opens up. Don't change any of the settings....just use the defaults for now.
  • Now click on the color in the image you want to be transparent. These colors will now show up outlined.
  • Right click on the image again and go to EDIT and then down to CLEAR. This should now erase the outlined color you just picked from the image and the "transparent gimp checkerbox" should show through. This is the Gimps way of showing you that section is now transparent.
  • Right click on the image and choose SAVE AS and make sure to save as a GIF file if you want the transparency to work on the web.

I found this information in this article

02:30:28 PM on 03/24/2010 by Maghiel - Misc - comments

Modern Application Design

Ben Scholzen has started a series of blog posts about his vision on Modern Application Design. Read part 1 here

11:08:40 AM on 03/09/2010 by Maghiel - PHP - comments

New website coming up

Expect a new website showing up here in a few weeks. Finally :p

The blogging software is quite outdated. That is mostly my own fault, as updates are released for NucleusCMS. But I just don't like the syntax highlighting plugins that are available. Plus, I just feel like writing a simple app that suits to what I want and need.

The portfolio and blog part will migrate into one website. This will primarely meen that there won't be a portfolio anymore. I just don't have the time to finish and/or update it, which renders it quite useless in its current form. A portfolio might come back later, but as part of the same website.

I guess the new website will also stop the comment spam, but time will have to tell that :p

09:37:24 PM on 03/02/2010 by Maghiel - Misc - comments

Convincing the Boss You Should Go To a Conference

In his Guide to Conferences Ivo Jansch gives some very useful tips how to confince your boss you should go to a conference.

05:47:33 AM on 02/20/2010 by Maghiel - Misc - comments

ZFDebug - a debug bar for Zend Framework

An interesting little tool passed the Zend Framework general mailinglist today: ZFDebug.

From the website:

ZFDebug is a plugin for the Zend Framework for PHP5. It provides useful debug information displayed in a small bar at the bottom of every page. ZF Debug has been renamed from Scienta ZF Debug Bar when moving from private hosting to googlecode. The original page for Scienta ZF Debug Bar remains available.

Time spent, memory usage and number of database queries are presented at a glance. Additionally, included files, a listing of available view variables and the complete SQL command of all queries are shown in separate panels (shown configured with 2 database adapters).....

Read more about ZFDebug and get it here: http://code.google.com/p/zfdebug/

02:31:42 PM on 02/18/2010 by Maghiel - PHP - comments

Disable error checking on custom (X)HTML tags in NetBeans IDE

In PHP, I mostly use gettext for localisation. I do not like to use php tags and functions however for just a piece of text. With gettext it would be something like:

  1.  
  2. <?php echo _('Translate me'); ?>

or with shorttags on:

  1.  
  2. <?=_('Translate me');?>

So i use a custom tag in my views which is parsed by a filter that calls the tranlation engine. I've called it nls (native language support or national language support), but call it whatever you want, l18n seems to be a popular term but i find it harder to type :p

    <h2>Hello</h2> <p> <nls>This will be translated</nls> </p>

Now the problem is that the IDE I use, currently the NetBeans IDE, reports, quite obviously, a warning on all the nls tags: ""Unkown tag ". I definitely not want to disable all the HTML error checking, but all these warnings get a big annoyance, how can I still find my 'real' tasks?

The solution: Use a custom namespace for those tags. The HTML editor will ignore those tags:

    <html xmlns:nls="http://yournamespace.org"> <h2>Hello</h2> <p> <nls:string>This will be translated</nls:string> </p>

I've found that only using the prefix without defining the namespace also works to disable the error checking, which is fine in my situation as the tags are replaced by a localised string before actual output to the client anyway.

My topic and the solution on the NetBeans Forums

06:34:34 PM on 01/05/2010 by Maghiel - Misc - 6 comments

Plesk and vhost.conf

If you edit a httpd.conf for a virtual host when you are running Plesk, it will overwrite it on next change. So you need to create/edit vhost.conf files per virtual host.

After editing your vhost.conf file, a line has to be added to httpd.conf to tell to include the vhost file. But you can't edit it manually. So how to apply your changes?

  • Configure a single domain: /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com
  • Configure all domains: /usr/local/psa/admin/bin/websrvmng -a

Source article

04:00:47 PM on 12/27/2009 by Maghiel - Linux - comments

Code completion for PHP-GTK in NetBeans IDE

You can find signature files for PHP-GTK in NetBeans IDE here

03:54:17 PM on 12/27/2009 by Maghiel - PHP - comments