Jump to content

How to Add rel="nofollow" in this code?


ishq143

Recommended Posts

Hi i m new here n i donot know about js so i need help

 

i wants to add rel="nofollow" in this code

 

means when user insert any url or link then it make like this <a rel="nofollow" href="yourdomain.com">

 

add rel="nofollow" by default in html a href tag

 

var nicLinkButton=nicEditorAdvancedButton.extend({addPane:function(){this.ln=this.ne.selectedInstance.selElm().parentTag("A");this.addForm({"":{type:"title",txt:"Add/Edit Link"},href:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},title:{type:"text",txt:"Title"},target:{type:"select",txt:"Open In",options:{"":"Current Window",_blank:"New Window"},style:{width:"100px"}}},this.ln)},submit:function©{var A=this.inputs.href.value;if(A=="http://"||A==""){alert("You must enter a URL to Create a Link");return false}this.removePane();if(!this.ln){var B="javascript:nicTemp();";this.ne.nicCommand("createlink",B);this.ln=this.findElm("A","href",B)}if(this.ln){this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})}}});nicEditors.registerPlugin(nicPlugin,nicLinkOptions);

 

so plz make a code for me n reply me with correct n working code

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/261840-how-to-add-relnofollow-in-this-code/
Share on other sites

so please make a code for me n reply me with correct n working code

 

That's not how it works.

 

{this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})}

Is the part you need to edit. href and target are attributes of the a element, just like rel is.

 

Hi

thanks for reply , but i said already i donot know about js :(

 

{this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})}

 

can u edit or update that line n add rel="nofollow" in this line please

or any one

 

please please

You don't need to know javascript for this task. You need common sense and basic editing skills.  If you want someone to do it for you, post in the freelance forum.  If you want a nudge in the right direction because you are trying to learn something, post here.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.