検索結果のキーワードテキストをハイライト表示したいけど作るの面倒くさいなあ、と思って検索したら『modifier.google_highlight』というSmarty Pluginが公開されてたので使ってみました。 http://smarty.incutio.com/?page=modifier.google_highlight すげー簡単にやりたいことを実現できて感動。 $contentsに本文のテキストが詰まっていて、$keywordは検索文字列。 $keyworldの中身は、キーワードとキーワードが半角スペースでつながっている。 Counter-Strike ニュース Steam Sourceで、tplで下みたいなカンジで指定するとハイライト表示されました。 デフォルトだと8キーワードまで対応しているみたい。 増やしたければもちろん自分で追加できます。 {$contents|goog