Difference between revisions of "Talk:Dynamic Page List"
(→includematch) |
(→Reply) |
||
(One intermediate revision by the same user not shown) | |||
Line 71: | Line 71: | ||
Now we select only those articles where the word 'groups' occurs: | Now we select only those articles where the word 'groups' occurs: | ||
− | {#dpl: | + | {{#dpl: |
|category=fictitious country | |category=fictitious country | ||
|include=#Religion | |include=#Religion | ||
Line 78: | Line 78: | ||
}} | }} | ||
+ | Unfortunately there is a small error in DPL 1.7.5 which happens to appear with the above example. So you MUST upgrade to DPL 1.7.6 (see [[Download]]) to run this example correctly on your installation. | ||
+ | |||
[[User:Gero|Gero]] 05:48, 26 April 2009 (UTC) | [[User:Gero|Gero]] 05:48, 26 April 2009 (UTC) |
Latest revision as of 07:06, 26 April 2009
hello,now i want to adust my wiki navigation bar like this, having a treeview,but i don't know how to do it? can you help me? thank you very much!
Reply
- please put a signature under your contributions.
- install the treeview extension
put the following into your LocalSettings.php
# Treeview require_once( "$IP/extensions/Treeview/Treeview.php" ); $wgTreeViewImages = array( 'plus' => "Plus.gif", 'minus' => "Minus.gif", 'opened' => "Folder_opn_sml_blu.gif", 'closed' => "Folder_sml_blu.gif", 'doc' => "Doc-icon.gif", 'spacer' => "Blank.gif", 'vert' => "Vertline.gif", 'node' => "Node.gif", 'lastnode' => "Lastnode.gif", ); #$wgTreeViewShowLines = true; // we added a new hook to skins/Monobook.php at the top of the sidebar $wgHooks['MonoBookTemplateSidebarBegin'][] = 'wfNavTree'; function wfNavTree() { global $wgUser,$wgTitle,$wgParser; if (is_object($wgParser)) $psr =& $wgParser; else $psr = new Parser; $opt = ParserOptions::newFromUser($wgUser); $nav = new Article(Title::newFromText('NavTree')); $out = $psr->parse($nav->fetchContent(0,false,false),$wgTitle,$opt,true,true); //echo '</ul></div>'.$out->getText(); echo $out->getText(); return true; }
and change Monobook.php:
You must add the following line
<?php wfRunHooks( 'MonoBookTemplateSidebarBegin', array( &$this ) ); ?>
directly before this (existing) line
<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
Finally you should add this line to Mediawiki:Common.css
#p-navigation { display:none }
Then write your tree into the Document "NavTree"
Gero 20:25, 14 December 2007 (CET)
includematch
Hi!
I want to select pages which contains 'hello world' in Example chapter. As i understand 'includematch' can help me, but i don't understand how to make it... I tried to paste expression from examples and always got PHP errors (about delimiter or offset). I just want to select pages which contains 'hello world' to add them to the table. What do i need?
--Maaboo 13:33, 24 April 2009 (UTC)
Reply
We create a table of countries and show the chapter on 'Religion':
Content page | Religion |
---|---|
DPL Example 007 main page 1 | |
Nigunda |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda; |
Nigunda Test |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda Test; |
Somango |
some facts about religion in Somango |
Now we select only those articles where the word 'groups' occurs:
Content page | Religion |
---|---|
Nigunda |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda; |
Nigunda Test |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda Test; |
Unfortunately there is a small error in DPL 1.7.5 which happens to appear with the above example. So you MUST upgrade to DPL 1.7.6 (see Download) to run this example correctly on your installation.
Gero 05:48, 26 April 2009 (UTC)