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 - Google Adsense (or any kind of ads) on attachment image (https://vborg.vbsupport.ru/showthread.php?t=142293)

deathemperor 03-16-2007 10:00 PM

Google Adsense (or any kind of ads) on attachment image
 
I coded this hack as a paid service request here
by zlos.

I'll go fast on this by using his request thread as a description for this hack.

Briefly it allows you to put Google adsense ( or any kind of ads) on image attachments. Currently supported gif, jpeg, jpg, bmp and psd.

To customize your ads, edit image_adsense template. Make sure to change the adsense code to yours or I'll steal the money from you clicks :p .

check attachment for Screenshot.

UPDATE:

- 03/20/2007: Correct a bug for PSD or JGP/GIF files. The ads will now be displayed with those files (upper case letters). Thanks zlos for this.

- Edit 17/04/2007:

I've corrected one error and I think it should be working now. Or you can try it here:

http://area51.holvn.org/attachment.p...1&d=1176805966

user:admin/password: admin. The product I used there is the same as at vb.org.

Hope it works now.

This hack is absolutely free (no f***king lite version whatsoever). however anykind of donation is welcome, my paypal is bloodynighcrawler [at] gmail [dot] com.

zlos 03-17-2007 10:07 AM

BANG!
First - ordered, installed and thankfull for this mod.


Results after 24h in operations:

- Google Analytics registered +25% of page impressions :)
- Google Adsense paid 10% extra to my account :D


Have fun! :)

cutoi 03-17-2007 11:41 AM

Installed. tks

tanyeri24 03-17-2007 01:24 PM

installed but doesn't work, no ads. Attachments are same...

zlos 03-17-2007 05:07 PM

Deathemperor - please check if this product does influence browsing of inline small graphical attachments within the thread. Please see enclosure :)

These attachmenst are small gif files (emoticons).

RichieBoy67 03-17-2007 05:40 PM

Hats off to you!! Thanks so much for spending your time to do this..... If I do end up installing and using this I will donate for sure...

I cannot wait to take a look and see how this was done...

Thanks again..

Rich

Ntfu2 03-17-2007 06:10 PM

awesome, i've wanted this for a while!

deathemperor 03-17-2007 06:49 PM

Quote:

Originally Posted by zlos (Post 1205724)
Deathemperor - please check if this product does influence browsing of inline small graphical attachments within the thread. Please see enclosure :)

These attachmenst are small gif files (emoticons).

The thumbnail is supposed to be working, it's working on my live site. You can check http://www.holvn.org/forum . The language may confuse you but well it works there. Give me a live to your site

puertoblack2003 03-17-2007 07:54 PM

i found one problem one of my members when they upload an attachment the attachment is not viewable till i disabled hack..

tanyeri24 03-17-2007 08:35 PM

Quote:

Originally Posted by tanyeri24 (Post 1205605)
installed but doesn't work, no ads. Attachments are same...

uninstalled

PoetJA-1975 03-18-2007 03:29 AM

Quote:

Originally Posted by tanyeri24 (Post 1205605)
installed but doesn't work, no ads. Attachments are same...

Same here - installed on 3.6.5 with vBSEO using Opera 9.10
Shows no adsense ads = Help please!

Thanx,

Jacquii.

kenfuzed 03-18-2007 04:29 AM

Just curious if anyone has run this by Google to see if it's in line with their TOS.
I'd want to make sure my Adsense account is not in danger of cancelation before installing.

deathemperor 03-18-2007 05:41 AM

anyone can provide a link to your site ? I can't debug this hack until then. You guys can check this out in my forum, it's working here: http://www.holvn.org/forum/showthrea...8805#post98805. This is an English box so you can even test it out by using this account: test/test.

zlos 03-18-2007 07:50 AM

Deathemperor - there is a bug, which I have corrected, but some other guys may overlook it. Your attachments are displayed through attachment.html file, while standard vB uses atachment.php.

Change the extension in the template ;)

deathemperor 03-18-2007 08:21 AM

Quote:

Originally Posted by zlos (Post 1206153)
Deathemperor - there is a bug, which I have corrected, but some other guys may overlook it. Your attachments are displayed through attachment.html file, while standard vB uses atachment.php.

Change the extension in the template ;)

Thanks for telling me. Fixed the xml.

puertoblack2003 03-18-2007 12:15 PM

Quote:

Originally Posted by zlos (Post 1206153)
Deathemperor - there is a bug, which I have corrected, but some other guys may overlook it. Your attachments are displayed through attachment.html file, while standard vB uses atachment.php.

Change the extension in the template ;)


thanks for the heads up i think my issue maybe resolved after this post an made adjustment in template, i had the problem when my members upload an attachments you can see,so then i disabled it then it's viewable:up: ...how can you tell if it worked i don't see any difference :eek:

Rich 03-18-2007 12:16 PM

If the google ad is displaying on a seperate page when an image is clicked, it can violate the TOS as that page has no content. Creating pages, like that, for the sake of adding adsense, can get you terminated.

PoetJA-1975 03-18-2007 12:31 PM

changed .html to .php in the xml file and made sure the image_adsense template corrected as well - still... no showing of adsense...

ALSO rebuilt attachment thumbnails in the admincp... Help!

Link to post with many attached pics: http://jpicforum.info/lots-humor/cats-painted-2508.html

Could it be a conflict with vBSEO and this modification?

Thanx,
Jacquii.

deathemperor 03-18-2007 12:36 PM

Quote:

Originally Posted by PoetJA-1975 (Post 1206327)
changed .html to .php in the xml file and made sure the image_adsense template corrected as well - still... no showing of adsense...

ALSO rebuilt attachment thumbnails in the admincp... Help!

Link to post with many attached pics: http://jpicforum.info/lots-humor/cats-painted-2508.html

Could it be a conflict with vBSEO and this modification?

Thanx,
Jacquii.

You are using vbSeo which changes the url of the attachment. I can't be sure if vbseo is making the hack useless on your board.

tanyeri24 03-18-2007 06:55 PM

Quote:

Originally Posted by zlos (Post 1206153)
Deathemperor - there is a bug, which I have corrected, but some other guys may overlook it. Your attachments are displayed through attachment.html file, while standard vB uses atachment.php.

Change the extension in the template ;)

I saw this bug before too but no matter anyways no ads in att. I think the problem i in the .xml

zlos 03-19-2007 08:51 AM

Quote:

Originally Posted by Rich (Post 1206317)
If the google ad is displaying on a seperate page when an image is clicked, it can violate the TOS as that page has no content. Creating pages, like that, for the sake of adding adsense, can get you terminated.

Well - it is up to you to fill in the page with proper content. You have now a bunch of possibilities to make it a real page and not only empty with simple image and google ad.

I am still in progress of building a content page displaying images instead of staying with simple - maybe TOS-violating - page.

Quote:

Originally Posted by tanyeri24 (Post 1206703)
I saw this bug before too but no matter anyways no ads in att. I think the problem i in the .xml

Try this:
- delete the product completely (inluding the plugin)
- install it once more

I don't know about dependencies with SEO or portal systems, since I am not using those.

Rich 03-19-2007 03:53 PM

Many images, when clicked, will open the original file in a new window. If THAT page is displaying these ads, you are in violation of googles TOS.

Adding relevant content for google ads to be displayed on a page where the only thing displayed is the original file size is pretty difficult to do. (Not to mention a massive waste of time.)

Those who use this feature, if it is iondeed how it works, need to realize that if caught, your account WILL be terminated.

zlos 03-19-2007 09:56 PM

Quote:

Originally Posted by Rich (Post 1207398)
Many images, when clicked, will open the original file in a new window. If THAT page is displaying these ads, you are in violation of googles TOS.

Adding relevant content for google ads to be displayed on a page where the only thing displayed is the original file size is pretty difficult to do. (Not to mention a massive waste of time.)

Those who use this feature, if it is iondeed how it works, need to realize that if caught, your account WILL be terminated.

vB opens an image which is bigger in a new file. It is not original file.
Standard behaviour of vB is that images which are of the same size are not clickable.

Anyhow - I will write to Google to clarify this from their point of view.

deathemperor 03-20-2007 11:41 AM

Update 03/20/2007: Correct a bug for PSD or JGP/GIF files. The ads will now be displayed with those files (upper case letters). Thanks zlos for this.

zlos 03-20-2007 06:55 PM

Still waiting for answer from Google :)

Here you can see this hack in action. Click and see the page source.

karabalsagun 03-20-2007 08:41 PM

This is clearly a violation of Google Adsense TOS.

But, it can be use for other ad networks, great idea ;)

zlos 03-22-2007 07:39 AM

Quote:

