Log in

View Full Version : Google Custom Search, how to add here please?


raiderlax
06-26-2007, 04:06 PM
Hey guys I'm looking to add the google search engine to my forum, I need to put in the place where I have the arrows in the uploaded picture. I have the search engine code, I just don't know where to put it.

Here's my header code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" style="background-image:url($stylevar[imgdir_misc]/header_bg.gif)">
<tr>
<td><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/logo1.jpg" border="0" alt="" /></a></td>
<td><img src="$stylevar[imgdir_misc]/header_bg.gif" border="0" alt="" /></td>
<td width="100%"><img src="$stylevar[imgdir_misc]/header_bg.gif" border="0" alt="" /></td>
<td><img src="$stylevar[imgdir_misc]/logo4_7.gif" border="0" alt="" /></td>
</tr>
</table>
<!-- /logo -->



<!-- Fading Buttons -->
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" style="background-image:url($stylevar[imgdir_misc]/nav_bg.gif)">


<tr>
<!-- Register --><if condition="$show['registerbutton']"><td width="59"><!-- *** Start Register *** --><table width="59" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/register.gif);"><a href="register.php$session[sessionurl_q]" rel="nofollow"
onmouseover="JSFX.fadeIn('register')"
onmouseout="JSFX.fadeOut('register')"><img
src="$stylevar[imgdir_misc]/register.gif" name="register" width="59" height="34" border="0" class="imgFader" id="register" alt="" /></a></td>
</tr>
</table></td>

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>
</if><!-- /Register -->





<!-- UserCP --><if condition="$show['member']"><td width="56"><table width="56" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/usercp.gif);"><a href="usercp.php$session[sessionurl_q]"
onmouseover="JSFX.fadeIn('usercp')"
onmouseout="JSFX.fadeOut('usercp')"><img
src="$stylevar[imgdir_misc]/usercp.gif" name="usercp" width="56" height="34" border="0" class="imgFader" id="usercp" alt="" /></a></td>
</tr>
</table></td>

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>

</if><!-- /UserCp -->
$template_hook[navbar_buttons_left]
<!-- FAQ --><td width="33"><table width="33" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/faq.gif);"><a href="faq.php$session[sessionurl_q]" accesskey="5"
onmouseover="JSFX.fadeIn('faq')"
onmouseout="JSFX.fadeOut('faq')"><img
src="$stylevar[imgdir_misc]/faq.gif" name="faq" width="33" height="34" border="0" class="imgFader" id="faq" alt="" /></a></td>
</tr>
</table></td><!-- /FAQ -->

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>

<!-- Members --><td width="58"><table width="58" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/members.gif);"><a href="memberlist.php$session[sessionurl_q]"
onmouseover="JSFX.fadeIn('members')"
onmouseout="JSFX.fadeOut('members')"><img
src="$stylevar[imgdir_misc]/members.gif" name="members" width="58" height="34" border="0" class="imgFader" id="members" alt="" /></a></td>
</tr>
</table></td><!-- /Members -->

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>

<!-- Calendar --><td width="59"><table width="59" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/calender.gif);"><a href="calendar.php$session[sessionurl_q]"
onmouseover="JSFX.fadeIn('calendar')"
onmouseout="JSFX.fadeOut('calendar')"><img
src="$stylevar[imgdir_misc]/calender.gif" name="calendar" width="59" height="34" border="0" class="imgFader" id="calendar" alt="" /></a></td>
</tr>
</table></td><!-- /Calendar -->

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>

<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">

<!-- New Posts --><td width="58"><table width="58" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/new_posts.gif);"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2"
onmouseover="JSFX.fadeIn('new')"
onmouseout="JSFX.fadeOut('new')"><img
src="$stylevar[imgdir_misc]/new_posts.gif" name="new" width="58" height="34" border="0" class="imgFader" id="new" alt="" /></a></td>
</tr>
</table></td>

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>
<!-- /New Posts -->
<else />
<!-- Daily --><td width="67"><table width="67" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/daily.gif);"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2"
onmouseover="JSFX.fadeIn('daily')"
onmouseout="JSFX.fadeOut('daily')"><img
src="$stylevar[imgdir_misc]/daily.gif" name="daily" width="67" height="34" border="0" class="imgFader" id="daily" alt="" /></a></td>
</tr>
</table></td><!-- /Daily -->

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>
</if>



<!-- Search --><td width="51"><table width="51" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/search.gif);" id="navbar_search"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow"
onmouseover="JSFX.fadeIn('search')"
onmouseout="JSFX.fadeOut('search')"><img
src="$stylevar[imgdir_misc]/search.gif" name="search" width="51" height="34" border="0" class="imgFader" id="search" alt="" /></a><if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search", 1); </script></if></td>
</tr>
</table></td>
<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>
</if><!-- /Search -->


<!-- Quick Links --><if condition="$show['member']"><td width="58"><table width="58" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/quicklinks.gif);" id="usercptools"><a href="$show[nojs_link]#usercptools"
onmouseover="JSFX.fadeIn('links')"
onmouseout="JSFX.fadeOut('links')"><img
src="$stylevar[imgdir_misc]/quicklinks.gif" name="links" width="58" height="34" border="0" class="imgFader" id="links" alt="" /></a><script type="text/javascript"> vbmenu_register("usercptools", 1); </script></td>
</tr>
</table></td>

<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>

</if><!-- /Quick Links -->


<!-- Articles Button --><td width="58"><table width="58" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/articles.gif);"><a href="http://talkfitness.org/articles-faqs/" accesskey="5"
onmouseover="JSFX.fadeIn('articles')"
onmouseout="JSFX.fadeOut('articles')"><img
src="$stylevar[imgdir_misc]/articles.gif" name="articles" width="58" height="34" border="0" class="imgFader" id="articles" alt="" /></a></td>
</tr>
</table></td>
<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td><!-- /Articles Button -->

<!-- Gallery Button --><td width="67"><table width="67" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/gallery.gif);"><a href="http://talkfitness.org/photo-gallery/" accesskey="5"
onmouseover="JSFX.fadeIn('gallery')"
onmouseout="JSFX.fadeOut('gallery')"><img
src="$stylevar[imgdir_misc]/gallery.gif" name="gallery" width="67" height="34" border="0" class="imgFader" id="gallery" alt="" /></a></td>
</tr>
</table></td>
<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td><!-- /Gallery Button -->


</if>

$template_hook[navbar_buttons_right]

<!-- Log Out --><if condition="$show['member']"><td width="43"><table width="43" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background:#FFFFFF url($stylevar[imgdir_misc]/logout.gif);"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"
onmouseover="JSFX.fadeIn('logout')"
onmouseout="JSFX.fadeOut('logout')"><img
src="$stylevar[imgdir_misc]/logout.gif" name="logout" width="43" height="34" border="0" class="imgFader" id="logout" alt="" /></a></td>
</tr>
</table></td>
<td width="2"><img src="$stylevar[imgdir_misc]/navspace.gif" width="2" height="34" border="0" alt="" /></td>
</if><!-- /Log Out -->



<td width="100%" align="right" style="background:#FFFFFF url($stylevar[imgdir_misc]/nav_bg.gif);"><img src="$stylevar[imgdir_misc]/nav_bg.gif" border="0" alt="" /></td>
</tr>

</table>
<!-- /Fading Buttons -->

<table border="0" width="$stylevar[outertablewidth]" cellpadding="10" cellspacing="0" style="background-color:#ffffff; background-image:url($stylevar[imgdir_misc]/page_bg.gif); background-repeat: repeat-x;" align="center">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color:#ffffff;">
<tr>
<td width="12" align="left" valign="top"><img src="$stylevar[imgdir_misc]/top_left_table.gif" width="19" height="19" alt="" /></td>
<td width="100%" align="left" valign="top"><img src="$stylevar[imgdir_misc]/top_pix_table.gif" width="100%" height="19" alt="" /></td>
<td width="12" align="left" valign="top"><img src="$stylevar[imgdir_misc]/top_right_table.gif" width="19" height="19" alt="" /></td>
</tr>
</table>
<!-- content table -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="19" style="background-image:url($stylevar[imgdir_misc]/left_table.gif);"><img src="$stylevar[imgdir_misc]/left_table.gif" border="0" alt="" /></td>
<td width="100%" style="background-color: #FFFFFF;">
<!-- content table -->
$spacer_open

$_phpinclude_output

Now where would I put the search engine code?


Thanks so much, the help is GREATLY appreciated

dm_fan
06-26-2007, 06:41 PM
It seems to me that this is the spot you want to add your search engine code.


</if><!-- /Log Out -->



<td width="100%" align="right" style="background:#FFFFFF url($stylevar[imgdir_misc]/nav_bg.gif);"><img src="$stylevar[imgdir_misc]/nav_bg.gif" border="0" alt="" /></td>

<td width="100%" align="right" style="background:#FFFFFF url($stylevar[imgdir_misc]/nav_bg.gif);">ADD THIS NEW TABLE DATA FIELD AND PUT YOUR GOOGLE SEARCH ENGINE CODE HERE</td>

</tr>

</table>
<!-- /Fading Buttons -->

raiderlax
06-27-2007, 02:50 AM
HI, thanks alot for helping me with this,

when I put in that code it comes up with , see the attached pic.

raiderlax
06-27-2007, 06:18 PM
???

tobybird
06-27-2007, 06:31 PM
remove the break after the text box and before the button. that should correct the layout issue.

dm_fan
06-27-2007, 08:03 PM
Toby's right, that should keep it all on one line.

You can also set a width for that table data field. (ie, where it says <td width="100%"... change it to <td width="250"... or a larger number that will fit the text field and submit button on one line)

Steve

raiderlax
06-28-2007, 06:56 AM
Well I've got this and can't find any break:




</if><!-- /Log Out -->



<td width="100%" align="right" style="background:#FFFFFF url($stylevar[imgdir_misc]/nav_bg.gif);"><img src="$stylevar[imgdir_misc]/nav_bg.gif" border="0" alt="" /></td>


<td width="250%" align="right" style="background:#FFFFFF url($stylevar[imgdir_misc]/nav_bg.gif);"><!-- Google CSE Search Box Begins -->
<form id="searchbox_0030000000000000000119:p2rgkon0ggc" action="http://www.google.com/cse">
<input type="hidden" name="cx" value="0035994599477599475959947799477gc" />
<input type="hidden" name="cof" value="FORID:1" />
<input name="q" type="text" size="40" />
<input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_0035086000ggc"></script>
<!-- Google CSE Search Box Ends -->
</td>

</tr>


</table>
<!-- /Fading Buttons -->



Okay LOL I got it working, thank you everyone for helping I appreciate it,

the problem was that:

I needed to take out the

<td width="100%" align="right" style="background:#FFFFFF url($stylevar[imgdir_misc]/nav_bg.gif);"><img src="$stylevar[imgdir_misc]/nav_bg.gif" border="0" alt="" /></td>before the

<td width="250%" align="right" style="background:#FFFFFF url($stylevar[imgdir_misc]/nav_bg.gif);"><!-- Google CSE Search Box Begins -->
<form id="searchbox_0030000000000000000119:p2rgkon0ggc" action="http://www.google.com/cse">
<input type="hidden" name="cx" value="0035994599477599475959947799477gc" />
<input type="hidden" name="cof" value="FORID:1" />
<input name="q" type="text" size="40" />
<input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_0035086000ggc"></script>
<!-- Google CSE Search Box Ends -->
</td>
cause it was creating double of the /nav_bg.gif image




HOW DOES IT LOOK ON MY FORUM??? SHOULD I LEAVE IT ON???