move query-string-passing to JS rather than embedding in the HTML, so that the HTML can be commonised and cached better

This commit is contained in:
Shish
2013-07-05 22:32:01 +01:00
parent e4bfa7df70
commit 47c1b5d094
9 changed files with 36 additions and 16 deletions

View File

@ -37,7 +37,7 @@ class BaseThemelet {
* Generic thumbnail code; returns HTML rather than adding
* a block since thumbs tend to go inside blocks...
*/
public function build_thumb_html(Image $image, $query=null) {
public function build_thumb_html(Image $image) {
global $config;
$i_id = (int) $image->id;
$h_view_link = make_link('post/view/'.$i_id, $query);
@ -55,7 +55,7 @@ class BaseThemelet {
$tsize = get_thumbnail_size($image->width, $image->height);
}
return "<a href='$h_view_link' class='thumb shm-thumb' data-tags='$h_tags' data-post-id='$i_id'>".
return "<a href='$h_view_link' class='thumb shm-thumb shm-thumb-link' data-tags='$h_tags' data-post-id='$i_id'>".
"<img id='thumb_$i_id' title='$h_tip' alt='$h_tip' height='{$tsize[1]}' width='{$tsize[0]}' class='lazy' data-original='$h_thumb_link' src='$base/lib/static/grey.gif'>".
"<noscript><img id='thumb_$i_id' title='$h_tip' alt='$h_tip' height='{$tsize[1]}' width='{$tsize[0]}' src='$h_thumb_link'></noscript>".
"</a>\n";