Originally Posted by karabalsagun (Post 1208297)
This is clearly a violation of Google Adsense TOS.

But, it can be use for other ad networks, great idea ;)

Following this, no image gallery would be allowed to use Google Adsense.
Although I don't want my account to be cancelled and thus replaced GA ads with another network, which has responded positively.

p.s. Still waiting for answer from Google guys...

Ntfu2 03-22-2007 01:11 PM

Isn't working for me either on 3.6.5 attachments are in filesystem.

The attachments appear just fine, but no advertisements.

Ntfu2 03-23-2007 08:44 PM

Anyone get this to work other then the creator?

tanyeri24 03-24-2007 12:02 AM

Quote:

Originally Posted by Ntfu2 (Post 1210616)
Anyone get this to work other then the creator?

I think no :) It doesn't work for me too.

PoetJA-1975 03-24-2007 12:39 AM

I sure as hell ain't got it to work either....
To bad - I was looking forward to this modification = kinda sucks - but oh well...

Jacquii.

zlos 03-24-2007 09:24 AM

Quote:

Originally Posted by PoetJA-1975 (Post 1210732)
I sure as hell ain't got it to work either....
To bad - I was looking forward to this modification = kinda sucks - but oh well...

Jacquii.

If you can't get it working, it means that the first if(...) instruction from plugin is false.

Go to Plugin edit and go through these conditions. There is definetely something, which is being hacked or changed compared to the original.

I have also changed this code a little to reflect my changes and it works.

BTW: adding &postid=$thread[postid] to link to the attachment would be an option for some of you, I think ;)

fasteddie 03-24-2007 04:32 PM

zlos: THANK YOU!

I had to add that &postid=$thread[postid] to get it working myself... just one little change to the image_adsense template (just pasted the snippet I changed)

Code:

<div><center><img src="$vboptions[bburl]/attachment.php?attachmentid=$attachmentid&ads=1&d=$time&postid=$thread[postid]" border="0" alt="" /></div></center>
It showed ads for a few minutes, but now it's not working... Very odd! :(

scottct1 03-26-2007 02:05 PM

Not working for me. :(

Great idea, just get it to work. :)

RedTyger 03-26-2007 03:30 PM

Quote:

Originally Posted by fasteddie (Post 1211183)
zlos: THANK YOU!

I had to add that &postid=$thread[postid] to get it working myself... just one little change to the image_adsense template (just pasted the snippet I changed)

Code:

<div><center><img src="$vboptions[bburl]/attachment.php?attachmentid=$attachmentid&ads=1&d=$time&postid=$thread[postid]" border="0" alt="" /></div></center>
It showed ads for a few minutes, but now it's not working... Very odd! :(

Are you using Adsense? That bases itself on text within the page, since there is none I'm sure it would simply fail unless it's using banners or something. Might fail even then, I'm not sure.

deathemperor 03-27-2007 12:47 AM

I really can't get an idea why it does not work because it is working on my board without any modifications to the template, except from installing the hack. I sincerely desire to know why it's not working for you really.

fasteddie 03-27-2007 01:05 AM

Quote:

Originally Posted by RedTyger (Post 1212787)
Are you using Adsense? That bases itself on text within the page, since there is none I'm sure it would simply fail unless it's using banners or something. Might fail even then, I'm not sure.


Yes, I am using Adsense. I also tried to put in just a static image on the attachments page (just to test out), but that didn't work either... :(

BigJimTheLug 03-27-2007 03:19 AM

Quote:

Originally Posted by kenfuzed (Post 1206073)
Just curious if anyone has run this by Google to see if it's in line with their TOS.
I'd want to make sure my Adsense account is not in danger of cancelation before installing.

it is your responsibility to make sure it is within Google's TOS.

Send them a screen shot and explain it to them.

So far, this appears to be withing the TOS because you are not making the ads look like a post, you are simply adding them as attachments to the post.

In a sense, you add Google adsense as attachments every where else, but if you need clarification or peace of mind, contact Google.


Good luck.

HawKe 04-02-2007 10:55 AM

Not working for me either... tried all the suggestions here. Great concept but needs more troubleshooting I suppose. Deinstalled.

fasteddie 04-05-2007 10:28 PM

Any ideas on why this doesn't work for so many??? It's just the hack I've been waiting for!


All times are GMT. The time now is 07:37 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.01377 seconds
  • Memory Usage 1,832KB
  • 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
  • (2)bbcode_code_printable
  • (16)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