Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
Welcome to AspAdvice Sign in | Join | Help

Re: Have any tips for implementing Google AdSense ads on VineType?

  •  12-06-2007, 8:46 PM

    Re: Have any tips for implementing Google AdSense ads on VineType?

    Carl

    I just wanted to bring you up to speed on something I'm doing with Google AdSense (AdWords) and see if you have any tips.

    Google AdSense offers a way to let readers search from a form on the blog, and then see their (ad enabled) search results embedded in the blog on a search results page.

    I have the Search Results page up and working. To check out a simulated "test" search, visit the URL I sent you by email. Please only click it once for test purposes. (Due to my commitment to Google to not encourage clicking for dollars.)

    Please note: Google's minimum allowed width for the I-frame that displays the results, is 500 pixels. I wanted to have my left and right nav bars showing with the search results, so I had to tweak the template to make the middle column 500 pixels wide. Whew. I had to fiddle with the CSS and the XHTML file quite a bit, but I got there. Looks good now. I like it.

    However, I can't seem to get the Google search form into the template without an XML error! Below is the code from Google that I need to somehow embed in the XHTML file, and below that is the VineType error message that gets thrown, and the site breaks. :-)

    I can't seem to get the Google search form into the template without an XML error! Below is the code from Google that I need to somehow embed in the XHTML file, and below that is the VineType error message that gets thrown, and the site breaks. :-)

    Do you have any tips or advice on how I could tweak things to get this working? Thanks if you can help!

    -Doug

     

    GOOGLE CODE TO MAKE SEARCH BOX APPEAR:

    <!-- SiteSearch Google -->

    <form method="get" action="http://www.dougjoseph.net/default.aspx?section=search_results" target="_top">

    <table border="0" bgcolor="#ffffff">

    <tr><td nowrap="nowrap" valign="top" align="left" height="32">

    <a href="http://www.google.com/">

    <img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>

    <br/>

    <input type="hidden" name="domains" value="www.dougjoseph.net"></input>

    <label for="sbi" style='display: none'>Enter your search terms</label>

    <input type="text" name="q" size="16" maxlength="255" value="" id="sbi"></input>

    <label for="sbb" style='display: none'>Submit search form</label>

    <input type="submit" name="sa" value="Search" id="sbb"></input>

    </td></tr>

    <tr>

    <td nowrap="nowrap">

    <table>

    <tr>

    <td>

    <input type="radio" name="sitesearch" value="" checked id="ss0"></input>

    <label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>

    <td>

    <input type="radio" name="sitesearch" value="www.dougjoseph.net" id="ss1"></input>

    <label for="ss1" title="Search www.dougjoseph.net"><font size="-1" color="#000000">www.dougjoseph.net</font></label></td>

    </tr>

    </table>

    <input type="hidden" name="client" value="pub-8833546113954977"></input>

    <input type="hidden" name="forid" value="1"></input>

    <input type="hidden" name="channel" value="2785937243"></input>

    <input type="hidden" name="ie" value="ISO-8859-1"></input>

    <input type="hidden" name="oe" value="ISO-8859-1"></input>

    <input type="hidden" name="safe" value="active"></input>

    <input type="hidden" name="flav" value="0000"></input>

    <input type="hidden" name="sig" value="jJwiVR3UsKUml1bm"></input>

    <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:230;L:http://www.dougjoseph.net/images/logo/dougjoseph.net-logo_460x100.jpg;S:http://www.dougjoseph.net;FORID:11"></input>

    <input type="hidden" name="hl" value="en"></input>

    </td></tr></table>

    </form>

    <!-- SiteSearch Google -->

     

    WHICH CAUSES THIS XHTML ERROR IN VINETYPE:


    Spry dove lands on wire,
    Tilts, falls, dies on impact.
    She too, lacked balance.

    Template file is not well formed XML or contains invalid characters.
    D:\wwwroot\dougjoseph.net\(vinetype_directory)\default.html

    System.Xml.XmlException: 'id' is an unexpected token. The expected token is '='. Line 44, position 56. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.Load(String filename) at e.o(String A_0)

    Unhandled Exception: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at e.d(String A_0, String A_1) at e.o(String A_0) at e.a(DataView A_0, String A_1, Boolean A_2, Boolean A_3) at e.a(String A_0, Boolean A_1, Boolean A_2) at e.a(Object A_0, EventArgs A_1)

    </tr>

    </table>

    <input type="hidden" name="client" value="pub-8833546113954977"></input>

    <input type="hidden" name="forid" value="1"></input>

    <input type="hidden" name="channel" value="2785937243"></input>

    <input type="hidden" name="ie" value="ISO-8859-1"></input>

    <input type="hidden" name="oe" value="ISO-8859-1"></input>

    <input type="hidden" name="safe" value="active"></input>

    <input type="hidden" name="flav" value="0000"></input>

    <input type="hidden" name="sig" value="jJwiVR3UsKUml1bm"></input>

    <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:230;L:http://www.dougjoseph.net/images/logo/dougjoseph.net-logo_460x100.jpg;S:http://www.dougjoseph.net;FORID:11"></input>

    <input type="hidden" name="hl" value="en"></input>

    </td></tr></table>

    </form>

    <!-- SiteSearch Google -->

     

    WHICH CAUSES THIS XHTML ERROR IN VINETYPE:


    Spry dove lands on wire,
    Tilts, falls, dies on impact.
    She too, lacked balance.

    Template file is not well formed XML or contains invalid characters.
    D:\wwwroot\dougjoseph.net\(vinetype_directory)\default.html

    System.Xml.XmlException: 'id' is an unexpected token. The expected token is '='. Line 44, position 56. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.Load(String filename) at e.o(String A_0)

    Unhandled Exception: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at e.d(String A_0, String A_1) at e.o(String A_0) at e.a(DataView A_0, String A_1, Boolean A_2, Boolean A_3) at e.a(String A_0, Boolean A_1, Boolean A_2) at e.a(Object A_0, EventArgs A_1)


    Sincerely,
    Doug Joseph
View Complete Thread