Page 1 of 1

[opgelost] Facebook comments in nieuws module

Posted: Tue Nov 13, 2012 9:32 am
by pasmaskas
Beste CMSMS leden,

Via de Facebook ontwikkelaars pagina krijg je deze codes door:

1. Include the JavaScript SDK on your page once, ideally right after the opening </__body> tag.

Code: Select all

<div id="fb-root"></div>
<__script__>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/nl_NL/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</__script>
2. Place the code for your plugin wherever you want the plugin to appear on your page.

Code: Select all

<div class="fb-comments" data-href="http://website.com" data-num-posts="5" data-width="470"></div>
Nummer 1 zet je na de </__body> tag en Nummer 2 waar je maar wilt.

Mijn vraag is: Zou je nummer 2 in het nieuws Artikel sjabloon kunnen verwerken maar dan dat de "data-href=" url automatisch vervangen word door de juiste url naar het nieuws bericht? dus dat het dan bijvoorbeeld word:

Code: Select all

<div class="fb-comments" data-href="{cmsms smarty auto url generator}" data-num-posts="5" data-width="470"></div>
Is dat mogelijk?

Gr pascal

Re: Facebook comments in nieuws module

Posted: Tue Nov 13, 2012 11:13 am
by pedes
dat wordt :

Code: Select all

<div class="fb-comments" data-href="{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" data-num-posts="5" data-width="470"></div>
mvg,
Peter

Re: Facebook comments in nieuws module

Posted: Wed Nov 14, 2012 11:14 am
by pasmaskas
Bedankt Peter!

Het werk!

Gr pascal

Re: Facebook comments in nieuws module

Posted: Wed Nov 14, 2012 6:44 pm
by pedes
graag gedaan Pascal !

zet je der ook nog opgelost bij?
dit topic is dan afgehandeld

Re: [opgelost] Facebook comments in nieuws module

Posted: Thu Nov 15, 2012 8:36 am
by pasmaskas
Klopt! Excuses staat er bij.

gr Pascal