Topic: punbb adsense advertisement mod?

was wondering if anyone had any plans on making a mod where you could enter your adsense code, and after the first post of every thread it'd put in your adsense banner since your ads are whatever is relevant to the topic. would be a good idea to increase revenue as well wink

Re: punbb adsense advertisement mod?

I second this idea. Although most users would probably find it annoying...

-Tim

Re: punbb adsense advertisement mod?

Mmm, I'll see what I can do smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: punbb adsense advertisement mod?

Sounds like a brilliant idea.........go Smartys....make code!!!!!!  wink

never bolt your door with a boiled carrot

5 (edited by Smartys 2005-05-13 21:35)

Re: punbb adsense advertisement mod?

Well, I'm almost done smile
Note to self: in the future, know something about what you're coding a mod for (in this case, Adsense). tongue
Since I've never used it before, tell me if I've gotten something wrong: I plan to add a whole bit for all the Adsense options (ie: border, ad_format, all that stuff I see when looking at the source code here tongue ).

But when I first release it, you'll have to edit that stuff yourself smile

Ooh, even better: create a new table, store the name of the poster and it's tag as well as all the options, and have the ability to store different color schemes for each stylesheet (future release)
Oh, and a cache file for the info!


Alright, all done, but I need to go somewhere soon. smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: punbb adsense advertisement mod?

OK, I'll write a quick readme up when I get back and release it. I'm not going to create an install_mod.php file, since so far it's only one insert query. I'm going to change up the code a lot over the weekend so it's more dynamic, and if anyone is willing to help explain to me the different options Google Adsense offers to make sure I include them all, feel free to email me smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: punbb adsense advertisement mod?

I just remembered about a forum script that I used to use -----> http://www.hot-things.net/forum/  it has a colour switcher on the bottom right...which also affects the google ads

Whats sort of adsense info do you need to know?

never bolt your door with a boiled carrot

Re: punbb adsense advertisement mod?

Well, for the Adsense coloring I think Rickard wrote something on that

And the info: looking at the source code for this page:

        google_ad_client = "pub-5038618221283072";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_ad_channel ="";
        google_ad_type = "text";
        google_color_border = "FFFFFF";
        google_color_bg = "FFFFFF";
        google_color_link = "005CB1";
        google_color_url = "005CB1";
        google_color_text = "333333";
        google_alternate_color = "FFFFFF";

Are there other things? For some things (like ad type and ad format) are there a limited number of options (so I could use a pull-down box instead of a textbox in the plugin I'm going to make).

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: punbb adsense advertisement mod?

OK, I decided to push back the release until tomorrow (I currently have the config file, table, etc working, just need to create a plugin so it's possible to edit the AdSense info).

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

10

Re: punbb adsense advertisement mod?

well, you can customize your adsense through the adsense login panel. Basically, all the mod really needs to do is put the adsense code after every 1st or 2nd post of every thread. This method increases revenue a TON, and i've seen it work on several boards.

Re: punbb adsense advertisement mod?

This could be anything it is their identification to google

        google_ad_client = "pub-5038618221283072";

this is a bit more complicated, the height and width are from the format i don't think your meant to change them, however, there are some text only formats
i think the easiest way to show it is

<select id="text_img_format" name="format">
<optgroup label="Text and image ads:">
<option value="728x90"> 728 x 90 Leaderboard </option>
<option value="468x60"> 468 x 60 Banner </option>
<option value="300x250"> 300 x 250 Medium rectangle </option>
<option value="160x600"> 160 x 600 Wide Skyscraper </option>
<option value="120x600"> 120 x 600 Skyscraper </option> </optgroup>
<optgroup label="Text ads only:">
<option value="336x280"> 336 x 280 Large Rectangle </option>
<option value="250x250"> 250 x 250 Square </option>
<option value="234x60"> 234 x 60 Half Banner </option>
<option value="180x150"> 180 x 150 Small Rectangle </option>
<option value="125x125"> 125 x 125 Button </option>
<option value="120x240"> 120 x 240 Vertical Banner </option>
</optgroup>
</select>

they all have _as appended to their value and are  google_ad_width x google_ad_height

        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";

again could be anything they can setup channels to moniter ads on specific pages

        google_ad_channel ="";

either "text" "image" or "text_image" specifies the type of ads shown, text only, image only, both respectively

        google_ad_type = "text";

the colours for the ad wink

        google_color_border = "FFFFFF";
        google_color_bg = "FFFFFF";
        google_color_link = "005CB1";
        google_color_url = "005CB1";
        google_color_text = "333333";
        google_alternate_color = "FFFFFF";

there is another setting called link unit instead of ad unit but that gives no color settings and a different set of sizes, if you want i can tell you about that or it might be better as a different mod since its for putting links in blocks of text not in between text like this is a mod for i think

hope that helps smile

Re: punbb adsense advertisement mod?

Perfect, thanks Connor smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: punbb adsense advertisement mod?

OK, all done and uploaded
http://www.punres.org/files.php?pid=80
Report any problems you have smile

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

14

Re: punbb adsense advertisement mod?

Parse error: parse error, unexpected $ in /home/brian/public_html/forum/viewtopic.php on line 467

Wierd sad

15 (edited by Smartys 2005-05-14 23:50)

Re: punbb adsense advertisement mod?

Mmm, what's your line 467 and the stuff around it (my file doesn't go that high)

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

16

Re: punbb adsense advertisement mod?

wierd, my viewtopic doesnt go that high either until I add the code into it -- got an email i can send my viewtopic to?

Re: punbb adsense advertisement mod?

Yeah, check the mod readme tongue

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

18

Re: punbb adsense advertisement mod?

Ahh -- people and their lovely gmail accounts! smile

19 (edited by Smartys 2005-05-15 00:35)

Re: punbb adsense advertisement mod?

Yes, very fun smile
OK, I dunno what the deal was with your error, but when I put it in I noticed I was missing a }
I need to fix that or the mod is useless, so I'll fix it in a sec

Edit: I just deleted the old 1.0.1 and made this 1.0.1 smile
I'll send you an edited version of yours

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

20

Re: punbb adsense advertisement mod?

Awesome.

you can view a sample of this mod here: http://www.cobaltandcalcium.com/forum/v … php?id=866

Re: punbb adsense advertisement mod?

Will my site still validate xhtml 1 strict when using this?

Re: punbb adsense advertisement mod?

If it doesn't, tell me and I'll make it so it does?

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

23 (edited by Smartys 2005-05-15 10:27)

Re: punbb adsense advertisement mod?

Looks like it validates to me (briank's demo site doesn't because of the PM mod URLs)

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: punbb adsense advertisement mod?

Thanks. I'm changing everything on my site so it validates and it's a huge pain.

Re: punbb adsense advertisement mod?

How can I fix this so a certain user group won't see the ads?