Door Gauke Pieter Sietzema in Web development
Op 20 juli 2010 | 0 reacties
Bij zowat elke site loop je tegen het maken van thumbnails aan. Content managers moeten afbeeldingen uploaden en resizen. Dit gebeurt vaak uit tijdgebrek via de alom bekende WYSIWYG editor zoals TinyMCE. Hierdoor ziet de afbeelding er kleiner uit, maar qua bestandsgrootte blijft de afbeelding natuurlijk even groot.
Een PHP script die hier uitkomst kan bieden is timthumb, één van de meest eenvoudige en effectieve thumbnail generator scripts.
...
Door Gauke Pieter Sietzema in Web development
Op 11 maart 2010 | 0 reacties
Voor bijna alle ‘normale’ sites maak ik gebruik van het MODx CMS. De laatste tijd overweeg ik echter ook steeds vaker WordPress als CMS. Het is natuurlijk vanuit de basis niet bedoeld als CMS en het is voor websites met een complexe navigatie en veel templates ook niet optimaal, maar voor websites met een groot sociaal aspect vind ik het een ideale tool, met alle plugins die beschikbaar zijn. Daarnaast hebben we sinds kort een nieuw soort site waarvoor we WordPress gebruiken: 1-product-shops.
Zo hebben we met Sterc een nieuw product in de markt gezet, een PS3 controller met muis. De site...
Door Gauke Pieter Sietzema in Web development
Op 2 april 2009 | 1 reactie
Finally, a debug bar for Zend Framework: Scienta ZF Debug Bar. It’s easy to install and I’m loving it! All it takes to install is:
copy the scienta folder into your library
add some code to your bootstrap and include your database connection
run your app!
Get the debug bar here, including installation instructions.
...
Door Gauke Pieter Sietzema in Web development
Op 23 december 2008 | 2 reacties
I was working on an application which was using alot of number-formatting using Zend_Currency. I was using a view helper for this. The view helper looked like this:
class Sterc_Helper_ToEuro extends Zend_Controller_Action_Helper_Abstract {
public function direct($amount) {
require_once('Zend_Currency');
$currency = new Zend_Currency('nl_NL', 'EUR');
return $currency->toCurrency($amount);
}
}
There was a certain page which called this view helper about 10 times and the whole page took 12 seconds to load. I was initially looking at my MySQL queries, which caused some problems in this...
Door Gauke Pieter Sietzema in Web development
Op 5 december 2008 | 0 reacties
I was working on an application where I needed all unique brands from a mysql table to populate a HTML select box. I have no idea how to do that quickly with Zend_Table, so I found out you can just pass on your own SQL if you want.
A simple “SELECT DISTINCT brand FROM products ORDER BY brand ASC” will do in these cases. It would even be better if I had a seperate brands table, so I wouldn’t have this problem at all. But since this was a quick and dirty job, there was no brands table ;)
Anyway, these lines will do the job (where $db is an instance of your Db adapter):
$statement =...