Quote:
Originally Posted by Souli
the NAVKEYS (3-4) function doesn?t work
|
Don't use parentheses. The readme just shows ( ) to indicate that part is optional.
Quote:
Originally Posted by Souli
I need in a specific subforum for all included subs:
Forum2 > Forum3 > THIS_PAGE
is it possible ?
|
This was not possible until Version 1.4.0. If you are running 1.4.x or later,
I have done what you ask with the following:
Script Title: forumdisplay
First URL: FORUM_HOME
URLs: NAVKEYS 3-4
- In this case,
Forum Home > Forum1 would be NAVKEYS 1-2
Final URL: THIS_PAGE
First Text: FORUM_HOME
Text: NAVBITS
Final Text: THIS_PAGE
Globals:
Code:
$foruminfo, $subforum_is_parent
Condition:
Code:
($foruminfo['forumid'] == SUBFORUM_ID) OR $subforum_is_parent
In order for this to work you need to create a plugin to get the current forum's parentlist, and perform a check that will set $subforum_is_parent
Hook Location: forumdisplay_start
Plugin Code:
PHP Code:
global $subforum_is_parent;
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$subforum_is_parent = ($forumID == SUBFORUM_ID) ? true : $subforum_is_parent;
}
Note that additional $subforums can easily be added to this check by creating additional variables in the global statement, and by duplicating the line
PHP Code:
$subforum_is_parent = ($forumID == SUBFORUM_ID) ? true : $subforum_is_parent;