fritzmg / contao-sharebuttons

Simple extension to provide share buttons as a module and content element in Contao
GNU Lesser General Public License v3.0
18 stars 2 forks source link

[Contao 4.3] _contao/share instdead of share/index.php #32

Closed netzarbeiter closed 7 years ago

netzarbeiter commented 7 years ago

sharebuttons_default.html5 and sharebuttons_fontawesome.html5

<a href="share/index.php?p=facebook&amp;u=<?php echo $this->url; ?>&amp;t=<?php echo $this->title; ?>" rel="nofollow" title="<?php echo $this->lang['share_on_facebook']; ?>" onclick="return shd.open(this.href,600,300);">Facebook</a>
<a href="share/index.php?p=twitter&amp;u=<?php echo $this->url; ?>&amp;t=<?php echo $this->title; ?>" rel="nofollow" title="<?php echo $this->lang['share_on_twitter']; ?>" onclick="return shd.open(this.href,500,260);">Twitter</a>

should be:

<a href="_contao/share?p=facebook&amp;u=<?php echo $this->url; ?>&amp;t=<?php echo $this->title; ?>" rel="nofollow" title="<?php echo $this->lang['share_on_facebook']; ?>" onclick="return shd.open(this.href,600,300);"></a>
<a href="_contao/share?p=twitter&amp;u=<?php echo $this->url; ?>&amp;t=<?php echo $this->title; ?>" rel="nofollow" title="<?php echo $this->lang['share_on_twitter']; ?>" onclick="return shd.open(this.href,500,260);"></a>
fritzmg commented 7 years ago

Right, I forgot that it is a route in Contao 4 now.

However, this would break compatibility with Contao 3. I'll just directly link to the respective share scripts instead.

fritzmg commented 7 years ago

Fixed in 828f94aefc5bb492aaed85235e0a0a45c0f81236