2013-10-25, 10:03 PM
So I have customized the menu bar like this:
Now I only want to highlight one of the menu items depending on where the user is on the website. Just like you are now on mybb's community section:
So if the user is browsing the forums, categories, threads, posting new replies, creating threads etc. etc. obviously the Forums button should be highlighted in my example.
Now for me it's easy to do this with javascript/prototype/jquery whatever. But the issue I've got here is that on the client side, it's a tedious task to check where the user is currently. Because unfortunately there is no universal URL directory for the forums. For example:
Fortunately, for the search section it's only /search.php
for the help section it's always /misc.php
etc.
So those would be easy.
Anyway, so that would be my idea. Does anyone have any other/better suggestion to achieve this on an easier and more efficient way?
Now I only want to highlight one of the menu items depending on where the user is on the website. Just like you are now on mybb's community section:
So if the user is browsing the forums, categories, threads, posting new replies, creating threads etc. etc. obviously the Forums button should be highlighted in my example.
Now for me it's easy to do this with javascript/prototype/jquery whatever. But the issue I've got here is that on the client side, it's a tedious task to check where the user is currently. Because unfortunately there is no universal URL directory for the forums. For example:
- /index.php would be the main index page
- /forumdispay.php would be the forums and categories
- /showthread.php would be a specific thread in the forums
Fortunately, for the search section it's only /search.php
for the help section it's always /misc.php
etc.
So those would be easy.
Anyway, so that would be my idea. Does anyone have any other/better suggestion to achieve this on an easier and more efficient way?