Condolences to Richard

Back when i was doing work-experience for college i worked at a company called Newstream. There was a guy working there called Richard. He was actually the one that introduced me to the possibilities of PHP and showed me the basics. Yesterday his partner Andrea died (18/06/1962 - 13/10/2008) after being diagnosed with cancer 7 weeks ago. [...]

Centralized programming

Iv been working on a couple of projects lately that require centralized programming. This is a term iv made up but i think it explains exactly what i mean…. more or less.. to other programmers/geeks…

It is generally the art (?) of programming in such a way that multiple sites, or multiple parts of a single [...]

Automated form and processing from DB table

I'm currently working on a function to speed up making forms. When making a form with some back-end table you need to do 4 things: make the database table and make a form, with javascript check and php processing into the table. My aim is to bring this back to 1 thing and have the rest automated [...]

Video conversion and player update

So fixed the whole streaming problem. Its all working great now
Next thing i want to look into is:
- adding categories for the playlist videos
- voting
- upload some info with the movie (name, email, title, info)

http://cmsv6.beinspired.com/video/

Video conversion and streaming UPDATE

Added download icons for the different filetypes
Added better error handeling
Added mouseover info for thumbs (might add some more info there)

Cant get a progressbar working for the conversion, tried many things but im being limited by the programming languages !_! sucks when that happens.. fridged this idea for now. 

Next step will be voting, and still trying [...]

Video conversion and streaming

Im working on this nifty little video uploader, converter and streamer.

http://cmsv6.beinspired.com/video/

The apli alows a user to upload a video file, this is automatically converted to a flv file for streaming and various downloadable files for apple/ipod/windows. also a thumbnail and a preview (mouseover the thumbnail) is made. All cropping and resizing is also handled automaticly.

Currently [...]

Report system

Make an interesting little report generator thing a while ago, simply enter field names/values and optionally your own colour to generate a pie chart and a bar chart. You can also save the reports

http://thomassmart.com/Experiments/report/

PHP function DB query

A simple little function to make querying databases a bit less repetative

function sqlGetQuery($table,$return='q',$id=0,$select='*',$where="){
global $dbL;
$q = mysql_query("SELECT * FROM $table WHERE 0",$dbL); $idName = mysql_field_name($q,0);
if($id>0){ $where = "$idName='$id' ".$where; }else{ $where = "$idName>0 "; }
$q = mysql_query("SELECT $select FROM $table WHERE $where",$dbL);

$selCount=explode(',',$select);$selCount=count($selCount);

if(mysql_num_rows($q)==0){
return false;
}elseif($return=='q' || mysql_num_rows($q)>1){
return $q;
}elseif($return=='r' || $selCount>1 || $select=='*'){
return(mysql_fetch_array($q));
}elseif($return=='i'){
$r=mysql_fetch_array($q);
return $r[$select];
}
}

Usage

if($q=sqlGetQuery('content_menus')){
$r=mysql_fetch_array($q);
[...]

XML editor

a simple little script i made thats loads in an xml file (in this case a language file for the cmsv6), splits it up and lets a user edit the values with a simple textarea.

todo: make the textareas into simple html editors with some basic html buttons for bold/link/img/etc.

http://thomassmart.com/Experiments/xmlform/

PHP function xml2array

This is by far the best XML2ARRAY function for php i have found so far, i use it in several projects.

function xml2array($contents, $get_attributes=1) {
/**
* xml2array() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
* Arguments : $contents - The XML text
* $get_attributes - 1 or 0. If this is [...]