Google: Adsense for Search and Custom Search Integration Version 1.2 - RC2!

Started by ɔɔɔɔɔɔuɥoɾ, October 15, 2009, 05:00:34 AM

Previous topic - Next topic

ɔɔɔɔɔɔuɥoɾ

Link to Mod

Google: Adsense for Search and Custom Search Integration - JohnCcCcCc

This mod allows the Google "Adsense for Search" and "Custom Search" features to be added easily with no coding at all on your part.

This mod will ad the Google search on the top of every page (if you choose that option), if you have a portal mod installed you can use a portal block to put the search box where ever you want.

First off, Install this mod, after installing this mod, there will be no changes that are visible to you on your forum yet.

This mod makes everything simple for you, once you set up your ad at Google's site, choose the option which says "view search results in my own site" or "Host results on my website using an iframe".

You will then have 2 sets of code to use.
Forget the second code, you will only need the 1st code, "Search box code". Click the code in the form and it will automatically be all selected, copy the code to you clipboard. (CTRL+C or right click, copy).

Now you have that done, Go to your admin setting in modifications page (see image below)

Paste that code into the form like on the image, scroll to the bottom of the modifications page, click save.


You will immediately notice that you now have a search box in the upper body area of the forum, it will be on the left side by default, adding center tags
will make it center, I have added center tags in the image to show how. ;)

Search results code, wondering what to do with it, nothing, don't worry about it, your integration is already complete, search for something and see


The background color is initially white, does not look to good, changing the background color is done in the Google control panel. Note you can also change the link color the border color and many other things to match your theme too.

This mod had been tested on SMF 2 RC2 and works fine.
______________________________________________________________________________________________

Version 1.1 released.

changelog
Version 1.1:
Added ability to change Search Results width from modification area instead of making changes in index.template.php yourself.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers


-=[Vyorel]=-

My mods for SMF - [6].

ɔɔɔɔɔɔuɥoɾ



SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Sabre™

Heeyy congratulations mate!
I don't use ads, but this sounds like a pretty good idea.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ɔɔɔɔɔɔuɥoɾ

#5
Yea, it is, using portals and ad management mods will only work for the "search bar" it will not not work for results code, that code needs to be hard coded into index.template.php.

Fortunately, the search results code is the same all the time, with the exception of the width setting for the results, which I have added instructions for on this topic and in the php file itself :).

Oh this is not such for ads, it can actually help your members search your site :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Sabre™

Nice, do you have a demo up n running mate, to have a glance at?
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Afro


Sabre™

Well I just asked for one champ because I don't use anything like this.
Is seeing how it works a crime?
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Afro

not really, but i guess its just adding a code for a search box to appear. i m just wondering what the sc will look like.

i can get sc for you if you need it so much , lol


ɔɔɔɔɔɔuɥoɾ

Well, I have not got a demo setup, but I do have the images of what the mod looks like in action, It's pretty much is as good as a demo :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Sabre™

Ah ok cool, I had something completely different pictured in my head.
Thanks for that, it is much clearer what you're providing now.

Cheers mate :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ɔɔɔɔɔɔuɥoɾ

Version 1.1 released.

changelog
Version 1.1:
Added ability to change Search Results width from modification area instead of making changes in index.template.php yourself.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Shades.

I installed this and it centered everything on my forum! :o
(Uninstalled for now) ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

ɔɔɔɔɔɔuɥoɾ

#14
Quote from: BoZilla on October 15, 2009, 11:42:11 PM
I installed this and it centered everything on my forum! :o
(Uninstalled for now) ;)

when you used <center> did you make sure to close </center> after, thats the only reason why it would center the whole forum.

Instead of using those center tags, you should use

<div style="text-align: center;">
Your Search box Code here
</div>


This way if you change to right, left or justify, you only need to type it once :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Shades.

I installed via the package installer! Should I have installed it manually then?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

ɔɔɔɔɔɔuɥoɾ

no install it normally, just when centering things in the Searchbox form, make sure to close the tag when done

<center>
My searchbox code
wefwerf
erferfer
rferef
</center>


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

kappazuhk

Hello, I can not use the ad mang mod on my site. I Can not find a way to manually add my ad sense to my forum so I downloaded and installed your mod. I read that adsense would not work only adsearch. But i put the code in anyway just to see what would happen, adsense is receiving the adsense page impressions. Does this mean the adsens ads will work this way or is only going to allow it to log the impressions?

ɔɔɔɔɔɔuɥoɾ

As long as you can see the ad being displayed on the page your getting the impressions, there are no permissions on this mod, thus everyone will see your ad.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

kappazuhk

That is ok for every one to see. I was just not sure if it will allow the register of the click properly. But I thought it would if it is registering the impressions. This will be a life saver if this works! There are no problems with google spiders crawling the pages with this mod? Useing portals, no bot can crawl my forum. Ad manager will not install and it would be too much trouble to fix the issues.

Advertisement: