Drupal

Drupal 5.0 リリース

Drupal 5.0 がリリースされました。

正式版となったのでこのサイトもアップグレード。

portsnap

会社のテストサーバ。 Proxyの中だったのでCVSupでソースが取得できないみたい。詳しいことは調べずにFW内だからいいかと思ってそのままにしていました。

ところがメンテナンスされていなかったそのサーバでDrupal 5.0-beta1を使っていたところ部署の情報共有サーバになりそうな流れに。それでも相変わらずFWの中のサーバなのですが、一応少しずつ勉強をしています。

調べてみるとCVSupの代わりにproxy内部でも最新のソースを取得することができるportsnapというものがあるみたい。ということで早速OSを最新にしてみました。OSを最新にすることはシステムビルドアップというらしいです。

Drupal 5.0-beta1

Drupal 5.0-beta1がリリースされました。
ここはまだだけど、違うサイトにインストールしてみましたよ。

・新テーマのgarlandはなかなかいい感じ

・管理がしやすくなった

・インストールが簡単

こんな感じです。 FCKEditorもすでに対応済み。
モジュールがそろってきたところで移行します。

本家は現在移行中みたいです。 データの移行だけなのかな。

RAQdevil インストール

FreeBSD 6.1 & Apache 2.2 & MySQL 5.1 & PHP5 & Drupal 4.7.2 インストールを遊び半分で試してみてからFreeBSDをいじるのが面白くなってきました。今は仕事でISOのドキュメントを作ってばかりなのですが、その合間に今度はRAQdevilというFreeBSD用のコントロールパネルをインストールすることにしました。現実逃避です。

RAQdevil
The Open-Source Web Contraol Panel

FreeBSD 6.1 & Apache 2.2 & MySQL 5.1 & PHP5 & Drupal 4.7.2 インストール

お仕事でFreeBSDのサーバを作るための練習をしました。
環境は6.1-RELEASE-i386
なんでFreeBSDを選んだのかは自分でもよくわかりません。サーバ用途ならLinuxよりFreeBSD というのをどこかで見たことがあるような気がしました。とにかく慣れてみようかと。
適度にドキュメントがあることも重要です。

Drupal 4.7.2 インストール

Drupal 4.6.X から4.7.2にアップデートしました。

Filesに.htaccessファイルを自動生成するようになっていて、ModRewiteを使っているとFilesの内容が表示できなくなってしまいます。アップデートに失敗したと思ってしまい、サイトを初期化しました。 再構築中です・・・

4.7.2をクリアインストールして、バックアップしておいたダンプからPhpMyAdminを使ってなんとかコンテンツだけ復元させました。ブラウザからDB操作するのって大変ですね。
Filesの.htaccessファイルは最初の一文を残して消去しました。セキュリティに問題があるみたいですが、まあそんなに心配しなくてもたぶん問題ないと思います。

Spam モジュール 大活躍

GoogleAnalytics を眺めていたら異変に。
クリスマスのエントリにアメリカからアクセスがたくさん。
Googleのblogにリンクしたら、その中のリンク一覧に載ってたみたい。

具体的にはこんな感じ


アメリカからこんなにアクセスがあるなんて・・・

さらに悲しいおまけとしてTrackback Spamも激増。
具体的にはこんな感じ

Drupal Spamモジュール追加

Trackback Spam が多くなってきたので Spam module を追加してみました。
本家のほうのモジュールは古いみたいなので、以下のページから

The Drupal Spam Module 2.0

ファイルをダウンロードして、SQLを流して、モジュールをコピーするだけ。
うまく動いているかもよくわかりませんが、とりあえず特徴としては以下のようです。

  • Written in PHP specifically for Drupal.
  • Highly configurable.
  • Automatically detects and unpublishes spam comments and other spam content.
  • Automatically learns to detect spam in any language using Bayesian logic.
  • Automatically learns and blocks spammer URLs.
  • Automatically blacklists IPs of learned spammers, preventing them from posting additional spam and wasting database resources.
  • Detects repeated postings of the same identical content.
  • Detects content containing too many links, or the same link over and over.
  • Supports the creation of custom filters using powerful regular expressions.
  • Can notify the user that his or her content was determined to be spam, preventing confusion over why their content doesn't show up.
  • Can notify the site administrator in an email when spam is detected.
  • Provides simple administrative interfaces for reviewing spam content.
  • Provides comprehensive logging to offer an understanding as to how and why content is determined to be or not to be spam.

    SMTPとおなじでTrackbackも性善説に基づいて作られた仕様とのこと。
    早くよい仕組みが考えられるといいですね。

  • Drupal gsitemap モジュール追加

    個人のページなんだから全然宣伝する必要ないのですが、Drupalのgsitemapモジュールを組み込んでみました。
    なんてったっていつか商売はじめるなら宣伝が大事だからね。今のうちから勉強勉強。

    1日2回くらいBotが巡回してきます。
    自分の駄文がIndexされているのって素敵。

    http://www.hanada.org/gsitemap

    FCKeditorインストール

    #Drupal 4.7.x用のFCKEditorはまだコミットされていません。
    #このサイトでは4.7.xにアップデートするにあたってTiniMCEを導入しました。
    #こまめにhttp://drupal.org/project/issues/16118をチェックしてみてください。

    WordPressに慣れている僕にはDrupalの標準エディタは機能無しで使いにくいのでGUIっぽいエディタを探しました。

    Drupalのモジュールはここから探せるよ。
    Drupal Modules
    で、見つかったのがFCKeditor。

    早速インストール
    FCKeditor for Drupalをダウンロード
    サーバのmodules/に展開
    #もちろんphpファイルのパーミッションは755

    さらに
    http://www.fckeditor.net/
    から GZip File (source code included): FCKeditor_2.0.tar.gz
    をダウンロード。
    中身をサーバのmodules/fckeditor/libにコピー。
    #libフォルダは自分で作ってね。
    #このとき_samples、_testcasesのフォルダはコピーしなくていいよ

    そのあとで、管理メニューでこのモジュールを使えるようにすると、なんというかものすごい高機能なGUIエディタが装備されます。
    すごいなぁ。これ。

    --
    FCKeditor の README.txt
    Overview
    --------
    This module allows Drupal to replace textarea fields with FCKeditor. This HTML
    text editor brings to the web many of the powerful functionalities of known
    desktop editors like Word. It's really lightweight and doesn't require any
    kind of installation on the client computer.

    NOTE: FCKeditor for Drupal relays on an external library called fckeditor.
    For further information please refer to:

    FCKeditor - The text editor for internet
    Copyright (C) 2003-2004 Frederico Caldeira Knabben

    Licensed under the terms of the GNU Lesser General Public License:
    http://www.opensource.org/licenses/lgpl-license.php

    For further information visit:
    http://www.fckeditor.net/

    Requirements
    ------------
    - Drupal 4.5.x
    - PHP 4.3.0 or greater
    - FCKEditor 2.0 (http://www.fckeditor.net/)

    Installation
    ------------
    1. Copy fckeditor folder to modules/.
    2. Download FCKeditor 2.0 from http://www.fckeditor.net and copy the
    distribution files to modules/fckeditor/lib.

    Configuration
    -------------
    1. Modify the fckconfig.js file to custom your needs (not required)
    2. Enable the module as usual from Drupal's admin pages.
    3. Under settings, configure the fckeditor settings.
    4. Grant permissions to the groups you want use fckeditor.

    Server Side Integration
    -----------------------
    The editor gives the end user the flexibility to create a custom file browser
    that can be integrated on it. The file browser allows users to view the
    content of a specific directory on the server and add new content to that
    directory (create foldes and upload files). To enable the File Browser
    (server side integration pack) follow these steps

    1. Edit the fckconfig.js file and set the FCKConfig.LinkBrowserURL and
    FCKConfig.ImageBrowserURL properties to:

    FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=[context_path]/modules/fckeditor/ssip/connector.php"
    FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=[context_path]/modules/fckeditor/ssip/connector.php"

    Note: If you are running Drupal under a directory replace '[context_path]'
    with yours directory's name (ie. /drupal ), otherwise simply remove it

    FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=/modules/fckeditor/ssip/connector.php"
    FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=/modules/fckeditor/ssip/connector.php"

    2. Modify the properties.inc file to fit your customs.
    Note: if you are running Drupal under a directory you need to set the
    'context_path' property to the ditectory's name

    Credits
    -------
    LatPro Inc.

    - FCKeditor for Drupal Core functionality originally written by:
    Jorge Tite
    - FCKeditor - The text editor for internet
    Copyright (C) 2003-2004 Frederico Caldeira Knabben
    http://www.opensource.org/licenses/lgpl-license.php
    http://www.fckeditor.net/