kunzite (kunzite1) wrote in component_help,
kunzite
kunzite1
component_help

wikipedia search v2.0

k1-ified version of this.
###################################
#         WIKIPEDIA SEARCH        #
# kunzite1, component-help/647226 #
# add to print_free_text(Page p)  #
###################################
# heading
var string yhWwiki         = """<span style="font-weight: bold;">Search <span style="color: #79b7e7;">Wikipedia</span></span>""";
# search button text
var string yhWsearch       = "Search";

var Color  yhWheader       = $*header_bgcolor;
var Color  yhWheaderMinus5 = $yhWheader->darker(50);
var Color  yhWheaderPlus3  = $yhWheader->lighter(30);
var string yhWcorner_color = "/p0"+$yhWheaderPlus3->substr(1,6)+"1"+$yhWheaderMinus5->substr(1,6)+"2"+$yhWheader->substr(1,6);
"""
<tr>
  <td colspan="7">
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
      <tr>
        <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-top-left.gif$yhWcorner_color" width="5" height="5" alt="" border="0" /></td>
        <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
        <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-top-right.gif$yhWcorner_color" width="5" height="5" alt="" border="0" /></td>
      </tr>
      <tr>
        <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
      </tr>
      <tr>
        <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
      </tr>
      <tr>
        <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
        <td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
        <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
        <td class="tabBg" width="100%">
          <div align="center">
            <div id="p-search" class="portlet">
              $yhWwiki
              <div class="pBody">
                <form name="searchform" id="searchform" action="http://www.wikipedia.org/search-redirect.php" id="searchform">
                  <input id="searchInput" name="search" size ="10" type="text" accesskey="f" value="" />
                  <select name="language">
                    <option value="de">Deutsch</option>
                    <option value="en" selected="selected">English</option>
                    <option value="es">Español</option>
                    <option value="fr">Français</option>
                    <option value="it">Italiano</option>
                    <option value="ja">日本語</option>
                    <option value="nl">Nederlands</option>
                    <option value="pl">Polski</option>
                    <option value="pt">Português</option>
                    <option value="sv">Svenska</option>
                  </select>
                  <br />
                  <input type='submit' name="go" class="searchButton" id="searchGoButton" value="$yhWsearch" />
                  <input type="hidden" name="go" value="Go" />
                </form>
              </div>
            </div>
          </div>
        </td>
        <td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
        <td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
        <td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
      </tr>
      <tr>
        <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-bottom-left.gif$yhWcorner_color" width="5" height="5" alt="" border="0" /></td>
        <td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
        <td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-bottom-right.gif$yhWcorner_color" width="5" height="5" alt="" border="0" /></td>
      </tr>
      <tr>
        <td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
      </tr>
      <tr>
        <td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td colspan="5"><img src="$*PALIMGROOT/component/clear.gif " width="1" height="3" alt="" border="0" /></td>
</tr>
""";
###################################
Tags: !tutorial, *account level: paid/perm, function: print_free_text, user: kunzite1
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic
  • 14 comments