Revision 1119
Added by Matthias about 16 years ago
| include.php | ||
|---|---|---|
| 22 | 22 |
02110-1301, USA. |
| 23 | 23 |
|
| 24 | 24 |
*********************************************** |
| 25 |
** Version 4.8: see README for documentation **
|
|
| 25 |
** Version 4.9: see README for documentation **
|
|
| 26 | 26 |
*********************************************** |
| 27 | 27 |
*/ |
| 28 | 28 |
|
| 29 |
define('SM2_ROOT', -1000);
|
|
| 30 |
define('SM2_CURR', -2000);
|
|
| 31 |
define('SM2_ALLMENU', -1);
|
|
| 32 |
define('SM2_START', 1000);
|
|
| 33 |
define('SM2_MAX', 2000);
|
|
| 34 |
define('SM2_ALL', 0x0001); // bit 0 (group 1) (Note: also used for max level!)
|
|
| 35 |
define('SM2_TRIM', 0x0002); // bit 1 (group 1)
|
|
| 36 |
define('SM2_CRUMB', 0x0004); // bit 2 (group 1)
|
|
| 37 |
define('SM2_SIBLING', 0x0008); // bit 3 (group 1)
|
|
| 38 |
define('SM2_NUMCLASS', 0x0010); // bit 4
|
|
| 39 |
define('SM2_ALLINFO', 0x0020); // bit 5
|
|
| 40 |
define('SM2_NOCACHE', 0x0040); // bit 6
|
|
| 41 |
define('SM2_PRETTY', 0x0080); // bit 7
|
|
| 42 |
define('SM2_ESCAPE', 0x0100); // bit 8
|
|
| 43 |
define('SM2_NOESCAPE', 0); // NOOP, unnecessary with WB 2.6.7+
|
|
| 44 |
define('SM2_BUFFER', 0x0200); // bit 9
|
|
| 45 |
define('SM2_CURRTREE', 0x0400); // bit 10
|
|
| 46 |
define('SM2_HIDEPAGES', 0x0800); // bit 11 (reactivate old behavior and doesn't show hidden pages)
|
|
| 29 |
define('SM2_ROOT', -1000);
|
|
| 30 |
define('SM2_CURR', -2000);
|
|
| 31 |
define('SM2_ALLMENU', -1);
|
|
| 32 |
define('SM2_START', 1000);
|
|
| 33 |
define('SM2_MAX', 2000);
|
|
| 34 |
define('SM2_ALL', 0x0001); // bit 0 (group 1) (Note: also used for max level!)
|
|
| 35 |
define('SM2_TRIM', 0x0002); // bit 1 (group 1)
|
|
| 36 |
define('SM2_CRUMB', 0x0004); // bit 2 (group 1)
|
|
| 37 |
define('SM2_SIBLING', 0x0008); // bit 3 (group 1)
|
|
| 38 |
define('SM2_NUMCLASS', 0x0010); // bit 4
|
|
| 39 |
define('SM2_ALLINFO', 0x0020); // bit 5
|
|
| 40 |
define('SM2_NOCACHE', 0x0040); // bit 6
|
|
| 41 |
define('SM2_PRETTY', 0x0080); // bit 7
|
|
| 42 |
define('SM2_ESCAPE', 0x0100); // bit 8
|
|
| 43 |
define('SM2_NOESCAPE', 0); // NOOP, unnecessary with WB 2.6.7+
|
|
| 44 |
define('SM2_BUFFER', 0x0200); // bit 9
|
|
| 45 |
define('SM2_CURRTREE', 0x0400); // bit 10
|
|
| 46 |
define('SM2_SHOWHIDDEN', 0x0800); // bit 11
|
|
| 47 | 47 |
|
| 48 | 48 |
define('_SM2_GROUP_1', 0x000F); // exactly one flag from group 1 is required
|
| 49 | 49 |
|
| ... | ... | |
| 575 | 575 |
if ($page['page_id'] == $CURR_PAGE_ID) {
|
| 576 | 576 |
$page['sm2_is_curr'] = true; |
| 577 | 577 |
$page['sm2_on_curr_path'] = true; |
| 578 |
if (($flags & SM2_HIDEPAGES) == 0){
|
|
| 579 |
unset($page['sm2_hide']); // don't hide the current page |
|
| 578 |
if ($flags & SM2_SHOWHIDDEN) {
|
|
| 579 |
// show hidden pages if active and SHOWHIDDEN flag supplied |
|
| 580 |
unset($page['sm2_hide']); |
|
| 580 | 581 |
} |
| 581 | 582 |
} |
| 582 | 583 |
|
| ... | ... | |
| 584 | 585 |
if (in_array($page['page_id'], $rgCurrParents)) {
|
| 585 | 586 |
$page['sm2_is_parent'] = true; |
| 586 | 587 |
$page['sm2_on_curr_path'] = true; |
| 587 |
unset($page['sm2_hide']); // don't hide a parent page |
|
| 588 |
if ($flags & SM2_SHOWHIDDEN) {
|
|
| 589 |
// show hidden pages if active and SHOWHIDDEN flag supplied |
|
| 590 |
unset($page['sm2_hide']); |
|
| 591 |
} |
|
| 588 | 592 |
} |
| 589 | 593 |
|
| 590 | 594 |
// add the entry to the array |
Also available in: Unified diff
Updated show_menu2 to version 4.9