Extension talk:Subpage Fun

From MediaWiki.org
Jump to navigation Jump to search

Installation Guide Issue[edit]

The guide says you have to create a file named LocalSettings.php within the SubpageFun-Folder. But the code two lines below isn't calling that file:

require_once( "$IP/extensions/SubpageFun/SubpageFun.php" );

To install the extension correctly you have to rename the file to SubpageFun.php.

I've fixed the documentation. Thanks for reporting this. —Emufarmers(T|C) 19:27, 27 December 2010 (UTC)
Same error on the source code page Extension:Subpage Fun/Source code, fixed it. --Nakohdo 19:49, 26 January 2011 (UTC)

Parent page not displaying children, but children display parent page[edit]


On the father page (title: EXAMPLE), the {{subpages}} tag doesn't output the subpages, and {{numberofsubpages}} returns 0.

On the subpage (title: EXAMPLE/TEST), the {{parentpages}} returns "EXAMPLE", and {{subpagelevel}} returns 1.

Any idea why this is happening to me?


I guess you created EXAMPLE, then EXAMPLE/TEST and then you didn't purge or re-save EXAMPLE. Of course you have to actualize the content of the page somehow. Either save the article again or use a page purge --Danwe 05:18, 4 January 2011 (UTC)

Trimming path names[edit]

Is there a way to trim path names with this extension similar to Extension:SubPageFunctions#pathname ? Might using Extension:ArrayExtension be a possibility?

Any suggestions welcome. tia --Nakohdo 19:54, 26 January 2011 (UTC)

Yes, works with ArrayExtension. Create a template (e.g. pagepath) with the following code:
#arraydefine: arrParents
| {{PARENTPAGES: {{{page|{{FULLPAGENAME}} }}} |sep=<SEP>}}<SEP>{{FULLPAGENAME: {{{page|{{FULLPAGENAME}} }}} }}
| <SEP>
#arrayslice: arrParents | arrParents | {{{1|0}}} | {{{2|}}}
#arrayprint: arrParents | {{{sep|&#32;/&#32;}}} | @@@@ | {{#if: {{{linked|}}} |  [[@@@@|{{SUBPAGETITLE:@@@@}}]]  |  {{SUBPAGETITLE:@@@@}}  }}
You can use the following parameters:
  • page: An existing page in the wiki to analyze.
  • 1: Start point of the page path. Can be negative.
  • 2: Length of the path.
  • linked: If any value is given, the parts of the output will be linked to their subpage.
  • sep: Separator between the parts. By default &#32;/&#32;
Hope that's good enough. And of course the main advantage of this extension also affects this template: It will recognize real subpages and not just strings separated by / as other extensions and MW core do. --Danwe 03:35, 27 January 2011 (UTC)

Main article, Template and Category namespaces not noticing subpages[edit]

Hi all, having a slight problem with this template.

I've notices some limitations, and I was wondering if you could suggest whether they were isolated to the wiki I contribute to, or whether they're global problems (that could potentially be fixed?):

  • Subpages are not recognised in MediaWiki 1.19.0beta2 on the Home (main) article.
  • Similarly, they don't seem to be recognised in Template, Category, and possibly other namespaces.

Is it just me? -- Jan Baykara (talk) 22:13, 1 May 2012 (UTC)

I think it works fine, perhaps you don't have Manual:$wgNamespacesWithSubpages set to allow real subpages in the given namespaces. It's disabled by default within the main namespace!. --Danwe (talk) 22:28, 7 May 2012 (UTC)
Ah, you're a genius. I think that's exactly it, will try it out. Thanks! Jan Baykara (talk) 18:41, 8 May 2012 (UTC)

Dont expect this extension to work with older php-versions[edit]

Our server runs php 5.2.6: Parse error: syntax error, unexpected T_FUNCTION in /var/www/virtual/wiki-aventurica.de/htdocs/extensions/SubpageFun/SubpageFun.i18n.php on line 14
I'm sure there is some version of this extension buried somewhere in git that works, but since the "Download snapshot"-function turns up blank, I'm not sure how to find it.--Baumgeist (talk) 13:41, 10 April 2014 (UTC)

Additional Parameters[edit]

I've tried Template:SUBPAGES linked=true. That does not work. The simple list Template:SUBPAGES is OK.