Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

JumpBox

(:input jumpbox ... :)

This page demonstrates a simple jumpbox:

(:input jumpbox value=JumpBox:)
(:input jumpbox value=Test:)
(:input jumpbox value=Cookbook:)

Or, from a pagelist:

(:if false:)
[[#jumpbox]]
(:input jumpbox value="{=$PageUrl}" label="{=$Title}":)
[[#jumpboxend]]
(:if:)

(:pagelist group=Test fmt=#jumpbox:)

The local customization used to enable (:input jumpbox ...:):

<?php if (!defined('PmWiki')) exit();

$InputTags['jumpbox'] = array(
  'name' => 'n',
  ':html' =>
    "<form action='{$PageUrl}' method='get'>
     <select onchange='window.location.href=this.options[this.selectedIndex].value'
       \$InputSelectArgs>\$InputSelectOptions</select>
     <input type='submit' value='$[Jump to page]' /></form>");

Markup('input-jumpbox', '<split',
  '/\\(:input\\s+jumpbox\\s.*?:\\)(?:\\s*\\(:input\\s+jumpbox\\s.*?:\\))*/ei',
  "InputSelect(\$pagename, 'jumpbox', PSS('$0'))");

With minor modifications this local customization may also provide a hidden submit button as Option Menu recipe did (Dfaure):

<?php if (!defined('PmWiki')) exit();

$FmtPV['$_UniqId_'] = '($GLOBALS["_UniqId_"] = uniqid("id"))';
$FmtPV['$_PrevId_'] = '$GLOBALS["_UniqId_"]';

$InputTags['jumpbox'] = array(
  'name' => 'n',
  ':html' =>
    "<form action='{$PageUrl}' method='get'>
     <select onchange='window.location.href=this.options[this.selectedIndex].value'
       \$InputSelectArgs class='inputbox' >\$InputSelectOptions</select>
     <input id='{\$_UniqId_}' type='submit' value='$[Jump to page]' class='inputbutton' />
     <script type='text/javascript'><!--
document.getElementById('{\$_PrevId_}').style.display = 'none';
//--></script></form>");

Markup('input-jumpbox', '<split',
  '/\\(:input\\s+jumpbox\\s.*?:\\)(?:\\s*\\(:input\\s+jumpbox\\s.*?:\\))*/ei',
  "InputSelect(\$pagename, 'jumpbox', PSS('$0'))");
Edit - History - Print - Recent Changes - Search
Page last modified on March 30, 2008, at 03:19 PM
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.07 00.06 MarkupToHTML begin
 3: 00.07 00.07 MarkupToHTML begin
 4: 00.09 00.09 MarkupToHTML end
 5: 00.09 00.09 MarkupToHTML begin
 6: 00.10 00.09 FPLTemplate begin
 7: 00.10 00.09 MakePageList pre
 8: 00.10 00.09 PageListSources begin
 9: 00.10 00.09 PageStore::ls begin wiki.d/{$FullName}
10: 00.20 00.12 PageStore::ls merge wiki.d/{$FullName}
11: 00.23 00.15 PageStore::ls end wiki.d/{$FullName}
12: 00.23 00.16 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
13: 00.23 00.16 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
14: 00.23 00.16 PageStore::ls end $FarmD/wikilib.d/{$FullName}
15: 00.24 00.16 PageListSources end count=845
16: 00.24 00.16 PageListSort pre ret=4 order=name
17: 00.24 00.16 MakePageList items count=845, filters=
18: 00.25 00.17 MakePageList post count=845, readc=0
19: 00.25 00.17 PageListCache begin save key=7d6ff07dc7c86744f2fbafd66cb59de0
20: 00.25 00.17 PageListCache end save
21: 00.25 00.17 PageListSort begin
22: 00.25 00.17 PageListSort sort
23: 00.30 00.22 PageListSort end
24: 00.30 00.22 MakePageList end
25: 00.81 00.69 MarkupToHTML begin
26: 01.43 01.29 MarkupToHTML end
27: 01.43 01.29 FPLTemplate end
28: 01.44 01.29 MarkupToHTML end
29: 01.45 01.31 MarkupToHTML end
30: 01.47 01.32 MarkupToHTML begin
31: 01.50 01.35 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
32: 01.51 01.36 ReadApprovedUrls SiteAdmin.ApprovedUrls end
33: 01.52 01.38 MarkupToHTML end
34: 01.52 01.38 MarkupToHTML begin
35: 01.54 01.39 MarkupToHTML end
36: 01.73 01.40 now