PDA

View Full Version : Miscellaneous Hacks - Google Adsense (or any kind of ads) on attachment image


deathemperor
03-16-2007, 10:00 PM
I coded this hack as a paid service request here (https://vborg.vbsupport.ru/showthread.php?p=1204772#post1204772)
by zlos (https://vborg.vbsupport.ru/private.php?do=newpm&u=84134).

I'll go fast on this by using his request thread (https://vborg.vbsupport.ru/showthread.php?t=138466&highlight=adsense+attachment) 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.php?attachmentid=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
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
installed but doesn't work, no ads. Attachments are same...

uninstalled

PoetJA-1975
03-18-2007, 03:29 AM
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/showthread.html?p=98805#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
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
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
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
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
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.

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
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 (http://pretty.wizaz.pl/forum/attachment.php?attachmentid=834089&d=1174125617&postid=3935420) 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
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
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
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)


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


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

fasteddie
04-17-2007, 02:36 AM
Any updates?

deathemperor
04-17-2007, 09:34 AM
hey guys,

this is the only options I can do to check it out why it's not working for you guys.

I've set up a test board here:

http://area51.holvn.org

username: admin, password: admin.

I've installed this hack there and it's working. You can try removing it and install it again by downloading the hack here and see.

Just see it's working on that test place.

deathemperor
01-14-2008, 11:07 AM
modification updated: Fixed a bug making the files with extension in UPPERCASE not showing ads.

RonH.
01-14-2008, 11:36 AM
I'm surprised no one has asked the question yet. Are there any recent plans to upgrade this mod for version 3.7 beta or are you going to wait until gold?

deathemperor
01-14-2008, 11:56 PM
It's best to go with gold. the hack is rather small so there won't be so too many things to do, moreover ppl will take vb only it's gold (except the relatively small boards that don't care risk ;) ).

Sandy-XXX
01-25-2008, 04:29 PM
No working for me on 3.6.8 Level 2 :(

Attachment show, but nothing more...

deathemperor
01-26-2008, 12:21 AM
I believe it need a conversion for 3.6.8. I will only do it on final release.

BarcaMaroc
04-30-2008, 01:28 PM
nice

valdet
05-21-2008, 04:55 AM
Are you sure Google allows to display ads like this.

Their TOS clearly state that ads should not be placed near or below/above pictures and they also say that ads should not be displayed in a non-content(text) page.

I hope some Adsense pros can clarify this?

zlos
05-28-2008, 01:28 PM
Google does not allow that. It is clear. That's why I do all ads but Google. :)

redraider
06-02-2008, 11:45 PM
looks like a great mod ..could you please let us know if this is available for vb 3.7 ? ...

h2ojunkie
06-04-2008, 12:37 AM
I did some testing with this, and it's a GREAT mod.

The only problem I came across at this point, is if a user makes a post containing an image like this...

https://vborg.vbsupport.ru/

...the image won't show in the post since the plugin is trying to show the new template in place of the standard image data.

Just have to come up with a way to keep the plugin from executing when viewing showthread or showpost. maybe adding something to your conditional to check request_uri for showthread.php or showpost.php.

I'm not the greatest at this stuff, but if I come up with a solution I'll be sure to post it.

madkeen
06-04-2008, 11:29 AM
Would it be possible to have this Membergroup dependent?

I have implemented Subscriptions and would prefer that members in the subscribed members member group do not see the ads

Is this possible?

Cristi_XP
12-20-2008, 12:36 AM
installed and working even in 3.7.4. Does anyone who didn`t got it to work is using watermark on images ?On the forums that I use watermarks on images ,it doesn`t work only when I disable the watermark plugin.
Can you get it to work with the watermark plugin ?The plugin I am using is this (https://vborg.vbsupport.ru/showthread.php?t=141883&page=13)

naveeid
04-22-2015, 05:04 AM
can i have a copy of this mod for vbulletin4????

naveeid
05-15-2015, 10:21 AM
hey i want this for vbulletin 4 , please help me any body , any paid version ??????

SaN-DeeP
05-15-2015, 06:00 PM
Great addon..
FYI - I will never do this.. just again FYI.