Facebooklike Button rechtssicher einbauen
funktioniert auch für andere Dienste wie google+ twitter xing etc.
Update neue Info Dezember 2014:
So sollte es ab jetzt gemacht werden - ist auch im Pflegeblog so umgesetzt worden:
Variante bis Dezember 2014 ….
Rechtssicherer Einbau von Facebook (und andere Dienste google + twitter etc) Like Button in Contao:
1) Buttongrafik erstellen und in Contao ablegen
2) Neues Template mod_share.html5 erstellen und in templates ablegen (FTP) oder in templates erstellen - template code siehe unten! Im Template die rauslöschen die man nicht benötigt, Pfad zum Grafik Button aus Schritt 1 anpassen
3) Modul erstellen, eigenes HTML, Inhalt:
{ {file::mod_share.html5}}
4) Das Modul kann dann Überall auf der Website eingebunden werden
Code für das Template ab Contao 3.X:
<ul class="share"> <li class="first"><a href="share/index.php?p=facebook&u=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>&t=<?php echo urlencode($objPage->pageTitle); ?>" rel="nofollow" title="Auf Facebook teilen" onclick="window.open(this.href, '', 'width=760,height=570,modal=yes,left=100,top=50,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no'); return false;"><img src="tl_files/buttons/facebook.png" alt="Facebook" width="20" height="20"></a></li> <li><a href="share/index.php?p=twitter&u=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>&t=<?php echo urlencode($objPage->pageTitle); ?>" rel="nofollow" title="Auf Twitter teilen" onclick="window.open(this.href, '', 'width=800,height=600,modal=yes,left=100,top=50,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no'); return false;"><img src="tl_files/buttons/twitter.png" alt="Twitter" width="20" height="20"></a></li> <li><a href="https://plus.google.com/share?url=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>" rel="nofollow" title="Auf Google+ teilen" target="blank"><img src="tl_files/buttons/googleplus.png" alt="Google+" width="20" height="20"></a></li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>" rel="nofollow" title="Auf LinkedIn teilen" target="blank"><img src="tl_files/icons/linkedin.png" alt="LinkedIn" width="24" height="24"></a></li> <li><a href="https://www.xing.com/app/user?op=share;url=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>" rel="nofollow" title="Auf Xing teilen" target="blank"><img src="tl_files/buttons/xing.png" alt="Xing" width="20" height="20"></a></li> <li class="last"><a href="mailto:hier-empfänger@einsetzen.de?subject=Webseitenempfehlung: <?php echo urlencode($objPage->pageTitle); ?>&body=Ich empfehle Ihnen folgende Webseite: <?php echo urlencode($this->Environment->base . $this->Environment->request); ?>"><img src="tl_files/buttons/mail.png" alt="Per E-Mail empfehlen" width="20" height="20"></a></li> </ul>
siehe auch:http://www.contao-anleitungen.de/post/schoenere-sharing-buttons-in-contao.html