Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27
  1. #21
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,252
    Plugin Contributions
    58

    Default Re: Pinterest urlencode

    Quote Originally Posted by niccol View Post
    SO, did you try the link that I sent to the shopBloved site? That works fine for me. I'd be interested to know if it doesn't work for you.
    Yes, "indeed" in post 15.... But it does not work for me with $canonicalLink. I tried several sites 1.5.0 & 1.5.1 without any luck
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  2. #22
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Pinterest urlencode

    I think we will put that down to weirdness in that case. The code I posted is exactly what I am using.

    How odd :-) As you say. If it works it works. Miller time.

  3. #23
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,252
    Plugin Contributions
    58

    Default Re: Pinterest urlencode

    Quote Originally Posted by niccol View Post
    I think we will put that down to weirdness in that case. The code I posted is exactly what I am using.

    How odd :-) As you say. If it works it works. Miller time.
    Yep Miller Time =)
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  4. #24
    Join Date
    Feb 2013
    Posts
    2
    Plugin Contributions
    0

    Default Re: Pinterest urlencode

    Hi, folks. To make URLs with reserved characters such as the question mark or ampersand work with Pinterest, please percent-encode them. Ampersands translate to %26; questions marks translate to %3F. If you need help with this you can paste your non-encoded URL into the form at http://business.pinterest.com/widget-builder and get back the right answer.

    More information on percent-encoding here:

    http://en.wikipedia.org/wiki/Percent_encoding

    Thanks very much,

    Kent Brewster, Button Wrangler, Pinterest

  5. #25
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Pinterest urlencode

    Thanks for your attention to this.

    A couple of questions if you are still around:

    Firstly, where would that information be available to developers on the pinterest site? It would be nice if it was there. As it would save a whole lot of experimentation about what works. The ability to post a single link and have it encoded is nice but does not really help developers who are trying to programatically create buttons.

    Secondly, I guess that what you are saying, for php applications, is that the function rawurlencode() needs to be used rather than urlencode(). Correct?

    Thanks

    Nick

  6. #26
    Join Date
    Feb 2013
    Posts
    2
    Plugin Contributions
    0

    Default Re: Pinterest urlencode

    We definitely owe you some documentation, Nick. Working on it now; when it appears, we'll be sure to link it prominently from the Widget Builder.

    Yes, rawurlencode() seems preferable to urlencode(), since it will do the right thing with spaces. Neither function turns ampersands into HTML entities, which are guaranteed not to work in an URL.

    --Kent

  7. #27
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Pinterest urlencode

    Thanks Kent

    You are right. rawurlencode won't solve the issue by itself.

    Zen, like many platforms that use dynamic style urls ( and don't use pretty URLs) will output this as a link

    index.php?main_page=index&cPath=3

    So, either one needs to modify the method of creation of the link. Which is kind of boring. Or one needs to use a function like str_replace() to turn the '&' back in to '&' before then rawurlencoding it.

    So, I think that that is really the message for anyone reading this thread.

    You need to use a function similar to the one that Melanie used above.

    I'd say that the best one would be:

    Code:
    $pinterest_url = rawurlencode(str_replace('&','&',$url));
    Where $url is the url that zen is creating. And $pinterest _url is the version of that that you want to insert into the pinterest button.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Pinterest Rich Pins
    By OLCS in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 1 Jun 2015, 02:02 AM
  2. creinold Pinterest Button Addon
    By creinold in forum All Other Contributions/Addons
    Replies: 97
    Last Post: 2 Jan 2015, 10:02 PM
  3. v151 Help with pinning to Pinterest
    By AnnieG in forum Basic Configuration
    Replies: 2
    Last Post: 7 Mar 2014, 03:43 PM
  4. v150 Pinterest Verification Help
    By ReRetail in forum General Questions
    Replies: 1
    Last Post: 5 Jun 2013, 04:53 PM
  5. v150 Numinix Pinterest mod
    By pityocamptes in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Apr 2012, 08:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg