Drupal oldalunkra telepíthetjük a Service Links modult. így követhetik, megoszthatják tartalmainkat olvasóink, a közösségi oldalak segítségével.
Egy állandó „bug”, ami a jelenlegi verzióban is benne van, hogy a Facebook Like nem akar megjelenni az oldalon, hiába állítottam be!
Bővebb info, letöltés: Service links
megoldás:
A modul mappájában, /sites/all/modules/service_links/js/ mappán belül található egy facebook_like.js fájl. Ennek a tartalmát cseréltem le!
eredeti:
(function ($) {
Drupal.behaviors.ws_fl = {
attach: function (context, settings) {
$(‘a.service-links-facebook-like’, context).each(function(){
var iframe = document.createElement(‘iframe’);
iframe.src = $(this).attr(‘href’).replace(‘http://’, ‘//’).replace(/http[s]*\%3A\/\//, ”);
iframe.setAttribute(‘scrolling’, ‘no’);
iframe.setAttribute(‘frameborder’, 0);
iframe.setAttribute(‘allowTransparency’, ‘true’);
$(iframe).css({
‘border’: ‘none’,
‘overflow’: ‘hidden’,
‘width’: Drupal.settings.ws_fl.width + ‘px’,
‘height’: Drupal.settings.ws_fl.height + ‘px’,
});
$(iframe).addClass($(this).attr(‘class’));
$(this).replaceWith(iframe);
});
}
}
})(jQuery);
általam használt:
(function ($) {
Drupal.behaviors.ws_fl = {
attach: function (context, settings) {
$(‘a.service-links-facebook-like’, context).each(function(){
var iframe = document.createElement(‘iframe’);
iframe.src = $(this).attr(‘href’).replace(‘http://’, ‘//’).replace(/http[s]*\%3A\/\//, ”);
iframe.src = $(this).attr(‘href’).replace(‘http://’, ‘//’);
iframe.setAttribute(‘scrolling’, ‘no’);
iframe.setAttribute(‘frameborder’, 0);
iframe.setAttribute(‘allowTransparency’, ‘true’);
$(iframe).css({
‘border’: ‘none’,
‘overflow’: ‘hidden’,
‘width’: Drupal.settings.ws_fl.width + ‘px’,
‘height’: Drupal.settings.ws_fl.height + ‘px’,
});
$(iframe).addClass($(this).attr(‘class’));
$(this).replaceWith(iframe);
});
}
}
})(jQuery);