Convert Gen Cat to be the board Index

Started by concorde7, October 13, 2016, 09:28:07 PM

Previous topic - Next topic

concorde7

I am looking to not have any categories for the boards, just one big forum. Is there a way to do this without doing surgery on the code? I dont even know how to ask or search for this.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

skb

I think he wants one category without showing the category as header.
Why don't you name the single category as "List of Topics" or "Topics on the Forum" etc.

SMF 2.1.4 / TP 2.2.2

Antes


Arantor

It requires more than just template changes; it requires changes to several key parts of SMF to make happen.

Might be that if just a single board is required, a forum better designed for such a minimalist layout is possibly the better choice?

concorde7

Can i just rename the board to index.php? or will that break the whole thing?

And, do you have a suggestion for a minimalist forum, as you described? Am i allowed to ask? PM me if not.

Illori

yes that would break everything. SMF requires index.php to be in place to function correctly.

Antechinus

If I understand correctly, what the OP is basically asking for is for the current message index to become the forum's main page.

Is this what is actually wanted?

If that is the desired result, there are ways of doing it. I can even think of one possible way of doing it without hacking masses of code: simply hide some elements of the linktree, and change some url's in a few places, so that you're effectively always navigating from MessageIndex downwards.

Arantor

Quote from: Antechinus on October 15, 2016, 10:39:32 PM
If I understand correctly, what the OP is basically asking for is for the current message index to become the forum's main page.

Is this what is actually wanted?

If that is the desired result, there are ways of doing it. I can even think of one possible way of doing it without hacking masses of code: simply hide some elements of the linktree, and change some url's in a few places, so that you're effectively always navigating from MessageIndex downwards.

That is what is desired, treat the boardindex as board=1... it's doable but it requires a lot of futzing around to make everything behave as expected. The actual top level futzing is quite straightforward and about 4 lines in BoardIndex.php, but it's fixing everything else afterwards like how it breaks SEO and a bunch of other side bits in SMF.

Antechinus

I was thinking of not touching BoardIndex.php, but just not calling it in the browser. IOW, change the templating (and a few links in Sources) so that you are only seeing MessageIndex.template.php and templates below it. So you'd change the basic ...index.php URL for the logo (for example) to ...index.php?board=1, and ditto for the home link in the main menu. Use CSS to hide the first couple of elements in the linktree, so the first one you see is the board itself.

A bit of messing around, but not an awful lot, and AFAICT it shouldn't break anything.

Arantor

Other than the small detail of actual loading the relevant data, the login and logout workflows dumping you at that page and that still breaking your SEO afterwards.

Antechinus

Hmm. Might be missing something, but I'm not seeing it. The url for any board or topic would still be the same as with the default setup, so how is SEO going to be broken?

Ditto for loading the data. You're using all the same stuff you'd usually use.

Login and logout just require a minor templating edit to the action for those forms.

Arantor

Because now you have a penalty for the default landing page (index.php) being the same as board=1 and you positively do not want to change the form actions because they'll stop working if you do, you need to change the redirects on completion.

I have done this before. I think I even documented it, because there are far more edge cases than you can just "fix" with light template edits.

Antechinus

Quote from: Arantor on October 17, 2016, 07:30:03 AM
Because now you have a penalty for the default landing page (index.php) being the same as board=1

Nope, index.php would still be index.php and index.php?board=1 would still be index.php?board=1, so both would still have the same url's as default.


Quoteand you positively do not want to change the form actions because they'll stop working if you do, you need to change the redirects on completion.

Well it's been a while since I did it, but I've done it before. Can't remember the details but it was pretty simple. Did it with TP ages ago, to stop it redirecting to index.php on login and send it to the board index instead. Wasn't hard to do, so the same should work with default login and logout.

Arantor

That's the point, he wants to replace index.php on its own with index.php?board=1 so that you'd never know there was anything beyond that board.

Antechinus

Yeah if you wanted to turn board=1 into index.php that would require major code rejigging all over the place. What I'm saying is if he just wants the functional effect, he could get that without much in the way of recoding by simply changing the navigation and a couple of other bits. IOW, a simple workaround that would be good enough for most people most of the time.

nend

I knew I posted a reply to something similiar to this.

http://www.simplemachines.org/community/index.php?topic=548221.msg3888471#msg3888471

If you create a main board and put the rest of boards as children this should work with a few edits.

Antechinus


Advertisement: