Vladimir’s WordPress Forum


 
Current User: Guest
Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

[SEO Smart Links] Fix for you SEO Smart Links plugin

Add a New Topic Reply to Post
UserPost

19:59
18 October, 2010


Antonio

Guest

Post edited 20:00 – 18 October, 2010 by Antonio


Hello Vladimir,

I have found an important bug in your plugin and would like you to propose a modification.

I use internal linking to sections with #section, so I have a TOC at the beginnig (

<ul><li><a href="#section" rel="nofollow">

….) pointing to

<h2 id="section">section name</h2>

. With this plugin activated, this method doesn't work and pages don't scroll down.

The modifications to be done in the code in order to work:

After line 27 we have:

// Initialize WordPress hooks
function SEOLinks() {
$options = $this->get_options();
if ($options)
{
if ($options['post'] || $options['page'])
add_filter('the_content', array(&$this, 'SEOLinks_the_content_filter'), 1);
if ($options['comment'])
add_filter('comment_text', array(&$this, 'SEOLinks_comment_text_filter'), 10);
}

Modify this line

add_filter('the_content', array(&$this, 'SEOLinks_the_content_filter'), 1);

to

add_filter('the_content', array(&$this, 'SEOLinks_the_content_filter'), 10);

And also, around line 300

function SEOLinks_the_content_filter($text) {
$result=$this->SEOLinks_process_text($text, 0);
$options = $this->get_options();
$link=parse_url(get_bloginfo('wpurl'));
$host='http://'.$link['host'];

modify it to

function SEOLinks_the_content_filter($text) {
$text = str_replace('\"',"'",$text);
$text = str_replace("\'","'",$text);
$text = str_replace('\&quot;','',$text);

$result=$this->SEOLinks_process_text($text, 0);
$result = str_replace('\"',"'",$result);
$result = str_replace("\'","'",$result);
$result = str_replace('\&quot;',"'",$result);

$options = $this->get_options();
$link=parse_url(get_bloginfo('wpurl'));
$host='http://'.$link['host'];

I hope this help!

BR
Antonio

Reply to Post

Reply to Topic:
[SEO Smart Links] Fix for you SEO Smart Links plugin

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
3 + 7