PDA

View Full Version : Follow Page / No Follow Links ? How



Pete Young
March 12, 2018, 05:36 AM
I may be on the wrong train ? but you can set a page to follow or no follow, for example our listings pages, mine are set to follow, so they end up in giggle, but on those pages people can place links (if set that way back to their products / events etc) but how do i set the links to no follow ?

or am i missing something / a setting already there somewhere ?

Bahram Soltanirad
March 12, 2018, 07:57 AM
how do i set the links to no follow ?

Hello Pete, good question.
Yes, you can do it with some changes in ckeditor.js file.
Go to /libs/ckeditor/ckeditor.js , and add below code at the end of the file and before }());

CKEDITOR.on("instanceReady", function(e) {
var editor = e.editor;
editor.dataProcessor.htmlFilter.addRules({
elements : {
a : function( element ) {
if ( !element.attributes.rel ){
element.attributes.rel = 'nofollow';
}
}
}
});
})

It adds nofollow attribute to all user links.

Pete Young
March 12, 2018, 08:04 AM
ok brilliant, thank you Bahram.

I asked because of this that I read,
a paid listing SHOULD be no followed; otherwise, it is violating Google Webmaster rules and you could be penalized for buying a link. and i am roughly guessing that would apply to all paid classifieds ? may be wrong but will apply the code anyway, thank you again.

Pete

Pete Young
March 23, 2018, 03:23 AM
Hello Bahram, I have applied this update and guessing everything is OK, is there a test of sorts to see if these links are now no follow. also attached is a screen shot of the update to see if looks OK but seems right based on the destruction's.

http://forum.flynax.com/attachment.php?attachmentid=2803&d=1521775349

Edit: you can right click and see the no follow attribute applied to the links so all looks good, thanks again.

Peter Jonsson
February 8, 2022, 07:16 PM
Doesnt work for me :/