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

A search component for LiveJournal's new "Search This Journal" feature

     This code creates a search box which clones LiveJournal's new "Search This Journal" feature, except that I used a drop-down box to determine "sort by", so that it would take up less space.

     You might need to add your journal to Feedster [here] before your journal is indexed. I'm not sure. As it is, searching when your journal hasn't been indexed results in you searching all of LiveJournal. That might be a feature or Feedster might simply have not gotten around to indexing everyone's journal yet. Once you add your LiveJournal to Feedster it takes 4 or 6 hours to be indexed. (I'm still waiting for mine to index)


    Important:
  • Find USERNAME in the following code and replace it with your username
  • 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().




"""
    <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://www.feedster.com/search.php' method='get' style='display:inline'>
        <input type='hidden' name="hl" value="en" /><input type='hidden' name="ie" value="UTF-8" /><input type='hidden' name="inrss" value="http://www.livejournal.com/users/USERNAME/data/rss/" />
         <table cellpadding='3'>
          <tr>
           <td align='center' colspan="2">
            <b>Search My Journal</b><br>
            <input maxlength='256' size='15' name='q' value='' />
           </td>
           </tr>
           <tr>
           <td align='right'><b>Sort:</b></td>
           <td align='left'>
          <div>
           <select id='type' name='sort'>
            <option value='date'  selected='selected'>Date</option>
            <option value='relevance' >Relevance</option>
            <option value='blogrank' >BlogRank</option>
           </select><br>
          </div>
         </td>
        </tr>
        <tr>
         <td align='center' colspan="2"><input type='submit' value='Search' name='btnG' /></td>
        </tr>
        </table>
        </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></tr>
""";




Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments