Advertisement:

Author Topic: Not allowing a user to post links in their ads.  (Read 2242 times)

Swede

  • Sr. Member
  • ****
  • Posts: 388
Not allowing a user to post links in their ads.
« on: January 19, 2012, 10:43:47 am »
I want a feature that disables the possibility for the users to post links in their ads.
This is because many users nowadays have their own websites, and i don´t want them to be able to promote their sites from the ads.
« Last Edit: January 19, 2012, 10:46:33 am by Swede »

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Not allowing a user to post links in their ads.
« Reply #1 on: January 19, 2012, 12:51:53 pm »
Hi, @Swede, If you are using 2.3.5 you can remove the tag <a> from description editing core files.
You need to modify oc-includes/osclass/ItemActions.php
l.46 aprox
Code: [Select]
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.Allowed', 'b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style]');

Remove " a[href|title], " from HTML.Allowed

Code: [Select]
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.Allowed', 'b,strong,i,em,u,ul,ol,li,p[style],br,span[style]');

That should work.
Regards

Swede

  • Sr. Member
  • ****
  • Posts: 388
Re: Not allowing a user to post links in their ads.
« Reply #2 on: January 19, 2012, 04:36:16 pm »
Thx! it seems to work!

telecomseva

  • Newbie
  • *
  • Posts: 32
Re: Not allowing a user to post links in their ads.
« Reply #3 on: July 30, 2012, 05:22:53 pm »
hi,

how to remove/block URL in description when i m using richedit plugin in osclass 3.0 with bcute theme.