您在這裡

4.7.x

news aggregator & http proxy

braveht's 的頭像
braveht 在 2006-10-11 (三) 17:01 發表

如果drupal架設的環境是需要透過http proxy才能連上WWW的話,
那麼aggregator是沒辦法正常使用的....
去查log的話會發現 fsockopen 函式出現問題.....

解決的辦法可見這篇文章
http://drupal.org/node/9706
雖然是針對ver4.4提的解決方案,可是我照著改在ver4.7.3的系統上也一樣能work....
不過...我不曉得這樣會不會有其他議題就是了...
畢竟改到的是common library....

參考一下:)

Drupal搭建新闻站后台设置问题?

增加页面可以

?q=node/add/story
一般文章
「一般文章」是最簡單的文章,包括標題、引言和內文,可以透過其他模組延伸,引言也是內文的一部分,通常用於發表最新消息、一般的描述性文章,或 group blog。
?q=node/add/page
頁面
如果你想新增一個靜態網頁,例如聯絡我們或關於我們,請使用頁面這個內容類型。
?q=node/add/book
手冊頁面
手冊是一種多人合作撰寫的內容:使用者可以合作撰寫手冊的頁面,按正確的順序編排頁面,並且檢查和修改現有的文章。所以當你有東西想和人分享,或者在閱讀手冊時並不喜歡它的寫法,或者是認為某個頁面可以寫得更好,你都可以做些改變。

Drupal 4.7.3 + CK-ERP 0.20.1 演示

各位網友, 你們好,

剛剛為時機商計 (CK-ERP) 完成了 Drupal 的接頭, 及安裝好 Drupal 4.7.3 + CK-ERP 0.20.1 的演示,有興趣的朋友, 請訪問,

http://ck-erp.net/ckerp/sitemgr/sitemgr-site/?page_name=DemoSites

請在 CK-ERP-zh_CN (at) googlegroups.com 討論小組中, 提出回饋和建議。

感謝支持。

CK Wu
香港

SIGNUP模組

zman's 的頭像
zman 在 2006-10-04 (三) 17:50 發表

把EVENT模組搞定後
就安裝SIGNUP模組
上傳 啟用
要去設定時卻出現錯誤訊息

user warning: Table 'drupal.signup' doesn't exist query: SELECT * FROM signup WHERE nid = 0 in /home/XXXX/drupal.morezman.com/includes/database.mysql.inc on line 120.

請問有裝過的人該怎麼解決
(手動去把該有的TABLE加入 可以嗎)

只剩這個模組就可以正式開站囉
http://drupal.morezman.com

備註:在EVENT中按右下方那個日曆圖示(Add iCalendar)都會出現無法顯示網頁
不知道是啥原因

對DRUPAL的後勁愈來愈覺得可怕
總覺得有機會可以搞的很偉大

some problem about tinymce module

I want to use the PHP Control in visibility of the tinymce module.
The PHP code I use:

<?php
if($format == 3 || $node->format == 3)
return true;
else
return false;
?>

When the INPUT FORMAT equal 3 (the value of FULL HTML), the tinymce module will be visible.But, it doesn't work.

I think the problem is the variable, $format [$node->format] in PHP code.
Could someone help me? Which variable is right to the INPUT FORMAT?

E-Commerce 快速指引範例

jimmy's 的頭像
jimmy 在 2006-09-30 (週六) 20:00 發表

參考資源:
http://drupal.org/handbook/modules/ecommerce

以下是e-commerence最基本的功能教學,不包含金流,而產品用實體物品當作範例(其他還有檔案軟體、贊助資金..等)。

步驟:
1. 將e-commerce整個資料夾放入資料夾 modules/

2. 到admin/modules頁面,打開幾個模組:

--------------------
address(地址資訊,用來寄送貨物用的,有些不適合台灣,需要修改code)
cart(購物車)
cod(直接付款,沒有線上金流)
parcel(物品群組)
payment(金額顯示)
product(產品)

[小片段程式碼] 視覺化的熱門內容!

charlesc's 的頭像
charlesc 在 2006-09-29 (週五) 12:43 發表

看到一個很酷的熱門內容呈現方式:
Display the most popular content in a way like c|Net's what's hot

範例:

<?php
/**
* This php snippet displays a list of links
* to most viewed pages
*
* To increase/decrease the number of nodes listed
* change the $list_length value to suit.
*
* Works with drupal 4.7.x & 4.6.x & 4.5.x
*
* Snippet submitted by aam
*/
$output = "\n";

$output .= "

\n";

/* ************** Hottest of all time *************************/
$list_length = 15;
$sql = "SELECT b.title, a.nid, b.created AS min_time, CASE WHEN a.totalcount > 0 THEN a.totalcount ELSE 1 END AS rec_cnt FROM node_counter a LEFT JOIN node b ON a.nid = b.nid ORDER BY rec_cnt DESC LIMIT $list_length";
$all_nodes = array();
$result = db_query($sql);
$i=0;
$max_time_all = 19000101;
$min_time_all = 99991231;
$max_rec_cnt_all = 0;
$min_rec_cnt_all = 999999999;
$rec_cnt_all = 0;
while ($mynode = db_fetch_object($result)) {
$i += 1;
$all_nodes[$i] = array(
'title' => $mynode->title,
'path' => ('/node/'.$mynode->nid),
'min_time' => format_date($mynode->min_time,'custom', 'Ymd')+0,
'rec_cnt' => $mynode->rec_cnt
);
$rec_cnt_all += $mynode->rec_cnt;
if ( $all_nodes[$i]['min_time'] > $max_time_all ) $max_time_all = $all_nodes[$i]['min_time'];
if ( $all_nodes[$i]['min_time'] < $min_time_all ) $min_time_all = $all_nodes[$i]['min_time'];
if ( $all_nodes[$i]['rec_cnt'] > $max_rec_cnt_all ) $max_rec_cnt_all = $all_nodes[$i]['rec_cnt'];
if ( $all_nodes[$i]['rec_cnt'] < $min_rec_cnt_all ) $min_rec_cnt_all = $all_nodes[$i]['rec_cnt'];
}
$a_x = 0; $a_y = 0;
$d_x = 500; $d_y = 500;
$ratio = 0.4;
//$output .= " rec_cnt_all = $rec_cnt_all \n";
//$output .= " max_time_all = $max_time_all \n";
//$output .= " min_time_all = $min_time_all \n";
//$output .= " max_rec_cnt_all = $max_rec_cnt_all \n";
//$output .= " min_rec_cnt_all = $min_rec_cnt_all \n";
$output .= "

\n";
$sum_rec_cnt = 0;
$myitems = array();
$i=1;
foreach ($all_nodes as $mynode) {
$myitems[$i] = $mynode;
$i += 1;
$sum_rec_cnt += $mynode['rec_cnt'];
if ( ($sum_rec_cnt+$mynode['rec_cnt'])/$rec_cnt_all > $ratio ) {
if ( $d_y-$a_y <= $d_x-$a_x ) {
// drawing area
$width = round( ($sum_rec_cnt/$rec_cnt_all) * ($d_x-$a_x) );
$pos=$a_y;
foreach($myitems as $node) {
$output .= "
";
$output .= "". $node['title'] ."";
$output .= "

\n";
$pos += round(($node['rec_cnt']/$sum_rec_cnt)*($d_y-$a_y));
}
// set the target area
$a_x += $width;
}
else {
// drawing area
$width = round( ($sum_rec_cnt/$rec_cnt_all) * ($d_y-$a_y) );
$pos=$a_x;
foreach($myitems as $node) {
$output .= "

";
$output .= "". $node['title'] ."";
$output .= "

\n";
$pos += round(($node['rec_cnt']/$sum_rec_cnt)*($d_x-$a_x));
}
// set the target area
$a_y += $width;
}
// reset algorithm
$i = 1;
$rec_cnt_all -= $sum_rec_cnt;
$sum_rec_cnt = 0;
unset($myitems);
$myitems = array();
}
}
$output .= "

\n";

/* ************** Hottest of today *************************/
$list_length = 15;
$sql = "SELECT b.title, a.nid, b.created AS min_time, CASE WHEN a.daycount > 0 THEN a.daycount ELSE 1 END AS rec_cnt FROM node_counter a LEFT JOIN node b ON a.nid = b.nid ORDER BY rec_cnt DESC LIMIT $list_length";
$all_nodes = array();
$result = db_query($sql);
$i=0;
$max_time_all = 19000101;
$min_time_all = 99991231;
$max_rec_cnt_all = 0;
$min_rec_cnt_all = 999999999;
$rec_cnt_all = 0;
while ($mynode = db_fetch_object($result)) {
$i += 1;
$all_nodes[$i] = array(
'title' => $mynode->title,
'path' => ('/node/'.$mynode->nid),
'min_time' => format_date($mynode->min_time,'custom', 'Ymd')+0,
'rec_cnt' => $mynode->rec_cnt
);
$rec_cnt_all += $mynode->rec_cnt;
if ( $all_nodes[$i]['min_time'] > $max_time_all ) $max_time_all = $all_nodes[$i]['min_time'];
if ( $all_nodes[$i]['min_time'] < $min_time_all ) $min_time_all = $all_nodes[$i]['min_time'];
if ( $all_nodes[$i]['rec_cnt'] > $max_rec_cnt_all ) $max_rec_cnt_all = $all_nodes[$i]['rec_cnt'];
if ( $all_nodes[$i]['rec_cnt'] < $min_rec_cnt_all ) $min_rec_cnt_all = $all_nodes[$i]['rec_cnt'];
}
$a_x = 0; $a_y = 0;
$d_x = 500; $d_y = 500;
$ratio = 0.4;
//$output .= " rec_cnt_all = $rec_cnt_all \n";
//$output .= " max_time_all = $max_time_all \n";
//$output .= " min_time_all = $min_time_all \n";
//$output .= " max_rec_cnt_all = $max_rec_cnt_all \n";
//$output .= " min_rec_cnt_all = $min_rec_cnt_all \n";
$output .= "

\n";
$sum_rec_cnt = 0;
$myitems = array();
$i=1;
foreach ($all_nodes as $mynode) {
$myitems[$i] = $mynode;
$i += 1;
$sum_rec_cnt += $mynode['rec_cnt'];
if ( ($sum_rec_cnt+$mynode['rec_cnt'])/$rec_cnt_all > $ratio ) {
if ( $d_y-$a_y <= $d_x-$a_x ) {
// drawing area
$width = round( ($sum_rec_cnt/$rec_cnt_all) * ($d_x-$a_x) );
$pos=$a_y;
foreach($myitems as $node) {
$output .= "
";
$output .= "". $node['title'] ."";
$output .= "

\n";
$pos += round(($node['rec_cnt']/$sum_rec_cnt)*($d_y-$a_y));
}
// set the target area
$a_x += $width;
}
else {
// drawing area
$width = round( ($sum_rec_cnt/$rec_cnt_all) * ($d_y-$a_y) );
$pos=$a_x;
foreach($myitems as $node) {
$output .= "

";
$output .= "". $node['title'] ."";
$output .= "

\n";
$pos += round(($node['rec_cnt']/$sum_rec_cnt)*($d_x-$a_x));
}
// set the target area
$a_y += $width;
}
// reset algorithm
$i = 1;
$rec_cnt_all -= $sum_rec_cnt;
$sum_rec_cnt = 0;
unset($myitems);
$myitems = array();
}
}
$output .= "

\n";

/* ************** Hottest of last week *************************/
$list_length = 15;
$sql = "SELECT title, path, MAX(timestamp) AS min_time, COUNT(*) AS rec_cnt FROM accesslog WHERE path LIKE '%book/%' OR path LIKE '%node/%' OR path LIKE '%image/%' GROUP BY title, path ORDER BY rec_cnt DESC LIMIT $list_length";
$all_nodes = array();
$result = db_query($sql);
$i=0;
$max_time_all = 19000101;
$min_time_all = 99991231;
$max_rec_cnt_all = 0;
$min_rec_cnt_all = 999999999;
$rec_cnt_all = 0;
while ($mynode = db_fetch_object($result)) {
$i += 1;
$all_nodes[$i] = array(
'title' => $mynode->title,
'path' => $mynode->path,
'min_time' => format_date($mynode->min_time,'custom', 'Ymd')+0,
'rec_cnt' => $mynode->rec_cnt
);
$rec_cnt_all += $mynode->rec_cnt;
if ( $all_nodes[$i]['min_time'] > $max_time_all ) $max_time_all = $all_nodes[$i]['min_time'];
if ( $all_nodes[$i]['min_time'] < $min_time_all ) $min_time_all = $all_nodes[$i]['min_time'];
if ( $all_nodes[$i]['rec_cnt'] > $max_rec_cnt_all ) $max_rec_cnt_all = $all_nodes[$i]['rec_cnt'];
if ( $all_nodes[$i]['rec_cnt'] < $min_rec_cnt_all ) $min_rec_cnt_all = $all_nodes[$i]['rec_cnt'];
}
$a_x = 0; $a_y = 0;
$d_x = 500; $d_y = 500;
$ratio = 0.4;
//$output .= " rec_cnt_all = $rec_cnt_all \n";
//$output .= " max_time_all = $max_time_all \n";
//$output .= " min_time_all = $min_time_all \n";
//$output .= " max_rec_cnt_all = $max_rec_cnt_all \n";
//$output .= " min_rec_cnt_all = $min_rec_cnt_all \n";
$output .= "

\n";
$sum_rec_cnt = 0;
$myitems = array();
$i=1;
foreach ($all_nodes as $mynode) {
$myitems[$i] = $mynode;
$i += 1;
$sum_rec_cnt += $mynode['rec_cnt'];
if ( ($sum_rec_cnt+$mynode['rec_cnt'])/$rec_cnt_all > $ratio ) {
if ( $d_y-$a_y <= $d_x-$a_x ) {
// drawing area
$width = round( ($sum_rec_cnt/$rec_cnt_all) * ($d_x-$a_x) );
$pos=$a_y;
foreach($myitems as $node) {
$output .= "
";
$output .= "". $node['title'] ."";
$output .= "

\n";
$pos += round(($node['rec_cnt']/$sum_rec_cnt)*($d_y-$a_y));
}
// set the target area
$a_x += $width;
}
else {
// drawing area
$width = round( ($sum_rec_cnt/$rec_cnt_all) * ($d_y-$a_y) );
$pos=$a_x;
foreach($myitems as $node) {
$output .= "

";
$output .= "". $node['title'] ."";
$output .= "

\n";
$pos += round(($node['rec_cnt']/$sum_rec_cnt)*($d_x-$a_x));
}
// set the target area
$a_y += $width;
}
// reset algorithm
$i = 1;
$rec_cnt_all -= $sum_rec_cnt;
$sum_rec_cnt = 0;
unset($myitems);
$myitems = array();
}
}
$output .= "

\n";

/* ******* end of container ************ */

$output .= "

\n";

$output .= "\n";

$output .= "熱門內容 全部\n";

$output .= " 今天\n";

$output .= " 上週\n";

$output .= "區塊愈大,代表愈熱門。\n";
$output .= "區塊顏色愈深,表示是比較舊的內容\n";
$output .= "\n";

print $output;
?>

怎麼樣可以把其他的頁面整合進來呢?

twdolphin's 的頭像
twdolphin 在 2006-09-27 (三) 21:48 發表

不才的小弟又來打擾了,事情是這樣的,最近找到一個有趣的FLASHPAINT的留言板,覺得小朋友應該會很喜歡,所以想把它整合進DRUPAL網站中,做出類似IFRAME那種效果(就是類似點選了留言板後,上面的標題、左邊的選單都不會變動,只有中間主要的頁面變成留言板)。瀏覽了一下DRUPAL現有的MODULE,似乎沒有這種模組耶,除了一個IMPORT HTML的不知道是不是?謝謝各位了。

安裝失敗

liaozi's 的頭像
liaozi 在 2006-09-27 (三) 10:44 發表

Hi,All 我試圖要在我的機器安裝Drupal,不過安裝失敗
錯誤訊息如下

禁止存取。

* warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/default/settings.php:128) in /var/www/drupal/includes/common.inc on line 139.
* warning: array_keys(): The first argument should be an array in /var/www/drupal/modules/user.module on line 351.
* warning: implode(): Bad arguments. in /var/www/drupal/modules/user.module on line 351.
* user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /var/www/drupal/includes/database.mysql.inc on line 120.

我是初學者,想要自行開發該如何上手

liao's 的頭像
liao 在 2006-09-26 (二) 11:05 發表

大家好,我是最近才接觸CMS的新手,在試著安裝過 joomla、e107、xoops之後,最後透過友人的推薦,決定使用drupal來架設網站,目前網站己經架設完成,但是非常陽春,我還是個初學者,其實很多東西也不是了解,市面上好像也沒有drupal的書,可是我想要自己開發新的模組(或修改現成的模組)建立自己的網站,我該從何上手呢,有沒有什麼資料值得我先閱讀的,我想從基本學起,也許只是從自己寫一個功能簡單的搜尋關鍵字的模組開始,慢慢漸入佳境,可是目前對drupal架構完全沒什麼概念,光是看原始碼我就有點頭痛了,所以想自己寫一些簡單基本的功能,有沒有人可以給我一些意見要如何上手。

頁面

訂閱 RSS - 4.7.x