Vorlage:FlogrThumbs: Unterschied zwischen den Versionen
Aus RTW
Wiese (Diskussion | Beiträge) (first element right away) |
Wiese (Diskussion | Beiträge) (id-less thumb container) |
||
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 title = data.match(/.*<span id=['"]page_title['"]>([\s\S]+?)<\/span>.*/ | + | var title = data.match(/.*<span id=['"]page_title['"]>([\s\S]+?)<\/span>.*/i)[1]; |
− | var pictures = data.match(/.*<div id=['"]thumbnail_container['"]>([\s\S]+?)<\/div>.*/ | + | var pictures = data.match(/.*<div id=['"]thumbnail_container['"]>([\s\S]+?)<\/div>.*/i)[1]; |
var count = pictures.match(/<img /ig).length; | var count = pictures.match(/<img /ig).length; | ||
jQuery(flogrthumbDomId).removeClass('loading').html( | jQuery(flogrthumbDomId).removeClass('loading').html( | ||
− | pictures + | + | <div class="thumbs">' pictures + '</div>' + |
'<strong>' + title + '</strong>' + | '<strong>' + title + '</strong>' + | ||
− | '(' + count + ')' | + | '(' + count + ' Fotos)' |
); | ); | ||
jQuery(flogrthumbDomId + ' a').attr('rel', 'lightbox[' + flogrthumbId + ']'); | jQuery(flogrthumbDomId + ' a').attr('rel', 'lightbox[' + flogrthumbId + ']'); |
Version vom 24. Oktober 2011, 11:14 Uhr