It is not a good idea to make changes to these core mediawiki files  
because it makes upgrading the wiki difficult. This script outputs  
some '.portlet' html code based on the content of a wiki article  
(Mediawiki:Nav). You can use this inside Monobook.php or a new skin  
file of your creation.

<div id='p-page-nav' class="portlet">
   <?php
   global $wgParser, $wgTitle;
   $side = new Article(Title::newFromText('Nav',NS_MEDIAWIKI));
   if (is_object($wgParser)) { $psr = $wgParser; $opt = $wgParser- 
 >mOptions; }
   else { $psr = new Parser; $opt = NULL; }
   if (!is_object($opt)) $opt = ParserOptions::newFromUser($wgUser);
   echo $psr->parse($side->fetchContent(),$wgTitle,$opt,true,true)- 
 >getText();
   ?>
</div>

Here is a link with some other useful examples:
http://organicdesign.co.nz/MediaWiki_code_snippets

Rob


On 17/03/2009, at 10:59 PM, Alessandra wrote:

> Hi all,
>
> I created a new wiki skin based loosely on MonoBook coding.
> I add two new sidebars (one left and one right bar) and original
> sidebar is now a topbar.
> New sidebars are used like original sidebar, so I created
> MediaWiki:leftbar and MediaWiki:rightbar page and I modified:
> * includes/Skin.php adding two functions like function buildSidebar()
> * includes/SkinTemplate.php adding two line after $tpl->set(
> 'sidebar', $this->buildSidebar() ); one for each new sidebar
> * includes/Wiki.php modifing 'case NS_CATEGORY' so that CategoryPage
> sections are available only $wgUser->isLoggedIn()
>
> I would like to release this skin. That is why I ask you if these
> changing are doable modifing only MonoBook coding or using extensions.
>
> Can you help about it?
> Best,
>
> -- 
> Alessandra Bilardi
> ----
> http://genomics.cribi.unipd.it/
> ----
>
> _______________________________________________
> MediaWiki-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to