Showing posts with label Drupal. Show all posts
Showing posts with label Drupal. Show all posts

Snap Shots in Drupal

Originally built in a site of materials used is Drupal, then my manager hope that can upload materials with a thumbnail to respect users preview. However, more than 1,000 information, how could I make thumbnail for everyone? Today, I find the "Snap Shots" this tool, and the official website also provides Drupal module, that is to mean that can be used Snap Shots directly in Drupal.
Use very simple, as long as installed Snap Preview module and then to Sanp Shots website to register an id, and then Snap Shots website on the website of the new ID, fill it in the Snap Priview Setting of Drupal and it can work.
--------
當初在建置數位教材中心的時候用的是Drupal,那時我們的老大希望在上傳教材時能有個縮圖,以方面使用者預覽。不過,資料上千筆,我怎麼可能一筆一筆來作縮圖?今天讓我找到這個Snap Shots這個工具了,而且Drupal官方網站還提供模組,就是說可以直接在Drupal上使用Snap Shots。
使用方式很簡單,只要裝好Snap Preview模組再到SanpShots網站去註冊一個帳號即可以,然後把SnapShots網站上新增的網站的ID填入Drupal的Snap Priview Setting裡即可。

Lightbox in Drupal

Well done the lightbox module in Drupal, feel that this feature is really cool!
But there is a little loss, I do not know what's wrong?
When I used one PC with a Windows 2000 server to view photos on my drupal site, which showed the effect of screen was loss, only appear once and will not happen again! Then changed for a Windows XP sp2 system is the same! I think it was the browser problem. I use IE5 and IE6 are unable to have good results, IE7 and Firefox 2.0.9 can be normal show.
--------
在Drupal上裝好了Lightbox的相關套件之後,覺得這個功能真是太酷了!
不過有一個小小的缺失,不知道是那邊的錯?
當我在某台裝有Windows 2000 server的機器上瀏覽照片時,所呈現的畫面效果打了折扣,也只顯現一次並不再出現了!然後換了一台Windows XP sp2的系統,也是一樣!我想應該是瀏覽器的問題,我使用IE5及IE6均無法有好的效果,IE7及Firefox 2.0.9卻可以正常顯示。

Install FckEditor for Drupal

又重新架了CMS管理系統,使用的還是我最喜歡的Drupal。這是選擇的是drupal-5.3版的,要作為學校的數位教材管理系統,也一併整併校內重複的兩、三個教材網站,未來只使用同一個即可。
在安裝時,想安裝一個WYGIWYS編輯器,比較了TinyMCE與FckEditor之後,我比較中意的是FckEditor,但在安裝時卻遇到了問題(FCKeditor_2.5b.tar.gz):
FckEditoer有個上傳檔案及瀏覽伺服器端的工具,使用時卻出現如圖中的錯誤訊息


重點在
/drupalroot/modules/fckeditor/fckeditor/editoer/filemanager/browser/default/connectors/php/connector.php was not found on this server
這一句話,就是在fckediort裡的一個工具沒找到
查看的一下fckeditor目錄的內容才現,原來在FCKeditor_2.5b這一版裡,connectors放錯目錄了,它原本放在fckeditor/filemanager下,只要複製一份connectors至/fckeditor/browser/default/底下即可解決。

另外,可以修改fckeditor上傳檔案的位置,譬如我將位置改放到drupal/files裡面。
修改/fckeditor/browser/default/connectors/php/config.php
將
1.
$Config['Enabled'] = false ;
改成
$Config['Enabled'] = true ;
2.
將
$Config['UserFilesPath'] = '/userfiles/' ;
改成
$Config['UserFilesPath'] = '/drupalroot/files/userfiles/' ;

這樣就成了!

另外,也開啟調整了所有個工具,將它放整齊一點
修改/fckeditor/fckconfig.js
找到
FCKConfig.ToolbarSets["Default"] = [
.....(略)
];

將這一段改成

FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['TextColor','BGColor'],
'/',

['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],['FitWindow','ShowBlocks','-'],
'/',
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],['FitWindow','ShowBlocks','-','About']
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
['Style','FontFormat','FontName','FontSize'] // No comma for the last row.

] ;
即可!

user warning: Table './xxxxx/watchdog' is marked as crashed and should be repaired.....

End Drupal upgrade to 5.1.X version of the time, after a time log management interface that would arise this warning message :

user warning: Table './xxxxx/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'user', '.......

That's a message make me a bit confused? I do not have revised the Drupal table, how would mistake? But this is easy to deal. To truncate table "watchdog" and the message will not be there, But I don't know that it will not happen again ?


剛升級完Drupal到5.1.X版的時候,過一陣子登入管理介面時會出現此警告訊息:

user warning: Table './xxxxx/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'user', '.......

這一個訊息的出現我有點納悶?我又沒去修改過資料表,怎麼會有錯誤呢?

不過這個好解決,只要到資料庫去清空watchdog這個資料表就不會出現了,不過以後不知道會不會再出現就是了?

Reslove the Header and Footer graphics of foliage theme not be found解決佈景Foliage頭尾無法顯示圖片

Changed Foliage this theme several days ago, but discovered the Header and Footer graphics not found. Resolve this problem when tried to modify foliage theme yesterday

I found a easy way to resolve this problem. I modified two among those lines in the themes/foliage/style.css

Original

}
#header {
background-color: #8c3;
background-image: url('themes/foliage/head960.jpg');
height: 100%;
border: 1px solid #ccc;
....

}
#footer {
background-color: #8c3;
background-image: url('themes/foliage/foot960.jpg');
height: 30px;
border: 1px solid #ccc

