Closed (fixed)
Project:
Similar Entries
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2010 at 13:13 UTC
Updated:
10 Aug 2011 at 03:56 UTC
When the similar entries module is installed, it creates links to pages with similar content. The link is missing the title tag making the code html strict invalid.
Example:
<a href="http://localhost/test-page-2">test page 2</a>
The link should be constructed as follows:
<a href="http://localhost/test-page-2" title="Test page 2">test page 2</a>
Current code in the theme_similar_content() function in similar.module:
array(
'attributes' => variable_get('similar_rel_nofollow', 0) ? array('rel' => 'nofollow') : NULL,
'absolute' => TRUE
)
I am not using nofollows, so I modified it like this:
array(
'attributes' => array('title' => ($content->title)),
'absolute' => TRUE
)
Comments
Comment #1
xjessie007 commentedHere is an update to make it work with the nofollow too.
Current code:
Updated code:
This will make the similar.module work to reflect both nofollow settings as well as to display title in the link HTML code.
(Sorry, I do not know how to make a patch, and I am not a programmer either, so I am just posting the suggested change in the code here as a FYI.)
----
Maxi-Pedia
Comment #2
jordojuice commentedThat is fine. Thanks for the work. This will be committed probably tonight. Sorry that it took so long to respond. I just took over development of the module as the previous maintainer was tied up in other work. I'm working to clear out the queue and get bug fixes in, though.
Comment #3
jordojuice commentedThis has been committed to dev and will go in the next release. Thanks for the work! : )