Calysto du Masque (calysto) wrote in component_help,
Calysto du Masque
calysto
component_help

  • Mood:
  • Music:

Google Search Component

This code creates a nifty little box for searching Google.



Google Search Component

  • Copy the following code into your customized theme layer inside a function (i.e. print_free_text() )
  • Do not paste it inside a print_comp_header().
  • This form will open the search results in a new window. If you do not want it to spawn a new window for the search results find and remove target="_blank" from the following code.
  • An example of this component can be seen on my journal, calysto




"""
    <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="http://www.livejournal.com/palimg/component/curve-top-left.gif/p0ffffff1b3b3b32e5e5e5" width="5" height="5" alt="" border="0" /></td>
	<td class="dkLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
	<td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-top-right.gif/p0ffffff1b3b3b32e5e5e5" width="5" height="5" alt="" border="0" /></td>
      </tr><tr>
	<td class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
      </tr><tr>
	<td class="tabBg"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
      </tr><tr>
	<td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
	<td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
	<td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
	<td class="tabBg" width="100%">
        <div align="center">
         <form action="http://google.com/search" method=get target="_blank">
          <b>Search <font color="blue">G</font><font color="red">o</font><font color="#EEEE00">o</font><font color="blue">g</font><font color="green">l</font><font color="red">e</font></b><br>
          <input type=text name=q size=10>
          <input type=submit value="Search" name="submit">
         </form>
        </div>
	<td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
	<td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
	<td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
      </tr><tr>
	<td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-bottom-left.gif/p0ffffff1b3b3b32e5e5e5" width="5" height="5" alt="" border="0" /></td>
	<td class="tabBg"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
	<td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-bottom-right.gif/p0ffffff1b3b3b32e5e5e5" width="5" height="5" alt="" border="0" /></td>
      </tr><tr>
	<td class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
      </tr><tr>
  	<td class="dkLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
       </tr>
      </table>
     </td></tr>
    <tr><td colspan=5><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
""";






Also, I'd like to thank xevinx for Component, and everyone here for their ideas and code bits. You all rawk :)
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 5 comments