The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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? |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
thanks buddy.
|
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
Quote:
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. |
#6
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|