ปุ่ม upload รูปไม่มีครับ ทำตามตัวอย่าางก็ไม่ได้

By littlekyb

ได้ทำตาม http://drupal.in.th/node/414 แล้วไม่เป็นผลครับ

ใช้ ธีม Pixture Reloaded 6.x-3.2 ใช้ Drupal-6.9

ขั้นตอนการติดตั้ง 1.ติดตั้ง tinymce-6.x-1.1 2.ติดตั้ง tinymce_3_2_0_2 พร้อมทำการคัดลอกไปไว้ที่ /var/www/drupal-6.9 ใช้งานได้(สามารถ

ขั้นตอนการติดตั้ง 3.ติดตั้ง imce-6.x-1.1.tar.gz -พร้อมทำการคัดลอกไปไว้ที่ /var/www แล้วแตกซิปไฟล์ -คัดลอกไฟล์นี้ไปไว้ท่ /var/www/drupal-6.9/modules -เสร็จแล้ว ลบ imce ออก

แก้ไขไฟล์ template.php ดังนี้

function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) { static $access, $integrated;

if (!isset($access)) { $access = function_exists('imce_access') && imce_access(); }

$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);

if ($init && $access) { $init['file_browser_callback'] = 'imceImageBrowser'; if (!isset($integrated)) { $integrated = TRUE; drupal_add_js(" function imceImageBrowser(field_name, url, type, win) { tinyOpenerWin = win, tinyTargetField = field_name; if (typeof tinyImceWin == 'undefined' || tinyImceWin.closed) { tinyImceWin = window.open(Drupal.settings.basePath +'?q=imce', '', 'width=760,height=560,resizable=1'); tinyImceWin['imceOnLoad'] = function () { tinyImceWin.imce.highlight(url.substr(url.lastIndexOf('/')+1)); tinyImceWin.imce.setSendTo(Drupal.t('Send to @app', {'@app': 'TinyMCE'}), function(file) { window.focus(); tinyOpenerWin.focus(); $('#width', tinyOpenerWin.document).val(file.width); $('#height', tinyOpenerWin.document).val(file.height); $('#'+ tinyTargetField, tinyOpenerWin.document).val(file.url).focus(); }); } } else { tinyImceWin.imce.highlight(url.substr(url.lastIndexOf('/')+1)); } tinyImceWin.focus(); } ", 'inline'); } }

return $init;

}

ผลลัพธ์คือ ในช่อง image url ที่ปุ่มต้นไม้ ไม่มีปุ่มให้ Browser

เกิดอะไรขึ้นครับ ผมมือใหม่จริง ๆ