File Handling for Drupal 4.8

Goals for drupal 4.8 file handling...

  • sink all file related DB activity to fileapi
  • introduce hook_file
  • drop temp files... either upload it or dont. No more messy previews.
  • files are associated to a uid not a node.
  • limit base file api to four functions upload, copy, move, delete.
  • fast path private file downloads
    • download key is created and prefixed to path when url is themed.
    • touch /tmp/dlkeys/key
    • files.php get url, parses key, if (is_file(tmp/dlkeys/key)) { send file } else { check file extension and send appropriate denied file }

Cool file uploader -

Neato multiple file uploads

Just documenting for myself later.

Setting up Darwin Streaming Server on Ubuntu Breezy

Well you can't do it with the 4.0 compiler that ships with the distribution... Its too strict.

Solution, use the gcc-3.3 compiler, and some useful includes.

apt-get install gcc-3.3 g++-3.3 libc6-dev

update Buildit

In the section under linux.i586/i686 (assuming you're running on a pentium or better system)...
CPLUS=gcc-3.3
CCOMP=gcc-3.3
LINKER='gcc-3.3'

Thats all there is to it... Tell the DSS developers to get up to date :).

Drupal file handling...

I've discovered upload.module is a totally whack piece of code... reading through it I feel like someone was trying to win a code obfuscation contest...

Through the process of osmosis(passing out on my laptop with vi open), I've think I've seen a light. Not necessarily a bright one, but a light none the less. There needs to be a way for modules to dependably interact with the file upload and management process, and hopefully without the overhead of a whole new hook... My disparate thoughts go something like....

if $node->files[$fid] is just an array of properties for a node/file relationship, and $node->filedata[$fid] is what we get from the actual file itself, we can decouple a lot of things... (list, description, properties added by other modules)...

Site maintenance with bzr

Site maintenace workflow

branch head site-development-branch
branch site-development-branch site-testing-branch
branch site-testing-branch site-live-branch
//ignore settings.php and files

major code changes on site-development-branch
testing and minor changes on site-testing-branch
live, and emergency quick fixes on site-live-branch

bzr merge or pull along tree. to get current code base into live branch.

Patch testing with bzr

Here you need to start with a bzr repository that is a functioning drupal site...

bzr branch head patch-test-site
cd patch-test-site

setup the patch-test-site branch, settings.php and database, apache virtualhost.. however you do it...

#set commit point for reverts after patch tests
bzr commit

The nice easy part...

#patch your branch
bzr patch http://url/of/test.patch
bzr diff --diff-options -p | less

check out the changes and review the functionality.

#restore vanilla installation
bzr revert

Drupal Ramblings

This book is a place where I keep my drupal ramblings in hope that one day I can organize them into something that makes sense to me. It is also a place I can build and review documentation before posting it to drupal.org.

Going monochromatic...

In my on going desire for the world to be shades of grey with one color I've started on my monochromatic theme for drupal... This my first shot at it... I need to do some CSS consolidation and use transparent images + background to clean it up for release...

.darrel.

Yeah dev.thing.net is alive...

Well got my new development server up and running... Well its not new, I've managed to update an old 1U from 500MHZ/64MB (it was a name server)->900MHZ/320MB... Its merrily been running along on Ubuntu Breezy since day 1.

Drupal For ISP's...

I've been planning on writing a management control panel and billing system for thing.net for a while. I've tried a few commercial ones, but I'm not really happy with them. They tend to be limited to managing a single server with a single application stack and closed source, cost way to much if they can manage a heterogenous environment, and generally aren't all that usable if they're open source. The closest to ideal I've found is Psoft's H-Spere, Currenlty I'm using clientexec, but only as a billing tool.

So I've come up with a list of requirements:

Syndicate content