vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=237502

Google Adsense (or other) in a Block like a Thread on FORUMDISPLAY
by Leo Brazil
04 Mar 2010 20:19

5 Attachment(s)
This is a simple code to be added into your FORUMDISPLAY Template that will deliver your adsense or images just like Thread Table and it'll fit the same design you have on your forums.

Khalled had this idea from a vb3 Code and asked me some help because of my other mod: Google Adsense (or other) in a Block like an Individual Post
And this was from where his original idea came from http://www.vbulletin.org/forum/showthread.php?t=237136


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Note: Just don't forget to add your adsense code where is indicated.


If you want it below your thread list considering a respective Forumdisplay that plays like a forum and not a category you have to:

On FORUMDISPLAY Template

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just place the code below it.

If you want it above your subforum list as well as Threadlist you have to:

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just place the code below it.


If you want it below your subforum list as well as Threadlist you have to:


Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


If you want it below your sticky threads you have to:

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just place the code below it.

Update!!

If you'd like to have your adsense looking just like a thread (see 4th screen shot) use the code below:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just don't forget to replace on the code above with your own adesense.
Note: The code above will look good only if placed as suggested below and will appear like a sticky thread after the sticky ones you already have.

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just place the code below it.

If you have other ideas how to use and don't mind to share with us, make your self comfortable for it. :up:

Edit: Screen Shots Added:
1- Above Sub Forums
2- Below Sub Forums
3- After Sticky Threads

If you like it, don't forget to mark as INSTALLED !!!

zeroality 05 Mar 2010 04:25

Any demo to show what it looks like? Thanks.

Hornstar 05 Mar 2010 06:39

or screen shot will be fine too.

Leo Brazil 05 Mar 2010 20:13

My bad, screen shots added.

khalled 05 Mar 2010 22:11

dear Leo Brazil very very thanks for your quick cooperation and help

but please there is minor different between what i want and the code you give although your code is very useful

What i want that Google Adsense appear as it is threads
like the below pictures in vb 3.8 the Google Adsense appear as threads in thredlist
can we do the same thing with vb 4


http://www.vbulletin.org/forum/attac...9&d=1186315438

like this mod do in vb 3.8

http://www.vbulletin.org/forum/showthread.php?t=154361

i wait for your help if it's possible

khalled 05 Mar 2010 22:36

1 Attachment(s)
also the attached pictures can clear more what i main

http://www.vbulletin.org/forum/attac...4&d=1267828523

baghdad4ever 07 Mar 2010 16:35

is that against google policy or not??

please can you tell me

khalled 07 Mar 2010 22:19

Quote:

Originally Posted by baghdad4ever (Post 1999133)
is that against google policy or not??

please can you tell me

NO it'snot , google answer by that
if any one can catch required code

khalled 08 Mar 2010 12:17

Dear ,Leo Brazil i wait you

baghdad4ever 08 Mar 2010 16:58

thanks khaled to confirm that

so can i install the other mod of Leo Brazil (post inside thread ) with this mod?????



see this if you want it i will pm you

http://www.baghdad4ever.net/vb/forumdisplay.php?f=175

khalled 09 Mar 2010 09:26

Quote:

Originally Posted by baghdad4ever (Post 1999862)
thanks khaled to confirm that

so can i install the other mod of Leo Brazil (post inside thread ) with this mod?????



see this if you want it i will pm you

http://www.baghdad4ever.net/vb/forumdisplay.php?f=175

yes you can
and good site

Leo Brazil 09 Mar 2010 12:25

Quote:

Originally Posted by baghdad4ever (Post 1999133)
is that against google policy or not??

please can you tell me

No, that's for sure. If the ads are clearly visible and you don't change Google's script, you'll be 100% clear with that.

Quote:

Originally Posted by baghdad4ever (Post 1999862)

so can i install the other mod of Leo Brazil (post inside thread ) with this mod?????

see this if you want it i will pm you

http://www.baghdad4ever.net/vb/forumdisplay.php?f=175

You can use both of my mods without any problems, I've tested them together.
Great site by the way, good to see my mod installed and work good on RTL language.

Quote:

Originally Posted by khalled (Post 1998017)
dear Leo Brazil very very thanks for your quick cooperation and help

but please there is minor different between what i want and the code you give although your code is very useful

What i want that Google Adsense appear as it is threads
like the below pictures in vb 3.8 the Google Adsense appear as threads in thredlist
can we do the same thing with vb 4

i wait for your help if it's possible

Khalled, I've got your idea and will see what I can do, OK ? Just give me some time, this week I'm terrible busy with a lot of things but I'll do it OK. :up:

khalled 10 Mar 2010 01:33

Quote:

Originally Posted by Leo Brazil (Post 2000357)


Khalled, I've got your idea and will see what I can do, OK ? Just give me some time, this week I'm terrible busy with a lot of things but I'll do it OK. :up:


Very thanks Leo Brazil , i think you forget me , take your time and thanks again for your cooperation

YankForum 12 Mar 2010 19:34

