tom.drastic.net

Archives Posts

flash papervision experiments

October 24th, 2007 by tom

my first flash+papervision 3d depth of field (DOF) experiment:

papervision.jpg
(to see the flash version click “read more”…)

  1. bluring (or fake dof if you want) is done by calculating the distance of every plane to the “current” plane.
  2. animations are done using tweener, which is a really nice tool to animate/keyframe numeric values.
    check this nice tutorial on tweener…
  3. pictures are taken from stephans asia journey on piclog

Read the rest of this entry »

Filed under papervision, flash, 3d having 2 Comments »

Archives Posts

mediawiki run php code

October 19th, 2007 by tom

you can run php code in mediawiki using the runphp extension.
you can get it here

i used it to display some database content. but it did only update after re-saving the article.
you need to disable caching in mediawiki:

$wgMainCacheType = CACHE_NONE;
$wgMessageCacheType = CACHE_NONE;
$wgParserCacheType = CACHE_NONE;
$wgCachePages = false;

(taken from: here)

when accessing a database:

  1. do not use $handle
  2. do not use select_db() just use absolute database and table names, like “select * from databasename.tablename”

other problems:

  1. include the runphp file AT THE END OF localsettings.php, not at the beginning……..
  2. runphp only executes php from protected (sysop only) pages!
Filed under php, mediawiki, wiki having 1 Comment »

Archives Posts

delete files older than x days

October 19th, 2007 by tom

to delete files that are older than x days on your linux server, you can use:

find /path/*.gif -mtime +1 -exec rm {} ;
Filed under linux having 1 Comment »