PDA

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


amykhar
09-04-2006, 10:00 PM
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
09-05-2006, 07:12 PM
first post :)

thanx amykhar

RonMan112
09-05-2006, 10:00 PM
jepp, thx, works fine :laugh:

Hornstar
09-06-2006, 12:00 AM
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
09-06-2006, 01:02 PM
Yep. as long as you get the $output.=' and the ending '; you are fine.

Phooey
09-06-2006, 01:21 PM
Neat.

/installed

Ricsca
09-07-2006, 05:05 PM
Thanks :)

revolver
09-08-2006, 05:47 AM
Nice work as always Amy. Well done :)

dturnbull
09-08-2006, 06:31 AM
Nice and easy :)

unitedpunjab
09-08-2006, 07:41 PM
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
09-12-2006, 11:45 PM
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
09-13-2006, 11:00 AM
You go in the plugin manager and edit the two plugins.

smoknz28
09-13-2006, 02:12 PM
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
09-13-2006, 02:22 PM
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
09-13-2006, 03:02 PM
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
09-13-2006, 03:19 PM
I see the banners on your site, but your html adjustments are a wee bit out of whack.

smoknz28
09-13-2006, 04:48 PM
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
09-13-2006, 05:09 PM
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
09-13-2006, 05:21 PM
Interesting....IE doesn't show any banners.

Do you know why this is?

kevinj
09-17-2006, 02:51 PM
Excellent thanks :)

MRGTB
09-23-2006, 01:29 AM
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
10-01-2006, 04:36 PM
thanks! :)
working great

<< install

Kwak
10-03-2006, 12:44 AM
Thanks alot! Installed.

Hent
10-04-2006, 01:25 AM
thanks, worked well.

osmanungur
10-04-2006, 09:59 AM
thanks amy
installed*

Kwak
10-04-2006, 11:44 PM
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
10-05-2006, 11:00 AM
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
11-06-2006, 01:48 PM
is there a way to put the adsense code between the threads or under the forums titles?

thanks

amykhar
11-06-2006, 02:33 PM
Yes, but not with this mod.

diretur
11-06-2006, 02:41 PM
Yes, but not with this mod.


where can I find it?

amykhar
11-07-2006, 01:57 AM
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
11-07-2006, 01:55 PM
Installed , Thank you

Dream
11-07-2006, 05:58 PM
great thanks :)

5 stars for you

SloppyGoat
11-07-2006, 09:32 PM
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
11-08-2006, 01:20 PM
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
11-08-2006, 02:21 PM
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
11-08-2006, 07:22 PM
I see it now. I realized that my hosts file was blocking all google adsense ads. Hahaha!!! :D Thanks.

doushx
12-11-2006, 01:34 PM
thanks

zbahadir
12-16-2006, 02:19 PM
thank you :)

Doug Nelson
05-22-2007, 12:27 AM
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
06-01-2007, 05:54 AM
Quick and easy installation. Thanks...

kollam003
06-02-2007, 06:31 AM
works well installed

pericolosogr
06-05-2007, 07:01 AM
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
08-27-2007, 10:48 PM
I wish I would have found this earlier! Easy install!

smestas
09-19-2007, 08:57 AM
Awesome hack. Took a few minutes to install and get running.

THANK YOU AMYKHAR!!!!

energetic
10-04-2007, 05:07 AM
Where do I enter my ads code ?

jGas
12-16-2007, 10:59 AM
installed...thanks!! :D

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

Phornixx
05-03-2008, 08:16 PM
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=632 0" 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
07-21-2008, 02:51 PM
Hi!

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


Thank you! :up:

Paul M
07-21-2008, 09:36 PM
Yes it does.

vithorius
07-22-2008, 08:35 AM
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
01-22-2009, 03:13 AM
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=632 0" 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
02-14-2009, 03:13 PM
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=632 0" 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