News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Linktree - Remove the Category part

Started by Burke ♞ Knight, September 15, 2014, 09:58:14 AM

Previous topic - Next topic

Burke ♞ Knight

Okay, I am working on a site, that will use a completely different way of showing the board index.
Now, I need to remove the category part from the linktree.
Yet, I have no idea where to do that.
Example below. I'd like to remove the red part from linktree.

Simple Machines Community Forum » Customizing SMF » SMF Coding Discussion

Arantor

The principle way to deal with it is in Load.php:
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#c' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),
array_reverse($board_info['parent_boards']),
array(array(
'url' => $scripturl . '?board=' . $board . '.0',
'name' => $board_info['name']
))
);


becoming:
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array_reverse($board_info['parent_boards']),
array(array(
'url' => $scripturl . '?board=' . $board . '.0',
'name' => $board_info['name']
))
);


There's a whole bunch of other places where links to categories get generated however...

Burke ♞ Knight

That worked perfectly, my friend. :)
I know one area you mean, the Jump-to box, which I also removed.

Any other areas I'd need to worry about?

Arantor

If you're planning on ditching categories, you'll need to look up every instance of #c in the source.

Burke ♞ Knight

I'm mainly just ditching the main board index.
Using the portal, and making buttons for the boards, instead of typical board index.

kat

Just a question...

If they don't want categories, why not just create one category and have all the boards in that?

Saves an awful lot off fukkinAbaht...

Burke ♞ Knight

It is not categories that is not wanted...
It is getting to default board index that is not wanted. ;)


Want the button index to be the board index.

kat

How... er... odd.

Each to their own, though, ay? :)

Burke ♞ Knight

Well, on this site, would like to have it as different as can be from my usual projects.
So, like I did on main portal page of my main site, going to have blocks that are the categories, with the boards being icons with text in them, only. No descriptions, no Topics/Posts, etc.

So when they leave a board, they go back to the portal.

kat

That would annoy me, to be honest. As I said, though, each to their own. :)

Burke ♞ Knight

Would only annoy those who know the normal way of SMF forums. ;)

This is a site that is made for people that really don't do much on the insides of the forum, they just click to go to the board they want, and post.

Arantor

Or indeed anyone who's ever used any of the other similar-era forum software which all function basically the same way.

Burke ♞ Knight

Ahhh... But, all I'm doing, is basically making a new look for board index, without having to re-code BoardIndex.template. :)

Advertisement: