vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Google Adsense Banners (or others) in Your Archive (https://vborg.vbsupport.ru/showthread.php?t=166209)

amykhar 12-26-2007 10:00 PM

Google Adsense Banners (or others) in Your Archive
 
This is a mod that has been working since 3.5.x. It still works in 3.7 beta 3 from my testing. I am reposting it to make it easier for people to find.

It is tested on my vbulletin 3.7 test forum 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.

Note: I have marked this mod as using external content because just about any ad banner system you use pulls in content from another site, unless you host the banner images locally.

Unfortunately, I work full time now and am not actively supporting my mods. Thank you for understanding.

youradhere4222 12-27-2007 12:53 AM

If the example you provided, EA Forums, is owned by you, I'd advise you to change the font color of your vBulletin and vBSEO copyright information. It's a violation of the rules to make them unreadable.

SwollenCranium 12-27-2007 02:16 AM

^ Jeeeeez

Hornstar 12-27-2007 10:10 AM

Yeah, I think I still have this installed on my site from 3.5.x ^^

amykhar 12-27-2007 12:23 PM

Quote:

Originally Posted by youradhere4222 (Post 1409836)
If the example you provided, EA Forums, is owned by you, I'd advise you to change the font color of your vBulletin and vBSEO copyright information. It's a violation of the rules to make them unreadable.

Thank you for noticing that :) I put somebody else's theme on for the holidays and never checked.

projectego 12-27-2007 09:43 PM

Thank you, Amy. :)

[high]* projectego clicks install[/high]

amykhar 12-28-2007 12:05 PM

Quote:

Originally Posted by projectego (Post 1410353)
Thank you, Amy. :)

[high]* projectego clicks install[/high]

You're most welcome.

yahoooh 12-31-2007 02:05 PM

thanks

Ipuck 01-03-2008 04:48 AM

Thank you Amy!!

One question:

I have two sites, one with vBSEO and one without, for some reason in the one with vBSEO works great but in the one without only the bottom ad shows. I tried everything, uninstall-install twice, check all my setting, copied the same codes from one site to the other and nothing works.

Do you have an idea what is the problem?

amykhar 01-03-2008 02:23 PM

Can you send me the url of the one without? I can inspect the HTML. You might be missing a quote or something in that one. I've tested it on a site with and without with no differences.

Amy

Ipuck 01-04-2008 03:54 AM

Quote:

Originally Posted by amykhar (Post 1414658)
Can you send me the url of the one without? I can inspect the HTML. You might be missing a quote or something in that one. I've tested it on a site with and without with no differences.

Amy

Thanks Amy!

I found the problem, I forgot that I'm using the Zoints SEO mod in the forum that is not showing the ads, and Zoints has their own plug in to add ads in the archives. I uninstall yours :o and I'm using the Zoints plug in. Thanks

BTW I never thought the amount of archives pages that are viewed, I thought those pages never showed in the SERPS. I was missing revenue big time.

Thanks for the mod.

amykhar 01-07-2008 12:12 AM

Glad you found the problem :)

snakeair 02-14-2008 06:44 PM

*Installed*

M-Tuning 02-15-2008 11:53 AM

Thanks

safakuygur 02-15-2008 12:21 PM

good thanks

amykhar 02-18-2008 01:53 PM

Glad you like it, guys :)

Black Tiger 02-21-2008 03:54 PM

Looks interesting. Can it be installed without conflicting with the vbSEO Google/Yahoo Sitemap generator mod and without violating google adsense rules?

crkgb 04-10-2008 12:59 AM

Hmm. And what is the way to uninstall it? Can't find a single link in neither products nor plugins

FlyBoy73 04-11-2008 05:57 AM

Hi Amy,

Thanks for a great hack. I installed it a few days back but have not changed the code up yet as thanks for your work.

It's appreciated!

GrAveTzT 04-11-2008 08:41 AM

Quote:

Originally Posted by crkgb (Post 1487125)
Hmm. And what is the way to uninstall it? Can't find a single link in neither products nor plugins

You just go to "Manage products" then hit the drop down tab where it says "edit" for the "Archive Adsense" Product. It will say "uninstall".



I realize that there is no support for this but I might as well ask anyway.

Can anyone confirm that this does not break the TOS of Google Adsense?

amykhar 04-11-2008 12:05 PM

Why would it break the TOS? It simply puts ad banners on archive content pages. Or am I missing some use of it?

FlyBoy73 04-11-2008 05:26 PM

Quote:

Originally Posted by GrAveTzT (Post 1488115)
You just go to "Manage products" then hit the drop down tab where it says "edit" for the "Archive Adsense" Product. It will say "uninstall".



I realize that there is no support for this but I might as well ask anyway.

Can anyone confirm that this does not break the TOS of Google Adsense?

It does not break any Adsense TOS.

crkgb 04-11-2008 09:52 PM

Quote:

Originally Posted by GrAveTzT (Post 1488115)
You just go to "Manage products" then hit the drop down tab where it says "edit" for the "Archive Adsense" Product. It will say "uninstall".

lol thank you so much stupid me could not find the name of the mod

GrAveTzT 04-12-2008 05:10 AM

I guess it shouldn't break the TOS.

Its just google demands you to have content on the site and I figured that the archive list may not be enough.

almannai 04-20-2008 11:16 AM

thanks, nice hack:)

fukdawrld 04-21-2008 03:05 AM

i cant seem to get it to show anywhere please help

amykhar 04-21-2008 01:42 PM

To the above poster (sorry, refuse to type that name :D) I can't check your installation because your homepage isn't linked. However, when you first start using adsense banners on new pages, it often takes some time for the banners to show up. This is because it takes google a bit of time to serve the ads to the page. If they are still not there after a day, pm me the link to your archive and I'll see what I can see.

Phornixx 05-03-2008 08:20 PM

I dont seem to get this working, I dont use Adsense, I use AdutAdWorld ads, my code is as follows:

Header

Code:

$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:

Code:

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

Julie 05-04-2008 11:31 AM

Thanks :)

Edit: I'm having some problems with some conditionals. The ads show up alright, but the user groups I've specified, shouldn't see the ads. Here's part of my conditional code:

Code:

<if condition="is_member_of($bbuserinfo, 21, 26, 6, 1)"><p>No ads</p><else /><div align="center">
<p>Ads code</p>
</div>
</if>

But what it is doing, is (if using the code above) print out both "No ads" and "Ads code". What do I have to write in the plugin to get it to NOT display ads for members of user groups X, Y, Z, but show the ads for members of user groups A, B, C?

I also tried writing a PHP conditional
Code:

if (condition) {
}
else {
}

But that didn't work either :/

Thanks in advance :)

veenuisthebest 05-04-2008 12:42 PM

I believe your conditional is wrong..

Use this instead

Code:

<if condition="is_member_of($vbulletin->userinfo, 21, 26, 6, 1)"><p>No ads</p><else /><div align="center">
<p>Ads code</p>
</div>
</if>


Julie 05-04-2008 01:23 PM

Quote:

Originally Posted by veenuisthebest (Post 1508056)
I believe your conditional is wrong..

Use this instead

Code:

<if condition="is_member_of($vbulletin->userinfo, 21, 26, 6, 1)"><p>No ads</p><else /><div align="center">
<p>Ads code</p>
</div>
</if>


Thanks for your help, but that didn't do the trick either :S

veenuisthebest 05-04-2008 01:47 PM

it shouldn't be !!

Its definitely something to do with conditional.. also try this:-

Code:

<if condition="is_member_of($vbulletin->userinfo, array(1, 2, 3))">
anyways Visit here for a nice Template Conditionals list.. it should solve your problem !!

Julie 05-04-2008 02:10 PM

Quote:

Originally Posted by veenuisthebest (Post 1508101)
it shouldn't be !!

Its definitely something to do with conditional.. also try this:-

Code:

<if condition="is_member_of($vbulletin->userinfo, array(1, 2, 3))">
anyways Visit here for a nice Template Conditionals list.. it should solve your problem !!

Nope, that didn't work either :( Maybe it has something to do with the <phpcode> tag in the xml file?

Oh well... It wasn't meant to be I guess :D Hehe...

Thanks for the link by the way, will definitely take a look at it! :)

Phornixx 05-04-2008 03:45 PM

Quote:

Originally Posted by Phornixx (Post 1507261)
I dont seem to get this working, I dont use Adsense, I use AdutAdWorld ads, my code is as follows:

Header

Code:

$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:

Code:

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

And what about me? Any help? :(

Julie 05-04-2008 06:00 PM

Quote:

Originally Posted by Phornixx (Post 1508209)
And what about me? Any help? :(

It might have something to do with the single quotes you've used in the document.write('') statement.

Code:

$output.='
^ is started and ended with a single quote ('), and I don't know for sure, but maybe the single quotes in the document.write statement causes the $output to be ended earlier than it should...

You can try changing the single quotes to double quotes;

Code:

document.write("Hello World!")
I have no idea if that'll do the trick though :/

Phornixx 05-04-2008 08:25 PM

Quote:

Originally Posted by Julie (Post 1508360)
It might have something to do with the single quotes you've used in the document.write('') statement.

Code:

$output.='
^ is started and ended with a single quote ('), and I don't know for sure, but maybe the single quotes in the document.write statement causes the $output to be ended earlier than it should...

You can try changing the single quotes to double quotes;

Code:

document.write("Hello World!")
I have no idea if that'll do the trick though :/

Nice try, the error is gone now but my ads dont show up because I changed the Code. Any other way I could modify the outside Ad code? Thanks!

Julie 05-04-2008 09:31 PM

Quote:

Originally Posted by Phornixx (Post 1508539)
Nice try, the error is gone now but my ads dont show up because I changed the Code. Any other way I could modify the outside Ad code? Thanks!

Hm, then try changing the $output.=' single quote to double quote. Don't forget the last one on the end, after your own code finishes...

Phornixx 05-04-2008 10:31 PM

Quote:

Originally Posted by Julie (Post 1508622)
Hm, then try changing the $output.=' single quote to double quote. Don't forget the last one on the end, after your own code finishes...

That was the first thig I tried but no success, I get the same arror again and again. How can I change the $output.=' ??

Julie 05-07-2008 04:46 PM

Quote:

Originally Posted by Phornixx (Post 1508677)
That was the first thig I tried but no success, I get the same arror again and again. How can I change the $output.=' ??

I have no idea :/ I don't know a lot about vbulletin/php programming. Sorry!

Derek_Trotter 05-12-2008 09:52 AM

I installed the product but right adsense ads does not apear?
Why?


All times are GMT. The time now is 06:00 AM.

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.01325 seconds
  • Memory Usage 1,837KB
  • 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
  • (14)bbcode_code_printable
  • (14)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