Wednesday, December 31, 2008

Drupal and Flash

SWFAddress模組: 把 SWFAddress library(by Asual)與 SWFObject 包成一個 Drupal 模組?
Services模組
AMFPHP模組


[ref]
http://boston2008.drupalcon.org/session/druplash-and-druplex-content-managed-flash-and-flex-sites-powered-drupal


http://drupal.org/project/swfaddress



http://www.asual.com/swfaddress/

Sunday, December 28, 2008

Aggregator所加入的block 只顯示在admin的頁面

[Q] Aggregator所加入的blocks, 只顯示在admin的頁面, 其他使用者看不到?

[sol] 檢查 User Permission 設定.


//===
[Q] The blocks created from the feed of Aggregator only show on admin's page,
other users cannot see the blocks, why?

[sol] chk User Permission for Aggregator.

Monday, December 15, 2008

How to login when site was put into offline-mode?

[Q] How to login when site was put into offline-mode?

[sol]
0. try http://ursite.com/?q=user/ to show login box
1. if login successfully, goto Administer -> Site configuration ->
Site maintenance -> restore site to online mode

Separate Admin theme from user-browsing theme

Admin theme would better be fixed to 'Garland' by
Site configuration -> Administration theme -> choose non-default theme(Garland is recommended)

user-browsing theme is changed by
Site building -> Themes -> check default to the desired theme(say Pushbutton)
(after saving the change, the message is shown like the following:
"Please note that the administration theme is still set to the garland theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected pushbutton theme by default. "
)

Tuesday, November 18, 2008

how to debug into .inc and .module file for php using eclipse

[Q] how to debug into(step debug) .inc and .module file for php using eclipse?

[try]

  • add mime association by editing /etc/mime.types,

  • add .inc and .module to php handler by editing /etc/apache2/mods-available/php5.conf

  • associate .inc, .module to eclipse editor by
    Eclipse -> Window -> Preferences -> General -> Content Types -> Text -> PHP Content Type ->
    File Associations -> Add .module and .inc;
    Restart Eclipse

Saturday, November 8, 2008

cannot enable fckeditor module?

[Q] After installing fckeditor-6.x-2.x-dev.tar.gz and FCKeditor_2.6.3.tar.gz,
then trying to enable fckeditor module, but

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in drupal/sites/all/modules/fckeditor/fckeditor.module on line 235

found that a fckeditor already exists in core, i.e. drupal/modules/fckeditor

cannot remove either drupal/modules/fckeditor or drupal/sites/all/modules/fckeditor/ in bluehost,
why?

--> bluehost disable the recursive delete/change permission!?
--> has to use Legacy FileManager!

Tuesday, November 4, 2008

Views Online Help

http://views-help.doc.logrus.com/help/views/about
重點:

  • Views 是很重要的模組
  • View == Content List/Collection, Content= Page, Story, Blog, ...
  • Display == View 的呈現(Presentation)


原文摘要:
"What is Views?

The views module allows administrators and site designers to create, manage, and display lists of content. Each list managed by the views module is known as a "view",
and the output of a view is known as a "display".

Displays are provided in either block or page form,
and a single view may have multiple displays.

Optional navigation aids, including a system path and menu item, can be set for each page-based display of a view.
...
"

Friday, October 31, 2008

想看免費的新IT技術原文書

覺得進口的原文書太貴,
又想跟上時代 學習熱門的新技術?

到PacktPub的網站申請當Reviewer 或者 ...
http://www.packtpub.com/free

Thursday, October 23, 2008

Internal Links and External Links

Internal Links : when clicked, shd not pop out new window; shd have proper access permission
External Links : when clicked, shd pop out new window

Wednesday, October 22, 2008

How to goto weblink without opening new browser window?

[Q] How to goto weblink without opening new browser window in drupal? (WebLinks module)

[try] http://drupal.org/node/31598

Take care when move module


  • put the add-on modules at drupal/sites/all/modules/
    instead of drupal/modules/ , where core modules are put.

  • if an add-on module was placed at drupal/modules/,
    before moving it to drupal/sites/all/modules/, remember to disable it first.
    Then cut and paste the whole diretory of the add-on module to drupal/sites/all/modules/

Run-time call by reference deprecated

Run-time call by reference deprecated:
0. function f1(&$form) {...}

1. deprecated version: call the function in a PHP program
...
$form1= ...;
f1(&$form1);


2. revised version
...
$form1= ...;
f1($form1);
//call-by-reference is determined compile-time,
//i.e. determined by the function declaration

Call-time pass-by-reference deprecated warning

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file
in C:\wamps2\www\drupal\sites\all\modules\weblinks\weblinks.module on line 323
in C:\wamps2\www\drupal\sites\all\modules\weblinks\weblinks.module on line 1507


[suspicious causes but actually not]
1. move module weblinks from dru\modules\ to dru\sites\all\modules\
2. weblinks module modification

[cause]
call-by-ref is done compile-time(at function declaration),
there is no need to use f1(&$parameter) at calling

Tuesday, October 21, 2008

Captcha module configuration/administration

Captcha module's configuration/administration is located within
"User management" rather than Site Configuration!

Monday, October 20, 2008

Often mentioned module?

Views
Panel
PathAuto

Thursday, October 16, 2008

How to change default publishing option?

[Q] How to change default publishing option for certain module/node/page?

[try1] use Views module to create a view customized for the desired module?

[try2] use Workflow module to setup desired options?

[try3] "Override Node Publishing Options" module
http://drupal.org/project/override_node_options ?

Thursday, October 9, 2008

Amazee - Drupal powered social collaboration. A redesign case study.

A redesign case study is provided in http://drupal.org/node/317253


Amazee - Drupal powered social collaboration.


Amazee logo




"... What is Amazee

Amazee is a platform that channels any kind of activism and provides powerful tools to help project initiators organize, promote, and fund projects of any size with participants from anywhere around the world.
..."

Friday, September 19, 2008

Sphinx Community Articles

Sphinx Community Articles

http://www.sphinxsearch.com/articles.html
"... In the Internet age, people want information packaged like fast food: served instantly, hassle-free, and in bite-size (or is that byte-size?) morsels.

...
RSS is your pizza guy, bringing fresh-baked data right to your door.
The weblog is your local Chinese take-out, delivering your favorite spicy dish.
The forum is the neighborhood potluck (or perhaps more aptly, the food fight scene in "Animal House").
And search is like all-you-can-eat night at your local cafeteriaplex:

..."

值得學習的網頁美工

http://www.liptongreenmint.ro/

麻吉List(buddyList) modules

buddylist module version 1(lightweight) and version 2
friend module for Drupal 6
User Relationships module

Drupal theme function override

drupal theme function override
http://drupalsn.com/drupal-tutorials/drupal-theme-function-overriding

"... Drupal can run on different theme engines but as of Drupal 4.7 the phptemplate theme engine became standard, so that’s what we’ll focus on in this tutorial. ...
"

i.e. phptemplate is the default theme engine for Drupal
Drupal 預設的 西門(Theme, 版面 樣式 門面 門板 "神門" "西門" ) 引擎為 "phpTemplate"
How about smarty?

theme function === theme_xxx()
"PHP function within Drupal that is prefixed with theme_"


"...By override I mean declaring a new version of a theme function (in template.php) and completely by passing the original theme function in order to alter its output. ...
"

Saturday, September 13, 2008

Drupal7 GoPhp5

http://drupal.org/gophp5

Drupal 7 將使用 php5.2 的許多新特性
--> Drupal7 將與 php4 不相容!


One Comment quoted:
"
I know that PHP 5 is going
Deeporange1 - July 13, 2007 - 07:53

I know that PHP 5 is going to be much improved over the current standard so that is good, however doesn't anyone worry that rolling out new versions of Drupal so rapidly may suppress module development and what not? The thing is, it takes time to develop modules for new "Major" releases (typically) as there are new methods that have to be taken into account (For D5 it was new form systems). So, if one has a few modules that they support doesn't this kind of stuff up their time?

I am not against new developments but phasing out old platforms so rapidly would seem to stifle growth of contributed modules just a bit.

Is Drupal 6 and 7 going to be fairly compatible with Drupal 5 or are all the modules going to need a lot of patchwork?

Best regards, Derek Webb

...

"

Monday, September 1, 2008

如何自訂block region(區塊範圍)?

0. template.php
1. page.tpl.php


//===

template.php:
function YOUR_THEMES_NAME_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
...
);
}
?>



page.tpl.php code:

*** The location of < div class="sidebar_left" > ...</div> within the page.tpl.php determines the location of the div shown in the layout.

class="sidebar_left" corresponds to some CSS layout code, for example:
.sidebar_left{
width:25%;
float:left;
margin-right:2%;
overflow: hidden;
}


[ref] http://drupalsn.com/drupal-tutorials/custom-drupal-theme-regions

Sunday, August 31, 2008

DrupalSN.com - Drupal Social Network

DrupalSN.com (Drupal Social Network)



  • Engineers: thomjjames , BioALIEN


  • 提供Drupal網站開發及設計人員一個展示的平台 (in fact, DrupalSN本身就是一個Drupal的展示網站)




新書二版

Pro Drupal Development ships for Drupal 6!



Pro Drupal Development
第二版出爐了!




第二版增加了超過 200 頁的篇幅來說明Drupal 6 的 Actions API/Batch API/其他新的工具 以及 一些關鍵的工具如Views2, CCK2等。如同第一版, 新版仍涵蓋了重要的基本觀念如building modules/ FormAPI /node system/ search tools 等等。


2007年 第一版上市數日即 登上 Amazon.com top 100;
二版銷售且拭目以待。

Thursday, July 31, 2008

Vocalo.org using Drupal 6

http://drupal.org/node/288658
http://vocalo.org

Vocalo.org 提供用戶一個 分享/製作 『故事』的平台(跟YouTube 有何不同呢?)
『故事』可以是影像語音或視訊(文字呢?)
用戶提供的故事會在 芝加哥地區廣播電台(89.5 FM) 中放送 也會放在網站上for licensed remixing

Sunday, July 27, 2008

CCK Link

Drupal Content Creation Kit
http://www.darcynorman.net/2006/05/15/drupal-content-creation-kit/
"
...
Drupal 4.7 has an amazing “Content Creation Kit” module available for it (apparently, the module drove much of the node redevelopment between 4.6 and 4.7). It lets you easily create new content types, on the fly, without touching any code. It provides a set of primitives, and you can assemble them however you want - even providing lists of acceptable entries.
...
"

樣板集網站

http://www.webpage.com.tw/drupal.html

Postnuke renamed to Zikula

http://community.zikula.org/

Thursday, July 17, 2008

6-part Tutorial for Drupal

"... This tutorial is another special series written guest author Sean Hodge from aiburn.com and Connection Cube. He is an expert in Drupal, ... Drupal is basically an open source CMS, ..."

Part0
http://www.gomediazine.com/tutorials/create-a-killer-band-site-with-drupal-introduction/

Part3
http://www.gomediazine.com/tutorials/create-a-killer-band-site-in-drupal-part-3-xhtml/

Sunday, July 13, 2008

How to upgrade Drupal?

How to upgrade Drupal?

1. following the Upgrade.txt included in drupla6.3.tar.gz
2. referring to the below



  • Easiest way to upgrade 6.2 to 6.3
    http://drupal.org/node/280649


  • Upgrading from 6.2 to 6.3 for Novices
    http://drupal.org/node/282000


  • Page Not Found
    http://drupal.org/node/281897
    http://drupal.org/node/48417#comment-91463


  • Verify the new configuration file
    http://drupal.org/node/281843


  • Out-of-memory
    http://drupal.org/node/280917

Sunday, July 6, 2008

drupal and fckeditor

fckeditor Introduction, FAQ, ...
http://drupal.fckeditor.net/
http://www.fckeditor.net/
http://docs.fckeditor.net/


drupal fckeditor module(shell) Download [只是一個殼]
http://drupal.org/node/16118/release

FCKeditor Download(core)[真正的汝視即汝得(WYSIWYG)的編輯器]
http://www.fckeditor.net/download

*** we have to download both the drupal fckeditor module(say fckeditor-6.x-1.3-beta.tar.gz) and FCKeditor(FCKeditor_2.6.2.tar.gz)
兩個軟件均需下載

*** fckeditor-6.x-1.3-beta.tar.gz shd be extracted to be under drupalsite/modules
*** FCKeditor_2.6.2.tar.gz shd be extracted to be under drupalsite/modules/fckeditor

i.e.,
fckeditor-6.x-1.3-beta.tar.gz == drupalsite/modules/fckeditor
FCKeditor_2.6.2.tar.gz == drupalsite/modules/fckeditor/fckeditor

Saturday, June 28, 2008

Drupal API

http://api.drupal.org/api/groups

Views Module

http://drupalmodules.com/module/views

"
Great Tool

This module is one of the most useful tools on a Drupal website.
...

Views 2 uses a "no page re-load" method of adding filters and arguments which makes building queries much faster.
...

Review by Ultimateboy on May 7, 2008 - 10:36
"

Friday, June 20, 2008

Search Module for Drupal

Google Site Search Enhanced Module
http://drupal.org/node/59150


  • The search engine does its indexing at intervals you choose by setting "cron runs."...

  • To trigger the indexing, we have to regularly visit cron page
    say, http://www.example.com/cron.php or http://www.any2flash.com/o2/cron.php


Use Sphinx in Drupal

http://sphinxsearch.com


http://drupal4hu.com/node/129
" ... sql_query_range = SELECT MIN(nid), MAX(nid) FROM node
sql_range_step = 1000
sql_query = \
SELECT n.nid, n.title, body, changed \
FROM node n \
INNER JOIN node_revisions USING(vid) \
WHERE n.nid BETWEEN $start AND $end AND status = 1

...
require_once ('./sphinxapi.php');
$start_from = $_GET['page'] ? $_GET['page'] : 0;
$index = ...;
$page_increment = 10; // number of nodes shown
$amount = 10;
$sphinx = new SphinxClient ();
$sphinx->SetServer ('localhost', 3312);
$sphinx->SetWeights (array(100, 1));
$sphinx->SetMatchMode (SPH_MATCH_ALL);
$sphinx->SetLimits($start_from * $page_increment, $page_increment);
$sphinx->SetSortMode(SPH_SORT_TIME_SEGMENTS, 'changed');
// you can add filters with $sphinx->SetFilter etc
$result = $sphinx->Query(implode(' ', $keys), $index);
...
"

Monday, June 9, 2008

Smart Eureka! Science News


e!Eureka Science News - Drupal Success Story

Eureka! Science News 是一個科學新聞的入口網站,或者說是科學新聞的自動收集站(aggregator of science news/feeds),具有將新聞進行收集、分類、排序的功能,...

網站開發者在 Eureka! Science News just launched! 介紹了開發方式、所使用的其他模組,...

參考連結
http://drupal.org/node/261340
http://www.biologynews.net/
http://esciencenews.com/



The Vintage Aviator(古典航空器, LKK航空器)

Drupal Success Story - The Vintage Aviator(古典航空器)
http://thevintageaviator.co.nz

這是介紹第一次世界大戰(WW1)的戰鬥機(LKK航空器)的網站,是一個內容豐富 美工設計卓越的網站。



作者在 http://drupal.org/node/267393 描述了該網站的建置網站的過程,使用及修改的模組,是一個很棒的參考資源。