Comments Moderation - facebook-graph-api

I've successfully added a comment box as described at the social plugins page:
I also included the following metatags:
<meta content='XXX' property='fb:app_id'/>
<meta content='YYY' property='fb:admins'/>
<meta content="YYY" property="fb:moderator"/>
Nothing seems to make a difference!
EDIT: yes, the values are ok, I had the older version and everything used to work.
Thanks!

Is it just broken in IE? If so, maybe you forgot to add the fb namespace to your html tag:
<html xmlns:fb="http://www.facebook.com/2008/fbml">

Related

Yield Google Tag Manager snippet in <head> in EmberJS

I have several Ember projects under the same repo and would like to be able to reuse the GTM snippet across all of their .html files.
<!DOCTYPE html>
<html lang="en">
<head>
{{content-for "head"}}
<link rel="stylesheet" href="assets/employer-vendor.css">
<link rel="stylesheet" href="assets/employer.css">
</head>
<body>
</body>
</html>
Should I use ember-cli-meta-tags, ember-cli-inline-content or similar? In order to have the snippet reusable, it will have to be stored not in ember-cli-build.js, since that's within a specific project, but in a shared folder across the board.
This is a great use case for writing an Ember Addon.
Ember Addon allow you to customize the build pipeline. They provide some hooks to do so. These hooks must be implemented in index.js file of the addon. The syntax of that file is a little bit uncommon these days. It's very old and hasn't be modernized yet. There is an ongoing initiative to replace it with a new format but that's not stable yet.
The hook you are looking for is contentFor. It allows you to inject content into the {{content-for}} placeholders in app/index.html (and tests/index.html). The hook gets the type as the first argument, which maps to the first argument for {{content-for}}. The second and third argument gives you access to the configuration and the existing content but both is not needed for your use case. You should return the HTML, which should be injected at this hook, from it.
Using the hook for your use case might look like this:
// index.js
'use strict';
module.exports = {
name: require('./package').name,
contentFor(type) {
if (type === "head") {
return "a string with Google Tag Manager snippet";
}
}
};
You can implement that addon as in-repo addon and later extract it into a standalone package for reusing across multiple apps.

How does one use Live Templates inside File Templates in IntelliJ IDEA?

I'm trying to change the default header in Intellij IDEA Community 2016.1
/**
* Created by ${USER} on ${DATE}.
*/
to have a date variable print an ISO 8601 date format instead of their usual platform-and-locale-dependent format. It's proving to be pretty damn difficult.
There's a configuration described in the help file, "Enable Live Templates" which supposedly enables live template variable parsing in file templates, so I made a very simple live variable, made it work in the editor, but I can't figure out how to make it work in file templates, not even by looking at their source code. I brute-forced everything I've read about Velocity templates, escaping, $variable, $variable$, #set directives, and all the combinations above... No dice.
Does anybody know what's going on? Or am I wrong about what that checkbox does?
Thanks in advance.
Take a look at the HTML file template that comes by default:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>#[[$Title$]]#</title>
</head>
<body>
#[[$END$]]#
</body>
</html>
Wrap your vars like #[[$VAR$]]#

How to have a favicon on my Ember app?

I know this seems like a simple question but I've tried many things and nothing seems to be working...
I have <link rel="shortcut icon" href="assets/images/favicon.jpg"> is my <head> tag but the favicon isn't showing.
The path to the image is \public\assets\images\favicon.jpg.
No errors whatsoever are shown anywhere.
Any idea why this is happenning and how can I solve it?
I managed to solve this by putting the favicon in the assets folder.
i.e.
Moved it from \public\assets\images\ to \public\assets\.

Does fragments currently work in sdk v0.2.6?

I've tried putting my fragments in {root}/fragments/myFragment.html and also {root}/src/fragments/myFragment.html and neither seemed to work.
Also from my behaviors.css
.tableFragment{
-randori-fragment: "fragments/tableFragment.html";
}
and I can't seem to get things going. Is there a missing step? Finally my view:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body class="tab-content boxoffice">
<h1>Box Office</h1>
<div class="tableFragment"></div>
</body>
</html>
Fragments do work.
They should be in the main project directory, not the src, just to be clear on why:
The only thing that goes in src is source code that is being cross compiled. HTML shouldn't be in the src folder, we don't cross compile it.
One thing I did notice... IF you have an older SDK, there was a bug fixed in v0.2.4 IU believe where the space between .tableFragment and { mattered. You can try adding a space there else as a next step to debug, take a look at the network tab in chrome or your browser of choice and watch what is loading. Does it try to load the HTML at all?

Simplest HTML5 template for examples in print

I'm going to be printing out a bunch of HTML5 examples that will be presented in a book format. With this constraint, space is at a premium, so every line I can remove is helpful. I'd like a minimal setup that is clear, but correct, and won't steer anyone down the wrong path.
This is the template I have so far:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<!-- examples... -->
</body>
</html>
I see <meta charset="utf-8"> in every html5 template on the web. Obviously it's best practice to keep it in, but is it so important that I can't remove it, even if it doesn't affect the examples I've provided. Likewise with <!doctype html>.
I could always provide a more robust example in the introduction, but as I expect people to cut-and-paste examples, I'd prefer to have them in a good, but concise, form. Thanks.
You've got to have the DOCTYPE, otherwise HTML5 type stuff won't work in certain browsers (notably IE9). It would probably be safe to leave out the charset - it's not like you can guarantee what charset your readers will be saving the examples in anyway. You will have to add a title element to the head - the document is not valid without it.