5月 2007のアーカイブ
Windows Internet Explorer 6.0-textAlign property-bug-CSS Margin Property
http://en.wikipedia.org/wiki/Internet_Explorer
Browser Market Share in April 2007
Internet Explorer, All Versions 78.03%
Internet Explorer 4 0.05%
Internet Explorer 5, 5.5 0.52%
Internet Explorer 6 46.82%
Internet Explorer 7 30.56%
Other Browsers 21.97%
2007年4月以降のデータをみると、Internet Explorer 6のシェアは40%台まで降下しています。
Windows版 Internet Explorer 6 : text-alignプロパティがテーブルやdivなどのブロックレベルの要素全体に有効となってしまうバグ bug
バグ「HTML作成時、text-align: center とすると、中身のブロックレベル要素まで中央寄せとなる」
がとても目立つようになりました。IE 6.0全盛のとき、このバグを意図的に利用したり、バグでないと誤解した方も多いと思います。
バグ回避のために、!DOCTYPE スイッチを下記のように【標準準拠モード】有効とする方法があります。有効に変更した後、ホームページのレイアウト全体を必ず確認することが大切です。
Internet Explorer 7, Firefox 2.0 1.5 1.0, Safariなどで閲覧すると、Internet Explorer 6とはブロック要素の位置が異なる(たとえば、中央寄せ・揃えとなっていない)原因は、
<center> </center>
<div align="center"> </div>
と同じように
<table style="text-align:center;">
と指定したためです。
text-alignプロパティは本来、テキストや画像などのインライン要素だけの水平方向を揃えるプロパティです。
よって、バグ bugのないバージョンのIEやブラウザ Firefoxでは、text-alignプロパティはブロック要素に影響(反映)しません。
ブロック要素全体の左右の余白を揃えるためには、marginプロパティを利用します。
たとえば、table(テーブル)の中のブロック要素を中央に揃えるとき、
<table style="margin-left: auto; margin-right: auto;">
となります。
参照ページ:
【HTMLタグの簡単検索】TAG index – Web制作情報
http://www.tagindex.com/
W3G – World Wide Web Guide
http://w3g.jp/css/box/margin
※ !DOCTYPE スイッチと【標準準拠モード】
無 効
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
[[確認中]] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
有 効
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
namazu – cron – pdf,doc,xls,ppt – $PATHと文書フィルタ
Xrea.comさんのサーバでは、
■ルール
http://www.xrea.com/?action=rules
●禁止事項
10. ウェブ目的以外で利用すること。データ・プログラムを格納するのみ、FTPでダウンロード・ファイル交換するのみ、CGIの実験など。
のとおり、WWWサーバを単なるファイルサーバの目的で使用することは固く禁止されています。
WWWサーバにアップロードしたhtml以外のファイル(たとえば、拡張子 xls, doc, ppt, pdf)も検索を行い、かつ http/httpsプロトコルでURLにアクセスし閲覧するために、NAMAZUを最大限に活用する方法 Tipsをお知らせします。
s***サーバでは、Xrea.comさんにNamazu全文検索サービスに対応した文書フィルターをいくつかインストールしていただきましたので、下記のメディアタイプの使用可能です。
重要 ⇒ メディアタイプ pdf, xls, doc, pptを cronジョブでmknmz する時、shellscript に$PATH 必須です!!!
[参照ページ]
「cronからmknmzを実行するとPDFのインデックスが更新されない」
http://www.namazu.org/ml/namazu-users-ja/msg03159.html
「cron からの場合 pdftotext が実行されない」
http://www.namazu.org/ml/namazu-users-ja/msg03167.html
解決方法
http://www.namazu.org/ml/namazu-users-ja/msg03167.html
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/root/bin
export PATH
この2行 ⇒ エンコードutf8で表示 txt
すべてのPATHが現サーバにマッチしているか?確認していませんが、
$PATHなし
@@ Unsupported media type application/msword
@@ Unsupported media type application/excel
@@ Unsupported media type application/pdf
@@ Unsupported media type application/powerpoint
$PATH行の追記後
@@ Using msword.pl
@@ Processing ms-word file … (using ‘/usr/local/bin/wvHtml’)
@@ Using excel.pl
@@ Processing ms-excel file … (using ‘/usr/local/bin/xlhtml’)
@@ Using pdf.pl
@@ Processing pdf file … (using ‘/usr/local/bin/pdftotext’)
@@ Using powerpoint.pl
@@ Processing powerpoint file … (using ‘/usr/local/bin/ppthtml’)
となり、indexingできるようになります。
また、ユーザー別の設定のため、 /virtual/ユーザーID/.mknmzrc を利用することもできます。
mknmzrcの設定ファイル
http://www.namazu.org/doc/manual.html#mknmzrc
の読込み順序2 となる
.mknmzrc
をホームディレクトリの最上位
/virtual/ユーザーID/ # (Xrea.comさんのサーバ)
/~ # 一般的に /チルダ(Tilde)
に置いて、設定します。
注) Webに公開できる最上位のディレクトリのことをドキュメントルート
⇒ /virtual/ユーザーID/public_html/ # (Xrea.comさんのサーバ)
と呼びますが、このディレクトリではありません。
SSH接続し、制限シェルを使って
エントリー「Restricted Shell SSH2 WinSCP puTTYgen」
http://www.osbsd.net/2005/01/restricted_shel.html
など参照して下さい。
shellコマンドにて
cp /usr/local/etc/namazu/mknmzrc-sample ~/.mknmzrc
を実行します。
編集前のサンプル[mknmzrc-sample] mknmzrc-sample.txtをダウンロード (エンコード utf8)
作成されたドットファイル .mknmzrc をテキストエディタで編集します。
[20-30行目あたり]
$HTML_SUFFIX = "html?|[ps]html|html\\.[a-z]{2}"; # 行頭のコメントアウトを解除する。
$ALLOW_FILE = ".*\\.(?:$HTML_SUFFIX)|.*\\.txt|.*\\.pdf|.*\\.doc|.*\\.xls|.*\\.ppt|.*\\.rtf|.*\\.odt|.*\\.ods|.*\\.odp"; # 許可するファイルを列記し、行頭のコメントアウトを解除する。
※ また、cronジョブで実行する mknmz のオプション設定とindexing用ログ作成は下記のとおりです(Xrea.comさんのサーバ例)。
/usr/local/bin/mknmz —verbose -a –use-chasen –indexing-lang=ja /virtual/ユーザ ID/public_html/検索対象ディレクトリ/ > /virtual/ユーザ ID/namazu/make_index.log
[s***サーバのnamazu稼動環境]
/virtual/ユーザーID/namazu$ mknmz -C
Loaded rcfile: /virtual/ユーザーID/.mknmzrc
System: linux
Namazu: 2.0.17
Perl: 5.008008
File-MMagic: 1.27
NKF: /usr/local/bin/nkf
KAKASI: /usr/local/bin/kakasi -ieuc -oeuc -w
ChaSen: /usr/local/bin/chasen -i e -j -F "%m "
情報の一部(数行)省略
Supported media types: (40)
Unsupported media types: (8) marked with minus (-) probably missing application in your $path.
application/excel: excel.pl
application/gnumeric: gnumeric.pl
application/ichitaro5: taro56.pl
application/ichitaro6: taro56.pl
- application/ichitaro7: taro7_10.pl
application/macbinary: macbinary.pl
application/msword: msword.pl
application/pdf: pdf.pl
- application/postscript: postscript.pl
application/powerpoint: powerpoint.pl
- application/rtf: rtf.pl
application/vnd.kde.kivio: koffice.pl
application/vnd.kde.kpresenter: koffice.pl
application/vnd.kde.kspread: koffice.pl
application/vnd.kde.kword: koffice.pl
application/vnd.oasis.opendocument.graphics: ooo.pl
application/vnd.oasis.opendocument.presentation: ooo.pl
application/vnd.oasis.opendocument.spreadsheet: ooo.pl
application/vnd.oasis.opendocument.text: ooo.pl
application/vnd.openxmlformats-officedocument.presentationml: msofficexml.pl
application/vnd.openxmlformats-officedocument.spreadsheetml: msofficexml.pl
application/vnd.openxmlformats-officedocument.wordprocessingml: msofficexml.pl
application/vnd.sun.xml.calc: ooo.pl
application/vnd.sun.xml.draw: ooo.pl
application/vnd.sun.xml.impress: ooo.pl
application/vnd.sun.xml.writer: ooo.pl
application/vnd.visio: visio.pl
application/x-apache-cache: apachecache.pl
application/x-bzip2: bzip2.pl
application/x-compress: compress.pl
- application/x-deb: deb.pl
- application/x-dvi: dvi.pl
application/x-gzip: gzip.pl
- application/x-js-taro: taro7_10.pl
application/x-rpm: rpm.pl
- application/x-tex: tex.pl
application/x-zip: zip.pl
- audio/mpeg: mp3.pl
message/news: mailnews.pl
message/rfc822: mailnews.pl
text/hnf: hnf.pl
text/html: html.pl
text/html; x-type=mhonarc: mhonarc.pl
text/html; x-type=pipermail: pipermail.pl
text/plain
text/plain; x-type=rfc: rfc.pl
text/x-hdml: hdml.pl
text/x-roff: man.pl
以上
uploader-ODF(odt,ods,odp)-browser-MIME type
OpenOffice.org 2.1で作成したOpenDocument Formatのファイル(拡張子 odt,odsなど)を、改変した KentWebさんのアップロード掲示板「ClipBoard v1.97」を用いてWWWサーバにアップロードしたところ、
.htaccess内にAddTypeディレクティブ(MIMEタイプ)を追記しても、
エントリー「OpenOffice.org 2.1とMIMEタイプ」
» http://www.osbsd.net/2007/04/openofficeorg_2_4663.html
下記のとおり、Webブラウザの種類・バージョンによって application/x-zip-compressedと誤って認識されることがわかりました。
IE 6.0は使用できず、他のブラウザ(Firefox の動作確認済)では正常作動します。
(また、IE 6.0, 7ともにブラウザ表示中に「名前を付けて保存」ができないようです。)
クライアントPC [OS/browser]
システム Microsoft Windows 2000 Service Pack 4 では、
Webブラウザ
Microsoft Internet Explorer 6.0 SP 1 ⇒ × 不可
Firefox 2 ⇒ ○ 可
システム Microsoft Windows XP Home Edition Service Pack 2 では、
Webブラウザ
Microsoft Internet Explorer 7 ⇒ ○ 可
【ClipBoard v1.97】
KentWebさんのアップロード掲示板 http://www.kent-web.com/
(例) 文書ドキュメント odt、表計算ドキュメント ods、プレゼンテーション odpをアップロードできるようにするための改変(改造)個所は以下のとおりです。
# (1) 200行あたり
$swf = 0; # SWFファイル
# 直下に3行追加
$odt = 1; # OOo ver2.1 ODTファイル
$ods = 1; # OOo ver2.1 ODSファイル
$odp = 1; # OOo ver2.1 ODPファイル
# (2) 610行あたり
if ($tail =~ /shockwave\-flash/i && $swf) { $tail=".swf"; $flag=1; }
# 直下に3行追加
if ($tail =~ /application\/vnd.oasis.opendocument.text/i && $odt) { $tail=".odt"; $flag=1; }
if ($tail =~ /application\/vnd.oasis.opendocument.spreadsheet/i && $ods) { $tail=".ods"; $flag=1; }
if ($tail =~ /application\/vnd.oasis.opendocument.presentation/i && $odp) { $tail=".odp"; $flag=1; }
# (3) 630行あたり
if ($fname =~ /\.swf$/i && $swf) { $tail=".swf"; $flag=1; }
# 直下に3行追加
if ($fname =~ /\.odt$/i && $odt) { $tail=".odt"; $flag=1; }
if ($fname =~ /\.ods$/i && $ods) { $tail=".ods"; $flag=1; }
if ($fname =~ /\.odp$/i && $odp) { $tail=".odp"; $flag=1; }
# 以上