Zend - The PHP Company




Code Gallery: liquidkernel


Another Resize Script with Border Option  

Type: code fragment
Added by: liquidkernel
Entered: 09/05/2002
Last modified: 05/12/2001
Rating: **** (7 votes)
Views: 12948
This script will open an image ($image), resize it to the values you specify ($max_height and $max_width), then if you want, add a border ($addborder). It uses ImageCopyResampled from GD 2 as ImageCopyResized looks too pixelated. Set $image_quality to anything between 0 and 100.


Assign From Array (v2.0)  

Type: code fragment
Added by: liquidkernel
Entered: 13/09/2002
Last modified: 09/12/2001
Rating: - (fewer than 3 votes)
Views: 4506
Runs through an array, assigns variables based on key name. Ability to append or prepend text to newly created variables. Useful for adapting current applications that depend on register_globals to work without it.


Assign Variables from Array  

Type: code fragment
Added by: liquidkernel
Entered: 08/05/2002
Last modified: 05/12/2001
Rating: - (fewer than 3 votes)
Views: 4568
This is a function I wrote that runs through a single dimensional array and assigns variables based on the key names.


Cacher - Easy and efficient variable cache system  

Type: class
Added by: liquidkernel
Entered: 14/09/2002
Last modified: 09/12/2001
Rating: - (fewer than 3 votes)
Views: 5068
Cacher allows you to cache variables (anything that can be put into a variable) for later use. This speeds up loading time, and reduces load on the data source.


Sort Order Class  

Type: class
Added by: LiquidKernel
Entered: 01/04/2002
Last modified: 04/12/2001
Rating: - (fewer than 3 votes)
Views: 3691
This is a class I wrote as a re-write of my original create_order_block() function. It's used to create href links on a page to sort a SQL query (in both ascending and decending orders, the two will alternate).


XMLConfig - XML Configuration Tool  

Type: class
Added by: LiquidKernel
Entered: 15/03/2003
Last modified: 03/12/2002
Rating: - (fewer than 3 votes)
Views: 8126
After trying counless ways (objects, constants, etc) of storing configuration values for my applications, I decided to take on a more elegant approach: use an XML file.




Search