Forum:Defining the image for "Read more" section

I am actually trying to change the image, that is chosen automatically for an article's "Read more" link. Do you know a working method?

I wrote a template some time ago like this to add an additional invisible image at the top of an article, for avoiding using (downscaled) message box icons, and I'm pretty sure it worked on articles with few images. But now I have here an article with several images, and the template doesn't seem to work. I have the impression, that "directly" included images are favored over images, that are included by a template. Is that possible?

The article I'm referring to can be found here. I want the "Read more" link to show the infobox image instead of the other book cover, that can be found in the section "Publishers in other countries".

Do you have experience with this problem? Thanks in advance. -- Weas-El  Talk|Contribs  18:34, March 26, 2011 (UTC)
 * I wish we knew the particulars of this. Sometimes it uses the first image, sometimes the last, sometimes it doesn't use any when there's images on the page... Until Wikia decides to reveal how the extension works, or someone decides to look in-depth into the code, you won't be able to get a straight answer on this and most of it will be speculative. Rappy 21:55, March 26, 2011 (UTC)


 * Tagging Staff needed. Wikia staff are the only ones that can begin to answer that question and they should have given some info when they released the feature, but they didn't. -- Fandyllic (talk &middot; contr) 28 Mar 2011 2:16 PM Pacific


 * I did some searching in the code and I found this snippet in the php. I don't fully understand PHP, but it looks as though it's to grab the first image it encounters on the page, but that doesn't always seem to be the case.

foreach( $pages as $pageId => $data ) { if( isset( $images[$pageId] ) ) { $image = $images[$pageId][0]; $data['imgUrl'] = $image['url'];

$this->pages[] = $data; }  else { // no images, get a text snippet $data['text'] = $this->getArticleSnippet( $pageId );

if ($data['text'] != '') { $this->pages[] = $data; }  }

if (count($this->pages) >= $limit) { break; } }
 * Rappy 22:41, March 28, 2011 (UTC)


 * In my experience, the extension has rules not to grab images that are used more than a key number of times on different pages (something like greater than 10). This is probably an attempt to exclude images in tag templates like . Also, the extension doesn't grab text inside of templates, so if you have a page with only text inside of templates and only one image which is used on more than 10 pages, the Read more section wont use that page at all in previews. For example, these pages on BioShock Wiki are in the same category, but all the articles in that category have the special exceptions that I just described, so the Read more section doesn't display at all: Parasite Expectations, Love for Science. Unfortunately, this rule for the extension also causes issues on category pages: Category:Medical Pavilion Audio Diaries. The extension recognizes that it can't use an image, so it tries to give a nonexistent text snippet. ~ Gardimuer { ʈalk } 07:30, March 29, 2011 (UTC)
 * I am not sure in which order which takes place, but the JS seems to do the weeding. The PHP seems to get the criteria to weed. Either way, the extension could use some work and possibly a way to manually assign the image to be used. Rappy 07:34, March 29, 2011 (UTC)


 * Thanks for your answers so far. -- Weas-El  Talk|Contribs  08:17, March 29, 2011 (UTC)


 * Gardimuer's guess "the extension has rules not to grab images that are used more than a key number of times on different pages" probably hits the mark. My image is ignored even when I add it directly at the beginning of the article. It may be used to often on other pages... good for message box icons, bad for a book cover in a wiki about this book. ;-) -- Weas-El  Talk|Contribs  09:16, March 29, 2011 (UTC)


 * If the JS does the weeding, you could redefine the function. But honestly, I think it's a better idea to just kill the headings.