Topic-icon Escape content from '{' and '}' chars

Active Subscriptions:

None
9 years 5 months ago - 9 years 5 months ago #60549 by milrus
In ./components/com_jfbconnect/libraries/utilities.php at 81 [current version]
        if ($showPinterestButton)
        {
            $extraButtonText .= '{SCPinterestShare href=' . $url . " layout=" . $dataCount . ' image=' . $pinnedImage . ' desc=' . $pinnedText . ' size=' . $size . $renderKeyString . '}';
        }

In ./components/com_jfbconnect/libraries/utilities.php [my patched version - it works well]
        if ($showPinterestButton)
        {
            $pinnedText = str_replace(array('{', '}'), array('', ''), $pinnedText);
            $extraButtonText .= '{SCPinterestShare href=' . $url . " layout=" . $dataCount . ' image=' . $pinnedImage . ' desc=' . $pinnedText . ' size=' . $size . $renderKeyString . '}';
        }

If the content string contains some meta tags implemented by another content plugin similar to '{tab param=xy}' your current implementation of social buttons doesn't work well.

I use tha last JFBConnect 7.1.2.

Please, fix it in a next update.

Best Regards,
Milan
Last edit: 9 years 5 months ago by milrus.
The topic has been locked.
Support Specialist
9 years 5 months ago #60555 by alzander
Can you describe more about what the problem is? Above, you just say it "doesn't work well"?

If you can give a snippet of code from the HTML of what was happening before, what your fix does and why, we can gladly help investigate further. Unfortunately, we can't just implement what you provided above without a lot more details. There are many, many users using the Pinterest tag right now. We don't alter how things work without a firm understanding of how it could impact all the other users, even if you have something that works on your site.

Any details you can provide will help.

Additionally, another thing to try is simply re-ordering the content plugins so that JFBConnect executes *after* the other plugin that's doing replacements. That way, the first tags are removed before our content plugin tries to do it's work.

Thanks,
Alex
The topic has been locked.