Yelp badge - how to insert?

Hi everyone,

I got some code from Yelp which I’m trying to incorporate into a Freeway site.

Do I add this as an HTML or Markup item? I’ve tried both and no joy.

Any help would be appreciated!

The Caledonian

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Have a look at http://www.deltadesign.co/FW6Test/twitterwidget.html

The first part

<div id="yelp-biz-badge-rrc-FfJD4vO-iYUL2Kr0WWzNYg">The Caledonian</div>

Insert Markup Item, paste in the code, OK it and resize and position on your page where you want it to appear.

The second part

<script type="text/javascript">
                !function(doc, id){
  var js;
  var scriptElement = doc.getElementsByTagName("script")[0];
  if (!doc.getElementById(id)) {
js = doc.createElement("script");
js.id = id;
js.src = "//dyn.yelpcdn.com/biz_badge_js/rrc/FfJD4vO-iYUL2Kr0WWzNYg.js";
scriptElement.parentNode.insertBefore(js, scriptElement);
  }
} (document, "yelp-biz-badge-script-rrc-FfJD4vO-iYUL2Kr0WWzNYg");


</script>

Page>Html Markup and paste the code in the before End section.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi David,

Always so fast… despite the late hour.

If I understand correctly :

  1. Intert a markup item for the first part and size accordingly. This will be the image.
  2. Insert an HTML item with the second part. Ths an be anywhere on the page and will be the reference that the Markup item uses to update itself.

Correct?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

  1. Insert an HTML item with the second part. Ths an be anywhere on the page and will be the reference that the Markup item uses to update itself.

No!

Use the main FW menu Page>HTML Markup and in the dialogue box that opens choose the Before slot using the Insert picker in the top bar.

Then paste your code in and OK it.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you’re using Freeway 6, you can apply the ID they sent you in this code (yelp-biz-badge-rrc-FfJD4vO-iYUL2Kr0WWzNYg) to an empty HTML box on the page. Then put the script portion in the Page / HTML Markup / Before section. That should do the trick.

Note the use of protocol-less URLs here, which means that you will not be able to preview this on your Mac – you will only see it running correctly on your server. If you change this line:

js.src = "//dyn.yelpcdn.com/biz_badge_js/rrc/FfJD4vO-iYUL2Kr0WWzNYg.js";

to read thus:

js.src = "http://dyn.yelpcdn.com/biz_badge_js/rrc/FfJD4vO-iYUL2Kr0WWzNYg.js";

(add http: before the rest of the src URL) then you should be able to see it on your Mac, too, although I haven’t tried that.

Walter

On Apr 13, 2013, at 8:59 PM, Stephen Todd wrote:

Hi everyone,

I got some code from Yelp which I’m trying to incorporate into a Freeway site.

Do I add this as an HTML or Markup item? I’ve tried both and no joy.

Any help would be appreciated!

The Caledonian

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

Thanks for the tips. I’ve added “http” to help preview in Freeway.

Before I can see this, I have another newb question… Having inserted the (empty) HTML object, then added Page>Markup code, how do I apply the markup to the HTML object?

On 14 Apr 2013, 2:22 pm, waltd wrote:

If you’re using Freeway 6, you can apply the ID they sent you in this code (yelp-biz-badge-rrc-FfJD4vO-iYUL2Kr0WWzNYg) to an empty HTML box on the page. Then put the script portion in the Page / HTML Markup / Before section. That should do the trick.

Note the use of protocol-less URLs here, which means that you will not be able to preview this on your Mac – you will only see it running correctly on your server. If you change this line:

js.src = “//dyn.yelpcdn.com/biz_badge_js/rrc/FfJD4vO-iYUL2Kr0WWzNYg.js”;

to read thus:

js.src = “http://dyn.yelpcdn.com/biz_badge_js/rrc/FfJD4vO-iYUL2Kr0WWzNYg.js”;

(add http: before the rest of the src URL) then you should be able to see it on your Mac, too, although I haven’t tried that.

Walter

On Apr 13, 2013, at 8:59 PM, Stephen Todd wrote:

Hi everyone,

I got some code from Yelp which I’m trying to incorporate into a Freeway site.

Do I add this as an HTML or Markup item? I’ve tried both and no joy.

Any help would be appreciated!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The markup “applies” itself. The key is that the empty box has the exact same ID (name) that the JavaScript code includes, so the JavaScript can find that empty box and do things with it. All this happens in the browser, you just provide the correct set of parts and let the browser assemble it.

Walter

On Apr 15, 2013, at 6:49 AM, Stephen Todd wrote:

Before I can see this, I have another newb question… Having inserted the (empty) HTML object, then added Page>Markup code, how do I apply the markup to the HTML object?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks everyone for your patience.

Object inserted and it works perfectly.

Your help is greatly appreciated.

Steve


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options