vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin Pre-Sales Questions (https://vborg.vbsupport.ru/forumdisplay.php?f=26)
-   -   Users can post adsense in their blog when using vb blog? (https://vborg.vbsupport.ru/showthread.php?t=195352)

NokStar 11-03-2008 03:03 PM

Users can post adsense in their blog when using vb blog?
 
Hi is it possible users to post their adsense code in their blog when i am using vbblog addon on my forum?

I mean i am giving free blogs to each user using vb blog addon. So is it possible to add their adsense code in their blog like blogger allows their members?

Any mod like that?

SEOvB 11-03-2008 03:09 PM

I'm not sure if this will work, but you can create a profile field call it Adsense Publisher Id, then put the adsense code in your template and replace the standard publisher id with $blog[fieldX].

I'm not 100% positive that the profile fields work within the blog area, so you might want to wait for a person with experience with the blog comes along, or ask over at vBulletin.com where you can get a definite answer

NokStar 11-03-2008 11:21 PM

thanks buddy.

TheElf 11-10-2008 01:39 AM

Well...

It isn't an easy question.
Why? While any modification to templates that would add adsense to the page would be problematic for user who don't have adsense....
Allowing HTML for the blog would be risky (even for a custom template)
And I am unsure if you could use a custom BB code for this task, mostly because it would be hard to restrict its used to custom blocks in the blog.

So I think you would need a plugin for this.

MrEyes 11-11-2008 10:19 AM

Quote:

Originally Posted by FRDS (Post 1658621)
I'm not sure if this will work, but you can create a profile field call it Adsense Publisher Id, then put the adsense code in your template and replace the standard publisher id with $blog[fieldX].

This is something I have been looking into for sometime, however with one thing or another I have not yet got around to making it live. From what I have worked out so far a "mod" isn't really needed.

As you said you can use the fieldX value in the template for the product ID, however I think you also need the "google_ad_slot" and then some cunning way of managing width/height and ensuring that users don't insert a skycraper banner in the vertical slot.

Once you have that the only other thing you need to do is add a conditional statement that checks if the user has actually supplied a valid publisher id etc and if not revert back to the defaults for the site (or not display the banner at all)

The other complexity was brought in with 3.7 and the ad location templates, these are generic and used on all VB pages, so if you use these the conditional needs to check THIS_SCRIPT to make sure it is a blog page and not something else.

I was planning on doing is a regular expression check on the user fields (the default profile field manager supports this), again I never got around to finding out was the structure of the PID/Slot ID so I haven't got the regexes.

Obviously whatever is used in the end should never ever ever ever allow HTML to be embedded.

The final thing, is getting Google approval to do this.

SEOvB 11-18-2008 04:00 PM

Quote:

Originally Posted by MrEyes (Post 1663451)
This is something I have been looking into for sometime, however with one thing or another I have not yet got around to making it live. From what I have worked out so far a "mod" isn't really needed.

As you said you can use the fieldX value in the template for the product ID, however I think you also need the "google_ad_slot" and then some cunning way of managing width/height and ensuring that users don't insert a skycraper banner in the vertical slot.

Once you have that the only other thing you need to do is add a conditional statement that checks if the user has actually supplied a valid publisher id etc and if not revert back to the defaults for the site (or not display the banner at all)

The other complexity was brought in with 3.7 and the ad location templates, these are generic and used on all VB pages, so if you use these the conditional needs to check THIS_SCRIPT to make sure it is a blog page and not something else.

I was planning on doing is a regular expression check on the user fields (the default profile field manager supports this), again I never got around to finding out was the structure of the PID/Slot ID so I haven't got the regexes.

Obviously whatever is used in the end should never ever ever ever allow HTML to be embedded.

The final thing, is getting Google approval to do this.

You should still be able to use the old google adsense code inside the templates so users don't go crazy or awol with their posting of adsense. That should take care of the sizes issue and needing an ad slot.


All times are GMT. The time now is 02:42 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.01107 seconds
  • Memory Usage 1,726KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete