MyXoops Forum

Forum - myXOOPS German Support

2 + 9 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Aw: Wie einfügen Facebook's Comments Box an News Module?

Betreff: Aw: Wie einfügen Facebook's Comments Box an News Module?
von feichtl am 16.02.2012 10:24:35

Dieser Code soll nur EINMAL eingebunden werden. Idealerweise in deiner theme.html gleich nach dem < body > tag
<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/de_DE/all.js#xfbml=1&appId=***meineappid***";   fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
Danach in den Template Dateien nur mehr diesen Code hier einfügen
<div class="fb-comments" data-href="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" data-num-posts="5" data-width="600"></div>
Dieser Code kann auch für andere Module angepasst werden, zB mylinks
<div class="fb-comments" data-href="<{$xoops_url}>/modules/mylinks/singlelink.php?cid=<{$link.cid}>&amp;lid=<{$link.id}>" data-num-posts="5" data-width="600"></div>

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag