我想用Uploadify替換Wordpress中的SWFUpload,因爲它看起來更加自定義友好並且更容易使用。如何使用Uploadify發送參數?
現在,我知道Wordpress會在上傳文件時爲服務器驗證發送一些數據。我很好奇我如何在我的Uploadify表單中使用這些數據來取代WordPress自己的上傳表單。
這是WordPress的上傳表單的例子:
<object width="132" height="23" class="swfupload" data="http://xxx.com/wp-includes/js/swfupload/swfupload.swf?preventswfcaching=1300750794560" type="application/x-shockwave-flash" id="SWFUpload_0">
<param value="window" name="wmode">
<param value="http://xxx.com/wp-includes/js/swfupload/swfupload.swf?preventswfcaching=1300750794560" name="movie">
<param value="high" name="quality">
<param value="false" name="menu">
<param value="always" name="allowScriptAccess">
<param value="movieName=SWFUpload_0&uploadURL=http%3A%2F%2Fxxx.com%2Fwp-admin%2Fasync-upload.php&useQueryString=false&requeueOnError=false&httpSuccess=&assumeSuccessTimeout=0&params=post_id%3D3562%26amp%3Bauth_cookie%3Dadmin%257C1301439526%257C5e5e63158e880597c782656a719f1738%26amp%3Blogged_in_cookie%3Dadmin%257C1301439526%257Ce01206ec12b5cee4a605f9abff385cc0%26amp%3B_wpnonce%3Dc52b08b0ce%26amp%3Btype%3Dimage%26amp%3Btab%3Dtype%26amp%3Bshort%3D1&filePostName=async-upload&fileTypes=*.*&fileTypesDescription=All%20Files&fileSizeLimit=4194304b&fileUploadLimit=0&fileQueueLimit=0&debugEnabled=false&buttonImageURL=http%3A%2F%2Fxxx.com%2Fwp-includes%2Fimages%2Fupload.png%3Fver%3D20100531&buttonWidth=132&buttonHeight=23&buttonText=%3Cspan%20class%3D%22button%22%3ESelect%20Files%3C%2Fspan%3E&buttonTextTopPadding=3&buttonTextLeftPadding=0&buttonTextStyle=.button%20%7B%20text-align%3A%20center%3B%20font-weight%3A%20bold%3B%20font-family%3A%22Lucida%20Grande%22%2CVerdana%2CArial%2C%22Bitstream%20Vera%20Sans%22%2Csans-serif%3B%20font-size%3A%2011px%3B%20text-shadow%3A%200%201px%200%20%23FFFFFF%3B%20color%3A%23464646%3B%20%7D&buttonAction=-110&buttonDisabled=false&buttonCursor=-1" name="flashvars">
</object>
現在,我猜這種形式的數據在這裏獲取生成: http://pastie.org/private/dxuytcqhu7b9odfhkwug (整個代碼在這裏:http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-admin/includes/media.php.source.html開始圍繞行1494)
但除此之外,我很無能。 如何通過Uploadify發送所需的參數? Scriptdata?哪些參數是必要的?這甚至有可能嗎?
只要你知道.. Uploadify實際使用SWFUpload的引擎蓋下的3.0版本。 – jessegavin 2011-03-22 00:25:43
另外,您應該使用Plupload來代替。 http://wordpress.org/extend/plugins/wplupload/ – jessegavin 2011-03-22 00:26:40
關心爲什麼Plupload更好?我已經看到了特定的插件,我認爲它很醜(我想替換Wordpress自己的形式的原因是因爲它看起來很雜亂和醜陋) – INT 2011-03-22 00:29:50