ページへ戻る

− Links

 印刷 

HypCommonFunc (はいぱー・こもん・ふぁんく) のバックアップソース(No.9) :: XOOPS マニア

xpwiki:keyword/HypCommonFunc のバックアップソース(No.9)

« Prev[4]  Next »[5]
#nopagecomment
#navi(../)
* HypCommonFunc (えっちわいぴー・こもん・ふぁんく) [#d88d609f]

当サイトで配布しているモジュールから利用する共通関数クラスです。

XOOPS_TRUST_PATH を利用します。必ず trust ディレクトリを用意してお使いください。

[[CVS から tarball をダウンロード:http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/hypweb/XOOPS_TRUST/class/hyp_common.tar.gz?view=tar]]した場合は、解凍したファイルを[[ディレクトリ構造>#vb6c77d3]]に従いサーバーにアップロードしてください。

XOOPS へ組み込むには、サーバーにアップロード後に HypCommonPreLoad を導入してください。導入方法については、HypCommonPreLoad に XOOPS のバージョン別に記載してあります。

** 最新版ダウンロード [#w419dfba]
-最新版は[[CVS:http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/hypweb/XOOPS_TRUST/class/hyp_common/]]より取得してください。
--[[hypwebCVS:XOOPS_TRUST/class/hyp_common]]
---[[ダウンロード(tarball):http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/hypweb/XOOPS_TRUST/class/hyp_common.tar.gz?view=tar]]

*** [[最近のCVS更新履歴:http://hypweb.net/cvs2cl/hyp_common.txt]] [#e0720112]
-http://hypweb.net/cvs2cl/hyp_common.txt

*** ディレクトリ構造 [#vb6c77d3]

- CVS から tarball をダウンロードした場合は、解凍後に次のようにサーバーにアップロードしてください。
-- XOOPS 2.0.16a JP の場合
--- hyp_common/core_addons/html_2.0.16aJP ディレクトリの中身を &font(Blue){html側}; ''XOOPS_ROOT_PATH'' へ。
-- XOOPS Cube Legacy の場合
--- hyp_common/core_addons/html_2.0.16aJP ディレクトリの中身を削除。
-- hyp_common/html ディレクトリの中身を &font(Blue){html側}; ''XOOPS_ROOT_PATH'' へ。
-- hyp_common/core_addons/xoops_trust_path ディレクトリの中身を &font(Red){trust側}; ''XOOPS_TRUST_PATH'' へ。
-- その他の hyp_common ディレクトリ以下を &font(Red){trust側}; ''XOOPS_TRUST_PATH/class'' ディレクトリ へ。
- XOOPS_TRUST_PATH/cache ディレクトリがなければ作成して、パーミッションを 707 などにして、ファイル作成権限を与えてください。
- XOOPS_TRUST_PATH/class/hyp_common/favicon/cache ディレクトリのパーミッションを 707 などにして、ファイル作成権限を与えてください。
- ini/http_request.ini.dist は、http通信をする Hyp_HTTP_Request クラスの設定ファイルの雛形です。プロキシ設定などサーバー固有の設定をしたい場合は、"ini/http_request.ini" として設定保存してください。&br;設定書式は、ini 形式です。

**** XOOPS_ROOT_PATH [#m4c1152a]
#code(pre,nonumber){{
XOOPS_ROOT_PATH
├─class
│  └─hyp_common
│          favicon.php
│          get_execpath.cgi            (imagemagick, jpegtran 実行パスの defineファイルを自動生成)
│          hyp_preload.conf.php.rename (PreLoadのオリジナル設定用ファイル雛形)
│          image_magick.cgi            (セーフモード時に使用。実行権限が必要)
│          redirect.php                (携帯対応レンダー用)
│
├─preload                             (XOOPS Cube 用)
│      HdXoopsTplHook.class.php
│      HypCommonPreLoad.class.php
│
└─themes
    └─ktai_default                    (携帯対応レンダー用)
        │  index.html
        │  theme.html
        │
        ├─images
        │      logo.jpg
        │
        └─templates
                index.html
}}

**** XOOPS_TRUST_PATH [#g5ca38e5]
#code(pre,nonumber){{
XOOPS_TRUST_PATH
├─libs
│  └─smartyplugins
│      │  resource.db.php
│      │
│      └─x2
│              resource.db.php
├─cache                          ( 707 などファイル作成権限を与える)
└─class
    └─hyp_common
        │  get_execpath.cgi
        │  hyp_common_func.php
        │  hyp_get_engine.php
        │  hyp_kakasi.php
        │  hyp_search_engines.dat (参照元サーチエンジンの定義)
        │  hyp_simplexml.php
        │  image_magick.cgi
        │  mac_ext.dat            (Mac用機種依存文字データ)
        │  mac_ext_utf8.dat       (      〃          UTF-8)
        │  spamsites.dat          (スパムサイトデータ)
        │  spamwords.dat          (スパム語句データ)
        │  version.php            (バージョン情報)
        │  win_ext.dat            (Win用機種依存文字データ)
        │  win_ext_utf8.dat       (      〃          UTF-8)
        │
        ├─favicon
        │  │  conf.php.rename
        │  │  favicon.php
        │  │  group.def.hosts
        │  │  group.hosts.rename
        │  │
        │  ├─cache              ( 707 などファイル作成権限を与える)
        │  │      readme
        │  │
        │  └─images
        │          default.png
        │          error.png
        │          link_break.png
        │          world_go.png
        │
        ├─hsamazon
        │  │  hyp_simple_amazon.php
        │  │
        │  ├─res
        │  │  ├─CA
        │  │  │      SerachIndexes
        │  │  │
        │  │  ├─DE
        │  │  │      SerachIndexes
        │  │  │
        │  │  ├─FR
        │  │  │      SerachIndexes
        │  │  │
        │  │  ├─JP
        │  │  │      SerachIndexes
        │  │  │
        │  │  ├─UK
        │  │  │      SerachIndexes
        │  │  │
        │  │  └─US
        │  │          SerachIndexes
        │  │
        │  └─templates
        │          default
        │          h5
        │          t3p
        │          w5
        │          w5_2
        │          w5_2_new
        │          w5_2_np
        │
        ├─hyppinger
        │      hyppinger.php
        │
        ├─idna
        │      idna_convert.class.php
        │
        ├─ini
        │      http_request.ini.dist
        │
        ├─ktairender
        │  │  hyp_ktai_render.php
        │  │
        │  ├─ipranges
        │  │      au.ip
        │  │      docomo.ip
        │  │      softbank.ip
        │  │
        │  └─templates
        │      │  _TemplateTagsForXoopsTheme.html
        │      │
        │      └─default
        │              body.html
        │              footer.html
        │              header.html
        │
        ├─mbemulator
        │      convert.table
        │      convert_kana.table
        │      history.html
        │      lower.table
        │      mb-emulator.ini
        │      mb-emulator.php
        │      sjistouni.table
        │      unitosjis.table
        │      upper.table
        │
        ├─preload
        │      hyp_preload.conf.php.rename (PreLoadのオリジナル設定用ファイル雛形)
        │      hyp_preload.php             (プリロードの実体)
        │
        └─rss2html
            │  hyp_rss2html.php
            │
            └─templates
                └─simple
                        base.html
                        item.html
}}

** 画像処理に imagemagick, jpegtran を使用する場合 [#z695a3e7]
画像処理には GD を使用しますが、imagemagick, jpegtran がサーバーに導入されている場合、画像サムネイルの作成、画像回転などにそれらを利用することができます。

使用するには、それぞれの実行パスを XOOPS_TRUST_PATH/class/hyp_common/execpath.inc.php に記載する必要があります。このファイルの記載内容例は次のような感じです。

#code(php){{
<?php
define('HYP_IMAGEMAGICK_PATH', '/usr/bin/');
define('HYP_JPEGTRAN_PATH', '/usr/bin/');
// 以下の設定は、サーバーのPHPがセーフモードの場合に使用されます。
define('HYP_IMAGE_MAGICK_URL', 'http://(XOOPSルート)/class/hyp_common/image_magick.cgi');
?>
}}

- Linux 環境で、CGIがFTPオーナー権限で動作するサーバーの場合、XOOPS_ROOT_PATH/class/hyp_common/get_execpath.cgi に実行権限を与えて、ブラウザからこのファイルにアクセスすることにより、このファイルを自動生成することができます。
- get_execpath.cgi が上手く動作しない場合は、手元で上記ファイルを作成して、サーバーにアップロードしてください。
- PHP がセーフモードで、XOOPS_ROOT_PATH/class/hyp_common/image_magick.cgi を使用する場合は、このcgi に実行権限を与えてください。

#navi(../)

« Prev[4]  Next »[5]