Joomler!.net - Decided on Joomla!

デル株式会社

Wiki or Wordpress? No it is JContentPlus.

Home » Blog » The script only fixes images
0 votes
Written by:Joomler! 5423 hits Saturday, 01 March 2008 21:49

test-trans

以前からどこかの記事を見て知っていたのですが使っていませんでしたが、今回ふと思い立ち使ってみました。

はじめは、ヘッドタグに書き込むだけで良いのかと思っていたら

The script only fixes images named: *-trans.png

と書かれています。どうもファイル名に-transがついていないと何もしないようですね。

http://code.google.com/p/ie7-js/

そこで

  1. #__contentテーブルだけをphpMyAdminからDROP TABLEとIF NOT EXISTSオプションを追加して(他はデフォルトのまま)エクスポート。
  2. テキストエディタで1のsqlファイルを開き正規表現の置き換えで以下のように指定し、pngファイルを指定しているすべてを置き換えた。

    検索する文字列 (src="/[^"]*)(\.png")

    置き換え後の文字列 \1-trans\2
  3. サーバーのイメージの保存場所から全てのイメージをダウンロードし、これまたファイル名を正規表現で置き換えます。
    現在の名前.png を 現在の名前-trans.pngに置き換える。
  4. 全てのイメージをサーバーにアップロードします。
    (万一のリンク切れが発生しないように以前のイメージはそのまま残るようにしています。)
  5. テンプレートのindex.phpまたは、CustomHeadTagプラグインを使っているなら以下をヘッドタグに追加します。(IE8.jsを使うならIE7.jsを指定する必要はないようです。)
    <!--[if lt IE 8]>
    <script src="http://あなたのサイトのJSまでのURL/IE8.js" type="text/javascript"></script>
    <![endif]-->
  6. 完了

いかがでしょう右上にPNGを貼り付けてみましたが・・・・。

オチがありました。

 

JContentPlus for Joomla!1.5 powered by Joomler!.net

デル株式会社
joomler.net is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla!(R) name is used under a limited license from Open Source Matters in the United States and other countries.
joomler.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.