2010年5月23日 星期日

竹大數位所_首頁成果

這個網站是利用水滴平台所建構而成,往後還會加上照片(或是影片檔)和連上facebook之類的功能~

2010年5月11日 星期二

Module Admin_Menu(安裝+設定篇)

Module Admin_Menu Download (44.22 KB)

看膩了預設的樹狀結構,來換一個樣式吧。

安裝:

1.下載後,

安裝到./module資料夾中。

2.進入admin權限
管理->網站建置->模組

3.將 選項打勾

4.安裝成功!!
***********************************************

原始畫面

















安裝Admin_Menu畫面

***********************************************
設定

1. 管理 -> 使用者管理 -> 權限









2. 管理 -> 網站設定 -> Administration menu



2010年5月9日 星期日

實做公告系統_CCK+VIEWS(設定Views)

設定Views




Basic setting & Fields 必填

Basic setting:
名稱 : 不/可 更動
標題 : 不/可 更動
Style : 表格
Uses AJAX : 不/可 更動
Uses Paper : 不/可 更動
Item per page:(一頁顯示多少的項目)
Distinct : 不/可 更動
Access : 不/可 更動(讓不同權限的使用者經由相同的 path看到不同程度的內容)
Caching : 不/可 更動(清除caching的時間設置)
Exposed form in block : 不/可 更動
頁首
頁尾
Empty text : 不變
CSS class : 不變
theme : 不變

Fields則按照第一張圖片設定就可以了!!


Live view(預覽結果)


實做公告系統_CCK+VIEWS(設定CCK)

公告系統如下:

安裝好這兩個模組(網誌前面有記錄)。

設定CCK

1.先新增一個Content type-Name:公告 Type:announcement。其他關於content type的設定,暫不贅述。

2.新增一個分類 Add vocabulary


3.新增公告類別下的terms:



4.好了,現在讓我們新增一個"公告"的內容:您可以發現多了一個欄位如下圖:

Black page..(慘)

因為安裝模組時出現記憶體不足...
網頁畫面瞬間變白畫面
Drupal 從此就變找不到畫面...
以為在網路上找到設定 settings.php 的方法就可以解救?!
結果非常地失望~因為超過三個小時還是無法解救回來,
還是把資料庫裡的資料表全刪掉~重新建立所有的資料表資料。

給未來的自己做參考:

1. 重建Drupal全部的資料表

2. 把settings.php刪除,default settings.php
  • (./site/default/settings.php)
3. 先把你虛擬記憶體設置空間加大
  • 更改 php.ini : memory_limit = 200M
  • 也在 settings.php: 最底下新增
    ini_set('max_execution_time', 200000);
    ini_set('memory_limit', '200M');


Drupal 6.15 | Content Construction Kit (CCK)

CCK:新增Drupal內容類型的欄位值。

Views模組是用於排版(內容呈現的模組),
為了Views彈性增大,
我們就必須要先新增內容類型的欄位值,
必須先要安裝CCK模組。

下載Drupal 6.16版本的CCK模組

下載後安裝此模組到水滴平台。

CCK模組功能說明如下

看到上面這功能這個畫面,安裝成功!!

2010年5月8日 星期六

Drupal 6.15 | Views module 安裝篇

模組介紹:

Views 模組提供了一個很有彈性的方式,讓網站管理者可以很容易地設計網站內容的呈現方式。它可以製做出網頁和區塊,並以表格、摘要、全文、RSS等方式來呈現。

安裝步驟:

(1).

Views Module & Advance Help

(2).將views-6.x-2.10.tar & advanced_help-6.x-1.2.tar解壓縮

(3).將advanced_help資料夾複製到views資料夾內





(4). 將views資料夾複製到

C:\AppServ\www\drupal6\module

(5). 開啟瀏覽器輸入Drupal的首頁,登入admin權限的帳號,

管理->網站建置->模組 執行Views模組安裝

成功!!



SMTP 模組 使用Gmail做為SMTP Server的方法

使用Gmail做為SMTP Server的方法

----------

SMTP Authentication Support

----------
Turn this module On or Off:
On

SMTP SERVER:
smtp.gmail.com

SMTP Backup SERVER:
空白

SMTP PORT:
465 (Gmail的port比較特別 一般都是port 25)

Use encrypted protocol:
Use SSL (需另外再做設定才會有此選項可選 預設只有"否")

使用者名稱:
你的Gmail帳號 (含@gmail.com)

密碼:
你的Gmail密碼

E-mail from:
你設定從哪個信箱寄出的E-mail

E-mail from name:
你設定的寄件者名稱

E-mail address to send test email too:
收所寄發測試信件的E-mail

----------php.ini----------
修改\apache\bin\資料夾下的php.ini檔:

將:
extension=php_openssl.dll
extension=php_smtp.dll
這兩行的註解給取消掉

修改:
[mail function]
; For Win32 only.
SMTP = smtp.gmail.com
smtp_port = 465

; For Win32 only.
;sendmail_from = 你的Gmail帳號 (含@gmail.com)


