Source for file htf_tlb_yahoo.phl
Documentation is available at htf_tlb_yahoo.phl
* @package HtmlTemplateFramework
* @author Yamauchi Shogo <htf@as-prj.com>
* @version $Id: htf_tlb_yahoo.phl ,v 1.0 $
require_once("htf_com_initialize.inc"); //共通初期処理
require_once("htf_tag_element.phl"); //エレメントクラス
* yahooの各種検索オプションを指定することにより、さまざまなyahoo検索タグを
* 生成するクラス。サイト内指定検索やファイルタイプ指定検索、言語指定指定などが可能。
* @author Yamauchi Shogo <htf@as-prj.com>
* yahoo検索エンジンの呼び出しURL。(デフォルトは、'http://search.yahoo.co.jp/bin/search')
* yahoo検索エンジンインターフェイス・入力エンコード。(デフォルトは空文字・指定なし)
* 'SJIS' 'euc-jp' 'UTF-8'等が指定可能なようです。
* yahoo検索エンジンインターフェイス・検索タイプ。(デフォルトは'ysvw'・いろいろサーチ)
* yahoo検索エンジンインターフェイス・ページ最終更新日。(デフォルトは空文字・指定なし)
* yahoo検索エンジンインターフェイス・検索対象サイト。(デフォルトは空文字・指定なし)
* 検索対象サイト・ドメインを指定する場合には、$frを'ysow'に指定し、$vdにURLを指定して下さい。<br>
* yahoo検索エンジンインターフェイス・指定ファイルタイプ。(デフォルトは空文字・指定なし)
* ppt→Microsoft PowerPoint<br>
* msword→Microsoft Word<br>
* yahoo検索エンジンインターフェイス・ゆれを含める/含めない。(デフォルトは空文字・指定なし)
* yahoo検索エンジンインターフェイス・対象とする国。(デフォルトは空文字・指定なし)
* countryformersovietunion→ロシア連邦<br>
* yahoo検索エンジンインターフェイス・言語を対象とする/しない。(デフォルトは空文字・指定なし)
* yahoo検索エンジンインターフェイス・対象とする言語指定。(デフォルトは空文字・指定なし)
* lang_zh-CN→中国語(簡体字)<br>
* lang_zh-TW→中国語(繁体字)<br>
* yahoo検索エンジンインターフェイス・出力件数指定。(デフォルトは空文字・指定なし)
* テキストボックスの長さ指定(デフォルトは空文字・指定なし)
* 結果を表示するウインドウ名指定(デフォルトは空文字・指定なし)
* 検索ボタンのラベル表示値(デフォルトは'Search')
* 引数の設定値からyahoo検索タグオブジェクトを生成します。
* @param string $textwidth 検索文字入力テキストボックスの長さ(デフォルトは空文字)
* @param string $strenc yahoo検索エンジンへの入力エンコード指定(デフォルトは空文字)
$searchform = $this->make_element_form($this->url, $this->target); //form
$input_ei = $this->make_element_input("ei", $this->ei); //ei
$input_fr = $this->make_element_input("fr", $this->fr); //fr
$input_vd = $this->make_element_input("vd", $this->vd); //vd
$input_vs = $this->make_element_input("vs", $this->vs); //vs
$input_vf = $this->make_element_input("vf", $this->vf); //vf
$input_yuragi = $this->make_element_input("yuragi", $this->yuragi); //yuragi
$input_vc = $this->make_element_input("vc", $this->vc); //vc
$input_fl = $this->make_element_input("fl", $this->fl); //fl
$input_vl = $this->make_element_input("vl", $this->vl); //vl
$input_n = $this->make_element_input("n", $this->n); //n
$inputtext = $this->make_element_inputtext("p", $this->width); //p(inputtext)
$submitbutton = $this->make_element_submitbutton($this->buttonlabel); //submitbutton
if (!is_null($input_ei)) { $searchform->add_content($input_ei); }
if (!is_null($input_fr)) { $searchform->add_content($input_fr); }
if (!is_null($input_vd)) { $searchform->add_content($input_vd); }
if (!is_null($input_vs)) { $searchform->add_content($input_vs); }
if (!is_null($input_vf)) { $searchform->add_content($input_vf); }
if (!is_null($input_yuragi)) { $searchform->add_content($input_yuragi); }
if (!is_null($input_vc)) { $searchform->add_content($input_vc); }
if (!is_null($input_fl)) { $searchform->add_content($input_fl); }
if (!is_null($input_vl)) { $searchform->add_content($input_vl); }
if (!is_null($input_n)) { $searchform->add_content($input_n); }
if (!is_null($inputtext)) { $searchform->add_content($inputtext); }
if (!is_null($submitbutton)) { $searchform->add_content($submitbutton); }
$strret = $searchform->get_htmltag();
$this->url= "http://search.yahoo.co.jp/bin/search";
* @return htf_tag_element
function make_element_form($url, $target) {
* input hiddenタグオブジェクトを生成します。
* @return htf_tag_element
function make_element_input($strname, $strvalue) {
* input textタグオブジェクトを生成します。
* @return htf_tag_element
function make_element_inputtext($namevalue, $widthvalue) {
* input submitタグオブジェクトを生成します。
* @return htf_tag_element
function make_element_submitbutton($labelstr) {
|