...

View Full Version : Google CSE Help



unify
08-10-2012, 12:15 AM
So I have this search method, it simply uses google to search my website.
But i'd like to use my Google Custom Search Engine instead.

Here's my search engine unique id:
Search engine unique ID: 008729583548452524559:cxs7ncn4fyg

Here's my search engine code google gave me:


Paste this code in the page where you'd like the search box to appear


<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '008729583548452524559:cxs7ncn4fyg';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>

<!-- Place this tag where you want the search box to render -->
<gcse:searchbox-only></gcse:searchbox-only>


Paste this code on http://, where you'd like the search results to appear.


<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '008729583548452524559:cxs7ncn4fyg';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>

<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only></gcse:searchresults-only>



Can you guys help me implement it into the code below
VVVVV



<div class='menusearch'>
<div style='float:right;padding:12px 8px 0 0;'>
<form action='http://www.google.com/search' method='get' target='_blank'>
<input name='sitesearch' style='display:none;' value='http://www.pleasuresmine.net/'/>
<input id='search-box' name='q' onblur='if(this.value==&apos;&apos;)this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value=&apos;&apos;;' style='width:170px;border:none;padding:10px 10px; margin-right:5px; font:italic 12px Georgia;color:#b5b5b5; background:url(http://3.bp.blogspot.com/-q3Q6hWjYZUo/T94HN6VdhHI/AAAAAAAAG58/P-A9JP3CDY4/s1600/search_form.png) no-repeat;' type='text' value='Find your video...'/><input align='top' id='search-btn' src='http://2.bp.blogspot.com/-BmpnVNvHgs0/T94HNdsyt8I/AAAAAAAAG50/Jn2uw4OJOUk/s1600/search_btn.png' type='image' value='Search'/>
</form>
</div>
</div>
</div>



Here's my website if that helps:
pleasuresmine.net

If you try searching it searches a google CSE. I want it to search from my engine.
Thank you! Any help is apreciated.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum