เขียน javascripts ใน Druapl

  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.
  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.

แบบว่าตอนนี้ กำลังแก้ Code ของ rcmail module ของ Drupal 5.1 อยู่ครับ

ตอนนี้กำลังติดปัญหาคือ rcmail กำหนดให้สร้างเนื้อหาใน iframe

แต่ว่า งานที่อยากได้นิ หัวหน้าอยากให้แสดงเป็น Popup

ผมไม่รู้จะต้องแก้ Code ยังไงครับ

นี้เป็นส่วนของ rcmail.module

 
function rcmail_menu()
{
    $items[] = array(
    'path' => 'rcmail',
    'title' => t('roundcubemail'),
    'callback' => 'rcmail_page',
    'access' => (user_access('use rcmail'))
    );
  return $items;
}
 
function rcmail_page(){
 
//เรียกข้อมูลจากฐานข้อมูล DB Query
 
$content='<iframe src=.........>'; //Code มันยาวครับ ก็เลยขอย่อ
}
 

ผมก็เลยเปลี่ยนจาก

$content='<iframe scr=.....>' ;

ไปเป็น

$content='<scripts language=...';

ผมใช้ Javascript ให้แสดงเป็นแบบ Popup

แต่ก็ไม่ได้ครับ

ไม่ทราบว่ามีความคิดที่ดีกว่านี้หรือเปล่าครับ

หรือไม่ก็ทำยังไงให้เขียน Javascripts บน Drupal ได้ครับ

ขอบคุณมากๆ

sugree's picture

ตอนใช้ javascript แล้วผลเป็นยังไงครับ

เป็นหน้าเปล่าๆครับ
The Ubuntu Counter Project - user number # 13421

sugree's picture

มี error ของ javascript มั๊ยครับ

ได้ล่ะครับ ;)
ผมก็แค่ใส่

print $content;

มันก็ได้เลยครับ

แต่พวกค่าscreen.availWidth,screen.availHeight มันไม่ส่งค่าให้ ;-P

ก็เลยไม่ได้ใช้
The Ubuntu Counter Project - user number # 13421

ย้าย Codenone

ประกาศย้าย Codenone ไปใช้ Forum ของ Blognone แทนครับ ตามไปตั้งกระทู้ต่อได้ที่ Codenone Forum (รายละเอียดอ่านจากกระทู้ ย้าย Codenone ไปรวมกับ Blognone)

กระทู้เก่าๆ จะย้ายตามไปในภายหลัง ตอนนี้ปิดการโพสต์กระทู้ไว้ เหลือไว้เฉพาะอ้างอิงเท่านั้น