Preparation
Read and understand the install docs on
http://dadaimc.org. Configure your
apache/php appropriately as described there. Understand your mysql
security setup. Install dada as per the directions. This should be
relatively easy, dada installs nicely.
That was easy, now for the legacy stuff and the real fun.
Handling old uploads.
Active had two directories where it stores uploaded multimedia,
local/webcast/uploads and local/webcast/uploads/metafiles. I wanted
all the multimedia to be present on the same server as dada. So I did
approximately:
cd local/webcast/uploads
cp -i -- * metafiles
cd metafiles
ln -s . metafiles
Resolve any conflicts from -i
Now we go get the stuff that the multimedia mirror has that we don't
have locally (for imcs on stallman this will be virtually all video
and audio)
ncftpls -u user -p pass ftp://<mirror>/<imc>/ > /tmp/mirrormedia
ls /tmp/media
diff /tmp/media /tmp/mirrormedia |grep \> > /tmp/todownload
for i in `cat /tmp/todownload` ; do wget -nc http://images.indymedia.org/<imc>/$i ; done
Alright now we should have all the old media in one place. I moved
this to
/olduploads and added an alias for
local/webcast/uploads in your apache configuration file, ie in the
virtual host for your site:
Alias /local/webcast/uploads/ /data/www/metafiles/washingtondc/
Now, create the hashed subdirs for uploaded media to go in for the
conversion script.
cd <dadaroot>/usermedia
for i in * ; do cd $i ; mkdir `seq 13 |xargs`; cd .. ; done
Make sure these directories are writeable by the user that the
webserver user. I did this by having that user be a member of the www group
chgrp -R www *
chmod -R g+w *
IMPORTANT
If you are going to use mirroring you probably want to prevent the
mirroring cronjob from copying all of your old media to the multimedia
server again! I modifed the SELECT statement in
/cronjobs/push_to_remote.php to not mirror media with an ID
less than the last coverted media objectid.
Now run convert.pl, originally written by clint from UC IMC, updated
by me to work with the dada .97 and a few minor changes. You will
have to edit a few variables in that file so please read through the
comments. Also take a look at how it makes the symlinks to the old
media, this may or may not be how you want to do things. It also
takes a while, I added an index to postgresql weblink table on
fromlink var to speed things up. It also consumes a lot of memory.
For DC's 80k row database it took approximately 5 hours on an athlon
1900 and ~150MB of RAM.
Active at one point had a bug whereby linked_file found up in
html_file, this caused garabage to be displayed in Active and causes
the convert.pl script to use a very large amount of memory and in my
case crash. you'll probably need to resolve this before going on.
Running the script revealed missing files, problems with special
characters, mainly attributable to Active's bugginess and/or bad
maintenance. Do what you can.
The newswire conversion script creates a map of Active article ids to
Dada article ids. Clint wrote front.php3 which redirects the old
articles to the new ones. For DC I also made a symlink for
display.php3 which was used for early versions of Active.
Convert Features
Now convert feature with featuresconvert.pl. Edit the script for
correct db name, user, pass. Thanks to "its the hormones" from
madison, with a couple mods.
If you want the old links to archived featuers to work copy or move
/local/features/archive/ to . Install the file
archive and add
<Files archive>
ForceType application/x-httpd-php
</Files>
to your apache virtual host config.
Onto the frontend
Now you can do stuff like play with the themes and get your editorial people used to Dada's workflow.
-- AlanB - 14 Aug 2003
- archive: php script for old active features
-- BrianSzymanski - 03 Dec 2003 added -nc flag to wget so we don't download anything we don't need