Google Adsense Search

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
collect_garbage

Google Adsense Search

Post by collect_garbage »

Hi,

I would like to put Google Adsense for search in my site using CMS Made Simple. However, I cannot figure out how to make the look so that when I hit search button, the original window content will be gone and only showing the search result. It happens now so that the search push the original content down below. I want so that the original content erased from the scree and only the search engine result seen.

Anyone can help me?

Thank you so much
Pierre M.

Re: Google Adsense Search

Post by Pierre M. »

Hello,

I'm confused :
Do you want to include AdSense ads inside your site ?
Do you want to skip CMSms internal search to use Google instead ?
Or do you want to do something else I have understood ?

For the first need, please see http://wiki.cmsmadesimple.org/index.php ... le_adsense and tune your templates.
For the second one, if you don't want to use pisearch, see the homepage of the w3.org (search square on the right).

PM
abhija

Re: Google Adsense Search

Post by abhija »

Pierre,
I tried to make Custom Module of the name google_adsense and pasted google javascript code in the code and submitted. It says invalid code...Please give me the example how or in what way to paste the code
thanks.

i want to replace the default search module with google adsense search.
thanks
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Google Adsense Search

Post by RonnyK »

Hello,

an answer from Cyberman in the other support-area.

http://forum.cmsmadesimple.org/index.ph ... l#msg52381


Ronny
Last edited by RonnyK on Fri Mar 02, 2007 12:31 pm, edited 1 time in total.
abhija

Re: Google Adsense Search

Post by abhija »

Still NO LUCK:-)

Ronny, I named the cutom module as gl_search and pasted the following gogle adsense search code in {literal} and {/literal}
and hit submit.
It still says INVALID CODE!

Replacing {search} with {google_search} works, but that's not my adsense code.
please guide me.
thanks.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Google Adsense Search

Post by RonnyK »

abhija,

can you post your code, to see what it shows.

Ronny
abhija

Re: Google Adsense Search

Post by abhija »

Ronny herez the google adsense search code:-










Enter your search terms

Submit search form



 





Web


www.xyz.com










RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Google Adsense Search

Post by RonnyK »

You can solve it by defiining a "global content block" using "Content -> Global Content Blocks", put your entire code in the block and give it a name.

Call the gcb then by the following code, on the place you want it in the template.

{global_content name='NAME-OF-CHOICE'}

Ronny
abhija

Re: Google Adsense Search

Post by abhija »

Thanks, Ronny! It worked:-)

Plz have a look at http://www.abhijitsplanet.com/

But, now the dotted line under the search box is disturbed, and I dunno how to get it back to normal. Can you suggest a solution?
thanks for yr help:-)
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Google Adsense Search

Post by RonnyK »

That's because you need a lot of more height. If you call the GCB on a regular page (adding content), you'll see that below the search-box there are radio-buttons asking what engine must be used. Google or your site.

If you want the search-box over there you'll have to lower the dotted-line, otherwise you'll have to put the search-box else where.

I'll check where the poistion of the dotted-line is set.

You'll might try switching the

Code: Select all

<hr class="accessibility" />
from the breadcrumb-div to the search-div in your template.

Ronny
Last edited by RonnyK on Fri Mar 02, 2007 4:16 pm, edited 1 time in total.
abhija

Re: Google Adsense Search

Post by abhija »

Thanks Ronnie! I already reduced the height of the block, and now it looks good:-)
Thanks for guiding me:-)
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Google Adsense Search

Post by RonnyK »

abhija,

I think you still miss a part of the google search. If you call your GCB as content on a new page, you'll see what I mean. In the form you can choose if you want to search google or within your site. You're missing those buttons right now. Or do you mean with the change you made, you deleted those options and now only search google?

Ronny
abhija

Re: Google Adsense Search

Post by abhija »

Ronny,
Thanks for your keen interest in solving my problem.

Yes, I purposly deleted domain site search, for it added an extra height to the serch box table if included. But I'll do add it in future. At present I have kept it only for google search.

Thanks again for your help.
Abhijit
Locked

Return to “CMSMS Core”