Hi,

On a project I'm working on, a table generated by an #ask function lists image pages in one of the columns, and I wanted to display thumbnails, instead of image file names, in that column. Then I had the thought that inline queries should *always* display thumbnails for images (assuming linking is set to true) - after all, why would someone just want to see a list of image names?

Anyway, below is the two-line addition to accomplish that. Feel free to add it in to the code - I think it would definitely be an improvement.

-Yaron


Index: includes/SMW_DV_WikiPage.php
===================================================================
--- includes/SMW_DV_WikiPage.php        (revision 28671)
+++ includes/SMW_DV_WikiPage.php        (working copy)
@@ -88,6 +88,8 @@
                }
                if ( ($linked === NULL) || ($linked === false) ) {
                        return $this->m_prefixedtext;
+               } elseif ($this->m_namespace == NS_IMAGE) { // display thumbnail for images
+                       return '[[' . str_replace("'", ''', $this->m_prefixedtext) . '|' . $this->m_textform . '|thumb]]';
                } else {
                        return '[[:' . str_replace("'", ''', $this->m_prefixedtext) . '|' . $this->m_textform . ']]';
                }