另外特別要注意的是
要啟動OpenSSL的功能
得將\apache\bin\資料夾下的:
ssleay32.dll
libeay32.dll
將這兩個檔複製到:C:\Windows\System32\目錄下
設定成功後就可以看到Drupal SMTP模組下的
Use encrypted protocol新增兩個選項:

Use SSL (選擇)
Use TLS


成功!!

SMTP 模組安裝

1.首先到drupal官網下載模組
2.之後再到sourceforge下載PHPMailer for PHP4
3.解壓縮2個套件
4.建議smtp模組目錄名稱 smtp
5.php-mailer套件的目錄名稱改為 phpmailer
6.把整個 phpmailer 放到 smtp 目錄底下(ex. ./smtp/phpmailer/)
7.上傳整個 smtp 資料夾到您的網站上 drupal module目錄下
(C:\AppServ\www\drupal6\modules)

設定畫面如下



設定成功畫面如下













如果沒有學校mail的話,可以利用有提供SMTP的免費信箱做設定依據,像是,Gmail。

引用電腦科學 - Computer Science -網誌內容:使用gmail的smtp要求php必須有SSL,請再編譯php時加入SSL的支援
以下是gmail的smtp設定參考
SMTP server: smtp.gmail.com
SMTP port: 465 or 587
Use encrypted protocol: Use SSL

Drupal文字編譯器模組安裝

Drupal + CKEditor + Syntaxhighlighter + IMCE 整合安裝

我照按上面說明進行安裝~
很順利,
我的畫面如下

水滴安裝環境

作業系統環境:Microsoft® Windows Server™ 2003

說明:已經安裝上去,不想重新安裝,所以沒有圖做輔助說明。

安裝環境資源如下:

官方資源:
必須安裝的軟體如下:

HTTP Server:Apache 2.5.9 (可以找自己習慣的版本)
  • Apache 2.2.4
  • PHP 5.2.3
  • MySQL 5.0.45
  • phpMyAdmin-2.10.2
Drupal 6.16主程式:主程式(6.x版本模組較其他版本穩定成熟)

Drupal繁體中文化程式 : 主程式
說明 :
將此Drupal 6 翻譯包格式的檔案,解壓縮後丟到你的 Drupal 根目錄裡,就可以在安裝時切換到 中文的安裝介面,或是在安裝後匯入各模組的中文翻譯。


安裝步驟 :

1.安裝Apache 2.5.9
  • 主機網址: localhost
  • root密碼 : 先簡單設一組,到時再進去apache更改密碼或是新增一筆使用者再刪掉root帳號
  • 其他皆為內設選項,打勾的部分,就給它全部勾。
安裝後,在瀏覽器輸入 http://localhost
選擇 phpMyAdmin輸入帳號密碼登入資料庫。
(印象中,第一次只需要在帳號那輸入root,無需輸入密碼。)

建立新的資料庫給水滴系統平台使用,EX:drupal。

記住,一定要更新root密碼
建議是新增使用者,再把root給刪除




2.
將Drupal-6.16.tar.gz 解壓縮到 C:\AppServ\www,
並更新資料夾名稱為drupal
這個名子將會影響到以後的網址名稱。
Ex: http://localhost/drupal

3.將Drupal繁體中文化程式解壓縮到C:\AppServ\www\drupal

4.開啟瀏覽器,輸入 http://localhost/drupal
開始執行平台安裝。

Drupal 首頁畫面

Drupal錯誤訊息安裝(引用 GE極易資訊)

訊息:
The Drupal installer requires that you create a settings file as part of the installation process.
Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php.
Change file permissions so that it is writable by the web server. If you are unsure how to grant file permissions, please consult the on-line handbook.
More details about installing Drupal are available in INSTALL.txt.

解決:將預設設定檔複製出來。copy ./sites/default/default.settings.php 到 ./sites/default/settings.php

訊息:
Failed to select your database on your MySQL database server, which means the connection username and password are valid, but there is a problem accessing your data. MySQL reports the following message: Unknown database 'drupal'.
Are you sure you have the correct database name?
Are you sure the database exists?
Are you sure the username has permission to access the database?
For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

解決:可由phpMyAdmin先在MySQL中建立資料庫。

訊息:
Consider increasing your PHP memory limit to 16M to help prevent errors in the installation process. Increase the memory limit by editing the memory_limit parameter in the file C:\WINDOWS\php.ini and then restart your web server (or contact your system administrator or hosting provider for assistance). See the Drupal requirements for more information. (Currently using PHP memory limit 8M)
解決:修改\WINDOWS\php.ini中的memory_limit = 8M改成memory_limit = 16M。

訊息:warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\AppServ\www\cms\drupal-test\includes\mail.inc on line 193.
Unable to send e-mail. Please contact the site admin, if the problem persists.
使用windows架appserv,所有沒有mail server可發信件,會員也將收不到啟動mail。

解決:在Drupal中,安裝模組:
SMTP Authentication Support 6.x-1.0-beta3 Allows the sending of site e-mail through an SMTP server of your choice.