<fb:comments> is displaying different layouts according to the href used inside. Why? - dynamic

I'm trying to understand why two different layouts are displayed by the placeholder, according to the href parameter used inside of it. Quick example - say I'm using http://example.com/ as the href resource - I'll get the usual header before the comments, with the number of comments on the left and "Add a comment" on the right. However, when I'm changing the href to the one I really need (i.e. the page where the box resides), I only get a list of comments, no number of comments, no "add a comment". Have a look at this to see what I mean: http://popz.ro/comments.php?aid=1
Why, oh why? (something to do with the app I've registered?)
Thanks!

When I go to your link, I see a comments area as well as an input box to add new comments.
This appears to be correct based upon the plugin code used:
<fb:comments width="950" href="http://popz.ro/comments.php?aid=1"></fb:comments>
I also see you've got the og meta tags specificed too, which will help:
<meta property="og:title" content="Popz" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://popz.ro/comments.php?aid=1" />
<meta property="og:image" content="http://popz.ro/png/fpopz.png" />
<meta property="og:site_name" content="Popz | fresh de stiri" />
<meta property="fb:admins" content="584603173" />
<meta property="fb:app_id" content="277079292362391" />
Also the app_id matches between the FB.init() code as well as that specified in the meta tags. So there's no problem there.
I see only 2 comments, and the default is 2, so it's not going to show the # of comments until you go over that amount.

Related

Can I separate tags with comma in HTL Slightly?

My problem is: I have to customize properties of a meta tag on AEM Console.
I have this meta tag:
<meta name="tags" data-sly-test="${properties.tag}" content="${properties.tag}" />
If an utent add more attributes on AEM console, I need that these attributes are separeted by ';'.
The output should be:
<meta name="tags" content="hello;world;laptop;screen"/>
You can use the join option (https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#124-array-join):
content="${properties.tag # join=';'}"

Access request's URL parameters in stencil

Can I access the request’s query params in stencil?
So if you go to http://example.com/?name=Bob
Can I render something like:
Hello {{url.name}}!
It has to be server-side rendered, not browser JavaScript.
Why? Well, I actually want to share the results of a quiz on Facebook, so the og:image tag needs to point at a picture of the score. So I share a link like http://example.com/quiz/?quizScore=encodedscoreresult and the page then contains:
<meta property="og:image"
content="https://myapi.example.com/quizresultsimage?quizScore=encodedscoreresult" />
Not a full solution, as you can't access an individual parameter's value, but...
The settings.facebook_like_button.href does contain the request URL, URL encoded as https%3A%2F%2Fexample.com%2Fquiz%3FquizScore%3Dencodedscoreresult
You can extract the whole query string from the URL using:
<meta property="og:image"
content="https://myapi.example.com/quizresultsimage{{get "search" (getObject "search" (urlParse (decodeURI settings.facebook_like_button.href)))}}" />
However, that will include all the query parameters, so that may be a security risk passing extra parameters from your stencil site to the api that aren't desired.
Simpler (and perhaps safer), you can pass the whole URL as a parameter in the meta tag, and then the API will have to decode it:
<meta property="og:image"
content="https://myapi.example.com/quizresultsimage?url={{settings.facebook_like_button.href}}" />
which results in:
<meta property="og:image"
content="https://myapi.example.com/quizresultsimage?url=https%3A%2F%2Fexample.com%2Fquiz%3FquizScore%3Dencodedscoreresult" />
Because there is only one parameter in the query string, you can be sure you're not passing anything undesired to the target URL.
If you just need the decoded URL you can use:
{{assignVar "requestUrl" (decodeURI settings.facebook_like_button.href) }}
{{getVar "requestUrl"}}

Read plain text on a non-HTML web page, VBA/Excel

I'm pretty new to VBA, but I haven't found a possible solution to the problem in other programming languages.
Let’s say we have a non-HTML web page (e.g. JS, SQL etc.) so that standard HTTP GET operation returns us HTML tags without the desired content.
Conversely, if we do copy-paste (Ctrl + c, Ctrl + v), we can directly copy the text that appears on the page, no matter what language it is displayed.
Is it possible in VBA (or any other programming language) to copy only the text that appears on a web page? (Not parsing, but actually doing CTRL + C and then CTRL + V)
Edit:I think it would be good to add an example to my intention.
Check out this link: cssscript.com/demo/calendar-generator-base It contains a calendar JS-based.
Now, if we try to perform HTTP GET on the above page, we will not see "June" or the day numbers per month (You can see here HTTP GET request)
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Simple Calendar Generator Example</title>
<link href="https://www.cssscript.com/wp-includes/css/sticky.css" rel="stylesheet" type="text/css">
<link href="https://www.cssscript.com/wp-includes/css/sticky.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="./style.css" />
</head>
...
However, if you get in the webpage and do CTRL + C and then CTRL + V you can copy the values ​​I mentioned (You can see the result here, or just try to copy to yours notepad)
Download
Back To CSS Script
Simple Calendar Generator Example
June
Mo
Tu
We
Th
Fr
Sa
Su
1
2
3
4
5
6
7
8
...
Thanks

Where do I find the "the HTMLQuestion schema URL" and CDATA (newbie ... run out of options)

I want to conduct a simple turk survey.
I've made the form, uploaded the images and set the details but I'm not quite sure what's next.
Here is the framework of my form with what I think are the AWS elements needed but:
1) How do I find the "the HTMLQuestion schema URL"?
2) Do I generate the assignmentId or does it get inserted on the POST?
3) Is there something I need to add for CDATA is it is a placeholder for an array?
(Please forgive my ignorance but I may even being asking the wrong questions. I'm just not clear what to do next - especially to test it myself (sandbox). I tried posting in the Turk forum but no replies in two days. I don't expect the AWS manual to be for novices.)
<pre>
<HTMLQuestion xmlns="[the HTMLQuestion schema URL]">
<HTMLContent><![CDATA[
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<script type='text/javascript' src='https://s3.amazonaws.com/mturk-public/externalHIT_v1.js'></script>
</head>
<body>
<form name='mturk_form' method='post' id='mturk_form' action='https://www.mturk.com/mturk/externalSubmit'>
<input type='hidden' value='' name='assignmentId' id='assignmentId'/>
... my handwritten form elements ...
</form>
<script language='Javascript'>turkSetAssignmentID();</script>
</body>
</html>
]]>
</HTMLContent>
<FrameHeight>0</FrameHeight>
</HTMLQuestion>
</pre>
Here is the latest link I found so far:
<HTMLQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd">

Where i wants to give the actual keyword in my website for SEO?

I have 10 keywords for my website. Please tell Where i wants to give the actual keyword in my website (home page or any place?)for display google search?
For put keywords in Home Page or any other Page:
Login to Admin panel.
go to CMS->Pages than select any page.
Here in Mete Data tab you can insert your Meta Keywords and Meta Description.
For put keyword in Category page:
go to Catalog->Manage Categories than select any category.
Here you can insert your Meta Keywords and Meta Description.
For put keyword in Product Detail page:
goto Catalog->Manage Products than select any product.
Here in Meta Information tab insert your Meta Title,Meta Keywords and Meta Description.
(If not display Meta Information tab or meta attributes than goto Catalog->Attributes->Manage Attributes Set to manage meta attribues for product accoring to product type.)
u should put those in meta tag
<meta name="description" content="Awesome Description Here">
of your page
you should add these meta tags in header of all pages.
<meta name="title" content="TITLE of Page">
<meta name="description" content="Description of Page">
<meta name="keywords" content="title,tag,tag2">
avoid repeating the keywords