if u need it to be just like threads , u need to copy ALL contents of threadbit and paste it in forumdisplay in appropriate area as mentioned above by leobrazil , and just replacing title by adsense coe and inset some random values for replies and vies and last post

Leo Brazil 12 Mar 2010 20:34

Khalled,

Updated this one just for you. Now you'll have the option to have your adsense to be showed just like this:

https://www.vbulletin.org/forum/external/2010/03/56.jpg

khalled 12 Mar 2010 22:29

Quote:

Originally Posted by Leo Brazil (Post 2002329)
Khalled,

Updated this one just for you. Now you'll have the option to have your adsense to be showed just like this:

https://www.vbulletin.org/forum/external/2010/03/56.jpg

Dear Leo Brazil
very very thanks for your help your are very marvelous man

khalled 12 Mar 2010 22:41

Quote:

Originally Posted by Leo Brazil (Post 2002329)
Khalled,

Updated this one just for you. Now you'll have the option to have your adsense to be showed just like this:

http://www.vbulletin.org/forum/attac...4&d=1268425889

Dear Leo Brazil
very very thanks for your help your are very marvelous man

javivi0 13 Mar 2010 01:14

thankssssss work fine !!!!!!!

khalled 15 Mar 2010 21:38

Dear Leo Brazil
i use your code after the following in search_resultlist to add the block at the end of search result

- after the following add the adsense code

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but where i can add it to appear in the beginning of search result

Bürger_von_Rado 16 Mar 2010 18:26

Thanks, worked and installed/modified.

Leo Brazil 22 Mar 2010 15:05

Quote:

Originally Posted by khalled (Post 2004276)
Dear Leo Brazil
i use your code after the following in search_resultlist to add the block at the end of search result

- after the following add the adsense code

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but where i can add it to appear in the beginning of search result

Sorry Khalled, I've been too busy.

If you want it to appear on top of the search list, add the code right after:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you like the way it shows at the end on search results, it'll be the same like I'm telling but it's going to show up at the beginning.

Try it and let people know here if it works.

khalled 23 Mar 2010 21:44

Quote:

Originally Posted by Leo Brazil (Post 2008090)
Sorry Khalled, I've been too busy.

If you want it to appear on top of the search list, add the code right after:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you like the way it shows at the end on search results, it'll be the same like I'm telling but it's going to show up at the beginning.

Try it and let people know here if it works.

very thanks Leo Brazil for your help you are very professional programmer

it's work good

Winter Sonata 24 Apr 2010 08:45

Installed, Thanks

medicalforums 14 Jun 2010 22:48

Is there anyway I can use this modification on my 3.8 VB?

asus78 23 Aug 2010 01:07

it would be awesome to put adsense within cms articles or blog post. Is that possible at all?

thanks

VAG 09 Sep 2010 09:03

I guess so.

You could edit the template to add this as it doesn't currently have an ad location.

Try looking through the 'vbcms_content_article_page' template.

Only don't know where to insert the code.

onehost 13 Sep 2010 06:00

I tried this on my forum as an inpost ad...

It looked horrible...It looked some spammy ad, did not match nothing.

let me know when you come up with something like this:

DEMO: Look at this if you want to see how an AD really matches....

http://www.patientenfragen.net/en/vo...ome-t1810.html

lubbie 14 Sep 2010 15:43

onehost
Warnung: filemtime() [function.filemtime]: stat failed for [path]/vbet_guestcache/en/_showthread_php_t_181012.zip in [path]/includes/vbenterprisetranslator_functions_guestcache.php (Zeile 53)
Oo
Von daher.Ich finds auch ehrlich gesagt nicht ok sowas zu schreiben und dann noch auf seinen eigenen Mod zu verweisen.

Man könnte meinen... Du musst es ja nötig haben.

Wenn Du schon Kritik üben willst dann doch konstruktiv!
edit. Abgesehen davon ist Deine Variante durchaus ansprechend.

Sry everybody, but i could not find any Words for what i wanted to "say", in english ;)

synseal 22 Oct 2010 00:28

Really like this for sticky adds, thank you!.

Dr Longhorn 16 Nov 2010 18:09

Hi Leo Brazil,

This works fine with the forumdisplay template, and it looks great.

Can you help with editing the postbit or showthread template in order to place an adsense ad in a block, right above the first post of each thread.

I got this to work with just an adsense ad, but can't seem to get it to work with a block like in your example images.

Can you help with the correct code and position for this? Am I editing the correct templates?

Also I would like to have the ad block on the category pages as well as forums, i.e. forums that are set-up as categories.

Can you please help with this too?

Longhorn.

Markos 19 Nov 2010 15:05

can anyone help me I'm trying to get this to have 6 images in it like this one
http://img.photobucket.com/albums/v3...77/ffsfdfd.jpg

here is the code I'm trying to do it with


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

it doesn't turn out right instead of going along the way it goes up and down the way

Leo Brazil 05 Jan 2011 11:14

Sorry, I've been pretty busy for awhile. Just trying to get back.

When I decided to do this mod, I had in mind to migrate my forum from vB3 to vB4 in a couple of months tops. Point is I was so disapointed with 4.0.X versions that simply couldn't waste my time. You know, bugs everywhere....
Now with 4.1 seems to be better (not perfect for sure) makes me think about getting back into it.

