PDA

View Full Version : Miscellaneous Hacks - Adsense Banners in Your Archive


amykhar
05 Sep 2006, 20:07
I've updated this script to remove the quote problem many users were having. It is tested on vbulletin 3.6 and can be seen at http://eaforums.com/forums/archive/index.php/

Essentially, this product allows you to have adsense (or other) banners in your forum archives.

To install:
Import the product. Edit the plugin code to substitute your adsense code.

To upgrade:
Uninstall the old product. Import and edit the new product to use your code.

Note: There is no need to upgrade if you are not having problems or you don't need to put in new banner code. This just makes the initial edit easer.

bonjurkes
05 Sep 2006, 21:12
first post :)

thanx amykhar

RonMan112
06 Sep 2006, 00:00
jepp, thx, works fine :laugh:

Hornstar
06 Sep 2006, 02:00
Thanks Amy, your always releasing good stuff.

just a quick question coz im not using google ads so i cant compare the code to that, do i just keep

$output.='
<div align="center" style="padding:4px; overflow: hidden;\">

at the top

then code in the middle

then

</td>
</tr>
</table>

';

at the bottom.

and pretty much the same for the other one?


it seems to be working fine, just wanted to make sure I have not left any important code out that may make it not function correctly on some browsers.

Thanks.

amykhar
06 Sep 2006, 15:02
Yep. as long as you get the $output.=' and the ending '; you are fine.

Phooey
06 Sep 2006, 15:21
Neat.

/installed

Ricsca
07 Sep 2006, 19:05
Thanks :)

revolver
08 Sep 2006, 07:47
Nice work as always Amy. Well done :)

dturnbull
08 Sep 2006, 08:31
Nice and easy :)

unitedpunjab
08 Sep 2006, 21:41
The one for 3.5 was working fine on my 3.6 forums,i updated and its not working now.
will you please post the older file.

smoknz28
13 Sep 2006, 01:45
Nooooob....sorry here.... :cross-eyed:

I imported the product.

When I go to the Plugins & Products >> Manage Products >> Edit Archive Adsense.... I don't see where I'm to add my adsense code....?

Please understand that I am a noob here with these plugins and products...

amykhar
13 Sep 2006, 13:00
You go in the plugin manager and edit the two plugins.

smoknz28
13 Sep 2006, 16:12
You go in the plugin manager and edit the two plugins.

Hi Amy, I've gone into the plugin manager and there is only one plugin for this "Archive Adsense".

I then select edit for this plugin....but I don't understand where I am to edit in my adsense data....? Under Add New Install/Uninstall Code >> Install Code??

Sorry, but I'm really lost.....

Also, you say I'm to edit the two plugins....there is only one plugin in your download here and that's what I have installed.

Yea like I said.....I'm really lost here. Sorry....

amykhar
13 Sep 2006, 16:22
There is one product containing TWO plugins. Do not go to the product manager. Go to the plugin manager. look for two plugins with the word adsense in them. Click edit. You will see the code there. Take out the existing adsense code and put in the new code you wish to use.

smoknz28
13 Sep 2006, 17:02
Ah yup, definitely a newb here.... :hurt:

K, I went in and edted both codes and they look as such:

Product: "Archive Adsense"
Hook Location: "archive_complete"
Title: "Archive Bottom"
Execution Order: "5"
Plugin PHP Code:

$output.='
<div align="center" style="padding:4px; overflow: hidden;\">
<script type="text/javascript"><!--
google_ad_client = "pub-1087880827049389";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td><td width="15%" valign="top">
<script type="text/javascript"><!--
google_ad_client = "pub-1087880827049389";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>

';

Plugin Is Active: "Yes"

I cannot get my adsense script to run with the above.

Thanks Amy

amykhar
13 Sep 2006, 17:19
I see the banners on your site, but your html adjustments are a wee bit out of whack.

smoknz28
13 Sep 2006, 18:48
I see the banners on your site, but your html adjustments are a wee bit out of whack.

Mmmmm....not sure if we're looking at the same site here.

http://www.f-bodyhideout.com/forums

I don't see adsense running at all....

amykhar
13 Sep 2006, 19:09
Yep. That's the one. It's got two banners about rss at the top and the content is scrunched over to the side in firefox.

smoknz28
13 Sep 2006, 19:21
Interesting....IE doesn't show any banners.

Do you know why this is?

kevinj
17 Sep 2006, 16:51
Excellent thanks :)

MRGTB
23 Sep 2006, 03:29
This is really good Amy, I've used the "text only" option though, instead of images/text (am I allowed to use 3 text only banners)?

Very good hack and only after 5 minutes I see I have a hit already.

Quick question though. On my main forum I use conditionals with my adsence banners code to exclude 3 forums ID's from displaying the adsence banner in Showthread and Forumdisplay templates.

It there anyway to do the same with this hack.

I use this code:

<if condition="!in_array($forumid, array(19,78,114))">
adsence code here
</if>

GrendelKhan{TSU
01 Oct 2006, 18:36
thanks! :)
working great

<< install

Kwak
03 Oct 2006, 02:44
Thanks alot! Installed.

Hent
04 Oct 2006, 03:25
thanks, worked well.

osmanungur
04 Oct 2006, 11:59
thanks amy
installed*

Kwak
05 Oct 2006, 01:44
In the Plugin Manager for archive, I only archive for header and bottom.

Where is the right column? For the default setting of this plugin, it is located top, bottom, and right.


And how can you locate the ad from right to the left column?

Thank you in advance.

amykhar
05 Oct 2006, 13:00
Columns are done by wrapping tables around the main content. So, depending on how you want your page to look, you have the right or left column in the header or footer. Left columns are done in the header. Right columns are done in the footer.

diretur
06 Nov 2006, 15:48
is there a way to put the adsense code between the threads or under the forums titles?

thanks

amykhar
06 Nov 2006, 16:33
Yes, but not with this mod.

diretur
06 Nov 2006, 16:41
Yes, but not with this mod.


where can I find it?

amykhar
07 Nov 2006, 03:57
If you mean in the archive threads, I don't know if one's been written. If you mean in the forum threads, there are several template mods.

Beller
07 Nov 2006, 15:55
Installed , Thank you

Dream
07 Nov 2006, 19:58
great thanks :)

5 stars for you

SloppyGoat
07 Nov 2006, 23:32
Should I see something immediately? I mean, I get nothing. This is what I have in both. Is this right? Is there any advantage to having them on the top and bottom at the same time?

$output.='
<div align="center" style="padding:4px; overflow: hidden;\">
<script type="text/javascript"><!--
google_ad_client = "pub-3725641775541024";
google_alternate_color = "FFFFFF";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2006-11-07: http://tga.dynu.com/archive
google_ad_channel = "6003384529";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>

';

baktabul
08 Nov 2006, 15:20
Really Good Thank You But 160*600 adsense code is on the right side, can we change it to left side ?
http://www.baktabul.com/archive/index.php

amykhar
08 Nov 2006, 16:21
sloppy, you won't always see something immediately. Sometimes, a google ad won't be appropriate for a given page. Browse around a bit and see if they don't show up.

SloppyGoat
08 Nov 2006, 21:22
I see it now. I realized that my hosts file was blocking all google adsense ads. Hahaha!!! :D Thanks.

doushx
11 Dec 2006, 15:34
thanks

zbahadir
16 Dec 2006, 16:19
thank you :)

Doug Nelson
22 May 2007, 02:27
Here's an odd one:
To solve a problem with Chinese ads showing for some reason, Adsense support told me to add "google_language = 'en';" (no quotes) to my Adsense script. But if I add it anywhere in the script, it breaks this mod and I get errors instead of ads in my archives.

dmyre
01 Jun 2007, 07:54
Quick and easy installation. Thanks...

kollam003
02 Jun 2007, 08:31
works well installed

pericolosogr
05 Jun 2007, 09:01
well...right now i have one ad in the top and one in tge bottom...can i also put in the left and right side?
whats the code?
thanks in advance

demojames
28 Aug 2007, 00:48
I wish I would have found this earlier! Easy install!

smestas
19 Sep 2007, 10:57
Awesome hack. Took a few minutes to install and get running.

THANK YOU AMYKHAR!!!!

energetic
04 Oct 2007, 07:07
Where do I enter my ads code ?

jGas
16 Dec 2007, 12:59
installed...thanks!! :D

edit: energetic, go to plugin management and search for "Archive Adsense"

Phornixx
03 May 2008, 22:16
I dont seem to get this working, I dont use Adsense, I use AdutAdWorld ads, my code is as follows:

Header

$output.='
<div align="center">

<!-- begin Ad World Media for channel: Amateur , publisher: XXX http://XXXXXXX.com , Ad Dimension: Super Banner - 728 x 90 -->
<script language="javascript">
document.write('<iframe src="http://newt1.adultadworld.com/jsc/z5/ff2.html?n=607;c=2437;s=6320;d=14;w=728;h=90;p=6320" frameborder=0 marginheight=0 marginwidth=0 scrolling="no" allowTransparency="true" width=728 height=90></iframe>');
</script>
<!-- end Ad World Media for channel: Amateur , publisher: XXX http://XXXXXXXX.com , Ad Dimension: Super Banner - 728 x 90 -->

</div>
</td>
</tr>
</table>
';

The error in the archive page is this:

Parse error: syntax error, unexpected T_STRING in /usr/www/XXXX/www.XXXXXX.com/archive/index.php(254) : eval()'d code on line 6

And the same for the footer code, any help?


Thanks in advance...

vithorius
21 Jul 2008, 16:51
Hi!

Anyone know if this hack works on 3.7.x? :confused:


Thank you! :up:

Paul M
21 Jul 2008, 23:36
Yes it does.

vithorius
22 Jul 2008, 10:35
Yes it does.

Mr Paul, you're the Man! (I have some of your hacks on my board! :up: :up: )

Thank you very much for that info! :up:

ru55ian
22 Jan 2009, 05:13
I dont seem to get this working, I dont use Adsense, I use AdutAdWorld ads, my code is as follows:

Header

$output.='
<div align="center">

<!-- begin Ad World Media for channel: Amateur , publisher: XXX http://XXXXXXX.com , Ad Dimension: Super Banner - 728 x 90 -->
<script language="javascript">
document.write('<iframe src="http://newt1.adultadworld.com/jsc/z5/ff2.html?n=607;c=2437;s=6320;d=14;w=728;h=90;p=6320" frameborder=0 marginheight=0 marginwidth=0 scrolling="no" allowTransparency="true" width=728 height=90></iframe>');
</script>
<!-- end Ad World Media for channel: Amateur , publisher: XXX http://XXXXXXXX.com , Ad Dimension: Super Banner - 728 x 90 -->

</div>
</td>
</tr>
</table>
';

The error in the archive page is this:

Parse error: syntax error, unexpected T_STRING in /usr/www/XXXX/www.XXXXXX.com/archive/index.php(254) : eval()'d code on line 6

And the same for the footer code, any help?


Thanks in advance...

i encountered same problem with adbrite... were you able to resolve this issue?

reverse1312
14 Feb 2009, 17:13
I dont seem to get this working, I dont use Adsense, I use AdutAdWorld ads, my code is as follows:

Header

$output.='
<div align="center">

<!-- begin Ad World Media for channel: Amateur , publisher: XXX http://XXXXXXX.com , Ad Dimension: Super Banner - 728 x 90 -->
<script language="javascript">
document.write('<iframe src="http://newt1.adultadworld.com/jsc/z5/ff2.html?n=607;c=2437;s=6320;d=14;w=728;h=90;p=6320" frameborder=0 marginheight=0 marginwidth=0 scrolling="no" allowTransparency="true" width=728 height=90></iframe>');
</script>
<!-- end Ad World Media for channel: Amateur , publisher: XXX http://XXXXXXXX.com , Ad Dimension: Super Banner - 728 x 90 -->

</div>
</td>
</tr>
</table>
';

The error in the archive page is this:

Parse error: syntax error, unexpected T_STRING in /usr/www/XXXX/www.XXXXXX.com/archive/index.php(254) : eval()'d code on line 6

And the same for the footer code, any help?


Thanks in advance...

i encountered same problem with adbrite... were you able to resolve this issue?

The same for me... Any advice ? I use openX javascript tag instead of google javascript
Martin