- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 44 guest(s) and 1 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Google search box block, need help [ ]
Author
Message
EarthAngel
Sergeant
Joined: Sep 05, 2004
Posts: 87
Location: Denmark
Posted:
Tue Aug 22, 2006 1:01 pm
Hi everyone,
I need the following code into a google search box (with adwords)... Can you guys help me?
Code:
<!-- Search Google -->
<center>
<form method="get" action="http://www.google.dk/custom" target="google_window">
<table 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="text" name="q" size="15" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Søg"></input>
<input type="hidden" name="client" value="pub-1420901654446160"></input>
<input type="hidden" name="forid" value="1"></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:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:186;L:http://www.XXX.COM/XXX.jpg;S:http://www.singlemom.dk;FORID:1"></input>
<input type="hidden" name="hl" value="da"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->
Thanks
arnoldkrg
Major
Joined: Aug 03, 2003
Posts: 936
Location: United Kingdom
Posted:
Tue Aug 22, 2006 2:06 pm
Code:
<?php
if (eregi("block-SearchGoogle.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
}
$content = "";
$stuff = <<< End_Stuff
<!-- Search Google -->
<center>
<form method="get" action="http://www.google.dk/custom" target="google_window">
<table 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="text" name="q" size="15" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Søg"></input>
<input type="hidden" name="client" value="pub-1420901654446160"></input>
<input type="hidden" name="forid" value="1"></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:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:186;L:http://www.XXX.COM/XXX.jpg;S:http://www.singlemom.dk;FORID:1"></input>
<input type="hidden" name="hl" value="da"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->
End_Stuff;
$content .= $stuff;
?>
Save as block-SearchGoogle.php and upload to the blocks directory of your site. Go to admin.php .... blocks and create the block by scrolling down and giving it a Title then select SearchGoogle from the dropdown filename menu. click create.
_________________
EarthAngel
Sergeant
Joined: Sep 05, 2004
Posts: 87
Location: Denmark
Posted:
Wed Aug 23, 2006 10:22 am
Agh, it didn't work... Syntax error on line 8 ??
arnoldkrg
Major
Joined: Aug 03, 2003
Posts: 936
Location: United Kingdom
Posted:
Thu Aug 24, 2006 2:16 am
Works perfectly on my Patched Nuke 7.9 site.
Its a Danish search.
_________________
EarthAngel
Sergeant
Joined: Sep 05, 2004
Posts: 87
Location: Denmark
Posted:
Thu Aug 24, 2006 4:13 am
Yeah, I'm from Denmark
I'm running phpnuke 7.1 - could that be the reason?
Perhaps you can try and send me the php file through email? mortilen@ofir.dk
chris-au
Elite Nuker
Joined: Jan 31, 2003
Posts: 717
Posted:
Tue Sep 05, 2006 11:58 pm
DId you have the following correct?
$content = "";
_________________Chris
arnoldkrg
Major
Joined: Aug 03, 2003
Posts: 936
Location: United Kingdom
Posted:
Wed Sep 06, 2006 4:46 am
Also make sure you use a decent text editor. Do not use notepad or wordpad.
I cant remember if I sent you this or not. If I didnt then please remind me.
_________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum