[pmwiki-users] Answers Directives

Rene Visco rvisco at csdr-cde.ca.gov
Mon Oct 24 14:31:42 CDT 2005


Hello,

I love directives!  I think there should be an updated page about
directives.  I attempted to create a "Answers.com" directive which I think
is useful for educational settings.

Here's the code from Answers.com webmaster tools:

<!-- Start www.Answers.com Answers Box --> <div id="squareBox"
style="width:115px;background-color:white;text-align:center;border:1px solid
#003399;"><form action="http://www.answers.com/main/ntquery"  method="get"
accept-charset="UTF-8" style="display:inline;" onsubmit="return
document.getElementById('answers_s').value != '';"><a
href="http://www.answers.com" target="_blank"><img border="0"
src="http://www.answers.com/main/images/answers_small2.gif"
style="width:105px;height:21px;vertical-align:top;"  alt="Online dictionary
at www.Answers.com"/></a><br/><span
style="padding-top:0px;margin-top:0px;color:#003399;font-family: Trebuchet
MS;font-size:8pt;"><a href="http://www.answers.com"
style="text-decoration:none;color:#003399;" target="_blank">Answers, not
links</a></span><input type="hidden" name="initiator" id="initiator"
value="12" /><input type="hidden" name="afid" value="6051" /><input
type="text" id="answers_s" name="s" size="16" maxlength="80"
style="width:100px;margin-bottom:2px;" /><br/><input type="submit"
style="width:108px;font-size:9pt;padding:3px 0px 3px 0px;" value=" Tell me
about... " /></form></div> <!-- End www.Answers.com Answers Box -->

I just tried to hack Google Search directive into Answers directive.  I'm
almost there..but again, I'm no PHP guru.

Markup('answers', 'directives', '/\\(:answers:\\)/e',"Keep(\"
<FORM method=GET action='http://www.answers.com/main/ntquery'
target='_blank'>
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE bgcolor='#f7f7f7'><tr><td>
<A HREF='http://www.answers.com'>
<center>
<IMG SRC='http://www.answers.com/main/images/answers_small2.gif'
border='0' ALT='Online dictionary at www.Answers.com' align='absmiddle'></A>
<INPUT TYPE=text name=q size=25 maxlength=255 value=''>
<INPUT type=submit name=btnG VALUE='Tell Me About....'>
</td></tr></TABLE>
</FORM>
\")");

When I submitted, I was directed to a page in Answers.com saying that
there's no search for Google.  It appears that I need to include javascript
code to enable Answers.com to search for what I submitted.

Any help is much appreciated!

Rene V. 





More information about the pmwiki-users mailing list