Vorlage:FlogrThumbs: Unterschied zwischen den Versionen

Aus RTW

(fixed typo)
(title and counter)
Zeile 9: Zeile 9:
 
var url = '/extensions/flogr/?type=sets' + amp + 'setId=' + flogrthumbId;
 
var url = '/extensions/flogr/?type=sets' + amp + 'setId=' + flogrthumbId;
 
jQuery.get(url, function(data) {
 
jQuery.get(url, function(data) {
var res = data.match(/.*<div id=['"]thumbnail_container['"]>([\s\S]+?)<\/div>.*/ig);
+
var title = data.match(/.*<span id=['"]page_title['"]>([\s\S]+?)<\/span>.*/ig);
jQuery(flogrthumbDomId).removeClass('loading').html(res[0]);
+
var pictures = data.match(/.*<div id=['"]thumbnail_container['"]>([\s\S]+?)<\/div>.*/ig);
 +
var count = pictures.match(/<img /ig).length;
 +
jQuery(flogrthumbDomId).removeClass('loading').html(
 +
pictures[0] +
 +
'<strong>' + title + '</strong>' +
 +
'(' + count  + ')'
 +
);
 
jQuery(flogrthumbDomId + ' a').attr('rel', 'lightbox[' + flogrthumbId + ']');
 
jQuery(flogrthumbDomId + ' a').attr('rel', 'lightbox[' + flogrthumbId + ']');
 
jQuery(flogrthumbDomId + ' a').lightBox(lightboxOptions);
 
jQuery(flogrthumbDomId + ' a').lightBox(lightboxOptions);

Version vom 24. Oktober 2011, 10:56 Uhr