Did anyone manage to add Pinterest social share icon to existing 4 icons? I've tried making one myself, but I get stuck with svg. Not sure if there are plans to add it in the future as a standard thing or not.
Responses (6)
  • Accepted Answer

    Monday, November 19 2018, 02:05 PM - #Permalink
    Hi

    If you have any issue with the built-in Pinterest support in sh404SEF, I would suggest open a ticket at our helpdesk. We currently have no issue with that feature ourselves.

    Best regards
    The reply is currently minimized Show
  • Accepted Answer

    Monday, November 19 2018, 06:32 PM - #Permalink
    No, The forum I posted in is titled wbAMP Community edition, so I was talking about wbAMP and trying to add fifth (Pinterest) social share icon to it. It would be great if you add it for us in the future, as my attempts didn't work for some reason; I think it may be the svg I am using; but could be something else too.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 20 2018, 12:45 AM - #Permalink
    Ok, I figured out what's going on. Should have started debugging sooner. wbAMP is removing everything after opening path tag (i.e. d="svg path") Why? This doesn't make any sense; svg is allowed by the AMP specification. So why would you remove the svg path?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 20 2018, 02:54 AM - #Permalink
    Allright, I've created pinterest sharing icon now for wbAMP now as follows:

    1./Wrote /plugins/system/wbamp/layouts/wbamp/buttons/pinterest_share.php where the svg resides, so it doesn't get removed

    2./Edited wbamp.xml to add pinterest in the list of the selectable icons using the Administrator interface

    3./Added four .wbamp-icons-colors .wbamp-pinterest css lines into the custom style (didn't want to hack your stylesheets).

    Do you want me to send you this somehow so that you can include it into the future releases, and if so how do I do it? Could save you some work.

    Also, I do need a solution for the inclusion of svg into the footer, so that wbAMP does not strip the d="svg path". Do you have any suggestions for this please? At the moment I had to cut the jpg from my main website that uses svg and put the image into AMP footer module, but this doesn't look as good as svg. Thank you in advance.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 20 2018, 02:51 PM - #Permalink
    Hi

    No, The forum I posted in is titled wbAMP Community edition
    Sorry, I do that all the time...

    This doesn't make any sense; svg is allowed by the AMP specification. So why would you remove the svg path?
    We use a "white list" approach to creating AMP content. Any HTML element that is not on the list is removed. That's the only way we found to pretty much guarantee AMP validity. Without AMP validity, there is not point in going AMP, so that is really the most important thing to achieve.

    However is on the white list, I just checked that so I don't know why that would be removed but indeed its attribute may, such as the d attribute or others. If you add a line like
    'path'        => array('__wbamp_any__'),

    in the /plugins/system/models/config.php file under the $_perTagAttrWhiteList variable, that should make it. I'll make sure it's included in next release.

    As for including Pinterest, the plan is more to simply switch to the native AMP social elements. Although our may load a bit faster, it's hard to justify the maintenance.

    Best regards
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 20 2018, 09:56 PM - #Permalink
    Thank you. Works like a charm :)
    The reply is currently minimized Show
Your Reply