Wikia

Community Central

WatchlistRandom pageRecent changes

Inputbox problem

63,452pages on
this wiki

Forum page

Forums: Index Help desk Inputbox problem
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 1839 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


I'm having a problem with the inputbox feature over on WikiJET. It seems that when a user creates a new article using an inputbox (for example on the Hokkaido Prefecture page) that the Local knowledge template is preloaded in its entirety, including the <noinclude> content. Is there any way to have it just substitute the template, and not include the <noinclude> content?

Bobo12345 04:12, 8 May 2007 (UTC)

Not that i know of so far, as it imputs the full page as it is, so the <noinclude> does not work on that type of trick the best would be not to add anything there, if you check the way the forums are full on this wiki you will notice they dont have any of the noinclude tags due to the same reason.--189.149.71.104 04:34, 8 May 2007 (UTC)
Looking at the code one can see that there is a custom parser just for this, and all it does is is remove <includeonly> :
private function getPreloadedText($preload) {
	if ( $preload === '' )
		return '';
	else {
		$preloadTitle = Title::newFromText( $preload );
		if ( isset( $preloadTitle ) && $preloadTitle->userCanRead() ) {
			$rev=Revision::newFromTitle($preloadTitle);
			if ( is_object( $rev ) ) {
				$text = $rev->getText();
				// TODO FIXME: AAAAAAAAAAA, this shouldn't be implementing
				// its own mini-parser! -ævar
				$text = preg_replace( '~</?includeonly>~', '', $text );
				return $text;
			} else
				return '';
		}
Datrio has consulted with ævar and written a patch for Wikia so that we can strip <noinclude> so as to categorize these pages (etc), but until this patch is deployed, all page content except the includeonly tags themselves, will be included. The best thing to do is just have a specific separate preload template with exactly what you want to preload.
Note: includeonly is stripped, for tricks like {{<includeonly>subst:</includeonly>CURRENTYEAR}} (substing in a magic word). --Splarka (talk) 05:22, 8 May 2007 (UTC)
You can put something like this:--Ciencia Al Poder (talk) -@WikiDex 18:10, 8 May 2007 (UTC)
<includeonly>{{</includeonly><includeonly>subst:ns:0|</includeonly>
THIS PART WILL BE INCLUDED, BUT ALSO WILL BE DELETED WHEN THE TRANSCLUDED PAGE IS SAVED (not *this* page)
<includeonly>}}</includeonly>

Thanks for the help. I'll have a go later in the week. Cheers, Bobo12345 01:10, 10 May 2007 (UTC)

Around Wikia's network

Random Wiki