From: <em...@sc...> - 2007-01-04 16:01:13
|
Hi there, I need to add two fields in the upload form. Field_1 is a simple input field/type=3Dtext where the user will paste =20= an URL. When displaying this field when listing a file, the URL have =20 to turn as a hot link. Field_2 is a simple textarea field where the user will paste some =20 HTML for embedded player, like what you can have from blip.tv, =20 youTube.com and others. These sites provide a way to generate HTML =20 that you can then paste on a page in your site to display an embedded =20= player (usually made with Flash). My first question is delete the flag that check that we are uploading =20= a file on the field "File/Specify file to upload". We need to be able =20= to use this form without uploading a file, since this file will be a =20 remote one or an embedded player. My second question is how to turn a link as a hot link in Field1. My third question is how to keep as it is the HTML for Field2 so the =20 embedded player will be display properly. My last question is how to feel the blank in the following to =20 implement these 2 fields. In my cctemplates/skin-osc-map.xml, I will edit this block: <metal:block define-macro=3D"list_files"> and add something like this: <tr> <th>Remote File:</th> <td><img src=3D"${record/upload_extra/blipinfo/remote_file}" /></td> </tr> <tr> <th>Embedded PLayer:</th> <td><img src=3D"${record/upload_extra/blipinfo/embedded_player}" /></=20= td> </tr> I'm sure that something is missing here. Then, in ccextras/bliptv.php, I will add the following: CCEvents::AddHandler(CC_EVENT_UPLOAD_ROW, 'BlipOnUploadRow'); function BlipsOnUploadDone ($upload_id, $op) { if ( $op !=3D CC_UF_NEW_UPLOAD ) { return; } $uploads =3D& CCUploads::GetTable(); $record =3D $uploads->GetRecordFromID ($upload_id); $blipinfo['remote_file'] =3D What should I put here ? $uploads->SetExtraField($upload_id, 'blipinfo', $blipinfo ); } TIA! Cheers -Emmanuel -- Emmanuel D=E9carie / Programmation pour le Web - Programming for the Web <http://scriptdigital.com/> - Blog: <http://lettre13.com> - AIM: =20 scriptdigital |