Problem with censure pro links  

  RSS

Mariosgr
(@mariosgr)
Member Customer
Joined: 3 months ago
Posts: 54
13/01/2019 12:45 pm  

If i want to censure  a link from gvectors.com to gvectors.net is not working,

it is changing only the com to net but the link remain the same,

What should i do to change the link ?


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1729
14/01/2019 1:34 pm  

Hi @mariosgr,

ok, we'll check it and back to you asap. 


Mariosgr liked
ReplyQuote
Mariosgr
(@mariosgr)
Member Customer
Joined: 3 months ago
Posts: 54
15/01/2019 9:15 pm  

Any update?


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1729
17/01/2019 2:42 pm  

Hi @mariosgr,

Sorry for the late response. 

I asked the plugin developers. This is designed to works in this way, otherwise, the URL can be broken.

E.g.

You've changed the word gvectors to gevec*rs  and someone adds the URL with this word https://gvectors.com, so it'll change the URL to  https://gevec*rs.com. And if we change the URL it'll get e.g. 404 error or something like this. 

To avoid such problems, we don't touch the URL.


ReplyQuote
Mariosgr
(@mariosgr)
Member Customer
Joined: 3 months ago
Posts: 54
17/01/2019 5:10 pm  

Thank you for your reply.

What i want to do in my forum.

I dont permit links if they dont pay me for advertise,

so if you place your link with out to pay me https://gvectors.com if it will change to censured it is still working.

How can i avoid this ? If it is not blocking your link there is not a reason to use it.

At least for me.


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1729
18/01/2019 4:27 pm  

Hi Mariosgr,

This code should hepl you. Please add it in your current active them's functions.php file.

add_filter('wpforo_content_after', function ($content) {
$s = array('gvectors.com');
$r = array('gvectors.net');
return str_replace($s, $r, $content);
}, 999);

 


Mariosgr liked
ReplyQuote
Mariosgr
(@mariosgr)
Member Customer
Joined: 3 months ago
Posts: 54
18/01/2019 5:14 pm  

this is for all links or i have to  add it for every link i want to change ?


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1729
19/01/2019 1:34 pm  

Hi @mariosgr,

The code I've provided in the previous post changes certain URL. If you need to change every URL, just use this code, it will replace any URL with an uncensored word.

add_filter('wpforo_content_after', function ($content) {
return preg_replace('@(href=[\'\"]https?://)[^/\'\"\?\&]+([^\'\"]*[\'\"])@is', '$uncensored$2', $content);
}, 999);

Mariosgr liked
ReplyQuote
Mariosgr
(@mariosgr)
Member Customer
Joined: 3 months ago
Posts: 54
24/01/2019 8:58 pm  

Thanks! It works and changes the url but for some reason it's no longer clickable, something must be missing


ReplyQuote
Mariosgr
(@mariosgr)
Member Customer
Joined: 3 months ago
Posts: 54
30/01/2019 5:04 pm  

Is there a way to change the url with censure words from the actual plugin?

Because in your first code I need to add every single url that I want to change and in your second code it changes every url to what I input as "uncensored"


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1729
02/02/2019 1:12 pm  

Hi @mariosgr

I'm really sorry, but the plugin doesn't have such a feature. Our team provides you some custom codes to use. For more deeper customization you should find some developer. 


ReplyQuote
Share: