Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Category navigation: a small modification to CategoryJumper
Max_B
New
I wrote somewhere in a discussion about this recurrent question of category navigation that, IMO, the best answer would be a slight modification to Mark's CategoryJumper extension: keep the selected category, from the sidepanel select or from the categories page, active until user deliberatly select to see all categories.
Here it is. Only a few lines are added to hte extension code so I see no reason to make another one.
Find the right place in CategoryJumper/default.php (around line #26) and add the lines between the two comments.
then change the line reading:
to
Post-scriptum edit: If you use FriendlyUrl, you should modify the relevant line instead of the one above. I didn't do it since i'm not able to test right now.
Here it is. Only a few lines are added to hte extension code so I see no reason to make another one.
Find the right place in CategoryJumper/default.php (around line #26) and add the lines between the two comments.
if (!$CategoryData) {
return '';
} else {
//mod Max_B: stick the category setting
$sess_cat = isset($_GET['CategoryID']) ? $_GET['CategoryID'] : -1;
if ($sess_cat == -1) {
if (isset($_SESSION['CategoryJumper'])) $_GET['CategoryID'] = $_SESSION['CategoryJumper'];
} elseif ($sess_cat == 0) {
unset($_SESSION['CategoryJumper']);
unset($_GET['CategoryID']);
} else {
$_SESSION['CategoryJumper'] = $sess_cat;
}
//end mod
$Select = $Context->ObjectFactory->NewObject($Context, 'Select');
$Select->Name = 'CategoryID';
then change the line reading:
$Select->Attributes = "onchange=\"document.location='".$Context->Configuration['WEB_ROOT']."'+(this.options[this.selectedIndex].value > 0 ? '?CategoryID='+this.options[this.selectedIndex].value : '');\"";
to
$Select->Attributes = "onchange=\"document.location='".$Context->Configuration['WEB_ROOT']."'+(this.options[this.selectedIndex].value > 0 ? '?CategoryID='+this.options[this.selectedIndex].value : '?CategoryID=0');\"";
Post-scriptum edit: If you use FriendlyUrl, you should modify the relevant line instead of the one above. I didn't do it since i'm not able to test right now.
0
This discussion has been closed.
Comments
I think the use of the category jumper is more intuitive in this way. When the user selects something it keeps selected until she decides to change it. After browsing a given discussion you come back to the same discussion list where you were previously. I think it is really apropriate for forums with strong category structure.
However, for people used to the old way it is a little annoying at first. I was so used to click in the Discussions tab to get the whole list that now I forget I should use the category jumper to do it ;-)