Quote:

Originally Posted by medicalforums (Post 2053700)
Is there anyway I can use this modification on my 3.8 VB?

Not this one, as this code is for vB4 and vB3.X code is quite different.

Quote:

Originally Posted by asus78 (Post 2088027)
it would be awesome to put adsense within cms articles or blog post. Is that possible at all?

It's possible for sure, but would need some time to work on it. I don't have full package of CMS and Blogs but If I decided to move my forums to vB4 I'll probably work on something., but not for now.

Quote:

Originally Posted by onehost (Post 2097412)
I tried this on my forum as an inpost ad...

It looked horrible...It looked some spammy ad, did not match nothing.

let me know when you come up with something like this:

DEMO: Look at this if you want to see how an AD really matches....

http://www.patientenfragen.net/en/vo...ome-t1810.html

Tried to see what happened but couldn't.
The point is, the idea for this code is to use exactly the same design as original vB template. If have a custom design or something, it'll probably look really off.
If you have a custom design but still want to use this concep, you'll need to search the code of your won templates.

Quote:

Originally Posted by lubbie (Post 2098094)
onehost
Warnung: filemtime() [function.filemtime]: stat failed for [path]/vbet_guestcache/en/_showthread_php_t_181012.zip in [path]/includes/vbenterprisetranslator_functions_guestcache.php (Zeile 53)
Oo
Von daher.Ich finds auch ehrlich gesagt nicht ok sowas zu schreiben und dann noch auf seinen eigenen Mod zu verweisen.

Man könnte meinen... Du musst es ja nötig haben.

Wenn Du schon Kritik üben willst dann doch konstruktiv!
edit. Abgesehen davon ist Deine Variante durchaus ansprechend.

Sry everybody, but i could not find any Words for what i wanted to "say", in english ;)

I can tell you this is not related to this mod at all.
By the way, any mistakes you made all you have to do is revert edited templates.

Just a tip for you guys that are not familiar in editing templates.
Created a new Style and called "Test Style" but don't give access to it for users, just for you. Make any changes you want only on this style, test it, if goes OK all you have to do is copying the whole template and paste on wroking style.
This is safer and kind bullet proof.

Quote:

Originally Posted by Dr Longhorn (Post 2122510)
Hi Leo Brazil,

This works fine with the forumdisplay template, and it looks great.

Can you help with editing the postbit or showthread template in order to place an adsense ad in a block, right above the first post of each thread.

I got this to work with just an adsense ad, but can't seem to get it to work with a block like in your example images.

Can you help with the correct code and position for this? Am I editing the correct templates?

Also I would like to have the ad block on the category pages as well as forums, i.e. forums that are set-up as categories.

Can you please help with this too?

Longhorn.

Have you checked this one ?
http://www.vbulletin.org/forum/showthread.php?t=236313

wraggster 14 Mar 2011 12:46

hi this seems a great mod, is there a way to have this showing to guests only with the option

just like a thread (see 4th screen shot)

khalled 12 Aug 2011 14:07

Quote:

Originally Posted by Leo Brazi
If you have other ideas how to use and don't mind to share with us, make your self comfortable for it.

Dear Leo Brazil
very thanks for your help to us and for your fantastic and High ability to convert ideas to reality
Your above sentence Encouraged me to ask you if it possible to make this ad show in different or random position between others threads in the formdispaly instead to be showed in fixed position.
thanks for your effort

victorvu 12 Aug 2011 15:31

Hi:

I have been looking for this simple way for ads and here it is! Thanks.

Installed, voted and nominated.

Victor:up:

BrightStar 02 Sep 2011 16:31

Hiya

Thanks for the mod. It seems to word with my forum. Just a quick question.....what should be the ad type and size? Letter board or text links only?

Also I am trying to put a letter board of size 728x90 and it's not centred but aligned to left.

How can I fix that? Thanks

BrightStar 09 Sep 2011 22:05

Anyone know the answer why am I getting this error when this mod is enabled?

Quote:

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: gaip_code1 in [path]/includes/functions.php on line 4161

byalik 24 Sep 2011 05:48

I tried adding all the different types of code but nothing happens on my forum - legalhelp(dot)org - anyone have any suggestions

ptceuro 01 Apr 2012 23:18

Excelent!! Thanks!

dany_danay 12 Sep 2013 19:53

Not showing in VB 4.2

datoneer 15 Sep 2013 23:40

Thanks it works in 4.2.1. But how to remove this? https://www.vbulletin.org/forum/external/2013/09/38.png

Edgespeeder06 25 Sep 2013 15:40

Hi, awesome plugin but I need support with Firefox, it's creating a height for the box that is double the size the height of the ad.

http://www.njstangers.org/forum/must...-sponsors-223/

Please help

Edgespeeder06 25 Sep 2013 17:16

anyway to added it before a thread starts at the top of the thread to just thread pages?


All times are GMT. The time now is 19:46.

Powered by vBulletin® Version 3.8.14
Copyright © 2022, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.