How to add google search to your dnn site?
  retweet   

Since you can not use forms in DotNetNuke, a good way of achieving this is to use iFrame where you can place a html module in.

 

# Solution1:

 

by calabresi  from this post.

 

Create a .txt file with the code you get in adsense or Co-op, Im using Co-op and I ask to go results in search results page of my site, so...

 

.TXT file start:

<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
<!-- Google CSE Search Box Begins -->
  <form id="searchbox_003708503336895402913:pcj68nrrmcq" action="
http://www.visflux.dyndns.org/SearchResults/tabid/37/Default.aspx/">
    <input type="hidden" name="cx" value="003708503336895402913:pcj68nrrmcq" />
    <input type="hidden" name="cof" value="FORID:11" />
    <input name="q" type="text" size="30" />
    <input type="submit" name="sa" value="Search" />
  </form>
  <script type="text/javascript" src="
http://www.google.com/coop/cse/brand?form=searchbox_003708503336895402913%3Apcj68nrrmcq"></script>
<!-- Google CSE Search Box Ends -->
</td>
    </tr>
</table>

Then, create your iFrame module and go edit iFrame, the source is file, upload it and set it, adjust width heigth (mine is 240,65), no scroll, no border, and there you go, you can check on my site if you like.

 

#Solution 2:

 

From this post.

 

Use iFrame and put the following code into html module:

<form method="get" action="http://www.google.it/custom" target="google_window">
<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.gruppovoloolbia.it"></input>
<input type="text" name="q" size="31" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Cerca"></input>
</td></tr>
<tr>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked="checked"></input>
<font size="-1" color="#000000">Web</font>
</td>
<td>
<input type="radio" name="sitesearch" value="www.gruppovoloolbia.it"></input>
<font size="-1" color="#000000">www.gruppovoloolbia.it</font>
</td>
</tr>
</table>
<input type="hidden" name="client" value="pub-XXXXXXXXXXXXXXXX"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="1785095909"></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="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; FORID:1;"></input>
<input type="hidden" name="hl" value="it"></input>
</td></tr></table>
</form>

 


Posted in: DNN "How to..."

Comments

No comments so far. Be the first to post one.


Leave a comment

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

LatestArticles