From: Victor S. <fou...@gm...> - 2006-12-22 10:55:07
|
On 12/21/06, Emmanuel M. D=E9carie <em...@sc...> wrote: > My hunch is that I only need to modify a record in the database to be > able to get what I want. Nope. In the BlipOnUploadDone() above you can do something like: $blipinfo['thumb'] =3D '/path/to/thumbnail'; // or url or whatever you h= ave $blipinfo['url'] =3D 'http://blip.tv/url/to/file'; $uploads->SetExtraField($upload_id, 'blipinfo', $blipinfo ); To change the download url, I think the following should work: catch the UPLOAD_ROW event and replace the 'download_urls' CCEvents::AddHandler(CC_EVENT_UPLOAD_ROW, 'BlipOnUploadRow'); function BlipOnUploadRow(&$record) { $keys =3D array_keys($record['files']); foreach( $keys as $k ) { $blipinfo =3D $record['upload_extra']['blipinfo']; $record['files'][$k]['download_url'] =3D $blipinfo['url']; } } Again, I'm not 100% on this; if it doesn't work let me know. I'm assuming you have your own skin. In your skin map file (e.g. skin-blip-map.xml) put this after the src-include line: <tal:block define=3D"list_files string:skin-blip-map.xml/list_files" /> <metal:block define-macro=3D"list_files"> // in here cut and paste the entire 'list_files' // macro from cctemplates/upload.xml </metal:block> Now, in your version of the macro put the line: <img src=3D"${record['upload_extra']['blipinfo']['thumb']}" /> I'm keeping my fingers crossed this stuff actually works ;) I've seen similar things to all these steps, just not put together quite like this. VS |