2 if ( !defined( 'MEDIAWIKI' ) ) die();
4 * A Special Page sample that can be included on a wikipage like
5 * {{Special:Includable}} as well as being accessed on [[Special:Includable]]
10 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
11 * @author Niklas Laxström
12 * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
13 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
16 $wgExtensionCredits['specialpage'][] = array(
18 'name' => 'Includable',
19 'description' => 'a sample includable Special Page',
20 'author' => 'Ævar Arnfjörð Bjarmason'
23 $wgSpecialPages['Includable'] = 'SpecialIncludable';
25 // See FourFileTemplate how to do i18n
26 //$wgExtensionMessagesFiles['Includable'] = dirname( __FILE__ ) . '/Includable.i18n.php';
28 class SpecialIncludable
extends IncludableSpecialPage
{
32 function __construct() {
33 parent
::__construct( 'Includable' );
39 function execute( $par = null ) {
42 if ( $this->including() )
43 $out = "I'm being included";
45 $out = "I'm being viewed as a Special Page";
49 $wgOut->addWikiText( $out );