Drupal

warning: Creating default object from empty value in /home/www/virtual/phaisarn.com/sun/htdocs/modules/taxonomy/taxonomy.pages.inc on line 33.

Setting drupal front page

admin/settings/site-information
Default front page

Drupal กับ .htaccess

Install drupal เสร็จ เข้าไปแก้ไข config ของ Theme แล้วมี error ประมาณว่า 
    * warning: fopen(sites/default/files/.htaccess) [function.fopen]: failed to open stream: Permission denied in /var/www/jack/includes/file.inc on line 129.
    * Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your sites/default/files directory which contains the following lines:
      SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
      Options None

ติดตั้ง GD Library

หลังจากติดตั้ง Drupal แล้ว 
มี message แจ้งเกี่ยวกับ GD Library
ให้ทำการติดตั้ง Package  php5-gd ด้วยคำสั่ง
sudo apt-get install php5-gd
จากนั้น restart apache ด้วยคำสั่ง
sudo /etc/init.d/apache2 restart
ก็เป็นอันเรียบร้อย
ที่มา: http://drupal.org/node/540838

How to Enable mod_rewrite on Ubuntu

เปิดใช้โมดูล mod_rewrite

sudo a2enmod rewrite

แก้ไฟล์คอนฟิก

sudo nano /etc/apache2/sites-enabled/000-default

แก้ไข none ให้เป็น all

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    allow from all
</Directory>

สุดท้าย บูต Apache ใหม่

Creating Drupal content using Python

เท่าที่ลองยังใช้ไม่ได้

แต่ไว้ดูเป็น Guildline น่ะ

http://qandr.org/quentin/writings/drupy

ตัวอย่าง code การใช้ Python ติดต่อ XML-RPC ของ Drupal

 #!/usr/bin/env python

import xmlrpclib
server = xmlrpclib.Server("http://localhost/drupal/xmlrpc.php")

for method in server.system.listMethods():
        print method
        print server.system.methodHelp(method)
        print
 

การติดตั้งและใช้งาน Tag

การจะใช้งาน Tag ได้ ต้องทำการติดตั้งโมดูล Taxonomy

ซึ่งเมื่อติดตั้ง Drupal แล้ว โมดูลนี้จะ Enable มาด้วย แต่ก็สามารถตรวจสอบการติดตั้งของโมดูลนี้ได้ที่ Administrator > Modules ดังรูปด้านล่าง

 

การเปลี่ยน Theme ใน Drupal

Drupal สามารถทำการเปลี่ยน Theme ได้ง่ายๆ โดยการ ดาวน์โหลด Theme ได้จาก http://drupal.org/project/themes ซึ่งจะมี Theme ให้เลือกมากมาย แต่ที่สำคัญคือ ต้องเลือกดาวน์โหลด Theme ให้เวอร์ชั่นตรงกับเวอร์ชั่นของ Drupal ที่ติดตั้งไว้ เช่น 5.x, 6.x หรือ 7.x จากนั้นทำการติดตั้ง Theme ดังนี้

การติดตั้ง FCKEditor

FCKeditor เป็นเครื่องมือช่วยเขียน HTML แบบ WYSIWYG
การติดตั้งใน Drupal จะต้องทำ 2 ขั้นตอนด้วยกัน คือ

  1. ติดตั้งโมดูล FCKeditor สำหรับ Drupal
  2. ติดตั้ง FCKeditor เวอร์ขั่นล่าสุด โดย download ได้จาก FCKeditor homepage

1. ดาวน์โหลด และติดตั้ง FCKeditor สำหรับ Drupal

ให้ดาว์นโหลดที่ http://drupal.org/project/fckeditor
จะได้ไฟล์ fckeditor-6.x-1.4.tar.gz
ทำการแตกไฟล์แล้วนำไปไว้ที่ <yourpath>/sites/all/modules

การติดตั้ง Markdown

การเขียนแบบ Markdown ใน Drupal

Markdown คืออะไร?

Markdown ก็คือรูปแบภาษาๆหนึ่ง ที่ออกแบบมาให้ใช้งานได้ง่ายโครงสร้างๆง่าย เพื่อที่จะใช้สร้างการแสดงผลที่สวยงามในเว็บเพ็จ (ที่มา thdiy.com)

จะเขียน Markdown ต้องติดตั้งโมดูลอะไรบ้าง?

ต้องทำการติดตั้งโมดูล Markdown filter โดยสามารถดาว์นโหลดได้จากหน้า Project Page เสร็จแล้วให้ทำการติดตั้งโมดูล

Syndicate content