Later

}
#header {
background-color: #8c3;
background-image: url('head960.jpg');
height: 100%;
border: 1px solid #ccc;
....

}
#footer {
background-color: #8c3;
background-image: url('foot960.jpg');
height: 30px;
border: 1px solid #ccc;

Finally, save it and reload your indrx and then the header and footer graphics will be found. ^^


幾天前換了Foliage這個佈景,卻發現Header 和 Footer 的圖片無法顯示。直到昨天嘗試去修改佈景的時候才解決了這個問題。

原來這個Bug很容易修正,只要修改foliage裡的style.css就可以了,修改的地方如下: themes/foliage/style.css


#header {
background-color: #8c3;
background-image: url('themes/foliage/head960.jpg');

修改這一行變成:

background-image: url('head960.jpg');
................................

}
#footer {
background-color: #8c3;
background-image: url('themes/foliage/foot960.jpg');

修改這一行變為:

background-image: url('foot960.jpg');

之後,存檔、收工。回到首頁重新整理試試看. ^^

Resolve Blank Page in Drupal

Found a problem while wanting to modify drupal module this morning:

My admin/modules page became blank.

Check to just find that is originally out of memory.

Modified the memory_limit=16 M in the php.ini

memory_limit=16 M => memory_limit=40 M

(The 40 M is what I establishes. I don't knowing would not calculate until how

much at the right moment)

and then restart httpd.

This problem is resolved. ^^


今天早上修改drupal的模組時,發現了admin/modules變成了空白頁,查了一下。

原來只要修改了php.ini裡的memory_limit = 16M,

memory_limit=16 M => memory_limit=40 M (40M是我設的,不知道要多少才算剛好)

然後重新啟動httpd。

這個問題就解決了。^^

Install Drupal

I use Fedora Core 5

httpd-2.2.2-1.2、php-5.1.6-1.2、mysql-5.0.22-1.FC5.1、

phpmyadmin-2.9.02 and so on.

and so on.

Step 1:

We want to download drupal package to your website directory from the

official website or download directly from the link Drupal-4.7.3

or you can command

#wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.3.tar.gz

Step 2:

Extract the package by your extracted tool.

Use linux , maybe you can command

#tar zxvf drupal-4.7.3.tar.gz

#mv drupal-4.7.3 drupal /* rename the directory. */

Step 3:

Let's create a datebase drupal first.

You can use the mysql manage tool phpmyadmin to easy create a datebase

and then import database.4.1.mysql (where is in the drupal/datebase/

directory ) to the drupal (the datebase).

Step 4:

Use your editor to alter the settings.php where is in the drupal/sites/default/

Find this row:

$db_url = "mysql://username:password@localhost/database"

Change username, password,localhost and database to be new.

for example:

$db_url = "mysql://acmevil:********@mysql.taes.tp.edu.tw/drupal"

and then find this row

$base_url = ' ';

Input your complete url of website , remember don't add "/" in the end of

url.

For my example:

$base_url = 'http://acmevil.taes.tp.edu.tw';

Save it.

P.S I discover that $base_url= ' '; can be empty, but I don't know

whether it has influence or not.

Step 5:

Go to your URL of Drupal and create a account immediately. Because the

first account is the website's admimistrator.

Enjoy! ^^

1.首先,我們要先去下載drupal安裝包,可以從Drupal官方網站下載,或者直接點選下載

Drupal-4.7.3,中文版可從Drupal Taiwan | 繁體中文支援站 下載。下載到您網站的

根目錄

2.解壓縮:用您習慣的解壓縮工具來解壓縮,譬如:

#tar zxvf drupal-4.7.3.tar.gz

#mv drupal-4.7.3 drupal //把drupal-4.7.3改成drupal

3.進入您的資料庫,新增一個資料庫(我是用phpmyadmin 來控制mysql),為drupal。

然後從在drupal/datebase的目錄裡有三個.sql檔案,我們將要匯入一個至剛剛所新

增的資料庫(drupal)裡,如果您的使用mysql且在4.1版之後的請匯入

database.4.1.mysql。 請根據您的資料庫版本來選擇匯入的sql檔案。

4.至drupal/sites/default/這一目錄裡修改settings.php這一個檔案。

找到這一行

$db_url = "mysql://username:password@localhost/database"

修改 username(資料庫使用者名稱)、 password(資料庫使者密碼)、

localhost(MySQL主機位置)、database(給drupal使用的資料庫名稱)

再找到以下這一行

$base_url = ' ';

填入drupal網站的完整網址,記得最後面不要加反斜線/。

例如: $base_url = 'http://acmevil.taes.tp.edu.tw';

存檔

P.S我發現上面這一行似乎不填也可以,留空。不過我不知道會不會有影響?

5.現在可以進入您的Drupal網站了。切記!第一個註冊的就是網站管理員喔!

現在就可以好好享受囉! ^^

Why I Choosed Drupal?

Very long has not played Servers and website set of. Because the school requests each people all to have the person website, thereupon when stroll the internet has discovered Drupal . Moreover Drupal is choosed one of open source CMS final five announced, this lets my interest be soaring. Under the curiosity obligation, wants to have a look Drupal to have what differently with before other frame station set of, with Wordpress, Xoops, Mambo, Joomla and so on has differently what.


很久沒有玩SERVER及網站套件,由於學校要求每個人都得要有個人網站,於是乎在逛網站時發現了Drupal,而且Drupal被選為五大CMS之一,這更讓我興趣高昂。在好奇心的驅使下,想看看Druapl跟之前其他的架站套件有何不同,跟Wordpress 、Xoops 、Mambo 、Joomla 等有何不同。