Go Back   Mosets Community > Mosets Templates > Kinabalu

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-23-2010, 01:24 AM
lukasmarberger lukasmarberger is offline
Mosets'd
 
Join Date: Jan 2010
Posts: 36
Default nofollow to visit or website link?

Hi!

Does anyone know how to add "nofollow" to the visit link?

I tried adding $this->plugin( 'ahrefvisit', $this->link, '', 1, array("rel"=>"nofollow")

to sub_listingDetails.tpl.php, but it doesnt seem to work. It looks like the visit link is in another div tag.

Does anyone have a solution?

Thanks

Lukas
Reply With Quote
  #2  
Old 05-27-2010, 11:30 AM
dknight dknight is offline
Mosets Team - Lead Developer
 
Join Date: Dec 2004
Posts: 25,942
Default

Hi Lukas,

Make sure you are applying your mod to the correct listing details file since there are a total of 7 styles. ie:

/components/com_mtree/templates/kinabalu/sub_listingDetails.tpl.php
/components/com_mtree/templates/kinabalu/sub_listingDetailsStyle2.tpl.php
/components/com_mtree/templates/kinabalu/sub_listingDetailsStyle3.tpl.php
/components/com_mtree/templates/kinabalu/sub_listingDetailsStyle4.tpl.php
/components/com_mtree/templates/kinabalu/sub_listingDetailsStyle5.tpl.php
/components/com_mtree/templates/kinabalu/sub_listingDetailsStyle6.tpl.php
/components/com_mtree/templates/kinabalu/sub_listingDetailsStyle7.tpl.php
__________________
Lee
Lead Developer
Mosets.com - Quality Joomla! Solutions
Reply With Quote
  #3  
Old 05-29-2010, 01:27 AM
lukasmarberger lukasmarberger is offline
Mosets'd
 
Join Date: Jan 2010
Posts: 36
Default

Hi Lee,

Thanks for your answer. Hmm, yup I have tried with all files even though i use the first style. It seems like it isnt applied for the correct div.

I inserted the line below

<div class="actions">

at the bottom of the file. But the visit link seems to be in a div class "output" tag.

I'm really not in to php just want to stop google from indexing
Reply With Quote
  #4  
Old 05-30-2010, 07:04 PM
dknight dknight is offline
Mosets Team - Lead Developer
 
Join Date: Dec 2004
Posts: 25,942
Default

Hi Lukas,

Your code above is correct:
PHP Code:
$this->plugin'ahrefvisit'$this->link''1, array("rel"=>"nofollow"); 
This will print the visit link with rel='nofollow' attribtue to your visit link. So now the question is, did you place it in the correct file? You said you are using Style 1, which means the file you need to insert this code is at:

/components/com_mtree/templates/kinabalu/sub_listingDetails.tpl.php
LINE: 218
__________________
Lee
Lead Developer
Mosets.com - Quality Joomla! Solutions
Reply With Quote
  #5  
Old 03-16-2012, 08:45 PM
clairebuckley clairebuckley is offline
Mosets'd
 
Join Date: Mar 2012
Posts: 2
Default

Quote:
Originally Posted by dknight View Post
Hi Lukas,

Your code above is correct:
PHP Code:
$this->plugin'ahrefvisit'$this->link''1, array("rel"=>"nofollow"); 
This will print the visit link with rel='nofollow' attribtue to your visit link. So now the question is, did you place it in the correct file? You said you are using Style 1, which means the file you need to insert this code is at:

/components/com_mtree/templates/kinabalu/sub_listingDetails.tpl.php
LINE: 218
Using version 2.2.5. I am having problems with this code:

I place the code and it breaks the PHP with a Parse Error: syntax error on the relevant line.

I am not a coder but I am relatively proficient at code changes, but I cannot get the rel=nofollow to work.

UPDATED

Okay, I sorted the Parse Error:

I am using Style 3 and made the change to the Style 3 sub listing template. But I still do not get the link to use rel="nofollow"

Last edited by clairebuckley; 03-16-2012 at 08:51 PM. Reason: Update
Reply With Quote
  #6  
Old 03-16-2012, 09:28 PM
clairebuckley clairebuckley is offline
Mosets'd
 
Join Date: Mar 2012
Posts: 2
Default

Okay I think I've figured this out (for the time being).

Like the OP I wanted to place a rel=nofollow link in the core field "Website". The related "class" for this is "output"

What the reply from the Lead Dev was to impliment this into the actions which can be found in the Features section of the backend Config.

And yes (and using the Default Template) the following code in the sub_listingdetails.tpl.php file at about line 212 will provide a new action button called "Visit Website" and produce a rel="nofollow" link:

$this->plugin( 'ahrefvisit', $this->link, 'Visit Website', 1, array("rel"=>"nofollow") );

The position of the code will determine where the action button appears relative to the other buttons. But you do need to activate the "visit" action in the Features section of Config first.

What it will not do is to add rel="nofollow" to the core field "website" as this is related to an "output" class.

To get around this I have simply said "no" not to show the "Website" field in detail and summary views.

However, like the OP I would still like to know how to add a rel=nofollow to the core field "Website"

Many thanks

Last edited by clairebuckley; 03-16-2012 at 09:29 PM. Reason: typo
Reply With Quote
  #7  
Old 10-21-2012, 09:55 PM
antoniosan antoniosan is offline
Mosets'd
 
Join Date: Oct 2012
Posts: 168
Default

Hello everybody,

I'm trying to add "nofollow" to the web site links in listings details (in core field "website" like said clairebuckley) but I can't find the way.

If anybody can help, I would be very appreciated.

Thank you in advance.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +8. The time now is 04:28 AM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.