Category: Drupal

Simple Gallery の設置方法

このサイトにあるようなDrupal6で動作するSimple Galleryの設置方法メモ

1、以下のモジュールをダウンロード後解凍し、site/all/modules/ 配下にアップロードする。

・タクソノミー / taxonomy

・CCK imagefields

・画像キャッシュ / ImageCache

・Lightbox2

 

2、コンテンツタイプを新規に追加する。

 

3、タクソノミーでボキャブラリーを新規に追加する。その際、2で作成したコンテンツタイプを選択する。

 

4、画像キャッシュ / imagecache で新しいプリセットを追加する。その際、アクションを任意に変更する(サムネイルにした時のリサイズ設定)。

 

5、Simple Gallery Setting へ遷移する。

(1) Vocabulary・・・タクソノミーで作成したカテゴリーを選択する。

(2)CCK Imagefield・・・field_imageを選択する。

(3)ImageCache Preset・・・画像キャッシュで作成したプリセットを選択する。

(4)以下は1ページに表示する列数など任意で選択する。

 

6、コンテンツの作成から画像をアップロードする。

 

7、http://{yourdomain}/gallery へアクセスすると上記で設定した通り表示される。

テーマへの表示領域追加方法

Drupal6.x のテーマに表示領域の追加を行いたい場合がある。

1、/sites/all/themes/{name}/{theme name}.info 内に

regions[xxxxx] = yyyyy

を追加する。

2、/sites/all/themes/{name}/templates/page.tpl.php 内の表示したい箇所に

        <?php if ($xxxxx): ?>
          <span id="xxxxx">
            <?php print $xxxxx; ?>
          </div>
        <?php endif; ?>

を追加する。

3、管理セクション→サイトの環境設定→パフォーマンスでデータキャッシュをクリアする。

(上記を忘れがちなので注意)

4、管理セクション→サイトの構築→ブロックで確認すると新しい領域が追加されている。

Drupal7の日本語化

Drupal7をレンタルサーバーなどで日本語化する場合、以下のようなエラーが出て日本語化ファイル(.po)をアップロードできない場合がある。

Home » Administration » Configuration » Regional and language » Translate interface » import

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access xxxxxxxxxxxxx in file_save_upload() (linea 1528 di /home/mysite/public_html/includes/file.inc).

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

代替法

1、http://localize.drupal.org/ から poファイルをダウンロードする。

2、/profiles/standard/translations へ poファイルを配置する。

3、Home » Administration » Configuration » Regional and language » Languages » Add から言語を選択し言語を追加する。

4、自動的に配置した poファイルを読み込みインポートされる。

5、デフォルトに設定する。