News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Edited subs.php, everything looks great except for ghost link

Started by colby2152, November 14, 2010, 01:46:24 PM

Previous topic - Next topic

colby2152

Yes, I updated to RC 5.0 and have my custom menu temporarily unavailable.  If someone can detail how I can edit the menu without error then I am all ears! :-[
ProFSL.com - Pro Fantasy Sports Leagues - Advanced fantasy sports leagues, contests, free chances at cash/prizes, and sports discussion.

Need a server? I am happy to advocate this hosting solution - hands on customer service and reliability is relieving!!!

Angelina Belle

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Illori

he has some custom links in a prior version of the menu, but the upgrade removed them. the only way to add them back would be to go though the prior attached subs.php or the op tell us what he wants and where and recreate the menu from scratch.

Angelina Belle

Colby,

Making changes to your menu buttons array in Subs.php, as you've done, is custom coding.
This is makes your question a lot more advanced than simple  SMF 2.x Support.

You have been working on custom coding here.
If you are looking for "how I can edit the menu without error", then the short answer is -- "that's impossible".

The long answer is:
* You know you will make errors while coding, so it is best to add the smallest "unit" possible at one time. In your case, that would mean first adding one top-level button to the array, withoout any sub-buttons. Then, after you fix all the mistakes you made there, adding one second-level button to that array. And finding all your mistakes with that. And so on. That's how I code.
* Since you know you are going to be messing things up, do this work in a test forum -- a copy of your real forum.
* You might get more and better help in SMF Coding Discussion or find something useful in Tips and Tricks

If you like, I can move this topic to SMF coding discussion if you would like to work on it some more there.
I think that, if we leave this topic here, in the Support Board, it will not get the attention you would like it to have, simply because it is not a simple SMF 2.X Support topic -- it really is a coding topic.

Another option would be to mark this topic solved (you fixed the ghost-link problem by removing the offending code from Sups.php).

Which would you like to do?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

colby2152

Yes, please move this to the coding forum.  So there will always be errors with a custom menu?
ProFSL.com - Pro Fantasy Sports Leagues - Advanced fantasy sports leagues, contests, free chances at cash/prizes, and sports discussion.

Need a server? I am happy to advocate this hosting solution - hands on customer service and reliability is relieving!!!

Illori

there should never be errors with a custom menu, if the edits are done correctly.

Angelina Belle

I guess I should have said "It is practically impossible for a normal human like me to make edits without making errors".

I always make errors when writing any kind of code. So I always have to check for my bugs and figure out how to correct them.
When I add a lot of lines of code at one time, and the code acts kind of funny, then I am usually very confused about what caused my problem.

That is why I gave the advice to add only one tiny change at a time. Then, if adding one more line causes something funny to happen, I have some idea of where the problem comes from.

At your request, I will move this to the custom coding board.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

colby2152

Thanks, all I need is a series of steps for adding something to the menu.  I have added drop-downs successfully, but not without error.  I assume I am missing some key declaration or function.
ProFSL.com - Pro Fantasy Sports Leagues - Advanced fantasy sports leagues, contests, free chances at cash/prizes, and sports discussion.

Need a server? I am happy to advocate this hosting solution - hands on customer service and reliability is relieving!!!

Angelina Belle

It seemed to me that you were going about it properly.
I could not see any obvious reason for the problem. So I just assumed you had made one of those typing errors that is difficult to spot by eye.

If I were attempting the same thing, I would add one menu element at a time and then test it. I would use a tool like firebug or IE developers tools to examine the structure of the nested lists produced in the menu buttons, as well as the associated CSS.

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

colby2152

Quote from: AngelinaBelle on March 22, 2011, 06:36:54 AM
It seemed to me that you were going about it properly.
I could not see any obvious reason for the problem. So I just assumed you had made one of those typing errors that is difficult to spot by eye.

If I were attempting the same thing, I would add one menu element at a time and then test it. I would use a tool like firebug or IE developers tools to examine the structure of the nested lists produced in the menu buttons, as well as the associated CSS.

Sounds good... I'll take your advice and post any issues I may have with an individual link.
ProFSL.com - Pro Fantasy Sports Leagues - Advanced fantasy sports leagues, contests, free chances at cash/prizes, and sports discussion.

Need a server? I am happy to advocate this hosting solution - hands on customer service and reliability is relieving!!!

Advertisement: