1 (edited by jop 2005-10-13 13:07)

Topic: Make all navlinks "additional navlinks"

I like to be able to remove navlinks as well as add them. I also like to configure who can see my additional navlink (admins/mod, user or guest).

The way i like this to be done is to make all navlinks the same. I also like to set "who can see" permissions just like unix permission (read=admins/mod, write=users, exec=guest). Position could be determined by the row number and permission can be written before the link. So per default the navlinks should look something like:

7 <a href="index.php">Index</a>
7 <a href="userlist.php">User list</a>
7 <a href="misc.php?action=rules">Rules</a>
7 <a href="search.php">Search</a>
1 <a href="register.php">Register</a>
6 <a href="profile.php">Profile</a>
4 <a href="admin_index.php">Admin</a>
1 <a href="login.php">Logga in</a>
6 <a href="login.php?action=out">Logout</a>

The reason i want this is to be able to move the login/logout links without a mod. It's confusing to have it in two diffrent places. I also like to add a link for admins to an admin plugin.

Re: Make all navlinks "additional navlinks"

Then how would language packs work?

Re: Make all navlinks "additional navlinks"

i think it would be easyer to just edit like 2-4 lines of code than write more lines for that function

4

Re: Make all navlinks "additional navlinks"

Hate mods. Even if it's just 2-4 lines. Makes me not want to update.

About the lang pack, there could be an option to use default or custom navlinks.

Re: Make all navlinks "additional navlinks"

I can understand your reasons for wanting to only show certain links to certain user groups, but why would you ever want to remove a link?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6

Re: Make all navlinks "additional navlinks"

I would like to move the login / logout links to my main menu. I could have them in both places but i think that is confusing.

Re: Make all navlinks "additional navlinks"

Well, you could hide them with CSS. Each list item has a unique ID.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8

Re: Make all navlinks "additional navlinks"

Solved now, I replaced the <pun_navlinks> with a <pun_include "navlinks.php">

Then i could rewrite the code myself without doing a mod. I bet many other mods could be done this way.