Google ads in TinyMCE. Any one tried?

Is it possible for members of websites to use their Google ads code in TinnyMCE. Any one tried?

Umar Haroon
Quote · 23 Nov 2014

You will have to prevent TinyMCE and the htmlpurifier from stripping out the javascript code.  However, that will open it up to where they can insert any javascript code.  Maybe a solution would be to insert a block on the page that uses the members' google advert code; to do this you will need to create a new field in their profile to hold the code and add the php code to retrieve it from the member's profile.  You can do a check to make sure it is just Google advert code and not some other javascript code.

Geeks, making the world a better place
Quote · 24 Nov 2014

The need for this idea came in mind, cause in forum we can't put blocks. So i was wondering if we allow users to add their code in their forum post. it will bring more traffic to the website plus the users can earn some money from a platform which is more social.

Umar Haroon
Quote · 24 Nov 2014

So you want this displayed in the forums; it is always better to be as specific as possible when asking questions.

There are several ways what you wish could be accomplish but they will require custom code changes.  If you are comfortable with making changes in php and xslt files, then you could probably have it so it will display the thread's owner advert code in the forum post without giving them full access to post malicious javascript code to your site.

Geeks, making the world a better place
Quote · 24 Nov 2014

As long as you don't care about using Adsense yourself then go ahead. Allowing people to post Adsense in a forum is a horrible idea because if anyone posts anything obscene, controversial, or any of the other things Google doesn't like its going to get someone banned. If you're not using it yourself maybe they'll ban the users AdSense account. Also there can only be a certain amount of ads per page so you'll have to watch that too.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 24 Nov 2014

Mscott points out some good points; Google bans for many reasons; of course if a member's code is banned then it should not affect the others unless Google bans the domain.  Content must be original.

As for the number of adverts on the page, you should have the advert only in the main body of the post, not in comments.  The advert displayed will be from the advert code for that particular person by grabbing the id of the poster.

Geeks, making the world a better place
Quote · 24 Nov 2014

 

As long as you don't care about using Adsense yourself then go ahead. Allowing people to post Adsense in a forum is a horrible idea because if anyone posts anything obscene, controversial, or any of the other things Google doesn't like its going to get someone banned. If you're not using it yourself maybe they'll ban the users AdSense account. Also there can only be a certain amount of ads per page so you'll have to watch that too.

This. This thread otherwise sounds like the Hindenburg Development Committee.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 24 Nov 2014

$this->probably not a good idea

It can be done; but should it be done?  Certainly not a freebie; at least I am not going to do it as a freebie.

Geeks, making the world a better place
Quote · 24 Nov 2014

In forum users will be responsible for post & their own adsense account, so they will abstain from posting something wrong cause it will ban their account. more over vulgar or pirated content will be removed by admin. i by my self wont be able to use adsense in forum why not let others to try ;) only thing ill get traffic and ranking

Umar Haroon
Quote · 24 Nov 2014

 

In forum users will be responsible for post & their own adsense account, so they will abstain from posting something wrong cause it will ban their account. more over vulgar or pirated content will be removed by admin. i by my self wont be able to use adsense in forum why not let others to try ;) only thing ill get traffic and ranking

And you'll be flooded with spam posts and Adsense links. Also the Google policy issues as mentioned above. I don't see how this does anything other than to drive legitimate users as far away as possible.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 24 Nov 2014

 RE

In forum users will be responsible for post & their own adsense account, so they will abstain from posting something wrong cause it will ban their account. more over vulgar or pirated content will be removed by admin. i by my self wont be able to use adsense in forum why not let others to try ;) only thing ill get traffic and ranking

 I, on the other hand, am not going to try and talk you out of this. I believe in letting people learn from their mistakes, however harsh that learning experience may be.

I wouldn't try adding this to TinyMCE though. You should consider a modification that will allow them to add the code to their signature.  So what if you end up with 20 google ads on one page... fck 'em if they can't take a joke.  It'll be fun to see 20 or 30 google ads on the same page.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 24 Nov 2014

lol. then ill be doing a favor to google isn't it ;) Helping in closing accounts :p how about if only the 1st post of the topic allowed to add the code and for the rest of people commenting disable the function of adding the code? Think out of box. Then wont there be only 3 or less ads ? i don't know much about tinymce but there would be a way to do it. i have seen on a forum where ad appear right under the 1st post but i don't know if that ad is from the forum admin or from the users. think think think :p

Umar Haroon
Quote · 24 Nov 2014

Google won't place 20 or 30 adverts on the same page; the limit is three and that would be the first three to comment and the rest will be rejected by Google.

As I said, the way to do this is to modify the forum code that retrieves the forum post; it will check the post owner's id and retrieve their advert code (adsense is not the only advert providers out there) from their profile and insert it at the top or bottom of the forum text.

Geeks, making the world a better place
Quote · 24 Nov 2014

 

i don't know much about tinymce but there would be a way to do it.

Sure, just allow all javascript tags.  Seriously, will you forget about TinyMCE?  Or do you want your website to have some javascript code that does really nasty things?  There is a reason why javascript code is not allowed.  Like HL said, maybe instead of just trying to educate we tell you how to turn off the stripping of javascript in TinyMCE and htmlpurifier and let your members have at it.

Geeks, making the world a better place
Quote · 24 Nov 2014

When there is a will there is a way ;) Solution is to allow only certain type of javascript codes. 

Umar Haroon
Quote · 24 Nov 2014

 This is what I was talking about, the first person posts their code and anyone else can say or do something that Google doesn't like and the first guy who did nothing wrong is going to get banned because its on the same page. When it comes to Adsense you cant think outside the box.. Google wants your thoughts inside the tiny box that their TOS sets fourth. But HL is right, every man should probably make his own mistakes so keep reaching for the stars. 

 

lol. then ill be doing a favor to google isn't it ;) Helping in closing accounts :p how about if only the 1st post of the topic allowed to add the code and for the rest of people commenting disable the function of adding the code? Think out of box. Then wont there be only 3 or less ads ? i don't know much about tinymce but there would be a way to do it. i have seen on a forum where ad appear right under the 1st post but i don't know if that ad is from the forum admin or from the users. think think think :p

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 24 Nov 2014

 Do you think google check every post ? you must be kidding me. They just check what kind of content your website is hosting. And specially on social network it is impossible to check the content. Ever wonder there are many pornographic pics on facebook. Facebook only take action when you report the content. So it all depends what kind of forum you are running.

 This is what I was talking about, the first person posts their code and anyone else can say or do something that Google doesn't like and the first guy who did nothing wrong is going to get banned because its on the same page. When it comes to Adsense you cant think outside the box.. Google wants your thoughts inside the tiny box that their TOS sets fourth. But HL is right, every man should probably make his own mistakes so keep reaching for the stars. 

 

Umar Haroon
Quote · 25 Nov 2014

 Yeah, they have one guy who sits there and checks ten zillion sites.. No, it's all automated. There is a list of words the bots look for and then either stop serving ads or ban you. But for goodness sake don't take my word for it, just Google it and read one of the thousands of articles about it. 

 

 Do you think google check every post ? you must be kidding me. They just check what kind of content your website is hosting. And specially on social network it is impossible to check the content. Ever wonder there are many pornographic pics on facebook. Facebook only take action when you report the content. So it all depends what kind of forum you are running.

 This is what I was talking about, the first person posts their code and anyone else can say or do something that Google doesn't like and the first guy who did nothing wrong is going to get banned because its on the same page. When it comes to Adsense you cant think outside the box.. Google wants your thoughts inside the tiny box that their TOS sets fourth. But HL is right, every man should probably make his own mistakes so keep reaching for the stars. 

 

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 Nov 2014

 In my country all copy right violated material is being paid by google :D i don't know why google sleeps there :p Like facebook introduced this feature to ban those pictures which ask for likes, so people here have a solution for that, to ask likes on local language ;) For Every thing there is solution. Even if google bans there are plenty other way to get paid. Local advert marketing :)

 Yeah, they have one guy who sits there and checks ten zillion sites.. No, it's all automated. There is a list of words the bots look for and then either stop serving ads or ban you. But for goodness sake don't take my word for it, just Google it and read one of the thousands of articles about it. 

 

Umar Haroon
Quote · 25 Nov 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.