Vorlage:FlogrThumbs: Unterschied zwischen den Versionen
Aus RTW
Wiese (Diskussion | Beiträge) (fixed typo) |
Wiese (Diskussion | Beiträge) (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 | + | var title = data.match(/.*<span id=['"]page_title['"]>([\s\S]+?)<\/span>.*/ig); |
− | jQuery(flogrthumbDomId).removeClass('loading').html( | + | 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