Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.4k views
in Q2A Core by
sorry for my bad english.

i want to make all links ( in the posts ) are unfollowed.

how can i make this ?
Q2A version: 1.5.3

3 Answers

0 votes
by
edited by

admin-k is right. you can simply use perg_replace()..

You can also use DOMdocument() . this will find anchor tag and add nofollow

 

$dom = new DOMdocument();
$dom->loadHTML($part);

foreach ($dom->getElementsByTagName('a') as $node) {
    if (
        !$node->hasAttribute('rel')
        || !preg_match('~\bno-follow\b~', $node->getAttribute('rel'))
    ) {
        $found = true;
        break;
    }
}

Get more info on stacoverflow

 

ckeckout my new theme which encrypts all external url like:

www.google.com

to

www.tovolt.com/redirect.php?8475684375h45488

An you can also use ADFLY in the redirect link.

here is demo tovolt, just click on the link in answers

0 votes
by
thx for help. But i search a unfollowed link only :)

But its a good theme. i think to buy. how much ?
by
will be releasing on 9th march
0 votes
by
Are you familiar with php?? if yes then you can do this with perg_replace() in theme option.
...