PEAK XOOPS - DBテンプレートの復権 in englishin japanese

Archive | RSS |
XOOPS
XOOPS : DBテンプレートの復権
Poster : GIJOE on 2005-12-22 05:39:15 (15967 reads)

in englishin japanese
XOOPS2で、Smartyを採用した際、以下のように実装されました。
・テーマ == Fileテンプレート
・各モジュールのテンプレート == DBテンプレート
・各ブロックのテンプレート == DBテンプレート

モジュールやブロックの見た目に手を入れる場合、当然、これらのDBテンプレートをいじるわけですが、今のテンプレート管理が使いやすいと思っている人はいるでしょうか?

私は思いません。

ある程度技術力のある人なら、みんな私と同じ感想のようで、それ故に、モジュールやブロックについて、Fileテンプレートを採用する動きも多くあります。確かに、Fileテンプレートであれば、FTPでテンプレート構成ファイルを上げれば、一斉に切替可能ですから。

しかし、DBテンプレートは本来、管理者が手軽にいじれるために実装されたはずです。管理画面でちょっと変更すれば、それが反映される。それこそが正しい「Nuke」でしょう。(XOOPSは誰がどう見てもNukeの一派生です)

XOOPSデフォルトのDBテンプレートが評判悪いのは、ちょっとした設計ミスと、本来実装されるべき機能が未実装のままである、という2点に起因していると思われます。

以下に問題点を具体的に挙げます。

1) defaultテンプレートが編集不可能(DBテンプレートのオリジナルは、Fileに存在しているので、ここでオリジナルデータを担保する必要はまったくない)
2) 複製がテンプレートセット単位でしかできない(これだと、カスタマイズしていないモジュールのテンプレートが更新された時の手間が異常に大変になる)
3) テンプレートの削除が1個ずつしかできない(10〜20個もテンプレートのあるモジュールの不必要なカスタムテンプレートを消す場合に気が遠くなる)
4) どのテンプレートをどうカスタマイズしたのかが判らない


そこで今回、tplsadminモジュールという形で、上の問題点を解決した使いやすいDBテンプレート管理を実装してみました。

1) defaultテンプレートも編集可能
2) テンプレートの複製がモジュール単位でも、個別のテンプレート単位でも可能
3) チェックボックス方式で削除可能
4) カスタマイズしたかどうかが一目瞭然の管理画面と、diffが表示される編集画面を実装


このtplsadminがどういうモジュールであるかは、blocksadminを使ったことがあればより判りやすいでしょう。blocksadminではモジュール毎に使いやすいブロック管理画面を提供していたのが、tplsadminではモジュール毎に使いやすいテンプレート管理画面を提供するだけです。管理画面だけのモジュールなので、気軽に導入できます。

もちろん、myblocksadminと同様に、mytplsadminとしてモジュール作者が取り込めば、そのモジュールのメニューにも、簡単に「テンプレート管理」をつけることができます。今後、拙作のモジュールにも、順次mytplsadminを導入していく予定です。

Printer friendly page Send this story to a friend

Comments list

GIJOE  Posted on 2006/1/19 6:52 | Last modified
hi jseymour

I've read your post in news of www.xoops.org

Thanks!
jseymour  Posted on 2006/1/13 8:56
I will be sure to get it in the module repository when it is not a development version.

But I did post news of this module In This XOOPS News Article.
GIJOE  Posted on 2006/1/10 5:31
Quote:
Playoffs are fun to watch, but looks like Jaguars only get one game. Next year maybe better.
Bad result. sorry...
Anyway, this is the season "Revalue the Jaguars"
Tom Coughlin, Mark Brunel, and Jaguars itself.
I hope Jaguars sweeps Colts and Payton Manning -I hate- next season.

Quote:
Also I am spreading the news about this most useful module to most of my contacts. All love it so far.
Register it to www.xoops.org please

It is too busy for me to support my works in www.xoops.org
jseymour  Posted on 2006/1/8 12:48
Playoffs are fun to watch, but looks like Jaguars only get one game. Next year maybe better.

Also I am spreading the news about this most useful module to most of my contacts. All love it so far.
GIJOE  Posted on 2006/1/8 6:30
hi seymour.

Thank you for testing my module.

And conguraturation with Jaguars goes to play off!
though KC -I love- can't go...

I'm waiting for the 1st wild card game in the front of TV now .
jseymour  Posted on 2006/1/8 4:07
Great Module GIJOE. I have been testing since it was released, found no problems as of yet. And does it improve the way to handle templates. You can see what is modified quickly and easily correct any mistakes to boot.

Thanks again for another great module tool.
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!