How do I get rid of the "Home" button ? (imgs included)

Started by capdaflag, October 19, 2020, 06:01:00 PM

Previous topic - Next topic

capdaflag


I'm trying to find out how to get rid of the "Home" button but the only place I see to edit it is below:

If I remove/comment out that "echo" area, the entire menu (Home,Seek, Members, Logout) disappears. It seems to be intertwined. How can I just removed the Home icon+button ?

Arantor

Your image looks like you tried to join both menus together, is that what happened?

The home button pretty much has to exist though, because anything not explicitly given a menu item will assume the home button is present and highlight that...
Holder of controversial views, all of which my own.


capdaflag

I just moved the echo toward the other menu so they can be next to eachother.

Everything works perfect but the Home button is there. I wanted to put a link between the Seek and Members button but I can't find out where to remove/add since I think the code has this stuff in a variable somewhere.

On old forums, I could just edit the <a href=""> tags and add/edit links easily. But I can't find out how to do it here since the code is a little more complicated.

Arantor

It's *really* not designed to be used this way and will be a complete mess on mobile too. It has this stuff in a *whole bunch of variables* because the home button is used as a fallback for other menu buttons, like I said.

I should point out it was also very, very deliberately done to separate user stuff from site stuff, as is now common on a lot of sites.

Can it be changed? Of course but it's actually a significant reworking to do properly without causing a ton of errors in your error log. So, again, if you remove home button, what is the default button going to be that all the other things fall back to? (Because the code demands one)
Holder of controversial views, all of which my own.


capdaflag

A significant reworking ? You can't be serious. The logo button is already a link to the index page, no need for another one. I used to do this easily on Invision boards and Vbulletin but for some reason, I can't find out how to easily remove the Home button lol

Arantor

Again, you're failing to understand my point. If you remove the Home button, half the forum will give you errors because they'll try to select the Home button! Like any page actually in the forum itself, boards, topics, unread replies, unread topics. These all try to use the Home button.

So if you're going to not have the home button at all, a fallback must be defined.

And that's before we get into the mess that will now be the mobile layout with the mobile menu jammed into who knows what because it's not designed to be inserted there.

But don't take my word for it. I'm only (literally) the guy who moved the 'user centric stuff' into its own menu at the top to leave the 'site centric stuff' lower down. The guy whose work you are currently trying to undo.

Also I think you'll find trying to do this in current IPS is quite a bit different, for exactly the same sort of reason - they're not just links now, they're managed in a menu system with things pointing to them. The world moved on from the kind of tweaks you're talking about.
Holder of controversial views, all of which my own.


capdaflag

I'm not failing to understand, you're failing to make yourself clear. Huge difference. It also won't make mobile a mess. It's obvious this isn't going anywhere and you're beyond unhelpful. lol no offense dude

Arantor

Did you actually try it on mobile with the responsive menu with JavaScript? SMF 2.1 has a responsive theme where the menus are semi-modal. Just moving things around will make it behave oddly.

I'm not being 'beyond unhelpful', I'm trying to stop you causing your die to have errors nearly every single page (which will guaranteed upset your host if you're not on a VPS or better) if your forum gets busy but you're making it hard for me to actually help you...
Holder of controversial views, all of which my own.


capdaflag

Dude, ALL of the forums I've had have had NO performance issues whatsoever even with a massive audience. It required no "significant reworking" of code and I highly doubt the world has moved from simplicity to complexity; if anything, it's been the reverse. You need to be specific; what I am doing is NOT a significant reworking of anything lol and nothing SO FAR has behaved oddly. Your speculation is unfounded and you're taking this in a direction is does not need to go.

Let me get this straight, seriously.... YOU ARE telling me that I cannot REMOVE the little Home ICON at the top because that will require a "SIGNIFICANT REWORKING" of code ? I am referring to JUST THE BUTTON, not the functionality of the button.

Arantor

Several things *expect the button to be there*. If you remove it, they will break.

You could just straight up remove it from the definition in setupMenuContext() in Subs.php but then any page that isn't Search/Messages/Profile will spit an error into the error log because it can't find the home button. So you need a fallback for it. Like I've been saying this entire time. The menu is not geared to cope with no menu item selected.

Meanwhile, moving the menu up there was tried in RC1 and RC2 and it ended up causing the JavaScript to behave weirdly, dragging the menu bar with into the responsive layout on mobile which could also force the search menu to appear and block access to things. Not to mention that depending on exactly where in the div structure you placed it, the popup menu that appears on mobile may also try to drag with it the profile/messages/alerts buttons with all their respective events which might actually mean the menu can't be closed properly on mobile.

But this is mostly a guess; I haven't tried to load it with the responsive layout on your exact setup... but it behaved badly when tried in previous versions and I see no reason why the changes from RC2 to RC3 would have changed this. You'd probably be better removing the popups from the top, reinserting them directly into setupMenuContext() (which would strip out the onclick behaviours and prevent them being popup menus so they wouldn't interfere with mobile) and then transplanting the menu. Still wouldn't solve your home button issue but it'd probably do a fair bet of not breaking the mobile menu.

Unless you don't care about mobile users at all, in which case go right ahead...
Holder of controversial views, all of which my own.


capdaflag

Subs.php was the answer. Edited a few things. No errors. THANK YOU !

Arantor

The real question was whether you fudged the show value or you simply removed it and didn't fix $current_action.
Holder of controversial views, all of which my own.


capdaflag

All I did was comment out the array. I'm not getting any errors at all anywhere, PC or mobile.

Arantor

Huh. This would previously have issued an error every page that wasn't explicitly tied to a menu item in RC2 (you're really not the first to have tried this or run into related issues with custom buttons), but looks like fixed in RC3 (for unrelated bugs). That's good to know, actually. (I don't remember *every* change between versions.)
Holder of controversial views, all of which my own.


capdaflag

I'm testing out everything on the RC version right now on my localhost just so I know what to edit before I download the stable version to upload to my actual webhost. Thanks again.

Arantor

Um... you know that there isn't a stable version of 2.1, right?

You can either have the stable 2.0 series, or the not yet finished 2.1... and the menu is quite a bit different in 2.0...
Holder of controversial views, all of which my own.


capdaflag

I never expect 2 versions to be the same and yes, I was referring to stable 2.0 series. I just wanted to get a GENERAL IDEA of what to edit that way I know where things are. That's all.

Arantor

Then I'd suggest using 2.0 on your local :) No point learning how to do things twice, especially things that will be quite a bit different.

I'm just trying to prevent you wasting more time than necessary but you seem determined, so best of luck to you.
Holder of controversial views, all of which my own.


capdaflag

I've compared both specifically for the lines that I'm editing. Virtually no difference. I'm sure I can handle it from here. I just needed to know WHERE to edit (or comment out rather) the piece of code for the home icon. It's all done ! Thanks !

Mick.

I thought that editing the button from 'true' to 'false' in subs.php, would hide such buttons. You know, like ridding the Help button in 2.0

Advertisement: