vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Adsense Banners in Your Archive (https://vborg.vbsupport.ru/showthread.php?t=125879)

amykhar 09-04-2006 10:00 PM

Adsense Banners in Your Archive
 
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
Code:

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

at the top

then code in the middle

then
Code:

</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

Quote:

Originally Posted by amykhar
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

Quote:

Originally Posted by amykhar
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:

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

Quote:

Originally Posted by amykhar
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.


All times are GMT. The time now is 05:32 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02458 seconds
  • Memory Usage 1,805KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete