PDA

View Full Version : Adsense plugin


TheSavior
03-19-2006, 01:57 AM
I made a custom plugin for my adsense. My code is html and it look like this:

<center>
ADSENSE CODE HERE
</center>

When i view the page with the adsense on it, the adsense doesn&#39;t show up, but the plugin box IS there. What did i do wrong?

Robert_J_Ellis
03-19-2006, 02:20 AM
Turn off the wysiwyg editor in main settings before you paste the javascript into it. After you&#39;ve pasted the code, turn the wysiwyg editor back on. If your code is php, you&#39;ll need to include it instead.

TheSavior
03-19-2006, 02:27 AM
That didn&#39;t seem to do anything.

I turned off the javascript. Re pasted the code into the code part of my adsense custom plugin, clicked submit, then refreshed my website.

Terminator1138
03-19-2006, 02:34 AM
turn off the online editor....then create the plugin and add adsense code..save and go back to main settings and turn on editor..do not go back to custom plugin cuz the editor will erase it.

thomas
03-19-2006, 04:21 AM
im hearing more and more people wanting to include. maybe the team should look at creating a adsence plugin or someone step up and take the plunge to create it :P

But personally, i include it the skin.

terminator is right, you do need to turn off the editor. incuding the file is another way, and they both would take the same time to implement

TheSavior
03-19-2006, 06:03 AM
i turned off the editor, like you said, and followed your instructions and it still didn&#39;t do anything differently.

Terminator1138
03-20-2006, 01:21 PM
Not sure why its not working for you then, shows up just fine on my site. Do you have javascript disabled on your browser?

also I see spib is making something as per the thread on plugin id&#39;s etc

spib
03-20-2006, 01:23 PM
Not sure if I&#39;m going to make it or not actually. I was going to allow you to set the options via the admin panel to build up the code in the same way as google does but I don&#39;t think it&#39;s going to be possible. Writing a plugin which lets you paste in the adsense code only seems a bit of a waste of time

thomas
03-20-2006, 01:26 PM
true. it may seem a waste of time.....

but people keep asking for it, and are having trouble and spending heaps of time trying to turn off the editor.

the demand is there :D

its a simple plugin which would take a genious like you, not very long at all :P

Terminator1138
03-20-2006, 03:16 PM
I also agree, waste of time really. I use phpads with vb and also on front page in custom plugin adsense which I cannot figure out why its not displaying. The only thing I can tell remotely is they are not putting in the right stuff.

I can put it in stories and plugins without any issues.

TheSavior
03-28-2006, 11:15 PM
so, is there a reason it isn&#39;t working for me though?

Terminator1138
03-30-2006, 01:53 AM
not sure why its not working for you. Can you provide a screen shot or something

DarK_AssassiN
07-04-2006, 04:53 PM
I turned off the editor. Went to the custom plugin, named it AdSense, out the title as AdSense, and then pasted the code on the box below. Now when I go into the site, it shows nothing but the box where it should be and the title as AdSense....

What am I doing wrong?

Brent
07-06-2006, 09:05 PM
<div class='quotetop'>QUOTE(DarK_AssassiN &#064; Jul 4 2006, 12&#58;53 PM) 7521</div>
I turned off the editor. Went to the custom plugin, named it AdSense, out the title as AdSense, and then pasted the code on the box below. Now when I go into the site, it shows nothing but the box where it should be and the title as AdSense....

What am I doing wrong?
[/b]

Maybe google does not have any ad inventory that they want to display on your site?
Set your adsense code to fill a solid red background color when no ads are available and test again, if you get solid red then this means google has no ads for you. You could also turn on Public service ads and see if they display?

72dpi
07-07-2006, 02:28 AM
I have just done the code for the Adnsense plugin.

i will obtain a number a bit later today,
then get some poeple to test it later if you want.

Dunno if this is a plugin already available?

Anyhow, all things are confugurable via the admin, ie, color, size, names etc.

Hope this helps..

abcohen
07-07-2006, 03:03 AM
wow this will be great :)

T-bone
07-07-2006, 03:17 AM
Yes - I&#39;ve been running into weird issues with the new redesign of my site where I put the google code in and it comes up but once in a while, with the right combination of plugins used, the google code actually switches itself with another plugin&#33; It&#39;s the weirdest thing and probably a skin issue but I can&#39;t figure it out so I try to work around it as best I can.

If this is contained in a good plugin and not as a custom job it will probably work a lot better - I hope&#33; Thanks.

72dpi
07-07-2006, 03:34 AM
Okkies, here it is.
I can&#39;t test it as my Adsense account isn&#39;t functioning.

can someone please upload & test it.

As far as I can see, all paramenters are working, and the output is perfect.
Just don&#39;t see teh adsense script initializeing.

Please lemme know how you go, and what i need to modify.

have fun, HOpe this works&#33;

:P

<-- Edit Fixed a Typo

Now available for download from:
http://www.72dpi.net.au/Downloads

DarK_AssassiN
07-07-2006, 03:59 AM
Tested it. It doesn&#39;t show anything for me... :&#092;

72dpi
07-07-2006, 04:11 AM
oops.
I didn&#39;t add the " " for the Google Javascript.

Works perfectly now, and Tested, See it on:

http://www.72dpi.net.au/index.php

BTW, may be a waste of time, but at least you can modify the color scheme when U want to suit your website. I guess thats the "ONLY" upside to this plugin.
Plus, it means your Ad code WONT get hijacked by anyone else. i have heard of adsense scripts getting hijacked and people stealing "hits" from other people.

In any case, it is good practice for me to make a plugin lol..

hope at least 1 other person enoys this plugin =)

jhobbs
07-07-2006, 02:35 PM
Urrrk&#33;
Invalid SQL&#58; INSERT INTO sd_pluginsettings &#40;pluginid, groupname, title, description, input, value, displayorder&#41; VALUES &#40;199, &#39;Options&#39;, &#39;Ad Channel&#39;, &#39;What is the Ad Channel you wish to use?&#60;a href=&#34;https&#58;//www.google.com/support/adsense/bin/search.py?query=Ad+Channel&#34; target=&#34;blank&#34; title=&#34;View Googl&#39;s help&#33;&#34;&#62;&#91;help&#93;&#60;/a&#62;&#39;, &#39;text&#39;, &#39;&#39;, 6&#41;**
Error&#58; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;s help&#33;&#34;&#62;&#91;help&#93;&#60;/a&#62;&#39;, &#39;text&#39;, &#39;&#39;, 6&#41;&#39; at line 1
Error number&#58; 1064
Date&#58; Friday 07th 2006f July 2006 02&#58;07&#58;19 PM
I modified line 46 of install.php to change "googl&#39;s" to "googles" and it seems to install OK.
Seems to work fine, but on a test site just displays public service messages.

DarK_AssassiN
07-07-2006, 06:03 PM
Cool&#33; :P It shows up now.

As Jack said, the typo needs to be fixed.

Also, would it be possible to get the bgcolor to override the themes setting so that way the SD theme doesn&#39;t use its image in the ad? I think that could count as a violation of the TOS...

EDIT- Ok, well I moved it and now it uses the correct BG color :&#092; Kinda weird....
Now I have a few more requests (hopefully nothing too big)

1) The ability to change the title of the plugin box (unless I&#39;m missing somehting and that is already possible).
2) Make an option to left, center, or right align. Right now it left aligns to the plugin box and I&#39;m trying to make it centered. Besides that it works great ;)

72dpi
07-08-2006, 03:15 AM
oops

Sorry about that typo.

Fix.

New version allows you to align left center or right.

Is also Available from here:
http://www.72dpi.net.au/Downloads

T-bone
07-08-2006, 03:22 AM
i&#39;ll give it a shot this week and let you know - thanks&#33;&#33;&#33;

DarK_AssassiN
07-08-2006, 02:01 PM
Thanks 72dpi&#33; :P Works perfect ;)

T-bone
07-08-2006, 02:38 PM
Is there a way to turn off the plugin header so just the ad shows up?

abcohen
07-08-2006, 03:15 PM
in the plugin manager _ where it says display name (but I dont think that&#39;ll always help if your skin isnt designed to function without a title)

72: when you feel this has been tested enough - submit it to the DLM with some pics :) watch those DL # blast towards the roof.

72dpi
07-08-2006, 03:24 PM
Cheers Abcohen =)

I submitted a bit earlier.

My First "official" plugin heh heh.

<-- Albeit a rather small pathetic one, but a plugin nonetheless =)

william
07-08-2006, 05:12 PM
ahhhhhh can&#39;t DL or register...ya big tease...fix your site :P

72dpi
07-08-2006, 05:36 PM
oops.

Sorry William.

i have fixed it now. U can register.

HeavyEddie
07-08-2006, 06:48 PM
I don&#39;t use adsense, but I know this is something that will get a ton of use 72&#33; Great job.

DarK_AssassiN
07-08-2006, 07:27 PM
I noticed something. It may just be me, but I&#39;m not sure. I set all my ads to a channel. I have my old URL redirect to my new one (with an image that says I&#39;ve moved, and a google ad). It redirects in 10 seconds.

Now. When I go to AdSense, it says I have about 150 page impressions today for the old URL, and a couple more from no channel. I&#39;ve been getting alot of guests for my new site (probably coming from the old URL), and the page impressions don&#39;t go up (for my current URL).

I set the ads on the current URL to their own seperate channel but nothing is happening with them. They&#39;re there but its not recording it....

72dpi
07-09-2006, 01:23 AM
Hmm Dark. Thats very interesting.

IF you can do some reserach on this one please let me know. I will modify the plugin if there are any issues. I leave my channel clear, so i havent dealt with this. the link to adsense FAQ&#39;s should fix this one, or perhaps best to post it to the google forumk.

lemme know bud&#33;

DarK_AssassiN
07-09-2006, 04:33 AM
I posted on the google forum.... hopefully someone can help me out.

I even checked overall hits and its nowhere near where it should be :&#092;

I&#39;ll keep looking into and keep you updated ;)

DarK_AssassiN
07-09-2006, 03:39 PM
I got it&#33; But I have no idea how to fix the problem. I set my Google Ad number (checked it twice before I did it) right after I installed the plugin. But I never checked the source code to see what it looked like. Now I found out why its not recording. The plugin isn&#39;t putting my Google Client Number:

&#60;&#33;-- google_ad_client = "";
google_ad_width = "468";
google_ad_height = "60";
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel = "3667143618";
google_color_border = "596268";
google_color_bg = "596268";
google_color_link = "4F5254";
google_color_url = "4F5254";
google_color_text = "4F5254"; //--&#62;[/b]


See that? Its supposed to be:

&#60;&#33;-- google_ad_client = "pub-5900907249187946";
google_ad_width = "468";
google_ad_height = "60";
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel = "3667143618";
google_color_border = "596268";
google_color_bg = "596268";
google_color_link = "4F5254";
google_color_url = "4F5254";
google_color_text = "4F5254"; //--&#62;[/b]


I wish I knew PHP or something so I could help :mellow: Do you know what could be wrong?

abcohen
07-09-2006, 03:58 PM
try this edit...

in 199_googleadsense.php
find this code...
********google_ad_client = &#092;&#34;&#34;.&#036;settings&#91;&#39;Ad Client&#39;&#93;.&#34;&#092;&#34;;

replace with this code
********google_ad_client = &#092;&#34;&#34;.&#036;settings&#91;&#39;Google Ad Client&#39;&#93;.&#34;&#092;&#34;;

the install.php has it building that information with a ID of Google Ad Client not just Ad Client

------------UPDATE---------------
I&#39;ve fixed up the install.php and the adsense plugin on the DLM - its version will be labeled as 1.0.2 but in order to install you&#39;ll need to uninstall the old versions overwrite the files and reinstall - but this should display the code correctly afterwards

DarK_AssassiN
07-09-2006, 06:16 PM
Thanks ;) Going to test it out right now...

EDIT- Sweet :P It works now. This is a great first plugin 72 ;) I&#39;ll be putting it to good use.

72dpi
07-10-2006, 12:28 AM
Thank you so much Abcohen for fixing that.
I feel a bit stoopid missing that one.

I have added to my download now:
http://www.72dpi.net.au/Downloads

I notice the one on Subdreamer is stil the old version, can a mod plz update asap&#33;, cheers....

insaneps3
11-22-2006, 07:31 AM
is there anyway we can use it multiple times with different sizes via the plugin ?

google adsense rules state that youm ay list up to three ad units per page.

well im not gonna make very much money if i can only list one so, is there a way i can use the plugin but different sizes and different places ?

sorry for my newb questions.
thanks.