Sunday, January 16, 2011

Underfloor Heating Problems Airlock

Feedback forms in sections

For some time, it is possible to integrate the feedback form on a Facebook Web page. Ditto on Blogger. Few lines of code and voila. Follow the guide.

As with all codes, there are several methods to install it.
The method I gave you, you will leave or not Blogger comment form.

Step 1: Collect information on Facebook


To begin, go to page developers to create any application.

In Form:
• You specify a name (for example the name of your blog)
• You mention the url of your blog (http://NOMDEVOTREBLOG.blogspot.com/) • And
locate the application ID

Step 2: Edit the header code in your blog


Now go to the Editor HTML code for your blog and find the tag \u0026lt;html ... . It is situated approximately
to the 2nd or 3rd line. (The contents of the tag depends on the model you use).

The code looks something like this:
\u0026lt;b html: version = '2 'class =' v2 'expr: dir =' data: Blog . languageDirection 'xmlns =' http://www.w3.org/1999/xhtml 'xmlns: b =' & http://www.google.com/2005/gml/b # 39; xmlns: data = 'http://www.google.com/2005/gml/data' xmlns: expr = 'http://www.google.com/2005/gml/expr'>


Once you have found, you just insert after \u0026lt;html :

xmlns: fb = 'http://www.facebook.com/2008/fbml'


What will give in our example:
\u0026lt;html xmlns : fb = & # 39; http://www.facebook.com/2008/fbml ' expr: dir =' data: blog.languageDirection 'xmlns =' http://www.w3. org/1999/xhtml ' xmlns: b = 'http://www.google.com/2005/gml/b' xmlns: data = '& # http://www.google.com/2005/gml/data 39; xmlns: expr = 'http://www.google.com/2005/gml/expr'>

Step 3: Create Meta Data


Also at the beginning of your code blog, you look for META tags that look like this:
\u0026lt;meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>

Just after you rajoutez:
\u0026lt;b:if cond='data:blog.pageType == "item"'>
\u0026lt;meta expr: content = 'data: blog.pageTitle 'property =' og: title '/>
\u0026lt;meta expr: content =' data: blog.url 'property =' og: url & # 39; />
\u0026lt;b:else/>
\u0026lt;meta expr:content='data:blog.title' property='og:title'/>
\u0026lt;meta expr: content = 'data: blog.homepageUrl' property = 'og: url' />
\u0026lt;/ b: if>
\u0026lt;meta content = 'NAME OF YOUR BLOG ' property = 'og : site_name '/>
\u0026lt;meta content=' ID APPLICATION ' property='fb:app_id'/>
\u0026lt;meta content = ' ; FACEBOOK PROFILE ID 'property =' fb: admins' />
\u0026lt;meta content = 'article' property = 'og: type' ; />


You replace:

NAME OF YOUR BLOG by the name of your blog. •

ID APPLICATION by the identification number of the FB application that you created (see step 1).

• FACEBOOK PROFILE ID by the identification number of your Facebook profile.

and finally, you back up your model.

Step 4: Create a section includable


So far we have set the parameters of that famous form. Now we will insert the code to display it at the foot of each article.

For that, we'll create a section includable in widget blog. We call it fbcomments .

Expand widget template and find this line:
\u0026lt;b: widget id = 'blog1' locked = 'true' title = 'blog posts' , type = 'Blog'>

Just below, you copy this code:
\u0026lt;b: includable id = 'fbcomments' var =' post & # 39;>

<b:if cond='data:post.allowComments'>

<div id="fb-root"></div>

<script>

window.fbAsyncInit = function() {

FB.init({

appId : ' ID DE L APPLICATION ',

status : true, // check login status

cookie : true, // enable cookies to allow the server to access the session

xfbml : true // parse XFBML

});

};



(function() {

var e = document.createElement('script');

e.src = document.location.protocol '//connect.facebook.net/fr_FR/all.js';

e.async = true;

document.getElementById('fb-root').appendChild(e);

}());

</script>



<fb:comments expr:title='data:post.title' expr:url='data:post.url' expr:xid='data:post.id' width=' 380 '/>

</b:if>
</b:includable>

In this code, you replace Application ID by the identification number of the application. You change the value
380 by the width of the column of your articles (in pixels).

Step 5: Create a reminder of the include section


is the last step (phew!).
After creating the includable section we named fbcomments must have created this recall. Looking

these lines:
\u0026lt;div class='post-outer'>
\u0026lt;b:include data='post' name='post'/>
\u0026lt;b: if cond = 'data: blog.pageType == & quot; " static_page '>
\u0026lt;b:include data='post' name='comments'/>
\u0026lt;/ b: if>
\u0026lt;b:if cond='data:blog.pageType == "item"'>
\u0026lt;b: include data = 'post' name = 'comments' />
\u0026lt;/ b: if>
\u0026lt;/ div>


If you want to conserve space comments Blogger, replace the code:
\u0026lt; ; div class = 'post-outer'>
\u0026lt;b:includable data='post' name='post'/>
\u0026lt;b: if cond = 'data: blog.pageType == " " static_page'>
\u0026lt;b: include data = 'post' name = 'fbcomments' />
\u0026lt;b: include data = 'post' name = 'comments' />
\u0026lt;/ b: if>
\u0026lt;b:if cond='data:blog.pageType == "item"'>
\u0026lt;b: include data = 'post' name = 'fbcomments' />
\u0026lt;b: include data = 'post' name = 'comments' ; />
\u0026lt;/ b: if>
\u0026lt;/ div>

If you do not want to keep the space of Blogger comments, use this code as:
\u0026lt;div class = 'post-outer & # 39;>
\u0026lt;b:includable data='post' name='post'/>
\u0026lt;b: if cond = 'data: blog. pageType == " " static_page '>
\u0026lt;b:includable data='post' name='fbcomments'/>
\u0026lt;/ b: if>
\u0026lt;b:if cond='data:blog.pageType == "item"'>
\u0026lt;b: include data = 'post' name = 'fbcomments' />
\u0026lt;/ b: if>
\u0026lt;/ div>


To find your way, I set bold lines represent the point of the section fbcomments . You can move at your convenience. You

Save and then take the time to admire your work. : D

You can see a demonstration of this trick:

• On all pages Log Blog .

0 comments:

Post a Comment